* Clears tile and builds a house or house part. * @param tile The tile to build upon. * @param t The town which will own the house. * @param counter The construction stage counter for the house. * @param stage The current construction stage of the house. * @param type The type of house. * @param random_bits Random bits for newgrf houses to use. * @param is_protected Whether the house is pro
| 2539 | * @pre The house can be built here. |
| 2540 | */ |
| 2541 | static inline void ClearMakeHouseTile(TileIndex tile, Town *t, uint8_t counter, uint8_t stage, HouseID type, uint8_t random_bits, bool is_protected) |
| 2542 | { |
| 2543 | [[maybe_unused]] CommandCost cc = Command<CMD_LANDSCAPE_CLEAR>::Do({DoCommandFlag::Execute, DoCommandFlag::Auto, DoCommandFlag::NoWater}, tile); |
| 2544 | assert(cc.Succeeded()); |
| 2545 | |
| 2546 | IncreaseBuildingCount(t, type); |
| 2547 | MakeHouseTile(tile, t->index, counter, stage, type, random_bits, is_protected); |
| 2548 | if (HouseSpec::Get(type)->building_flags.Test(BuildingFlag::IsAnimated)) AddAnimatedTile(tile, false); |
| 2549 | |
| 2550 | MarkTileDirtyByTile(tile); |
| 2551 | } |
| 2552 | |
| 2553 | |
| 2554 | /** |
no test coverage detected