(svn r11107) -Feature: some tool so one can still build tunnels under rails (and other structures) when the owner of the structure built it on foundations and if you have enough "empty" space ofcourse. One could use the tool for some other construction needs too. Patch by frosch.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "table/unmovable_land.h"
|
||||
#include "genworld.h"
|
||||
#include "bridge.h"
|
||||
#include "autoslope.h"
|
||||
|
||||
/** Destroy a HQ.
|
||||
* During normal gameplay you can only implicitely destroy a HQ when you are
|
||||
@@ -408,6 +409,10 @@ static CommandCost TerraformTile_Unmovable(TileIndex tile, uint32 flags, uint z_
|
||||
/* Owned land remains unsold */
|
||||
if (IsOwnedLand(tile) && CheckTileOwnership(tile)) return CommandCost();
|
||||
|
||||
if (AutoslopeEnabled() && (IsStatue(tile) || IsCompanyHQ(tile))) {
|
||||
if (!IsSteepSlope(tileh_new) && (z_new + GetSlopeMaxZ(tileh_new) == GetTileMaxZ(tile))) return _price.terraform;
|
||||
}
|
||||
|
||||
return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user