diff options
author | rubidium <rubidium@openttd.org> | 2007-08-30 17:17:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-30 17:17:04 +0000 |
commit | f4482907dabf064299c7ef50a3ff47589ccb54ff (patch) | |
tree | 8562d4448fae5c239425c0e3a045ac05afd33329 /src/unmovable_cmd.cpp | |
parent | f8306999712ddfd98ee342962ff446ccadcd8d1a (diff) | |
download | openttd-f4482907dabf064299c7ef50a3ff47589ccb54ff.tar.xz |
(svn r11005) -Codechange: move the tiletype specific terraforming checks to the functions for those tile types.
-Codechange: barren the rail grounds on terraforming.
Diffstat (limited to 'src/unmovable_cmd.cpp')
-rw-r--r-- | src/unmovable_cmd.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index 079e46d07..ee486cbfa 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -398,6 +398,14 @@ static void ChangeTileOwner_Unmovable(TileIndex tile, PlayerID old_player, Playe } } +static CommandCost TerraformTile_Unmovable(TileIndex tile, uint32 flags, uint z_new, Slope tileh_new) +{ + /* Owned land remains unsold */ + if (IsOwnedLand(tile) && CheckTileOwnership(tile)) return CommandCost(); + + return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); +} + extern const TileTypeProcs _tile_type_unmovable_procs = { DrawTile_Unmovable, /* draw_tile_proc */ GetSlopeZ_Unmovable, /* get_slope_z_proc */ @@ -412,4 +420,5 @@ extern const TileTypeProcs _tile_type_unmovable_procs = { NULL, /* get_produced_cargo_proc */ NULL, /* vehicle_enter_tile_proc */ GetFoundation_Unmovable, /* get_foundation_proc */ + TerraformTile_Unmovable, /* terraform_tile_proc */ }; |