summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-11-21 23:02:29 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commitc6d7b98808575f31103121528565ed252a3cfc6c (patch)
tree8514fed6cd3b20bbb065a21cc1820f964508f722 /src/script
parente6e69d528921ab731c4c38ee708ff31b7055fd27 (diff)
downloadopenttd-c6d7b98808575f31103121528565ed252a3cfc6c.tar.xz
Codechange: Un-bitstuff landscape commands.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_airport.cpp2
-rw-r--r--src/script/api/script_bridge.cpp2
-rw-r--r--src/script/api/script_marine.cpp10
-rw-r--r--src/script/api/script_road.cpp2
-rw-r--r--src/script/api/script_tile.cpp8
-rw-r--r--src/script/api/script_tunnel.cpp2
6 files changed, 13 insertions, 13 deletions
diff --git a/src/script/api/script_airport.cpp b/src/script/api/script_airport.cpp
index 8ed4dbfca..4416a4bcd 100644
--- a/src/script/api/script_airport.cpp
+++ b/src/script/api/script_airport.cpp
@@ -86,7 +86,7 @@
EnforcePrecondition(false, ::IsValidTile(tile))
EnforcePrecondition(false, IsAirportTile(tile) || IsHangarTile(tile));
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}
/* static */ int32 ScriptAirport::GetNumHangars(TileIndex tile)
diff --git a/src/script/api/script_bridge.cpp b/src/script/api/script_bridge.cpp
index fbea9fb12..b0fda2412 100644
--- a/src/script/api/script_bridge.cpp
+++ b/src/script/api/script_bridge.cpp
@@ -121,7 +121,7 @@ static void _DoCommandReturnBuildBridge1(class ScriptInstance *instance)
{
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
EnforcePrecondition(false, IsBridgeTile(tile));
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}
/* static */ char *ScriptBridge::GetName(BridgeID bridge_id, ScriptVehicle::VehicleType vehicle_type)
diff --git a/src/script/api/script_marine.cpp b/src/script/api/script_marine.cpp
index 059157e27..ba5163e49 100644
--- a/src/script/api/script_marine.cpp
+++ b/src/script/api/script_marine.cpp
@@ -125,7 +125,7 @@
EnforcePrecondition(false, ::IsValidTile(tile));
EnforcePrecondition(false, IsWaterDepotTile(tile));
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}
/* static */ bool ScriptMarine::RemoveDock(TileIndex tile)
@@ -134,7 +134,7 @@
EnforcePrecondition(false, ::IsValidTile(tile));
EnforcePrecondition(false, IsDockTile(tile));
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}
/* static */ bool ScriptMarine::RemoveBuoy(TileIndex tile)
@@ -143,7 +143,7 @@
EnforcePrecondition(false, ::IsValidTile(tile));
EnforcePrecondition(false, IsBuoyTile(tile));
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}
/* static */ bool ScriptMarine::RemoveLock(TileIndex tile)
@@ -152,7 +152,7 @@
EnforcePrecondition(false, ::IsValidTile(tile));
EnforcePrecondition(false, IsLockTile(tile));
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}
/* static */ bool ScriptMarine::RemoveCanal(TileIndex tile)
@@ -161,7 +161,7 @@
EnforcePrecondition(false, ::IsValidTile(tile));
EnforcePrecondition(false, IsCanalTile(tile));
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}
/* static */ Money ScriptMarine::GetBuildCost(BuildType build_type)
diff --git a/src/script/api/script_road.cpp b/src/script/api/script_road.cpp
index 297a8f56c..cae144a87 100644
--- a/src/script/api/script_road.cpp
+++ b/src/script/api/script_road.cpp
@@ -593,7 +593,7 @@ static bool NeighbourHasReachableRoad(::RoadType rt, TileIndex start_tile, DiagD
EnforcePrecondition(false, IsTileType(tile, MP_ROAD))
EnforcePrecondition(false, GetRoadTileType(tile) == ROAD_TILE_DEPOT);
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}
/* static */ bool ScriptRoad::RemoveRoadStation(TileIndex tile)
diff --git a/src/script/api/script_tile.cpp b/src/script/api/script_tile.cpp
index 9e67b074a..8be74c030 100644
--- a/src/script/api/script_tile.cpp
+++ b/src/script/api/script_tile.cpp
@@ -255,7 +255,7 @@
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
EnforcePrecondition(false, tile < ::MapSize());
- return ScriptObject::Command<CMD_TERRAFORM_LAND>::Do(tile, slope, 1, {});
+ return ScriptObject::Command<CMD_TERRAFORM_LAND>::Do(tile, (::Slope)slope, true);
}
/* static */ bool ScriptTile::LowerTile(TileIndex tile, int32 slope)
@@ -263,7 +263,7 @@
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
EnforcePrecondition(false, tile < ::MapSize());
- return ScriptObject::Command<CMD_TERRAFORM_LAND>::Do(tile, slope, 0, {});
+ return ScriptObject::Command<CMD_TERRAFORM_LAND>::Do(tile, (::Slope)slope, false);
}
/* static */ bool ScriptTile::LevelTiles(TileIndex start_tile, TileIndex end_tile)
@@ -272,14 +272,14 @@
EnforcePrecondition(false, start_tile < ::MapSize());
EnforcePrecondition(false, end_tile < ::MapSize());
- return ScriptObject::Command<CMD_LEVEL_LAND>::Do(end_tile, start_tile, LM_LEVEL << 1, {});
+ return ScriptObject::Command<CMD_LEVEL_LAND>::Do(end_tile, start_tile, false, LM_LEVEL);
}
/* static */ bool ScriptTile::DemolishTile(TileIndex tile)
{
EnforcePrecondition(false, ::IsValidTile(tile));
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}
/* static */ bool ScriptTile::PlantTree(TileIndex tile)
diff --git a/src/script/api/script_tunnel.cpp b/src/script/api/script_tunnel.cpp
index 8529f908d..04c182c1f 100644
--- a/src/script/api/script_tunnel.cpp
+++ b/src/script/api/script_tunnel.cpp
@@ -126,5 +126,5 @@ static void _DoCommandReturnBuildTunnel1(class ScriptInstance *instance)
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
EnforcePrecondition(false, IsTunnelTile(tile));
- return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
+ return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile);
}