Chunnel patch 28397: Codechange: Chunnels can't pass oilrigs.
https://www.tt-forums.net/viewtopic.php?p=1183416#p1183416
This commit is contained in:

committed by
Jonathan G Rennison

parent
dfce9cc4c0
commit
1ac8f66de1
@@ -44,6 +44,8 @@
|
||||
#include "water.h"
|
||||
#include "company_gui.h"
|
||||
#include "viewport_func.h"
|
||||
#include "station_map.h"
|
||||
#include "industry_map.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/bridge_land.h"
|
||||
@@ -707,6 +709,12 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
|
||||
if(direction == DIAGDIR_SW && (end_tileh & SLOPE_SW) == SLOPE_SW) break;
|
||||
if(direction == DIAGDIR_NW && (end_tileh & SLOPE_NW) == SLOPE_NW) break;
|
||||
|
||||
/* No drilling under oil rigs.*/
|
||||
if ((IsTileType(end_tile, MP_STATION) && IsOilRig(end_tile)) ||
|
||||
(IsTileType(end_tile, MP_INDUSTRY) &&
|
||||
GetIndustryGfx(end_tile) >= GFX_OILRIG_1 &&
|
||||
GetIndustryGfx(end_tile) <= GFX_OILRIG_5)) return_cmd_error(STR_ERROR_NO_DRILLING_ABOVE_CHUNNEL);
|
||||
|
||||
end_tile += delta;
|
||||
tiles++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user