Loading

Paste #pz8my8xcv

  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.  
  6.     /* Rivers can't be terraformed if the resulting formation is not flat or inclined */
  7.     if (IsWaterTile(tile) && IsRiver(tile)) {
  8.         if (IsTileFlat(tile) && IsInclinedSlope(tileh_new)) {
  9.         }
  10.         else {
  11.             return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
  12.         }
  13.     }
  14.     return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  15. }

Version history

Revision # Author Created at
pud3xwsld Anonymous 20 Mar 2015, 20:34:03 UTC Diff
psebpsnid Anonymous 20 Mar 2015, 20:25:12 UTC Diff
pf0ccdkvi Anonymous 20 Mar 2015, 20:03:08 UTC Diff

Comments