mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #14667: Unpurchaseable land tiles in Extreme Hawaiian Island
This commit is contained in:
parent
654fb83d3c
commit
864de57877
|
@ -3,6 +3,7 @@
|
||||||
- Feature: [#15084] [Plugin] Add "vehicle.crash" hook
|
- Feature: [#15084] [Plugin] Add "vehicle.crash" hook
|
||||||
- Feature: [#15143] Added a shortcut key for Giant Screenshot.
|
- Feature: [#15143] Added a shortcut key for Giant Screenshot.
|
||||||
- Fix: [#14316] Closing the Track Designs Manager window causes broken state.
|
- Fix: [#14316] Closing the Track Designs Manager window causes broken state.
|
||||||
|
- Fix: [#14667] “Extreme Hawaiian Island” has unpurchaseable land tiles (original bug).
|
||||||
- Fix: [#15096] Crash when placing entrances in the scenario editor near the map corner.
|
- Fix: [#15096] Crash when placing entrances in the scenario editor near the map corner.
|
||||||
- Fix: [#15142] ToonTowner's mine roofs were moved into the pirate theme scenery group instead of the mine theme scenery group.
|
- Fix: [#15142] ToonTowner's mine roofs were moved into the pirate theme scenery group instead of the mine theme scenery group.
|
||||||
- Fix: [#15148] Track Designs Manager delete confirmation window doesn't display properly.
|
- Fix: [#15148] Track Designs Manager delete confirmation window doesn't display properly.
|
||||||
|
|
|
@ -472,6 +472,12 @@ public:
|
||||||
auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark();
|
auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark();
|
||||||
park.Name = GetUserString(_s6.park_name);
|
park.Name = GetUserString(_s6.park_name);
|
||||||
|
|
||||||
|
FixLandOwnership();
|
||||||
|
|
||||||
|
research_determine_first_of_type();
|
||||||
|
}
|
||||||
|
void FixLandOwnership() const
|
||||||
|
{
|
||||||
if (String::Equals(_s6.scenario_filename, "Europe - European Cultural Festival.SC6"))
|
if (String::Equals(_s6.scenario_filename, "Europe - European Cultural Festival.SC6"))
|
||||||
{
|
{
|
||||||
// This scenario breaks pathfinding. Create passages between the worlds. (List is grouped by neighbouring tiles.)
|
// This scenario breaks pathfinding. Create passages between the worlds. (List is grouped by neighbouring tiles.)
|
||||||
|
@ -486,8 +492,33 @@ public:
|
||||||
OWNERSHIP_OWNED);
|
OWNERSHIP_OWNED);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
}
|
}
|
||||||
|
else if (String::Equals(gScenarioFileName, "N America - Extreme Hawaiian Island.SC6"))
|
||||||
research_determine_first_of_type();
|
{
|
||||||
|
FixLandOwnershipTilesWithOwnership(
|
||||||
|
{
|
||||||
|
{ 132, 124 },
|
||||||
|
{ 133, 124 },
|
||||||
|
{ 133, 125 },
|
||||||
|
{ 133, 126 },
|
||||||
|
{ 119, 35 },
|
||||||
|
{ 132, 62 },
|
||||||
|
{ 133, 67 },
|
||||||
|
{ 136, 71 },
|
||||||
|
{ 87, 33 },
|
||||||
|
{ 87, 34 },
|
||||||
|
{ 90, 36 },
|
||||||
|
{ 91, 36 },
|
||||||
|
},
|
||||||
|
OWNERSHIP_OWNED);
|
||||||
|
// We set the doNotDowngrade flag for cases where the player has used a cheat to own all land.
|
||||||
|
FixLandOwnershipTilesWithOwnership(
|
||||||
|
{
|
||||||
|
{ 49, 99 },
|
||||||
|
{ 50, 99 },
|
||||||
|
{ 88, 110 },
|
||||||
|
},
|
||||||
|
OWNERSHIP_AVAILABLE, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImportRides()
|
void ImportRides()
|
||||||
|
|
|
@ -2494,13 +2494,16 @@ void FixLandOwnershipTiles(std::initializer_list<TileCoordsXY> tiles)
|
||||||
FixLandOwnershipTilesWithOwnership(tiles, OWNERSHIP_AVAILABLE);
|
FixLandOwnershipTilesWithOwnership(tiles, OWNERSHIP_AVAILABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FixLandOwnershipTilesWithOwnership(std::initializer_list<TileCoordsXY> tiles, uint8_t ownership)
|
void FixLandOwnershipTilesWithOwnership(std::initializer_list<TileCoordsXY> tiles, uint8_t ownership, bool doNotDowngrade)
|
||||||
{
|
{
|
||||||
for (const TileCoordsXY* tile = tiles.begin(); tile != tiles.end(); ++tile)
|
for (const TileCoordsXY* tile = tiles.begin(); tile != tiles.end(); ++tile)
|
||||||
{
|
{
|
||||||
auto surfaceElement = map_get_surface_element_at(tile->ToCoordsXY());
|
auto surfaceElement = map_get_surface_element_at(tile->ToCoordsXY());
|
||||||
if (surfaceElement != nullptr)
|
if (surfaceElement != nullptr)
|
||||||
{
|
{
|
||||||
|
if (doNotDowngrade && surfaceElement->GetOwnership() == OWNERSHIP_OWNED)
|
||||||
|
continue;
|
||||||
|
|
||||||
surfaceElement->SetOwnership(ownership);
|
surfaceElement->SetOwnership(ownership);
|
||||||
update_park_fences_around_tile({ (*tile).x * 32, (*tile).y * 32 });
|
update_park_fences_around_tile({ (*tile).x * 32, (*tile).y * 32 });
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,6 +300,7 @@ void map_obstruction_set_error_text(TileElement* tileElement, GameActions::Resul
|
||||||
uint16_t check_max_allowable_land_rights_for_tile(const CoordsXYZ& tileMapPos);
|
uint16_t check_max_allowable_land_rights_for_tile(const CoordsXYZ& tileMapPos);
|
||||||
|
|
||||||
void FixLandOwnershipTiles(std::initializer_list<TileCoordsXY> tiles);
|
void FixLandOwnershipTiles(std::initializer_list<TileCoordsXY> tiles);
|
||||||
void FixLandOwnershipTilesWithOwnership(std::initializer_list<TileCoordsXY> tiles, uint8_t ownership);
|
void FixLandOwnershipTilesWithOwnership(
|
||||||
|
std::initializer_list<TileCoordsXY> tiles, uint8_t ownership, bool doNotDowngrade = false);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue