Codechange: use ScriptMap size functions instead of global functions
This commit is contained in:
@@ -253,7 +253,7 @@
|
||||
/* static */ bool ScriptTile::RaiseTile(TileIndex tile, int32 slope)
|
||||
{
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
|
||||
EnforcePrecondition(false, tile < ::MapSize());
|
||||
EnforcePrecondition(false, tile < ScriptMap::GetMapSize());
|
||||
|
||||
return ScriptObject::Command<CMD_TERRAFORM_LAND>::Do(tile, (::Slope)slope, true);
|
||||
}
|
||||
@@ -261,7 +261,7 @@
|
||||
/* static */ bool ScriptTile::LowerTile(TileIndex tile, int32 slope)
|
||||
{
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
|
||||
EnforcePrecondition(false, tile < ::MapSize());
|
||||
EnforcePrecondition(false, tile < ScriptMap::GetMapSize());
|
||||
|
||||
return ScriptObject::Command<CMD_TERRAFORM_LAND>::Do(tile, (::Slope)slope, false);
|
||||
}
|
||||
@@ -269,8 +269,8 @@
|
||||
/* static */ bool ScriptTile::LevelTiles(TileIndex start_tile, TileIndex end_tile)
|
||||
{
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
|
||||
EnforcePrecondition(false, start_tile < ::MapSize());
|
||||
EnforcePrecondition(false, end_tile < ::MapSize());
|
||||
EnforcePrecondition(false, start_tile < ScriptMap::GetMapSize());
|
||||
EnforcePrecondition(false, end_tile < ScriptMap::GetMapSize());
|
||||
|
||||
return ScriptObject::Command<CMD_LEVEL_LAND>::Do(end_tile, start_tile, false, LM_LEVEL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user