MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / TerraformTownTile

Function TerraformTownTile

src/town_cmd.cpp:1121–1129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1119}
1120
1121static bool TerraformTownTile(TileIndex tile, Slope edges, bool dir)
1122{
1123 assert(tile < Map::Size());
1124
1125 CommandCost r = std::get<0>(Command<CMD_TERRAFORM_LAND>::Do({DoCommandFlag::Auto, DoCommandFlag::NoWater}, tile, edges, dir));
1126 if (r.Failed() || r.GetCost() >= (_price[PR_TERRAFORM] + 2) * 8) return false;
1127 Command<CMD_TERRAFORM_LAND>::Do({DoCommandFlag::Auto, DoCommandFlag::NoWater, DoCommandFlag::Execute}, tile, edges, dir);
1128 return true;
1129}
1130
1131static void LevelTownLand(TileIndex tile)
1132{

Callers 1

LevelTownLandFunction · 0.85

Calls 2

FailedMethod · 0.80
GetCostMethod · 0.45

Tested by

no test coverage detected