mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 07:13:07 +01:00
Use Is/Set Indestructible
This commit is contained in:
@@ -117,7 +117,7 @@ public:
|
|||||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS);
|
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tileElement->flags & TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE)
|
if (tileElement->AsTrack()->IsIndestructible())
|
||||||
{
|
{
|
||||||
return MakeResult(
|
return MakeResult(
|
||||||
GA_ERROR::DISALLOWED, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION);
|
GA_ERROR::DISALLOWED, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION);
|
||||||
|
|||||||
@@ -1015,7 +1015,7 @@ static money32 track_remove(
|
|||||||
return MONEY32_UNDEFINED;
|
return MONEY32_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tileElement->flags & TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE)
|
if (tileElement->AsTrack()->IsIndestructible())
|
||||||
{
|
{
|
||||||
gGameCommandErrorText = STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION;
|
gGameCommandErrorText = STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION;
|
||||||
return MONEY32_UNDEFINED;
|
return MONEY32_UNDEFINED;
|
||||||
|
|||||||
@@ -633,14 +633,7 @@ static bool scenario_prepare_rides_for_save()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (markTrackAsIndestructible)
|
it.element->AsTrack()->SetIsIndestructible(markTrackAsIndestructible);
|
||||||
{
|
|
||||||
it.element->flags |= TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
it.element->flags &= ~TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} while (tile_element_iterator_next(&it));
|
} while (tile_element_iterator_next(&it));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user