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

Function CheckClearTile

src/town_cmd.cpp:3478–3484  ·  view source on GitHub ↗

* Check whether the land can be cleared. * @param tile Tile to check. * @return true if the tile can be cleared. */

Source from the content-addressed store, hash-verified

3476 * @return true if the tile can be cleared.
3477 */
3478static bool CheckClearTile(TileIndex tile)
3479{
3480 Backup<CompanyID> cur_company(_current_company, OWNER_NONE);
3481 CommandCost r = Command<CMD_LANDSCAPE_CLEAR>::Do({}, tile);
3482 cur_company.Restore();
3483 return r.Succeeded();
3484}
3485
3486/**
3487 * Perform a 9x9 tiles circular search from the center of the town

Callers 1

TownActionBuildStatueFunction · 0.85

Calls 2

SucceededMethod · 0.80
RestoreMethod · 0.45

Tested by

no test coverage detected