mirror of https://github.com/OpenRCT2/OpenRCT2.git
Use Is/Set Indestructible
This commit is contained in:
parent
411e5c47a2
commit
92cdbfb0a8
|
@ -117,7 +117,7 @@ public:
|
|||
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(
|
||||
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;
|
||||
}
|
||||
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE)
|
||||
if (tileElement->AsTrack()->IsIndestructible())
|
||||
{
|
||||
gGameCommandErrorText = STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION;
|
||||
return MONEY32_UNDEFINED;
|
||||
|
|
|
@ -633,14 +633,7 @@ static bool scenario_prepare_rides_for_save()
|
|||
}
|
||||
}
|
||||
|
||||
if (markTrackAsIndestructible)
|
||||
{
|
||||
it.element->flags |= TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE;
|
||||
}
|
||||
else
|
||||
{
|
||||
it.element->flags &= ~TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE;
|
||||
}
|
||||
it.element->AsTrack()->SetIsIndestructible(markTrackAsIndestructible);
|
||||
}
|
||||
} while (tile_element_iterator_next(&it));
|
||||
|
||||
|
|
Loading…
Reference in New Issue