octane 0.8.0 → 0.9.0
raw patch · 6 files changed
+541/−433 lines, 6 files
Files
- library/Octane/Data.hs +472/−356
- library/Octane/FullReplay.hs +43/−13
- library/Octane/Parser.hs +10/−34
- library/Octane/Parser/Garage.hs +14/−28
- octane.cabal +1/−1
- package.yaml +1/−1
library/Octane/Data.hs view
@@ -425,30 +425,29 @@ -- * Garage --- TODO-todo :: Int-todo = -1- -- | A one-to-one mapping between body IDs and their names. bodies :: Bimap.Bimap Int Text.Text bodies =- [ ("Backfire", 21)- , ("Batmobile", 803)- , ("Breakout", 22)- , ("DeLorean Time Machine", 597)- , ("Dominus", 403)- , ("Gizmo", 26)- , ("Grog", 607)- , ("Hotshot", 29)- , ("Merc", 30)+ [ ("Armadillo", 625) -- GearsCar+ , ("Backfire", 21)+ , ("Batmobile", 803) -- Darkcar+ , ("Breakout", 22) -- Force+ , ("DeLorean Time Machine", 597) -- GreyCar+ , ("Dominus", 403) -- MuscleCar+ , ("Gizmo", 26) -- Spark+ , ("Grog", 607) -- WastelandTruck+ , ("Hogsticker", 723) -- Warthog+ , ("Hotshot", 29) -- Torment+ , ("Merc", 30) -- Vanquish , ("Octane", 23)- , ("Paladin", 24)- , ("Ripper", 600)- , ("Road Hog", 25)+ , ("Paladin", 24) -- Orion+ , ("Ripper", 600) -- Interceptor+ , ("Road Hog", 25) -- Rhino , ("Scarab", 404)- , ("Takumi", 402)+ , ("Sweet Tooth", 27)+ , ("Takumi", 402) -- Import , ("Venom", 31)- , ("X-Devil", 28)+ , ("X-Devil", 28) -- Torch , ("Zippy", 523) ] & map (\ (v, k) -> (k, Text.pack v)) & Bimap.fromList @@ -475,10 +474,10 @@ ]) , ( "Dominus", [ ("Flames", 504)- , ("Scorpions", 506)+ , ("Scorpions", 506) -- Skorpion , ("Skulls", 507) , ("Stripes", 508)- , ("Tats", 509)+ , ("Tats", 509) -- Tribal , ("Wings", 510) ]) , ( "Gizmo",@@ -491,9 +490,9 @@ , ("Wings", 329) ]) , ( "Grog",- [ ("Bomber", 693)+ [ ("Bomber", 674) , ("Cyclops", 694)- , ("Lepus", 675)+ , ("Lepus", 675) -- Bunny , ("Stripes", 687) , ("Tagged", 695) , ("Tribal", 696)@@ -535,10 +534,10 @@ , ("Wings", 315) ]) , ( "Ripper",- [ ("Bomber", 701)+ [ ("Bomber", 701) -- Sandgirl , ("Flames", 669)- , ("Ockie", 700)- , ("Shot Fox", 670)+ , ("Ockie", 700) -- Getkraken+ , ("Shot Fox", 670) -- Kitsune , ("Spikes", 671) , ("Tribal", 672) ])@@ -548,23 +547,23 @@ , ("Skulls", 318) , ("Stars", 319) , ("Stripes", 320)- , ("Tech", 321)+ , ("Tech", 321) -- TechSplat , ("Wings", 322) ]) , ( "Scarab",- [ ("Bomani", 585)- , ("Derby Girl", 592)+ [ ("Bomani", 585) -- Clouds+ , ("Derby Girl", 592) -- RollerDerby , ("Flames", 591) , ("Hearts", 586) , ("Tiger", 587) , ("Tribal", 588) ]) , ( "Takumi",- [ ("Chaser", 503)- , ("Copycat", 497)- , ("Crazy-8", 502)- , ("Gaki", 499)- , ("Reiko", 498)+ [ ("Chaser", 503) -- Wisp+ , ("Copycat", 497) -- Gato+ , ("Crazy-8", 502) -- Technologic+ , ("Gaki", 499) -- Ohai+ , ("Reiko", 498) -- Nitrous , ("Stripes", 501) ]) , ( "Venom",@@ -586,8 +585,8 @@ , ("Wings", 336) ]) , ( "Zippy",- [ ("Caboodle", 589)- , ("Callous", 590)+ [ ("Caboodle", 589) -- HeckTec+ , ("Callous", 590) -- MeanMachine , ("Flames", 583) , ("Hearts", 581) , ("Leopard", 584)@@ -604,63 +603,69 @@ -- | A one-to-one mapping between wheels IDs and their names. wheels :: Bimap.Bimap Int Text.Text wheels =- [ ("Alchemist", 374)- , ("Almas", 364)- , ("Batmobile", 874)- , ("Bender", 369)+ [ ("(Alpha Reward) Goldstone", 358) -- AlphaRim+ , ("Alchemist", 374) -- Revolution+ , ("Almas", 364) -- Crypt+ , ("Armadillo", 618)+ , ("Batmobile", 874) -- Darkcar+ , ("Bender", 360) -- Ballistic , ("Carriage", 549)- , ("Cristiano", 386)- , ("DeLorean Time Machine", 609)- , ("Dieci", 363)- , ("Falco", 382)- , ("Foreman", 372)- , ("Grog", 613)- , ("Invader", 380)+ , ("Cog", 716) -- TODO: What is this called in game?+ , ("Cristiano", 386) -- SoccerBall+ , ("DeLorean Time Machine", 609) -- GreyCar+ , ("Dieci", 363) -- Caliber+ , ("Falco", 382) -- Vulcan+ , ("Foreman", 372) -- OffRoad+ , ("Grog", 613) -- WastelandTruck+ , ("Hogsticker", 719) -- Warthog+ , ("Invader", 380) -- Triad , ("Lowrider", 369)- , ("Lucci", 361)- , ("Mountaineer", 375)- , ("Neptune", 370)- , ("Octavian", 379)- , ("OEM", 376)- , ("Rat Rod", 366)- , ("Ripper", 690)- , ("Scarab", 540)- , ("Servergate", 519)- , ("Spinner", 388)- , ("Spyder", 371)- , ("Stallion", 365)- , ("Stern", 368)- , ("Sunburt", 383)- , ("Tempest", 377)- , ("Tomahawk", 362)- , ("Trahere", 367)- , ("Tunica", 359)- , ("Veloce", 373)+ , ("Lucci", 361) -- Bling+ , ("Mountaineer", 375) -- SnowTire+ , ("Neptune", 370) -- Mob+ , ("Octavian", 379) -- Tarantula+ , ("OEM", 376) -- Star+ , ("Rat Rod", 366) -- Dynamo+ , ("Ripper", 690) -- Spiked+ , ("Scarab", 540) -- Scarab+ , ("Servergate", 519) -- SkullxBones+ , ("Spinner", 388) -- Spinner+ , ("Spyder", 371) -- Ninja+ , ("Stallion", 365) -- DeepDish+ , ("Stern", 368) -- Hydra+ , ("Sunburt", 383) -- Wynd+ , ("Sweet Tooth", 378)+ , ("Tempest", 377) -- Storm+ , ("Tomahawk", 362) -- Brink+ , ("Trahere", 367) -- Forge+ , ("Tunica", 359) -- Atlantis+ , ("Veloce", 373) -- Pedigree , ("Vortex", 381)- , ("Zippy", 518)+ , ("Zippy", 518) -- SingleSpoke ] & map (\ (v, k) -> (k, Text.pack v)) & Bimap.fromList -- | A one-to-one mapping between rocket trail IDs and their names. rocketTrails :: Bimap.Bimap Int Text.Text rocketTrails =- [ ("Accelerato", 524)- , ("Batmobile", 868)+ [ ("(Alpha Reward) Gold Rush", 32) -- AlphaReward+ , ("Accelerato", 524) -- MusicalNotes+ , ("Batmobile", 868) -- DarkCar , ("Battle-Stars", 545) , ("Bubbles", 33) , ("Burnout", 387) , ("Candy Corn", 578) , ("Confetti", 34)- , ("Datastream", 35)- , ("Flamethrower", 36)+ , ("Datastream", 35) -- Digital , ("Flamethrower Blue", 37) , ("Flamethrower Green", 38) , ("Flamethrower Pink", 39) , ("Flamethrower Purple", 40) , ("Flamethrower Red", 41)+ , ("Flamethrower", 36) , ("Flowers", 42) , ("Grass", 43)- , ("Hydro", 69)- , ("Ion Blue", 45)+ , ("Hydro", 69) -- Water+ , ("Ion Blue", 45) -- LightTrail , ("Ion Green", 46) , ("Ion Pink", 47) , ("Ion Purple", 48)@@ -669,13 +674,13 @@ , ("Money", 51) , ("Nitrous", 384) , ("Nuts & Bolts", 544)- , ("OutaTime", 626)+ , ("OutaTime", 626) -- GreyCar , ("Plasma", 52) , ("Portal - Conversion Gel", 651) , ("Portal - Propulsion Gel", 652) , ("Portal - Reuplsion Gel", 653) , ("Rainbow", 59)- , ("Sacred", 44)+ , ("Sacred", 44) -- HolyLight , ("Sandstorm", 664) , ("Slime", 60) , ("Snowflakes", 61)@@ -685,54 +690,57 @@ , ("Standard Purple", 66) , ("Standard Red", 63) , ("Standard Yellow", 67)- , ("Thermal", 53)+ , ("Sweet Tooth", 68) , ("Thermal Blue", 54) , ("Thermal Green", 55) , ("Thermal Pink", 56) , ("Thermal Purple", 57) , ("Thermal Yellow", 58)- , ("Xmas", 635)+ , ("Thermal", 53) -- Propulsion+ , ("Xmas", 635) -- Presents ] & map (\ (v, k) -> (k, Text.pack v)) & Bimap.fromList -- | A one-to-one mapping between antenna IDs and their names. antennas :: Bimap.Bimap Int Text.Text antennas = [ ("None", 0)+ , ("(Beta Reward) Gold Nugget", 6) , ("8-Ball", 1) , ("Alien", 753) , ("Balloon Dog", 752) , ("Batman", 804) , ("Blue Chequered Flag", 284) , ("Bomb Pole", 614)- , ("Calavera", 574)+ , ("Calavera", 574) -- DOTDSkull , ("Camo Flag", 285) , ("Candle", 757) , ("Candy Cane", 649) , ("Chick Magnet", 392) , ("Cupcake", 393) , ("Dave's Bread", 391)- , ("deadmau5", 781)+ , ("deadmau5", 781) -- Mau5 , ("Disco Ball", 800) , ("Disconnect", 394) , ("Dollar Sign", 3) , ("Donut", 395) , ("Foam Finger", 398)- , ("Fuzzy Brute", 593)- , ("Fuzzy Vamp", 595)+ , ("Fuzzy Brute", 593) -- FurballFrakenstein+ , ("Fuzzy Vamp", 595) -- FurballVampire , ("Genie Lamp", 798) , ("Gingerbread Man", 5) , ("Heart", 7)- , ("Holiday Gift", 650)+ , ("Holiday Gift", 650) -- ChristmasGift , ("Horseshoe", 8) , ("Hula Girl", 762)- , ("Jolly Roger", 217)+ , ("Jolly Roger", 217) -- Pirate , ("Lightning Bolt", 9) , ("Moai", 522) , ("Parrot", 750) , ("Peace", 11) , ("Piñata", 400)- , ("Planetoid", 12)- , ("Radioactive", 615)+ , ("Planetoid", 12) -- Saturn+ , ("Radioactive", 615) -- RadiationSymbol+ , ("Rainbow", 490) , ("Reddit Snoo", 629) , ("Retro Ball - Urban", 575) , ("Retro Ball - Utopia", 576)@@ -740,7 +748,7 @@ , ("Rocket", 755) , ("Rose", 785) , ("Rubber Duckie", 779)- , ("Safety Flag", 286)+ , ("Safety Flag", 286) -- OrangeNylon , ("Skull", 13) , ("Smiley", 14) , ("Snowman", 15)@@ -748,22 +756,32 @@ , ("Star", 17) , ("Sunflower", 786) , ("Superman", 805)+ , ("Sweet Tooth", 18) , ("Tennis Ball", 19)- , ("The Game Awards - Statue", 655)+ , ("The Game Awards - Statue", 655) -- VGA_Statue , ("UFO", 20) , ("Venus Flytrap", 788) , ("Waffle", 401) , ("White Flag", 491) , ("Wonder Woman", 806)+ -- TODO: What are these called in game?+ , ("Community", 527)+ , ("ESL_Champ", 537)+ , ("Eyeball", 396)+ , ("Moderator", 528)+ , ("PanicButton", 829)+ , ("Psyonix", 287)+ , ("TourneyChamp", 539)+ , ("Translator", 530) -- Community Flags , ("9GAG", 799) , ("AbleGamers", 814) , ("Achievement Hunter", 610)- , ("Angry Army", 548)+ , ("Angry Army", 548) -- AgryJoe , ("Anne Munition", 531) , ("Day[9]TV", 654) , ("Destructoid", 724)- , ("EMD1", 532)+ , ("EMD1", 532) -- EatMyDiction , ("ESL", 536) , ("Funhaus", 611) , ("Gamespot", 725)@@ -792,231 +810,231 @@ , ("Team Fat", 220) , ("Team PowA", 515) , ("The Attack", 535)- , ("The Game Awards - Logo", 693)+ , ("The Game Awards - Logo", 693) -- VGX , ("Twitch", 221) , ("YouTube Gaming", 516) -- Country Flags , ("Afghanistan", 407)- , ("Albania", todo)- , ("Algeria", todo)- , ("American Samoa", todo)- , ("Andorra", todo)- , ("Angola", todo)- , ("Anguilla", todo)- , ("Antigua & Barbuda", todo)- , ("Argentina", todo)- , ("Armenia", todo)- , ("Aruba", todo)- , ("Australia", todo)- , ("Austria", todo)- , ("Azerbaijan", todo)- , ("Bahamas", todo)- , ("Bahrain", todo)- , ("Bangladesh", todo)- , ("Barbados", todo)- , ("Belarus", todo)- , ("Belgium", todo)- , ("Belize", todo)- , ("Benin", todo)- , ("Bermuda", todo)- , ("Bhutan", todo)- , ("Bolivia", todo)- , ("Bosnia and Herzegovina", todo)- , ("Botswana", todo)- , ("Brazil", todo)- , ("British Virgin Islands", todo)- , ("Bulgaria", todo)- , ("Burkina Faso", todo)- , ("Burma", todo)- , ("Burundi", todo)- , ("Cambodia", todo)- , ("Cameroon", todo)- , ("Canada", todo)- , ("Cape Verde Islands", todo)- , ("Cayman Islands", todo)- , ("Central African Republic", todo)- , ("Chad", todo)- , ("Chile", todo)- , ("China", todo)- , ("Chinese Taipei", todo)- , ("Colombia", todo)- , ("Comoros", todo)- , ("Congo", todo)- , ("Congo DR", todo)- , ("Cook Islands", todo)- , ("Costa Rica", todo)- , ("Croatia", todo)- , ("Cuba", todo)- , ("Curacao", todo)- , ("Cyprus", todo)- , ("Czech Republic", todo)- , ("Côte d'Ivoire", todo)- , ("Denmark", todo)- , ("Djibouti", todo)- , ("Dominica", todo)- , ("Dominican Republic", todo)- , ("East Timor", todo)- , ("Ecuador", todo)- , ("Egypt", todo)- , ("El Salvador", todo)- , ("England", todo)- , ("Equatorial Guinea", todo)- , ("Eritrea", todo)- , ("Estonia", todo)- , ("Ethiopia", todo)- , ("Falkland Islands", todo)- , ("Faroe Islands", todo)- , ("Fiji", todo)- , ("Finland", todo)- , ("France", todo)- , ("Gabon", todo)- , ("Gambia", todo)- , ("Georgia", todo)- , ("Germany", todo)- , ("Ghana", todo)- , ("Gibraltar", todo)- , ("Greece", todo)- , ("Grenada", todo)- , ("Guam", todo)- , ("Guatemala", todo)- , ("Guinea", todo)- , ("Guinea Bissau", todo)- , ("Guyana", todo)- , ("Haiti", todo)- , ("Honduras", todo)- , ("Hong Kong", todo)- , ("Hungary", todo)- , ("Iceland", todo)- , ("India", todo)- , ("Indonesia", todo)- , ("Iran", todo)- , ("Iraq", todo)- , ("Ireland", todo)- , ("Isle Of Man", todo)- , ("Israel", todo)- , ("Italy", todo)- , ("Jamaica", todo)- , ("Japan", todo)- , ("Jordan", todo)- , ("Kazakhstan", todo)- , ("Kenya", todo)- , ("Kiribati", todo)- , ("Kosovo", todo)- , ("Kuwait", todo)- , ("Kyrgyzstan", todo)- , ("Laos", todo)- , ("Latvia", todo)- , ("Lebanon", todo)- , ("Lesotho", todo)- , ("Liberia", todo)- , ("Libya", todo)- , ("Lithuania", todo)- , ("Luxembourg", todo)- , ("Macau", todo)- , ("Macedonia", todo)- , ("Madagascar", todo)- , ("Malawi", todo)- , ("Malaysia", todo)- , ("Maldives", todo)- , ("Mali", todo)- , ("Malta", todo)- , ("Marshall Islands", todo)- , ("Mauritania", todo)- , ("Mauritius", todo)- , ("Mexico", todo)- , ("Micronesia", todo)- , ("Moldova", todo)- , ("Mongolia", todo)- , ("Montenegro", todo)- , ("Montserrat", todo)- , ("Morocco", todo)- , ("Mozambique", todo)- , ("Namibia", todo)- , ("Nepal", todo)- , ("Netherlands", todo)- , ("New Caledonia", todo)- , ("New Zealand", todo)- , ("Nicaragua", todo)- , ("Nigeria", todo)- , ("North Korea", todo)- , ("North Mariana Islands", todo)- , ("Northern Ireland", todo)- , ("Norway", todo)- , ("Oman", todo)- , ("Palestine", todo)- , ("Palau", todo)- , ("Palestine", todo)- , ("Panama", todo)- , ("Papua New Guinea", todo)- , ("Paraguay", todo)- , ("Peru", todo)- , ("Philippines", todo)- , ("Poland", todo)- , ("Portugal", todo)- , ("Puerto Rico", todo)- , ("Puntland", todo)- , ("Qatar", todo)- , ("Republic of Niger", todo)- , ("Romania", todo)- , ("Russia", todo)- , ("Rwanda", todo)- , ("Réunion", todo)- , ("Saint Kitts & Nevis", todo)- , ("Saint Lucia", todo)- , ("Saint Vincent", todo)- , ("Samoa", todo)- , ("San Marino", todo)- , ("Sao Tome", todo)- , ("Saudi Arabia", todo)- , ("Scotland", todo)- , ("Senegal", todo)- , ("Serbia", todo)- , ("Setchelles", todo)- , ("Sierra Leone", todo)- , ("Singapore", todo)- , ("Slovakia", todo)- , ("Slovenia", todo)- , ("Solomon Islands", todo)- , ("Somalia", todo)- , ("Somaliland", todo)- , ("South Africa", todo)- , ("South Korea", todo)- , ("South Sudan", todo)- , ("Spain", todo)- , ("Sri Lanka", todo)- , ("Sudan", todo)- , ("Suriname", todo)- , ("Swaziland", todo)- , ("Sweden", todo)- , ("Switzerland", todo)- , ("Syria", todo)- , ("Tahiti", todo)- , ("Tajikistan", todo)- , ("Tanzania", todo)- , ("Thailand", todo)- , ("Togo", todo)- , ("Tonga", todo)- , ("Trinidad and Tobago", todo)- , ("Tunisia", todo)- , ("Turkey", todo)- , ("Turkmenistan", todo)- , ("Turks & Caicos", todo)- , ("Uganda", todo)- , ("Ukraine", todo)- , ("United Arab Emirates", todo)- , ("United Kingdom", todo)- , ("United States", todo)- , ("Uruguay", todo)- , ("US Virgin Islands", todo)- , ("Uzbekistan", todo)- , ("Vanuatu", todo)- , ("Vatican City", todo)- , ("Venezuela", todo)- , ("Vietnam", todo)- , ("Wales", todo)- , ("Western Sahara", todo)- , ("Yemen", todo)- , ("Zambia", todo)+ , ("Albania", 408)+ , ("Algeria", 124)+ , ("American Samoa", 409)+ , ("Andorra", 830)+ , ("Angola", 410)+ , ("Anguilla", 831)+ , ("Antigua & Barbuda", 832)+ , ("Argentina", 125)+ , ("Armenia", 411)+ , ("Aruba", 833)+ , ("Australia", 126)+ , ("Austria", 127)+ , ("Azerbaijan", 412)+ , ("Bahamas", 834)+ , ("Bahrain", 550)+ , ("Bangladesh", 413)+ , ("Barbados", 835)+ , ("Belarus", 414)+ , ("Belgium", 128)+ , ("Belize", 551)+ , ("Benin", 415)+ , ("Bermuda", 836)+ , ("Bhutan", 552)+ , ("Bolivia", 416)+ , ("Bosnia and Herzegovina", 129)+ , ("Botswana", 553)+ , ("Brazil", 130)+ , ("British Virgin Islands", 837)+ , ("Bulgaria", 131)+ , ("Burkina Faso", 417)+ , ("Burma", 418)+ , ("Burundi", 419)+ , ("Cambodia", 420)+ , ("Cameroon", 132)+ , ("Canada", 133)+ , ("Cape Verde Islands", 134)+ , ("Cayman Islands", 838)+ , ("Central African Republic", 540)+ , ("Chad", 422)+ , ("Chile", 135)+ , ("China", 136)+ , ("Chinese Taipei", 198)+ , ("Colombia", 137)+ , ("Comoros", 554)+ , ("Congo", 138)+ , ("Congo DR", 423)+ , ("Cook Islands", 839)+ , ("Costa Rica", 139)+ , ("Croatia", 140)+ , ("Cuba", 424)+ , ("Curacao", 840)+ , ("Cyprus", 141)+ , ("Czech Republic", 142)+ , ("Côte d'Ivoire", 165)+ , ("Denmark", 143)+ , ("Djibouti", 555)+ , ("Dominica", 841)+ , ("Dominican Republic", 425)+ , ("East Timor", 556)+ , ("Ecuador", 144)+ , ("Egypt", 426)+ , ("El Salvador", 145)+ , ("England", 146)+ , ("Equatorial Guinea", 147)+ , ("Eritrea", 427)+ , ("Estonia", 428)+ , ("Ethiopia", 429)+ , ("Falkland Islands", 842)+ , ("Faroe Islands", 843)+ , ("Fiji", 557)+ , ("Finland", 148)+ , ("France", 149)+ , ("Gabon", 430)+ , ("Gambia", 558)+ , ("Georgia", 431)+ , ("Germany", 150)+ , ("Ghana", 151)+ , ("Gibraltar", 844)+ , ("Greece", 152)+ , ("Grenada", 863)+ , ("Guam", 432)+ , ("Guatemala", 153)+ , ("Guinea", 154)+ , ("Guinea Bissau", 559)+ , ("Guyana", 560)+ , ("Haiti", 433)+ , ("Honduras", 155)+ , ("Hong Kong", 156)+ , ("Hungary", 157)+ , ("Iceland", 158)+ , ("India", 159)+ , ("Indonesia", 160)+ , ("Iran", 161)+ , ("Iraq", 434)+ , ("Ireland", 162)+ , ("Isle Of Man", 845)+ , ("Israel", 163)+ , ("Italy", 164)+ , ("Jamaica", 166)+ , ("Japan", 167)+ , ("Jordan", 435)+ , ("Kazakhstan", 436)+ , ("Kenya", 168)+ , ("Kiribati", 846)+ , ("Kosovo", 561)+ , ("Kuwait", 437)+ , ("Kyrgyzstan", 438)+ , ("Laos", 439)+ , ("Latvia", 440)+ , ("Lebanon", 441)+ , ("Lesotho", 562)+ , ("Liberia", 442)+ , ("Libya", 443)+ , ("Lithuania", 444)+ , ("Luxembourg", 169)+ , ("Macau", 563)+ , ("Macedonia", 445)+ , ("Madagascar", 446)+ , ("Malawi", 447)+ , ("Malaysia", 170)+ , ("Maldives", 847)+ , ("Mali", 448)+ , ("Malta", 171)+ , ("Marshall Islands", 848)+ , ("Mauritania", 449)+ , ("Mauritius", 564)+ , ("Mexico", 172)+ , ("Micronesia", 849)+ , ("Moldova", 450)+ , ("Mongolia", 451)+ , ("Montenegro", 452)+ , ("Montserrat", 864)+ , ("Morocco", 453)+ , ("Mozambique", 454)+ , ("Namibia", 457)+ , ("Nepal", 458)+ , ("Netherlands", 173)+ , ("New Caledonia", 850)+ , ("New Zealand", 174)+ , ("Nicaragua", 175)+ , ("Nigeria", 176)+ , ("North Korea", 460)+ , ("North Mariana Islands", 456)+ , ("Northern Ireland", 177)+ , ("Norway", 178)+ , ("Oman", 461)+ , ("Palestine", 462)+ , ("Palau", 851)+ , ("Palestine", 462)+ , ("Panama", 180)+ , ("Papua New Guinea", 463)+ , ("Paraguay", 464)+ , ("Peru", 181)+ , ("Philippines", 182)+ , ("Poland", 183)+ , ("Portugal", 184)+ , ("Puerto Rico", 465)+ , ("Puntland", 565)+ , ("Qatar", 466)+ , ("Republic of Niger", 459)+ , ("Romania", 185)+ , ("Russia", 186)+ , ("Rwanda", 467)+ , ("Réunion", 566)+ , ("Saint Kitts & Nevis", 852)+ , ("Saint Lucia", 853)+ , ("Saint Vincent", 854)+ , ("Samoa", 855)+ , ("San Marino", 856)+ , ("Sao Tome", 857)+ , ("Saudi Arabia", 468)+ , ("Scotland", 187)+ , ("Senegal", 188)+ , ("Serbia", 189)+ , ("Seychelles", 858)+ , ("Sierra Leone", 469)+ , ("Singapore", 190)+ , ("Slovakia", 191)+ , ("Slovenia", 192)+ , ("Solomon Islands", 567)+ , ("Somalia", 470)+ , ("Somaliland", 568)+ , ("South Africa", 193)+ , ("South Korea", 194)+ , ("South Sudan", 471)+ , ("Spain", 195)+ , ("Sri Lanka", 389)+ , ("Sudan", 472)+ , ("Suriname", 569)+ , ("Swaziland", 570)+ , ("Sweden", 196)+ , ("Switzerland", 197)+ , ("Syria", 473)+ , ("Tahiti", 859)+ , ("Tajikistan", 474)+ , ("Tanzania", 475)+ , ("Thailand", 199)+ , ("Togo", 476)+ , ("Tonga", 730)+ , ("Trinidad and Tobago", 477)+ , ("Tunisia", 200)+ , ("Turkey", 201)+ , ("Turkmenistan", 478)+ , ("Turks & Caicos", 860)+ , ("Uganda", 479)+ , ("Ukraine", 204)+ , ("United Arab Emirates", 202)+ , ("United Kingdom", 203)+ , ("United States", 206)+ , ("Uruguay", 502)+ , ("US Virgin Islands", 480)+ , ("Uzbekistan", 481)+ , ("Vanuatu", 861)+ , ("Vatican City", 862)+ , ("Venezuela", 207)+ , ("Vietnam", 208)+ , ("Wales", 209)+ , ("Western Sahara", 571)+ , ("Yemen", 210)+ , ("Zambia", 482) , ("Zimbabwe", 483) -- NBA Flags , ("NBA", 1263)@@ -1056,36 +1074,36 @@ , ("Chivalry - Agatha Knights", 525) , ("Chivalry - Mason Order", 526) , ("Edge Of Space", 213)- , ("Euro Truck Simulator Rig", 813)+ , ("Euro Truck Simulator Rig", 813) -- ETS2 , ("Fallout - Vault Boy", 673) , ("Fenix Rage", 216) , ("Goat Simulator - G2", 927) , ("Goat Simulator - Goatenna", 867) , ("Oddworld - Abe", 678) , ("Oddworld - Molluck", 679)- , ("Oddworld - Necrum", todo)- , ("Oddworld - RuptureFarms", todo)- , ("Portal - Aperture Laboratories", todo)- , ("Portal - Cake Sticker", todo)- , ("Portal - Companion Cube", todo)- , ("Portal - PotatOS", todo)- , ("Portal - Wheatley", todo)- , ("Shadowgate", todo)- , ("Strike Vector EX", todo)- , ("Unreal", todo)- , ("Unreal Frag Center", todo)- , ("Unreal Tournament", todo)- , ("Unreal Tournament (Classic)", todo)- , ("Unreal Tournament - Blue", todo)- , ("Unreal Tournament - Flak Shell", todo)- , ("Unreal Tournament - Red", todo)- , ("Unreal Tournament 2004", todo)- , ("Warframe", todo)- , ("Warframe - Chroma", todo)- , ("Warframe - Excalibur", todo)- , ("Warframe - Loki", todo)- , ("Witcher Medallion", todo)- , ("Worms W.M.D", todo)+ , ("Oddworld - Necrum", 632)+ , ("Oddworld - RuptureFarms", 633)+ , ("Portal - Aperture Laboratories", 656)+ , ("Portal - Cake Sticker", 657)+ , ("Portal - Companion Cube", 681)+ , ("Portal - PotatOS", 698)+ , ("Portal - Wheatley", 686) -- Portal_PC+ , ("Shadowgate", 218)+ , ("Strike Vector EX", 219)+ , ("Unreal", 222)+ , ("Unreal Frag Center", 485)+ , ("Unreal Tournament", 489) -- UTBlue+ , ("Unreal Tournament (Classic)", 487) -- UT+ , ("Unreal Tournament - Blue", 484) -- Epic_BlueFlag+ , ("Unreal Tournament - Flak Shell", 397)+ , ("Unreal Tournament - Red", 486) -- Epic_RedFlag+ , ("Unreal Tournament 2004", 488)+ , ("Warframe", 223)+ , ("Warframe - Chroma", 682)+ , ("Warframe - Excalibur", 684)+ , ("Warframe - Loki", 683)+ , ("Witcher Medallion", 749)+ , ("Worms W.M.D", 1008) , ("Worms W.M.D. Grenade", 1000) ] & map (\ (v, k) -> (k, Text.pack v)) & Bimap.fromList @@ -1093,22 +1111,23 @@ toppers :: Bimap.Bimap Int Text.Text toppers = [ ("None", 0)+ , ("(Alpha Reward) Gold Cap", 224) -- AlphaHat , ("Antlers", 774) , ("Beret", 775) , ("Biker Cap", 776) , ("Birthday Cake", 789)- , ("Blitzen", 640)- , ("Bobby Helmet", 227)+ , ("Blitzen", 640) -- ReindeerAntlers+ , ("Bobby Helmet", 227) -- BPH , ("Boombox", 521)- , ("Bowler", 745)- , ("Brodie Helmet", 743)- , ("Brünnhilde", 241)+ , ("Bowler", 745) -- GentlemanHat+ , ("Brodie Helmet", 743) -- DoughboyHelmet+ , ("Brünnhilde", 241) -- Viking_Helmet , ("Captain's Hat", 741)- , ("Cavalier", 580)+ , ("Cavalier", 580) -- Tricorn , ("Chainsaw", 795) , ("Chef's Hat", 756)- , ("Cherry Top", 237)- , ("Christmas Tree", 639)+ , ("Cherry Top", 237) -- PoliceSiren+ , ("Christmas Tree", 639) -- RegularChristmasTree , ("Cockroach", 769) , ("Cow Skull", 685) , ("deadmau5", 796)@@ -1117,31 +1136,34 @@ , ("Devil Horns", 229) , ("Fez", 230) , ("Fire Helmet", 231)- , ("Foam Hat", 390)+ , ("Foam Hat", 390) -- TourneyWinner , ("Fruit Hat", 744) , ("Graduation Cap", 778) , ("Halo", 232) , ("Hard Hat", 233)- , ("Homburg", 742)- , ("Locomotive", 547)+ , ("Homburg", 742) -- DetectiveHat+ , ("Locomotive", 547) -- TrainConductor , ("Mariachi Hat", 234) , ("Mohawk", 638)- , ("Mouse Trap", 782)+ , ("Mouse Trap", 782) -- RatTrap , ("Paper Boat", 770) , ("Pirate's Hat", 235)- , ("Pixelated Shades", 494)+ , ("Pixelated Shades", 494) -- DWI , ("Pizza Topper", 236) , ("Plunger", 772) , ("Police Hat", 746) , ("Portal - Cake", 661)- , ("Propellerhead", 225)- , ("Pumpkin", 546)+ , ("Propellerhead", 225) -- Beanie+ , ("Pumpkin", 546) -- CatOLantern , ("Rasta", 771) , ("Rhino Horns", 780) , ("Royal Crown", 228)- , ("Sad Sapling", 641)+ , ("Sad Sapling", 641) -- SadChristmasTree , ("Santa", 642)+ , ("Season 1 - Bronze", 705) , ("Season 1 - Gold", 706)+ , ("Season 1 - Platinum", 707)+ , ("Season 1 - Silver", 708) , ("Shark Fin", 579) , ("Shuriken", 773) , ("Sombrero", 238)@@ -1149,7 +1171,7 @@ , ("Tiara", 495) , ("Top Hat", 240) , ("Traffic Cone", 747)- , ("Unicorn", 748)+ , ("Unicorn", 748) -- Unihorn , ("Witch's Hat", 242) , ("Wizard Hat", 243) , ("Work Boot", 740)@@ -1161,18 +1183,112 @@ finishes = [ ("Brushed Metal", 266) , ("Camo", 541)- , ("Carbon Fiber", 272)- , ("Corroded Metal", 268)- , ("DeLorean Time Machine", 623)- , ("Glossy", 270)+ , ("Carbon Fiber", 272) -- GlossyCarbonFiber+ , ("Corroded Metal", 268) -- Corroded+ , ("DeLorean Time Machine", 623) -- GreyCar+ , ("Glossy", 270) -- Default , ("Matte", 273) , ("Metallic", 274) , ("Metallic Pearl", 275) , ("Pearlescent", 276)- , ("Semigloss", 277)- , ("Sun-Damaged", 542)+ , ("Semigloss", 277) -- Plastic+ , ("Sun-Damaged", 542) -- Cracked , ("Toon Glossy", 279) , ("Toon Matte", 281) , ("Toon Wood", 280) , ("Wood", 283)+ ] & map (\ (v, k) -> (k, Text.pack v)) & Bimap.fromList++-- * Misc++-- | A one-to-one mapping between bot IDs and their names.+bots :: Bimap.Bimap Int Text.Text+bots =+ [ ("Astro", 70)+ , ("Bane", 71)+ , ("Beast", 72)+ , ("Blade", 73)+ , ("C-Block", 74)+ , ("Captain", 75)+ , ("Caveman", 76)+ , ("Cougar", 77)+ , ("Devil", 78)+ , ("Diesel", 79)+ , ("Dotty", 80)+ , ("Dude", 81)+ , ("Duke", 82)+ , ("Dynamite", 83)+ , ("Flame", 84)+ , ("Flash", 85)+ , ("Fossil", 86)+ , ("Fury", 87)+ , ("Hawk", 88)+ , ("Hunter", 89)+ , ("Imp", 90)+ , ("Jet", 91)+ , ("JM", 92)+ , ("Kidd", 93)+ , ("Laser", 94)+ , ("Lightning", 95)+ , ("Lucky", 96)+ , ("Middy", 97)+ , ("Mountain", 98)+ , ("Nitro", 99)+ , ("Outlaw", 100)+ , ("Phoenix", 101)+ , ("Raja", 102)+ , ("Razor", 103)+ , ("Retro", 104)+ , ("Roundhouse", 105)+ , ("Sabre", 106)+ , ("Samson", 107)+ , ("Savage", 108)+ , ("Shadow", 109)+ , ("Shield", 110)+ , ("Siren", 111)+ , ("Sky", 112)+ , ("Squall", 113)+ , ("Tank", 114)+ , ("Thunder", 115)+ , ("Titan", 116)+ , ("Turbo", 117)+ , ("Tusk", 118)+ , ("Viper", 119)+ , ("Warrior", 120)+ , ("Wolf", 121)+ , ("Yuri", 122)+ , ("Zap", 123)+ ] & map (\ (v, k) -> (k, Text.pack v)) & Bimap.fromList++-- | A one-to-one mapping between logo IDs and their names.+logos :: Bimap.Bimap Int Text.Text+logos =+ [ ("Barracudas", 244)+ , ("Blacklight", 245)+ , ("Bombers", 246)+ , ("Cyclones", 247)+ , ("Destroyers", 248)+ , ("Dragons", 249)+ , ("Express", 250)+ , ("Guardians", 251)+ , ("Knights", 252)+ , ("Kodiaks", 253)+ , ("Mammoths", 254)+ , ("Monarchs", 255)+ , ("Phantoms", 256)+ , ("Pharaohs", 257)+ , ("Pioneers", 258)+ , ("Ravagers", 259)+ , ("Rebels", 260)+ , ("Rovers", 261)+ , ("Scorpions", 262)+ , ("Skyhawks", 263)+ , ("Wolves", 264)+ ] & map (\ (v, k) -> (k, Text.pack v)) & Bimap.fromList++gameModes :: Bimap.Bimap Int Text.Text+gameModes =+ [ ("Soccar", 0)+ , ("Hockey", 1)+ , ("Hoops", 2) ] & map (\ (v, k) -> (k, Text.pack v)) & Bimap.fromList
library/Octane/FullReplay.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} module Octane.FullReplay- ( FullReplay+ ( FullReplay(..) , parseReplay , parseReplayFile , unsafeParseReplay@@ -17,6 +17,7 @@ import qualified Control.DeepSeq as DeepSeq import qualified Control.Monad as Monad import qualified Data.Aeson as Aeson+import qualified Data.Bimap as Bimap import qualified Data.Binary as Binary import qualified Data.ByteString.Lazy as ByteString import qualified Data.Foldable as Foldable@@ -25,7 +26,9 @@ import qualified Data.Text as Text import qualified Data.Version as Version import qualified GHC.Generics as Generics+import qualified Octane.Data as Data import qualified Octane.Parser as Parser+import qualified Octane.Parser.Garage as Garage import qualified Octane.Type as Type import qualified Prelude @@ -339,19 +342,40 @@ Parser.PExplosion a b c -> Aeson.toJSON (a, b, c) Parser.PFlaggedInt x y -> Aeson.toJSON (x, y) Parser.PFloat x -> Aeson.toJSON x- Parser.PGameMode x -> case x of- 1 -> "Hockey"- 2 -> "Hoops"- _ -> Aeson.String ("Unknown game mode " <> Text.pack (Prelude.show x))+ Parser.PGameMode gameMode -> Aeson.object+ [ ("Id", Aeson.toJSON gameMode)+ , ("Name", Data.gameModes+ & Bimap.lookup (Prelude.fromIntegral gameMode)+ & (\ x -> x :: Prelude.Maybe Text.Text)+ & Aeson.toJSON)+ ] Parser.PInt x -> Aeson.toJSON x Parser.PLoadout version body decal wheels rocketTrail antenna topper x y -> Aeson.object [ ("Version", Aeson.toJSON version)- , ("Body", Aeson.toJSON body)- , ("Decal", Aeson.toJSON decal)- , ("Wheels", Aeson.toJSON wheels)- , ("RocketTrail", Aeson.toJSON rocketTrail)- , ("Antenna", Aeson.toJSON antenna)- , ("Topper", Aeson.toJSON topper)+ , ("Body", Aeson.object+ [ ("Id", Aeson.toJSON body)+ , ("Name", body & Garage.getBody & Aeson.toJSON)+ ])+ , ("Decal", Aeson.object+ [ ("Id", Aeson.toJSON decal)+ , ("Name", decal & Garage.getDecal & Aeson.toJSON)+ ])+ , ("Wheels", Aeson.object+ [ ("Id", Aeson.toJSON wheels)+ , ("Name", wheels & Garage.getWheels & Aeson.toJSON)+ ])+ , ("RocketTrail", Aeson.object+ [ ("Id", Aeson.toJSON rocketTrail)+ , ("Name", rocketTrail & Garage.getRocketTrail & Aeson.toJSON)+ ])+ , ("Antenna", Aeson.object+ [ ("Id", Aeson.toJSON antenna)+ , ("Name", antenna & Garage.getAntenna & Aeson.toJSON)+ ])+ , ("Topper", Aeson.object+ [ ("Id", Aeson.toJSON topper)+ , ("Name", topper & Garage.getTopper & Aeson.toJSON)+ ]) , ("Unknown1", Aeson.toJSON x) , ("Unknown2", Aeson.toJSON y) ]@@ -390,8 +414,14 @@ [ ("Team", Aeson.toJSON team) , ("PrimaryColor", Aeson.toJSON color1) , ("AccentColor", Aeson.toJSON color2)- , ("PrimaryFinish", Aeson.toJSON finish1)- , ("AccentFinish", Aeson.toJSON finish2)+ , ("PrimaryFinish", Aeson.object+ [ ("Id", Aeson.toJSON finish1)+ , ("Name", finish1 & Garage.getFinish & Aeson.toJSON)+ ])+ , ("AccentFinish", Aeson.object+ [ ("Id", Aeson.toJSON finish2)+ , ("Name", finish2 & Garage.getFinish & Aeson.toJSON)+ ]) ] Parser.PUniqueId systemId remoteId localId -> Aeson.object [ ("System", case systemId of
library/Octane/Parser.hs view
@@ -23,7 +23,6 @@ import qualified Octane.Data as Data import qualified Octane.Json as Json import qualified Octane.Parser.ClassPropertyMap as CPM-import qualified Octane.Parser.Garage as Garage import qualified Octane.Type as Type import qualified Text.Printf as Printf @@ -327,7 +326,6 @@ getGameModeProperty :: Bits.BitGet PropValue getGameModeProperty = do x <- Bits.getWord8 2- -- 1 is hockey, 2 is hoops return (PGameMode x) getIntProperty :: Bits.BitGet PropValue@@ -350,18 +348,12 @@ getLoadoutProperty :: Bits.BitGet PropValue getLoadoutProperty = do version <- getInt8- bodyId <- getInt32- let body = Garage.getBody bodyId- decalId <- getInt32- let decal = Garage.getDecal decalId- wheelsId <- getInt32- let wheels = Garage.getWheels wheelsId- rocketTrailId <- getInt32- let rocketTrail = Garage.getRocketTrail rocketTrailId- antennaId <- getInt32- let antenna = Garage.getAntenna antennaId- topperId <- getInt32- let topper = Garage.getTopper topperId+ body <- getInt32+ decal <- getInt32+ wheels <- getInt32+ rocketTrail <- getInt32+ antenna <- getInt32+ topper <- getInt32 g <- getInt32 h <- if version > 10 then do@@ -444,10 +436,8 @@ team <- getInt8 primaryColor <- getInt8 accentColor <- getInt8- primaryFinishId <- getInt32- let primaryFinish = Garage.getFinish primaryFinishId- accentFinishId <- getInt32- let accentFinish = Garage.getFinish accentFinishId+ primaryFinish <- getInt32+ accentFinish <- getInt32 return (PTeamPaint team primaryColor accentColor primaryFinish accentFinish) getUniqueIdProperty :: Bits.BitGet PropValue@@ -572,16 +562,7 @@ | PFloat !Float | PGameMode !Word.Word8 | PInt !Int- | PLoadout- !Int- !Garage.Body- !Garage.Decal- !Garage.Wheels- !Garage.RocketTrail- !Garage.Antenna- !Garage.Topper- !Int- !(Maybe Int)+ | PLoadout !Int !Int !Int !Int !Int !Int !Int !Int !(Maybe Int) | PLoadoutOnline !Int !Int !Int !(Maybe Int) | PLocation !(Vector Int) | PMusicStinger !Bool !Int !Int@@ -592,12 +573,7 @@ | PReservation !Int !SystemId !RemoteId !LocalId !(Maybe Text.Text) !Bool !Bool | PRigidBodyState !Bool !(Vector Int) !(Vector Float) !(Maybe (Vector Int)) !(Maybe (Vector Int)) | PString !Text.Text- | PTeamPaint- !Int- !Int- !Int- !Garage.Finish- !Garage.Finish+ | PTeamPaint !Int !Int !Int !Int !Int | PUniqueId !SystemId !RemoteId !LocalId deriving (Eq, Generics.Generic, Show)
library/Octane/Parser/Garage.hs view
@@ -1,9 +1,6 @@ module Octane.Parser.Garage where -import Data.Function ((&))- import qualified Data.Bimap as Bimap-import qualified Data.Maybe as Maybe import qualified Data.Text as Text import qualified Octane.Data as Data @@ -17,40 +14,29 @@ type Finish = Text.Text -getDefaultItem :: String -> Int -> Text.Text-getDefaultItem itemType itemId =- ["Unknown", itemType, show itemId] & unwords & Text.pack---getItem :: Bimap.Bimap Int Text.Text -> String -> Int -> Text.Text-getItem items itemType itemId = items- & Bimap.lookup itemId- & Maybe.fromMaybe (getDefaultItem itemType itemId)---getBody :: Int -> Body-getBody = getItem Data.bodies "body"+getBody :: Int -> Maybe Body+getBody bodyId = Bimap.lookup bodyId Data.bodies -getDecal :: Int -> Decal-getDecal = getItem Data.decals "decal"+getDecal :: Int -> Maybe Decal+getDecal decalId = Bimap.lookup decalId Data.decals -getWheels :: Int -> Wheels-getWheels = getItem Data.wheels "wheels"+getWheels :: Int -> Maybe Wheels+getWheels wheelsId = Bimap.lookup wheelsId Data.wheels -getRocketTrail :: Int -> RocketTrail-getRocketTrail = getItem Data.rocketTrails "rocket trail"+getRocketTrail :: Int -> Maybe RocketTrail+getRocketTrail rocketTrailId = Bimap.lookup rocketTrailId Data.rocketTrails -getAntenna :: Int -> Antenna-getAntenna = getItem Data.antennas "antenna"+getAntenna :: Int -> Maybe Antenna+getAntenna antennaId = Bimap.lookup antennaId Data.antennas -getTopper :: Int -> Topper-getTopper = getItem Data.toppers "topper"+getTopper :: Int -> Maybe Topper+getTopper topperId = Bimap.lookup topperId Data.toppers -getFinish :: Int -> Finish-getFinish = getItem Data.finishes "finish"+getFinish :: Int -> Maybe Finish+getFinish finishId = Bimap.lookup finishId Data.finishes
octane.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack name: octane-version: 0.8.0+version: 0.9.0 synopsis: Parse Rocket League replays. description: Octane parses Rocket League replays. category: Game
package.yaml view
@@ -69,4 +69,4 @@ - -with-rtsopts=-N main: TestSuite.hs source-dirs: test-suite-version: '0.8.0'+version: '0.9.0'