From f50c8cce4bdde4ba238ec07ddc32991f00422165 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sun, 25 Feb 2024 11:56:48 -0300 Subject: [PATCH] Rename json files to .parkpatch using scenario hash --- ...ee monkeys park.json => 0153987.parkpatch} | 2 + ...rotting heights.json => 0844655.parkpatch} | 2 + .../{Utopia Park.json => 0dcee48.parkpatch} | 2 + ...Haunted Harbour.json => 102a1c5.parkpatch} | 2 + ...{Nevermore Park.json => 1286934.parkpatch} | 2 + ...un at the Beach.json => 1340eef.parkpatch} | 2 + ... Inca Lost City.json => 13e81f2.parkpatch} | 2 + ...logical Salvage.json => 17f0c69.parkpatch} | 2 + ...ltural Festival.json => 1c3ea45.parkpatch} | 2 + ...lags over Texas.json => 229cf57.parkpatch} | 2 + ...{Africa - Oasis.json => 2696a05.parkpatch} | 2 + ...{Dynamite Dunes.json => 287e87d.parkpatch} | 2 + ...pleasure island.json => 32cce5d.parkpatch} | 2 + ...ric - Stone Age.json => 33bac63.parkpatch} | 2 + .../{mel's world.json => 3767ef3.parkpatch} | 2 + ...Great Adventure.json => 37d31a4.parkpatch} | 2 + .../{Crazy Castle.json => 3a2ca59.parkpatch} | 2 + ...Jurassic Safari.json => 4ec6b38.parkpatch} | 2 + .../{Alton Towers.json => 5c95a4e.parkpatch} | 2 + ... Pleasure Beach.json => 608cd8a.parkpatch} | 2 + .../{woodworm park.json => 66ab5d1.parkpatch} | 2 + ...{coaster canyon.json => 68a69f3.parkpatch} | 2 + ... - Grand Canyon.json => 6ce84b8.parkpatch} | 2 + ... dreamland - s4.json => 73d0921.parkpatch} | 2 + ... Magic Mountain.json => 7ffdb44.parkpatch} | 2 + ...acific Pyramids.json => 80099be.parkpatch} | 2 + ...Coastal Reclaim.json => 8108298.parkpatch} | 2 + .../{Pokey Park.json => 815b6f6.parkpatch} | 2 + ...ge - Robin Hood.json => 825134a.parkpatch} | 2 + ...trinity islands.json => 829abd6.parkpatch} | 2 + .../{Urban Park.json => 835ec8b.parkpatch} | 2 + .../{Leafy Lake.json => 83bd798.parkpatch} | 2 + ...ia - Ayers Rock.json => 8cd8484.parkpatch} | 2 + .../{grand glacier.json => 92f4b50.parkpatch} | 2 + ...rk Age - Castle.json => 9c8b7cf.parkpatch} | 2 + ...eat Wall of China Tourism Enhancement.json | 2 + data/scenario_patches/WW Africa - Oasis.json | 2 + .../WW Asia - Japanese Coastal Reclaim.json | 2 + ...Hawaiian Island.json => aaad3e7.parkpatch} | 2 + ...hite water park.json => ba94426.parkpatch} | 2 + ...Extreme Heights.json => c215313.parkpatch} | 2 + ...pe - Renovation.json => c4fa992.parkpatch} | 2 + ... Magic Mountain.json => c82272a.parkpatch} | 2 + ...x Flags Holland.json => d055327.parkpatch} | 2 + ...- Rock 'n' Roll.json => d48bbfe.parkpatch} | 2 + .../{Ghost Town.json => db352d3.parkpatch} | 2 + ...- Schneider Cup.json => e57112f.parkpatch} | 2 + ...ort Anachronism.json => e93677f.parkpatch} | 2 + ...of Civilization.json => ef0c020.parkpatch} | 2 + ...Maharaja Palace.json => f4b1675.parkpatch} | 2 + ...{Infernal Views.json => fcc15f9.parkpatch} | 2 + ...Mystic Mountain.json => fd4c6ee.parkpatch} | 2 + ...tronic Film Set.json => ff52987.parkpatch} | 2 + data/scenario_patches/katie's dreamland.json | 2 + data/scenario_patches/scenario_to_hash | 107 ++++++++++++++++++ src/openrct2/rct1/S4Importer.cpp | 3 +- src/openrct2/rct12/ScenarioPatcher.cpp | 52 ++++++++- src/openrct2/rct12/ScenarioPatcher.h | 2 +- src/openrct2/rct2/S6Importer.cpp | 6 +- 59 files changed, 264 insertions(+), 14 deletions(-) rename data/scenario_patches/{three monkeys park.json => 0153987.parkpatch} (65%) rename data/scenario_patches/{rotting heights.json => 0844655.parkpatch} (52%) rename data/scenario_patches/{Utopia Park.json => 0dcee48.parkpatch} (57%) rename data/scenario_patches/{Haunted Harbour.json => 102a1c5.parkpatch} (52%) rename data/scenario_patches/{Nevermore Park.json => 1286934.parkpatch} (52%) rename data/scenario_patches/{Australasia - Fun at the Beach.json => 1340eef.parkpatch} (70%) rename data/scenario_patches/{South America - Inca Lost City.json => 13e81f2.parkpatch} (82%) rename data/scenario_patches/{Antarctic - Ecological Salvage.json => 17f0c69.parkpatch} (78%) rename data/scenario_patches/{Europe - European Cultural Festival.json => 1c3ea45.parkpatch} (72%) rename data/scenario_patches/{Six Flags over Texas.json => 229cf57.parkpatch} (81%) rename data/scenario_patches/{Africa - Oasis.json => 2696a05.parkpatch} (83%) rename data/scenario_patches/{Dynamite Dunes.json => 287e87d.parkpatch} (57%) rename data/scenario_patches/{pleasure island.json => 32cce5d.parkpatch} (55%) rename data/scenario_patches/{Prehistoric - Stone Age.json => 33bac63.parkpatch} (84%) rename data/scenario_patches/{mel's world.json => 3767ef3.parkpatch} (55%) rename data/scenario_patches/{Six Flags Great Adventure.json => 37d31a4.parkpatch} (66%) rename data/scenario_patches/{Crazy Castle.json => 3a2ca59.parkpatch} (66%) rename data/scenario_patches/{Prehistoric - Jurassic Safari.json => 4ec6b38.parkpatch} (58%) rename data/scenario_patches/{Alton Towers.json => 5c95a4e.parkpatch} (57%) rename data/scenario_patches/{Blackpool Pleasure Beach.json => 608cd8a.parkpatch} (80%) rename data/scenario_patches/{woodworm park.json => 66ab5d1.parkpatch} (55%) rename data/scenario_patches/{coaster canyon.json => 68a69f3.parkpatch} (52%) rename data/scenario_patches/{North America - Grand Canyon.json => 6ce84b8.parkpatch} (87%) rename data/scenario_patches/{katie's dreamland - s4.json => 73d0921.parkpatch} (77%) rename data/scenario_patches/{Build your own Six Flags Magic Mountain.json => 7ffdb44.parkpatch} (80%) rename data/scenario_patches/{Pacific Pyramids.json => 80099be.parkpatch} (61%) rename data/scenario_patches/{Asia - Japanese Coastal Reclaim.json => 8108298.parkpatch} (96%) rename data/scenario_patches/{Pokey Park.json => 815b6f6.parkpatch} (56%) rename data/scenario_patches/{Dark Age - Robin Hood.json => 825134a.parkpatch} (63%) rename data/scenario_patches/{trinity islands.json => 829abd6.parkpatch} (55%) rename data/scenario_patches/{Urban Park.json => 835ec8b.parkpatch} (77%) rename data/scenario_patches/{Leafy Lake.json => 83bd798.parkpatch} (56%) rename data/scenario_patches/{Australasia - Ayers Rock.json => 8cd8484.parkpatch} (83%) rename data/scenario_patches/{grand glacier.json => 92f4b50.parkpatch} (52%) rename data/scenario_patches/{Dark Age - Castle.json => 9c8b7cf.parkpatch} (82%) rename data/scenario_patches/{N America - Extreme Hawaiian Island.json => aaad3e7.parkpatch} (82%) rename data/scenario_patches/{white water park.json => ba94426.parkpatch} (57%) rename data/scenario_patches/{Extreme Heights.json => c215313.parkpatch} (57%) rename data/scenario_patches/{Europe - Renovation.json => c4fa992.parkpatch} (51%) rename data/scenario_patches/{Six Flags Magic Mountain.json => c82272a.parkpatch} (72%) rename data/scenario_patches/{Six Flags Holland.json => d055327.parkpatch} (85%) rename data/scenario_patches/{Rock 'n' Roll - Rock 'n' Roll.json => d48bbfe.parkpatch} (63%) rename data/scenario_patches/{Ghost Town.json => db352d3.parkpatch} (57%) rename data/scenario_patches/{Roaring Twenties - Schneider Cup.json => e57112f.parkpatch} (92%) rename data/scenario_patches/{Fort Anachronism.json => e93677f.parkpatch} (56%) rename data/scenario_patches/{Mythological - Cradle of Civilization.json => ef0c020.parkpatch} (88%) rename data/scenario_patches/{Asia - Maharaja Palace.json => f4b1675.parkpatch} (88%) rename data/scenario_patches/{Infernal Views.json => fcc15f9.parkpatch} (53%) rename data/scenario_patches/{Mystic Mountain.json => fd4c6ee.parkpatch} (61%) rename data/scenario_patches/{Mythological - Animatronic Film Set.json => ff52987.parkpatch} (63%) create mode 100644 data/scenario_patches/scenario_to_hash diff --git a/data/scenario_patches/three monkeys park.json b/data/scenario_patches/0153987.parkpatch similarity index 65% rename from data/scenario_patches/three monkeys park.json rename to data/scenario_patches/0153987.parkpatch index ab84674800..c3bb925f7f 100644 --- a/data/scenario_patches/three monkeys park.json +++ b/data/scenario_patches/0153987.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Three Monkeys Park", + "sha256": "0153987dbf8e1ec665205d7b39aeb4b88cf1f24dcadba61cf352ee22a919fcdb", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/rotting heights.json b/data/scenario_patches/0844655.parkpatch similarity index 52% rename from data/scenario_patches/rotting heights.json rename to data/scenario_patches/0844655.parkpatch index 539ab420bf..dfa6c5b889 100644 --- a/data/scenario_patches/rotting heights.json +++ b/data/scenario_patches/0844655.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Rotting Heights", + "sha256": "0844655d058e2f4cb3a8ead6c2a44d0c1b6512a36f36f2c2cbb3a7f313c1ad63", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Utopia Park.json b/data/scenario_patches/0dcee48.parkpatch similarity index 57% rename from data/scenario_patches/Utopia Park.json rename to data/scenario_patches/0dcee48.parkpatch index 8905803983..9ebc11e286 100644 --- a/data/scenario_patches/Utopia Park.json +++ b/data/scenario_patches/0dcee48.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Utopia Park", + "sha256": "0dcee4815ded0995d5b2b675e409eb2d37814194e4c8cea8ce1dbff5b1e9d91b", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Haunted Harbour.json b/data/scenario_patches/102a1c5.parkpatch similarity index 52% rename from data/scenario_patches/Haunted Harbour.json rename to data/scenario_patches/102a1c5.parkpatch index 5f4d0927b2..2656620b40 100644 --- a/data/scenario_patches/Haunted Harbour.json +++ b/data/scenario_patches/102a1c5.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Haunted Harbour", + "sha256": "102a1c52853e77b6efd448a44572a862fa440615b4ea9ae5d7fb31c48c96aac9", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Nevermore Park.json b/data/scenario_patches/1286934.parkpatch similarity index 52% rename from data/scenario_patches/Nevermore Park.json rename to data/scenario_patches/1286934.parkpatch index 646aeac504..afa47848e8 100644 --- a/data/scenario_patches/Nevermore Park.json +++ b/data/scenario_patches/1286934.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Nevermore Park", + "sha256": "1286934695bee6bee94d9111ad4fd52bf61eab501837422c831d427e2f254eda", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Australasia - Fun at the Beach.json b/data/scenario_patches/1340eef.parkpatch similarity index 70% rename from data/scenario_patches/Australasia - Fun at the Beach.json rename to data/scenario_patches/1340eef.parkpatch index f2276ae640..1a7473a713 100644 --- a/data/scenario_patches/Australasia - Fun at the Beach.json +++ b/data/scenario_patches/1340eef.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Australasia - Fun at the Beach", + "sha256": "1340eefc16e867a39eb597febabf12a9207146615fb419de20f486e2f06242de", "land_ownership": { "unowned": { "coordinates": [ diff --git a/data/scenario_patches/South America - Inca Lost City.json b/data/scenario_patches/13e81f2.parkpatch similarity index 82% rename from data/scenario_patches/South America - Inca Lost City.json rename to data/scenario_patches/13e81f2.parkpatch index 8fcd07ef75..d8692bd4f2 100644 --- a/data/scenario_patches/South America - Inca Lost City.json +++ b/data/scenario_patches/13e81f2.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "South America - Inca Lost City", + "sha256": "13e81f23ab1a7051b5465e4a7bb214b4188f2264d499f8f7e106372c3a984331", "land_ownership": { "unowned": { "coordinates": [ diff --git a/data/scenario_patches/Antarctic - Ecological Salvage.json b/data/scenario_patches/17f0c69.parkpatch similarity index 78% rename from data/scenario_patches/Antarctic - Ecological Salvage.json rename to data/scenario_patches/17f0c69.parkpatch index 9ba4771b03..8bb4d998b5 100644 --- a/data/scenario_patches/Antarctic - Ecological Salvage.json +++ b/data/scenario_patches/17f0c69.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Antarctic - Ecological Salvage", + "sha256": "17f0c69511d88f3cbc00eaf4aea5ccc9002c2c1dedd5f7387a7256cb943d8cde", "land_ownership": { "unowned": { "coordinates": [ diff --git a/data/scenario_patches/Europe - European Cultural Festival.json b/data/scenario_patches/1c3ea45.parkpatch similarity index 72% rename from data/scenario_patches/Europe - European Cultural Festival.json rename to data/scenario_patches/1c3ea45.parkpatch index dbe6d5eeb7..08a9877054 100644 --- a/data/scenario_patches/Europe - European Cultural Festival.json +++ b/data/scenario_patches/1c3ea45.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Europe - European Cultural Festival", + "sha256": "1c3ea4505f2341a76c55ca51e51034b649467def4002b7ee1825324355c51406", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Six Flags over Texas.json b/data/scenario_patches/229cf57.parkpatch similarity index 81% rename from data/scenario_patches/Six Flags over Texas.json rename to data/scenario_patches/229cf57.parkpatch index 2fc98a35a1..59ded9ee51 100644 --- a/data/scenario_patches/Six Flags over Texas.json +++ b/data/scenario_patches/229cf57.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Six Flags over Texas", + "sha256": "229cf5777d1b90034f3b711eed45c4d6ab9a368a466fd4db758a1eac21632a35", "land_ownership": { "construction_rights_owned": { "cannot_downgrade": true, diff --git a/data/scenario_patches/Africa - Oasis.json b/data/scenario_patches/2696a05.parkpatch similarity index 83% rename from data/scenario_patches/Africa - Oasis.json rename to data/scenario_patches/2696a05.parkpatch index 05352b2cd7..9058413ed3 100644 --- a/data/scenario_patches/Africa - Oasis.json +++ b/data/scenario_patches/2696a05.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Africa - Oasis", + "sha256": "2696a059c2c1b23c60cbfcc293fd29cfec45d7e3da7f3b38bc2b52aff834fd34", "land_ownership": { "unowned": { "coordinates": [ diff --git a/data/scenario_patches/Dynamite Dunes.json b/data/scenario_patches/287e87d.parkpatch similarity index 57% rename from data/scenario_patches/Dynamite Dunes.json rename to data/scenario_patches/287e87d.parkpatch index eea7acd5ce..3ac595cb25 100644 --- a/data/scenario_patches/Dynamite Dunes.json +++ b/data/scenario_patches/287e87d.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Dynamite Dunes", + "sha256": "287e87db95f51dd1594b7568bbdd22cadece87749216d2f65a6ff3b506018eb3", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/pleasure island.json b/data/scenario_patches/32cce5d.parkpatch similarity index 55% rename from data/scenario_patches/pleasure island.json rename to data/scenario_patches/32cce5d.parkpatch index 485a37fafb..afd40ca16d 100644 --- a/data/scenario_patches/pleasure island.json +++ b/data/scenario_patches/32cce5d.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Pleasure Island", + "sha256": "32cce5dcb86cf9e7f5b061ee49e737dbb845b46da54792d7b7f33b7a11b0bca1", "land_ownership": { "construction_rights_owned": { "coordinates": [ diff --git a/data/scenario_patches/Prehistoric - Stone Age.json b/data/scenario_patches/33bac63.parkpatch similarity index 84% rename from data/scenario_patches/Prehistoric - Stone Age.json rename to data/scenario_patches/33bac63.parkpatch index 60eb634c58..69a29f6ac9 100644 --- a/data/scenario_patches/Prehistoric - Stone Age.json +++ b/data/scenario_patches/33bac63.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Prehistoric - Stone Age", + "sha256": "33bac63d13aa7513ac8536d865cbc6fa4a2189c79e3943869e6380072e71bce7", "land_ownership": { "available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/mel's world.json b/data/scenario_patches/3767ef3.parkpatch similarity index 55% rename from data/scenario_patches/mel's world.json rename to data/scenario_patches/3767ef3.parkpatch index 6a01730780..9b2dbbd3ce 100644 --- a/data/scenario_patches/mel's world.json +++ b/data/scenario_patches/3767ef3.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Mel's World", + "sha256": "3767ef3e2a8524e16cebe29e18148499dd8c91abe049e5f39011037ba41a8065", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Six Flags Great Adventure.json b/data/scenario_patches/37d31a4.parkpatch similarity index 66% rename from data/scenario_patches/Six Flags Great Adventure.json rename to data/scenario_patches/37d31a4.parkpatch index 6e1050bfba..237d78b580 100644 --- a/data/scenario_patches/Six Flags Great Adventure.json +++ b/data/scenario_patches/37d31a4.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Six Flags Great Adventure", + "sha256": "37d31a4f272f58bacc97b16743dc6bd3d6fa778a0a944d788b4ed9ab20839030", "land_ownership": { "unowned": { "coordinates": [ diff --git a/data/scenario_patches/Crazy Castle.json b/data/scenario_patches/3a2ca59.parkpatch similarity index 66% rename from data/scenario_patches/Crazy Castle.json rename to data/scenario_patches/3a2ca59.parkpatch index 7e636cf485..420dbf0ef8 100644 --- a/data/scenario_patches/Crazy Castle.json +++ b/data/scenario_patches/3a2ca59.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Crazy Castle", + "sha256": "3a2ca59166d8a0286feb8404ead68e0d83b47026b7e4015852b770e3fd4bf125", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Prehistoric - Jurassic Safari.json b/data/scenario_patches/4ec6b38.parkpatch similarity index 58% rename from data/scenario_patches/Prehistoric - Jurassic Safari.json rename to data/scenario_patches/4ec6b38.parkpatch index 052a622913..056e4f6fd2 100644 --- a/data/scenario_patches/Prehistoric - Jurassic Safari.json +++ b/data/scenario_patches/4ec6b38.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Prehistoric - Jurassic Safari", + "sha256": "4ec6b381faf6b576f38c59a16ee441b9ed680e4bb38a9320e58e65dfd3f12c94", "land_ownership": { "construction_rights_owned": { "cannot_downgrade": true, diff --git a/data/scenario_patches/Alton Towers.json b/data/scenario_patches/5c95a4e.parkpatch similarity index 57% rename from data/scenario_patches/Alton Towers.json rename to data/scenario_patches/5c95a4e.parkpatch index 00b835b9da..3d8e53d6fb 100644 --- a/data/scenario_patches/Alton Towers.json +++ b/data/scenario_patches/5c95a4e.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Alton Towers", + "sha256": "5c95a4ec28579851972547dce4f4f1ca4bb241808baacf33e57c3076d6a40a69", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Blackpool Pleasure Beach.json b/data/scenario_patches/608cd8a.parkpatch similarity index 80% rename from data/scenario_patches/Blackpool Pleasure Beach.json rename to data/scenario_patches/608cd8a.parkpatch index ad64a5a69b..6cb89a8fb8 100644 --- a/data/scenario_patches/Blackpool Pleasure Beach.json +++ b/data/scenario_patches/608cd8a.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Blackpool Pleasure Beach", + "sha256": "608cd8a781cde0ae3604fc291f027f14354396700bc5f22292e3de0272f6fe05", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/woodworm park.json b/data/scenario_patches/66ab5d1.parkpatch similarity index 55% rename from data/scenario_patches/woodworm park.json rename to data/scenario_patches/66ab5d1.parkpatch index c1d68f8067..ce45134afc 100644 --- a/data/scenario_patches/woodworm park.json +++ b/data/scenario_patches/66ab5d1.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Woodworm Park", + "sha256": "66ab5d1e8412c94cd6bfa40a664167df7df651d67b90da2a612108212ebc98d3", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/coaster canyon.json b/data/scenario_patches/68a69f3.parkpatch similarity index 52% rename from data/scenario_patches/coaster canyon.json rename to data/scenario_patches/68a69f3.parkpatch index 8e1f378ccd..07c3e85f19 100644 --- a/data/scenario_patches/coaster canyon.json +++ b/data/scenario_patches/68a69f3.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Coaster Canyon", + "sha256": "68a69f3c7db661430ce94e23caba7e31d14e822ea13f4ad32e5455c3c26354fa", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/North America - Grand Canyon.json b/data/scenario_patches/6ce84b8.parkpatch similarity index 87% rename from data/scenario_patches/North America - Grand Canyon.json rename to data/scenario_patches/6ce84b8.parkpatch index b3985cc1fe..c1f8cbb946 100644 --- a/data/scenario_patches/North America - Grand Canyon.json +++ b/data/scenario_patches/6ce84b8.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "North America - Grand Canyon", + "sha256": "6ce84b809471ba539d94d4198832b848b47d81316f5c8cc1297d8328299b4c52", "land_ownership": { "available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/katie's dreamland - s4.json b/data/scenario_patches/73d0921.parkpatch similarity index 77% rename from data/scenario_patches/katie's dreamland - s4.json rename to data/scenario_patches/73d0921.parkpatch index 39ebe21609..0fba7f53fa 100644 --- a/data/scenario_patches/katie's dreamland - s4.json +++ b/data/scenario_patches/73d0921.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "katie's dreamland - s4", + "sha256": "73d0921f1d49388ffb4deb300c6ebb3920564410c2239580a7d1145fa54c2d4a", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Build your own Six Flags Magic Mountain.json b/data/scenario_patches/7ffdb44.parkpatch similarity index 80% rename from data/scenario_patches/Build your own Six Flags Magic Mountain.json rename to data/scenario_patches/7ffdb44.parkpatch index abe39dfdcd..084f71387e 100644 --- a/data/scenario_patches/Build your own Six Flags Magic Mountain.json +++ b/data/scenario_patches/7ffdb44.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Build your own Six Flags Magic Mountain", + "sha256": "7ffdb448eccc8e24026e820f5e1d5649459b5ee5d469afdaa73e87d31475f2b0", "land_ownership": { "available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/Pacific Pyramids.json b/data/scenario_patches/80099be.parkpatch similarity index 61% rename from data/scenario_patches/Pacific Pyramids.json rename to data/scenario_patches/80099be.parkpatch index c8a59ea90f..13678b3399 100644 --- a/data/scenario_patches/Pacific Pyramids.json +++ b/data/scenario_patches/80099be.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Pacific Pyramids", + "sha256": "80099be793f965c67ac0106109308e61dbb1d229a52b9797e468aa279c97fee0", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Asia - Japanese Coastal Reclaim.json b/data/scenario_patches/8108298.parkpatch similarity index 96% rename from data/scenario_patches/Asia - Japanese Coastal Reclaim.json rename to data/scenario_patches/8108298.parkpatch index c8aedfda06..4283eada6b 100644 --- a/data/scenario_patches/Asia - Japanese Coastal Reclaim.json +++ b/data/scenario_patches/8108298.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Asia - Japanese Coastal Reclaim", + "sha256": "810829891e1bafa33b9ccc6c296bcfb1fc86b6d812c1fea28899b5e47c048628", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Pokey Park.json b/data/scenario_patches/815b6f6.parkpatch similarity index 56% rename from data/scenario_patches/Pokey Park.json rename to data/scenario_patches/815b6f6.parkpatch index 875e0d446c..f68699cc3b 100644 --- a/data/scenario_patches/Pokey Park.json +++ b/data/scenario_patches/815b6f6.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Pokey Park", + "sha256": "815b6f6b626cf178c02cc0e4c75b71bb100cc52a503129d9d5c03c6264e733b8", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Dark Age - Robin Hood.json b/data/scenario_patches/825134a.parkpatch similarity index 63% rename from data/scenario_patches/Dark Age - Robin Hood.json rename to data/scenario_patches/825134a.parkpatch index 5676c0cdb3..b8353cb397 100644 --- a/data/scenario_patches/Dark Age - Robin Hood.json +++ b/data/scenario_patches/825134a.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Dark Age - Robin Hood", + "sha256": "825134aad8365e12efba50b58f67e96b729640e6ff4007dfe5dffe99c167531f", "land_ownership": { "available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/trinity islands.json b/data/scenario_patches/829abd6.parkpatch similarity index 55% rename from data/scenario_patches/trinity islands.json rename to data/scenario_patches/829abd6.parkpatch index 7a0b35fff9..737b063d7f 100644 --- a/data/scenario_patches/trinity islands.json +++ b/data/scenario_patches/829abd6.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Trinity Islands", + "sha256": "829abd64d95a646e6a1462b1465588e434e0b1b42d9857308687b7986b558a57", "land_ownership": { "construction_rights_owned": { "coordinates": [ diff --git a/data/scenario_patches/Urban Park.json b/data/scenario_patches/835ec8b.parkpatch similarity index 77% rename from data/scenario_patches/Urban Park.json rename to data/scenario_patches/835ec8b.parkpatch index 5afb2eaf4c..e34b9bc187 100644 --- a/data/scenario_patches/Urban Park.json +++ b/data/scenario_patches/835ec8b.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Urban Park", + "sha256": "835ec8bdba3dc4086906126907c022cf42fa0f9cd6ee06221f36aac526ac4ec4", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Leafy Lake.json b/data/scenario_patches/83bd798.parkpatch similarity index 56% rename from data/scenario_patches/Leafy Lake.json rename to data/scenario_patches/83bd798.parkpatch index db3e60f2cf..4c42cd0a90 100644 --- a/data/scenario_patches/Leafy Lake.json +++ b/data/scenario_patches/83bd798.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Leafy Lake", + "sha256": "83bd798a9755acf3ba8b9fe1ccad5dee3816a5d595ca53ff566882c357dcf733", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Australasia - Ayers Rock.json b/data/scenario_patches/8cd8484.parkpatch similarity index 83% rename from data/scenario_patches/Australasia - Ayers Rock.json rename to data/scenario_patches/8cd8484.parkpatch index 6a95c0b745..dcd7a04eb1 100644 --- a/data/scenario_patches/Australasia - Ayers Rock.json +++ b/data/scenario_patches/8cd8484.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Australasia - Ayers Rock", + "sha256": "8cd8484dd39c03485cdbd490509e19b252478810fb1fbce55582a2e22f9b69f6", "tiles": { "type": "track", "operations": [ diff --git a/data/scenario_patches/grand glacier.json b/data/scenario_patches/92f4b50.parkpatch similarity index 52% rename from data/scenario_patches/grand glacier.json rename to data/scenario_patches/92f4b50.parkpatch index 0058c62f32..1471451756 100644 --- a/data/scenario_patches/grand glacier.json +++ b/data/scenario_patches/92f4b50.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Grand Glacier", + "sha256": "92f4b50037a2f85d3fb05ce6a07e27d73c6e61ab2cb5f8b00f5c2f98e95b356c", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Dark Age - Castle.json b/data/scenario_patches/9c8b7cf.parkpatch similarity index 82% rename from data/scenario_patches/Dark Age - Castle.json rename to data/scenario_patches/9c8b7cf.parkpatch index c63c2a6753..018b3fee75 100644 --- a/data/scenario_patches/Dark Age - Castle.json +++ b/data/scenario_patches/9c8b7cf.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Dark Age - Castle", + "sha256": "9c8b7cf36bddc9e354b270b3027f74cd802d2fe4d22df954db797890a3ca81e8", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Great Wall of China Tourism Enhancement.json b/data/scenario_patches/Great Wall of China Tourism Enhancement.json index da09688207..bad593f110 100644 --- a/data/scenario_patches/Great Wall of China Tourism Enhancement.json +++ b/data/scenario_patches/Great Wall of China Tourism Enhancement.json @@ -1,4 +1,6 @@ { + "scenario_name": "Great Wall of China Tourism Enhancement", + "sha256": "e72d720a27ad13d07bb017b8f6da1b73c77fee00f648c65e3f593c8a60f0e236", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/WW Africa - Oasis.json b/data/scenario_patches/WW Africa - Oasis.json index 8a557d7f80..461340a67f 100644 --- a/data/scenario_patches/WW Africa - Oasis.json +++ b/data/scenario_patches/WW Africa - Oasis.json @@ -1,4 +1,6 @@ { + "scenario_name": "WW Africa - Oasis", + "sha256": "2696a059c2c1b23c60cbfcc293fd29cfec45d7e3da7f3b38bc2b52aff834fd34", "land_ownership": { "unowned": { "coordinates": [ diff --git a/data/scenario_patches/WW Asia - Japanese Coastal Reclaim.json b/data/scenario_patches/WW Asia - Japanese Coastal Reclaim.json index c8aedfda06..89d5992442 100644 --- a/data/scenario_patches/WW Asia - Japanese Coastal Reclaim.json +++ b/data/scenario_patches/WW Asia - Japanese Coastal Reclaim.json @@ -1,4 +1,6 @@ { + "scenario_name": "WW Asia - Japanese Coastal Reclaim", + "sha256": "810829891e1bafa33b9ccc6c296bcfb1fc86b6d812c1fea28899b5e47c048628", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/N America - Extreme Hawaiian Island.json b/data/scenario_patches/aaad3e7.parkpatch similarity index 82% rename from data/scenario_patches/N America - Extreme Hawaiian Island.json rename to data/scenario_patches/aaad3e7.parkpatch index de17c308fc..873a6a0d4f 100644 --- a/data/scenario_patches/N America - Extreme Hawaiian Island.json +++ b/data/scenario_patches/aaad3e7.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "N America - Extreme Hawaiian Island", + "sha256": "aaad3e787741a253bd8dcb866c67ea50d78489bec0a5f9b01778362b9905b715", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/white water park.json b/data/scenario_patches/ba94426.parkpatch similarity index 57% rename from data/scenario_patches/white water park.json rename to data/scenario_patches/ba94426.parkpatch index c56f697c5e..b80657c760 100644 --- a/data/scenario_patches/white water park.json +++ b/data/scenario_patches/ba94426.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "White Water Park", + "sha256": "ba94426ecde1d6b375f566b155573e8a1471dcf62c651bafcb751f04f542cd5c", "land_ownership": { "construction_rights_owned": { "coordinates": [ diff --git a/data/scenario_patches/Extreme Heights.json b/data/scenario_patches/c215313.parkpatch similarity index 57% rename from data/scenario_patches/Extreme Heights.json rename to data/scenario_patches/c215313.parkpatch index 6463d245e8..2ab49f8d7c 100644 --- a/data/scenario_patches/Extreme Heights.json +++ b/data/scenario_patches/c215313.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Extreme Heights", + "sha256": "c2153130813a127e67355662e385025936a427b8628bbc129cc7fc20b9ac49af", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Europe - Renovation.json b/data/scenario_patches/c4fa992.parkpatch similarity index 51% rename from data/scenario_patches/Europe - Renovation.json rename to data/scenario_patches/c4fa992.parkpatch index 529d4ae2fe..6e7fca46b7 100644 --- a/data/scenario_patches/Europe - Renovation.json +++ b/data/scenario_patches/c4fa992.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Europe - Renovation", + "sha256": "c4fa992e3d54c89d3932614e903daad0f955fc3f848021de437d5ff03ab11941", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Six Flags Magic Mountain.json b/data/scenario_patches/c82272a.parkpatch similarity index 72% rename from data/scenario_patches/Six Flags Magic Mountain.json rename to data/scenario_patches/c82272a.parkpatch index 8cc932dfc1..c959a291e2 100644 --- a/data/scenario_patches/Six Flags Magic Mountain.json +++ b/data/scenario_patches/c82272a.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Six Flags Magic Mountain", + "sha256": "c82272a1e966e54863b3b90ba4c90e37ed8ef8b99253d284bb7cc56f9590d97a", "land_ownership": { "available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/Six Flags Holland.json b/data/scenario_patches/d055327.parkpatch similarity index 85% rename from data/scenario_patches/Six Flags Holland.json rename to data/scenario_patches/d055327.parkpatch index d2ac6f1610..89e44f8a63 100644 --- a/data/scenario_patches/Six Flags Holland.json +++ b/data/scenario_patches/d055327.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Six Flags Holland", + "sha256": "d0553271f6fe9ff7bb6a5e7e5735c553340dfcdfb103d5ff3e332d4841938ddd", "land_ownership": { "available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/Rock 'n' Roll - Rock 'n' Roll.json b/data/scenario_patches/d48bbfe.parkpatch similarity index 63% rename from data/scenario_patches/Rock 'n' Roll - Rock 'n' Roll.json rename to data/scenario_patches/d48bbfe.parkpatch index 9d749b97a9..b7a272d261 100644 --- a/data/scenario_patches/Rock 'n' Roll - Rock 'n' Roll.json +++ b/data/scenario_patches/d48bbfe.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Rock 'n' Roll - Rock 'n' Roll", + "sha256": "d48bbfe4833347dfbf5befe63eb3795df3bce36cdc9152048ee7851e36d45ad9", "land_ownership": { "available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/Ghost Town.json b/data/scenario_patches/db352d3.parkpatch similarity index 57% rename from data/scenario_patches/Ghost Town.json rename to data/scenario_patches/db352d3.parkpatch index aec0b9fb32..6be5a136c4 100644 --- a/data/scenario_patches/Ghost Town.json +++ b/data/scenario_patches/db352d3.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Ghost Town", + "sha256": "db352d3dcf74b8a1931963c4e07e8c23802227bb1d31d8c57b97c3239a382f5e", "land_ownership": { "owned": { "coordinates": [ diff --git a/data/scenario_patches/Roaring Twenties - Schneider Cup.json b/data/scenario_patches/e57112f.parkpatch similarity index 92% rename from data/scenario_patches/Roaring Twenties - Schneider Cup.json rename to data/scenario_patches/e57112f.parkpatch index ae9bc48258..9262c94dbd 100644 --- a/data/scenario_patches/Roaring Twenties - Schneider Cup.json +++ b/data/scenario_patches/e57112f.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Roaring Twenties - Schneider Cup", + "sha256": "e57112f58a7710d3e80242e867fb65d720e0cd3b67bebfd6b7df8b404fc7ea2b", "land_ownership": { "construction_rights_available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/Fort Anachronism.json b/data/scenario_patches/e93677f.parkpatch similarity index 56% rename from data/scenario_patches/Fort Anachronism.json rename to data/scenario_patches/e93677f.parkpatch index adaa214d9c..8cdb46fbf9 100644 --- a/data/scenario_patches/Fort Anachronism.json +++ b/data/scenario_patches/e93677f.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Fort Anachronism", + "sha256": "e93677fc42c8b657fddb3c92bfeebcda868c7dd2d2a352f719302778a1c676bd", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Mythological - Cradle of Civilization.json b/data/scenario_patches/ef0c020.parkpatch similarity index 88% rename from data/scenario_patches/Mythological - Cradle of Civilization.json rename to data/scenario_patches/ef0c020.parkpatch index 8b77cd2090..69c2e5a55d 100644 --- a/data/scenario_patches/Mythological - Cradle of Civilization.json +++ b/data/scenario_patches/ef0c020.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Mythological - Cradle of Civilization", + "sha256": "ef0c0202510d84cf4f1ad198ae43b6bc00d5af2d664c60cdb38de632ea25db51", "land_ownership": { "available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/Asia - Maharaja Palace.json b/data/scenario_patches/f4b1675.parkpatch similarity index 88% rename from data/scenario_patches/Asia - Maharaja Palace.json rename to data/scenario_patches/f4b1675.parkpatch index ad4b6ba91d..fbfab9ee56 100644 --- a/data/scenario_patches/Asia - Maharaja Palace.json +++ b/data/scenario_patches/f4b1675.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Asia - Maharaja Palace", + "sha256": "f4b1675c8ccb31d422c1b7b8bd5336b2bfefa94d702aeae1859ea95ecda2c29d", "land_ownership": { "available": { "cannot_downgrade": true, diff --git a/data/scenario_patches/Infernal Views.json b/data/scenario_patches/fcc15f9.parkpatch similarity index 53% rename from data/scenario_patches/Infernal Views.json rename to data/scenario_patches/fcc15f9.parkpatch index 185a324493..f9e43d32d7 100644 --- a/data/scenario_patches/Infernal Views.json +++ b/data/scenario_patches/fcc15f9.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Infernal Views", + "sha256": "fcc15f9c9b42bdd4aa8761c3a6df17c1293aa616780bc4aadd348d191e275112", "water": [ { "height": 96, diff --git a/data/scenario_patches/Mystic Mountain.json b/data/scenario_patches/fd4c6ee.parkpatch similarity index 61% rename from data/scenario_patches/Mystic Mountain.json rename to data/scenario_patches/fd4c6ee.parkpatch index 7d03b4a4fc..bb3b3bfc7b 100644 --- a/data/scenario_patches/Mystic Mountain.json +++ b/data/scenario_patches/fd4c6ee.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Mystic Mountain", + "sha256": "fd4c6ee6c27a3831564a67b5edf8fafe7b0ad309e5abb82bff822eecf5548343", "land_ownership": { "available": { "coordinates": [ diff --git a/data/scenario_patches/Mythological - Animatronic Film Set.json b/data/scenario_patches/ff52987.parkpatch similarity index 63% rename from data/scenario_patches/Mythological - Animatronic Film Set.json rename to data/scenario_patches/ff52987.parkpatch index 6646501098..53574b0069 100644 --- a/data/scenario_patches/Mythological - Animatronic Film Set.json +++ b/data/scenario_patches/ff52987.parkpatch @@ -1,4 +1,6 @@ { + "scenario_name": "Mythological - Animatronic Film Set", + "sha256": "ff52987c70ea89deb5c1b8445b7a689c8b83e22b5aef18bb4bbd07375b27f47e", "land_ownership": { "construction_rights_owned": { "cannot_downgrade": true, diff --git a/data/scenario_patches/katie's dreamland.json b/data/scenario_patches/katie's dreamland.json index 81e6e500ec..d6419084be 100644 --- a/data/scenario_patches/katie's dreamland.json +++ b/data/scenario_patches/katie's dreamland.json @@ -1,4 +1,6 @@ { + "scenario_name": "katie's dreamland", + "sha256": "73d0921f1d49388ffb4deb300c6ebb3920564410c2239580a7d1145fa54c2d4a", "land_ownership": { "construction_rights_owned": { "coordinates": [ diff --git a/data/scenario_patches/scenario_to_hash b/data/scenario_patches/scenario_to_hash new file mode 100644 index 0000000000..4d295b5bad --- /dev/null +++ b/data/scenario_patches/scenario_to_hash @@ -0,0 +1,107 @@ +// This file serves no purpose other than documenting what are the scenarios with patches applied and their hashes + +// RCT2 Scenario names to hashes + 'Africa - Oasis': ['2696a05', + '2696a059c2c1b23c60cbfcc293fd29cfec45d7e3da7f3b38bc2b52aff834fd34'], + 'Antarctic - Ecological Salvage': ['17f0c69', + '17f0c69511d88f3cbc00eaf4aea5ccc9002c2c1dedd5f7387a7256cb943d8cde'], + 'Asia - Great Wall of China Tourism Enhancement': ['e72d720', + 'e72d720a27ad13d07bb017b8f6da1b73c77fee00f648c65e3f593c8a60f0e236'], + 'Asia - Japanese Coastal Reclaim': ['8108298', + '810829891e1bafa33b9ccc6c296bcfb1fc86b6d812c1fea28899b5e47c048628'], + 'Asia - Maharaja Palace': ['f4b1675', + 'f4b1675c8ccb31d422c1b7b8bd5336b2bfefa94d702aeae1859ea95ecda2c29d'], + 'Australasia - Ayers Rock': ['8cd8484', + '8cd8484dd39c03485cdbd490509e19b252478810fb1fbce55582a2e22f9b69f6'], + 'Australasia - Fun at the Beach': ['1340eef', + '1340eefc16e867a39eb597febabf12a9207146615fb419de20f486e2f06242de'], + 'Build your own Six Flags Magic Mountain': ['7ffdb44', + '7ffdb448eccc8e24026e820f5e1d5649459b5ee5d469afdaa73e87d31475f2b0'], + 'Crazy Castle': ['3a2ca59', + '3a2ca59166d8a0286feb8404ead68e0d83b47026b7e4015852b770e3fd4bf125'], + 'Dark Age - Castle': ['9c8b7cf', + '9c8b7cf36bddc9e354b270b3027f74cd802d2fe4d22df954db797890a3ca81e8'], + 'Dark Age - Robin Hood': ['825134a', + '825134aad8365e12efba50b58f67e96b729640e6ff4007dfe5dffe99c167531f'], + 'Europe - European Cultural Festival': ['1c3ea45', + '1c3ea4505f2341a76c55ca51e51034b649467def4002b7ee1825324355c51406'], + 'Europe - Renovation': ['c4fa992', + 'c4fa992e3d54c89d3932614e903daad0f955fc3f848021de437d5ff03ab11941'], + 'Extreme Heights': ['c215313', + 'c2153130813a127e67355662e385025936a427b8628bbc129cc7fc20b9ac49af'], + 'Ghost Town': ['db352d3', + 'db352d3dcf74b8a1931963c4e07e8c23802227bb1d31d8c57b97c3239a382f5e'], + 'Infernal Views': ['fcc15f9', + 'fcc15f9c9b42bdd4aa8761c3a6df17c1293aa616780bc4aadd348d191e275112'], + 'Mythological - Animatronic Film Set': ['ff52987', + 'ff52987c70ea89deb5c1b8445b7a689c8b83e22b5aef18bb4bbd07375b27f47e'], + 'Mythological - Cradle of Civilization': ['ef0c020', + 'ef0c0202510d84cf4f1ad198ae43b6bc00d5af2d664c60cdb38de632ea25db51'], + 'N America - Extreme Hawaiian Island': ['aaad3e7', + 'aaad3e787741a253bd8dcb866c67ea50d78489bec0a5f9b01778362b9905b715'], + 'North America - Grand Canyon': ['6ce84b8', + '6ce84b809471ba539d94d4198832b848b47d81316f5c8cc1297d8328299b4c52'], + 'Prehistoric - Jurassic Safari': ['4ec6b38', + '4ec6b381faf6b576f38c59a16ee441b9ed680e4bb38a9320e58e65dfd3f12c94'], + 'Prehistoric - Stone Age': ['33bac63', + '33bac63d13aa7513ac8536d865cbc6fa4a2189c79e3943869e6380072e71bce7'], + 'Roaring Twenties - Schneider Cup': ['e57112f', + 'e57112f58a7710d3e80242e867fb65d720e0cd3b67bebfd6b7df8b404fc7ea2b'], + "Rock 'n' Roll - Rock 'n' Roll": ['d48bbfe', + 'd48bbfe4833347dfbf5befe63eb3795df3bce36cdc9152048ee7851e36d45ad9'], + 'Six Flags Great Adventure': ['37d31a4', + '37d31a4f272f58bacc97b16743dc6bd3d6fa778a0a944d788b4ed9ab20839030'], + 'Six Flags Holland': ['d055327', + 'd0553271f6fe9ff7bb6a5e7e5735c553340dfcdfb103d5ff3e332d4841938ddd'], + 'Six Flags Magic Mountain': ['c82272a', + 'c82272a1e966e54863b3b90ba4c90e37ed8ef8b99253d284bb7cc56f9590d97a'], + 'Six Flags over Texas': ['229cf57', + '229cf5777d1b90034f3b711eed45c4d6ab9a368a466fd4db758a1eac21632a35'], + 'South America - Inca Lost City': ['13e81f2', + '13e81f23ab1a7051b5465e4a7bb214b4188f2264d499f8f7e106372c3a984331'], + +// RCT1 Scenario names to hashes + 'Alton Towers': ['5c95a4e', + '5c95a4ec28579851972547dce4f4f1ca4bb241808baacf33e57c3076d6a40a69'], + 'Blackpool Pleasure Beach': ['608cd8a', + '608cd8a781cde0ae3604fc291f027f14354396700bc5f22292e3de0272f6fe05'], + 'Coaster Canyon': ['68a69f3', + '68a69f3c7db661430ce94e23caba7e31d14e822ea13f4ad32e5455c3c26354fa'], + 'Dynamite Dunes': ['287e87d', + '287e87db95f51dd1594b7568bbdd22cadece87749216d2f65a6ff3b506018eb3'], + 'Fort Anachronism': ['e93677f', + 'e93677fc42c8b657fddb3c92bfeebcda868c7dd2d2a352f719302778a1c676bd'], + 'Grand Glacier': ['92f4b50', + '92f4b50037a2f85d3fb05ce6a07e27d73c6e61ab2cb5f8b00f5c2f98e95b356c'], + 'Haunted Harbour': ['102a1c5', + '102a1c52853e77b6efd448a44572a862fa440615b4ea9ae5d7fb31c48c96aac9'], + 'katie's dreamland': ['73d0921', + '73d0921f1d49388ffb4deb300c6ebb3920564410c2239580a7d1145fa54c2d4a'], + 'Leafy Lake': ['83bd798', + '83bd798a9755acf3ba8b9fe1ccad5dee3816a5d595ca53ff566882c357dcf733'], + 'Mel's World': ['3767ef3', + '3767ef3e2a8524e16cebe29e18148499dd8c91abe049e5f39011037ba41a8065'], + 'Mystic Mountain': ['fd4c6ee', + 'fd4c6ee6c27a3831564a67b5edf8fafe7b0ad309e5abb82bff822eecf5548343'], + 'Nevermore Park': ['1286934', + '1286934695bee6bee94d9111ad4fd52bf61eab501837422c831d427e2f254eda'], + 'Pacific Pyramids': ['80099be', + '80099be793f965c67ac0106109308e61dbb1d229a52b9797e468aa279c97fee0'], + 'Pleasure Island': ['32cce5d', + '32cce5dcb86cf9e7f5b061ee49e737dbb845b46da54792d7b7f33b7a11b0bca1'], + 'Pokey Park': ['815b6f6', + '815b6f6b626cf178c02cc0e4c75b71bb100cc52a503129d9d5c03c6264e733b8'], + 'Rotting Heights': ['0844655', + '0844655d058e2f4cb3a8ead6c2a44d0c1b6512a36f36f2c2cbb3a7f313c1ad63'], + 'Three Monkeys Park': ['0153987', + '0153987dbf8e1ec665205d7b39aeb4b88cf1f24dcadba61cf352ee22a919fcdb'], + 'Trinity Islands': ['829abd6', + '829abd64d95a646e6a1462b1465588e434e0b1b42d9857308687b7986b558a57'], + 'Urban Park': ['835ec8b', + '835ec8bdba3dc4086906126907c022cf42fa0f9cd6ee06221f36aac526ac4ec4'], + 'Utopia Park': ['0dcee48', + '0dcee4815ded0995d5b2b675e409eb2d37814194e4c8cea8ce1dbff5b1e9d91b'], + 'Woodworm Park': ['66ab5d1', + '66ab5d1e8412c94cd6bfa40a664167df7df651d67b90da2a612108212ebc98d3'], + 'White Water Park': ['ba94426', + 'ba94426ecde1d6b375f566b155573e8a1471dcf62c651bafcb751f04f542cd5c'] \ No newline at end of file diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index b4906d7422..9245d571f2 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -194,8 +194,7 @@ namespace OpenRCT2::RCT1 ImportSavedView(); // TODO: investigate why Katie's Dreamland.s4 and .sea have different patches - // TODO: s4 patch system is broken since .s4 files do not use scenario name, but rather slot - RCT12::FetchAndApplyScenarioPatch(_s4.ScenarioName, _isScenario); + RCT12::FetchAndApplyScenarioPatch(_s4Path, _isScenario); FixNextGuestNumber(gameState); CountBlockSections(); SetDefaultNames(); diff --git a/src/openrct2/rct12/ScenarioPatcher.cpp b/src/openrct2/rct12/ScenarioPatcher.cpp index e2163cfa53..406fbf5b2b 100644 --- a/src/openrct2/rct12/ScenarioPatcher.cpp +++ b/src/openrct2/rct12/ScenarioPatcher.cpp @@ -12,6 +12,7 @@ #include "../Context.h" #include "../Game.h" #include "../PlatformEnvironment.h" +#include "../core/Crypt.h" #include "../core/File.h" #include "../core/Guard.hpp" #include "../core/Json.hpp" @@ -29,6 +30,9 @@ #include +// Generic keys +static const std::string s_scenarioNameKey = "scenario_name"; +static const std::string s_fullSHAKey = "sha256"; static const std::string s_coordinatesKey = "coordinates"; // Land Ownership Keys @@ -377,22 +381,58 @@ static void ApplyRideFixes(const json_t& scenarioPatch) } } -static u8string GetPatchFileName(u8string_view scenarioName) +static u8string getScenarioSHA256(u8string_view scenarioPath) +{ + auto env = OpenRCT2::GetContext()->GetPlatformEnvironment(); + std::cout << "Scenario path is: " << scenarioPath << std::endl; + auto scenarioData = File::ReadAllBytes(scenarioPath); + auto scenarioHash = Crypt::SHA256(scenarioData.data(), scenarioData.size()); + std::cout << "ScenarioHash is: " << String::StringFromHex(scenarioHash) << std::endl; + return String::StringFromHex(scenarioHash); +} + +static u8string GetPatchFileName(u8string_view scenarioHash) { auto env = OpenRCT2::GetContext()->GetPlatformEnvironment(); auto scenarioPatches = env->GetDirectoryPath(OpenRCT2::DIRBASE::OPENRCT2, OpenRCT2::DIRID::SCENARIO_PATCHES); - auto scenarioPatchFile = Path::WithExtension(Path::GetFileNameWithoutExtension(scenarioName), ".json"); + auto scenarioPatchFile = Path::WithExtension(scenarioHash.substr(0, 7), ".parkpatch"); return Path::Combine(scenarioPatches, scenarioPatchFile); } -void RCT12::FetchAndApplyScenarioPatch(u8string_view scenarioName, bool isScenario) +static bool ValidateSHA256(const json_t& scenarioPatch, u8string_view scenarioHash) { - auto patchPath = GetPatchFileName(scenarioName); - std::cout << "Path is: " << patchPath << std::endl; - // TODO: Check if case sensitive, some scenario names have all lowercase variations + if (!scenarioPatch.contains(s_scenarioNameKey)) + { + Guard::Assert(0, "All .parkpatch files should contain the name of the original scenario"); + return false; + } + + if (!scenarioPatch.contains(s_fullSHAKey)) + { + Guard::Assert(0, "All .parkpatch files should contain the sha256 of the original scenario"); + return false; + } + + auto scenarioName = Json::GetString(scenarioPatch[s_scenarioNameKey]); + auto scenarioSHA = Json::GetString(scenarioPatch[s_fullSHAKey]); + std::cout << "Validating Scenario '" << scenarioName << "' with SHA256 '" << scenarioSHA << "'" << std::endl; + + return scenarioSHA == scenarioHash; +} + +void RCT12::FetchAndApplyScenarioPatch(u8string_view scenarioPath, bool isScenario) +{ + auto scenarioSHA = getScenarioSHA256(scenarioPath); + auto patchPath = GetPatchFileName(scenarioSHA); + std::cout << "Patch is: " << patchPath << " full SHA" << scenarioSHA << std::endl; if (File::Exists(patchPath)) { auto scenarioPatch = Json::ReadFromFile(patchPath); + if (!ValidateSHA256(scenarioPatch, scenarioSHA)) + { + Guard::Assert(0, "Invalid full SHA256. Check for shortened SHA collision"); + return; + } // TODO: Land ownership is applied even when loading saved scenario. Should it? ApplyLandOwnershipFixes(scenarioPatch); if (isScenario) diff --git a/src/openrct2/rct12/ScenarioPatcher.h b/src/openrct2/rct12/ScenarioPatcher.h index ebf564b9c5..d89d0406e8 100644 --- a/src/openrct2/rct12/ScenarioPatcher.h +++ b/src/openrct2/rct12/ScenarioPatcher.h @@ -13,5 +13,5 @@ namespace RCT12 { - void FetchAndApplyScenarioPatch(u8string_view scenarioName, bool isScenario); + void FetchAndApplyScenarioPatch(u8string_view scenarioPath, bool isScenario); } diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 4e8aa3af55..77505c06da 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -506,11 +506,7 @@ namespace OpenRCT2::RCT2 gameState.Park.Name = GetUserString(_s6.ParkName); - // Checking _s6.ScenarioFilename is generally more reliable as it survives renaming. - // However, some WW/TT scenarios have this incorrectly set to "Six Flags Magic Mountain.SC6", - // so for those cases (as well as for SFMM proper, we’ll have to check the filename. - RCT12::FetchAndApplyScenarioPatch( - _s6.ScenarioFilename != gScenarioFileName ? gScenarioFileName : _s6.ScenarioFilename, _isScenario); + RCT12::FetchAndApplyScenarioPatch(_s6Path, _isScenario); ResearchDetermineFirstOfType(); UpdateConsolidatedPatrolAreas();