Loading

Paste #p8sll6rsy

  1. static CommandCost TerraformTile_Water(TileIndex tile, DoCommandFlag flags, int z_new, Slope tileh_new)
  2. {
  3.     /* Canals can't be terraformed */
  4.     if (IsWaterTile(tile) && IsCanal(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_CANAL_FIRST);
  5.     if (IsWaterTile(tile) && IsRiver(tile)) {
  6.         if (!IsTileFlat(tileh_new) || !IsInclinedSlope(tileh_new)) {
  7.             return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED);
  8.         }
  9.     }
  10.     return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  11. }

Comments