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
@@ -21,6 +21,7 @@
|
||||
#include "cheat_type.h"
|
||||
#include "genworld.h"
|
||||
#include "tree_map.h"
|
||||
#include "tunnel_map.h"
|
||||
#include "newgrf_cargo.h"
|
||||
#include "newgrf_debug.h"
|
||||
#include "newgrf_industrytiles.h"
|
||||
@@ -1457,6 +1458,11 @@ static CommandCost CheckIfIndustryIsAllowed(TileIndex tile, int type, const Town
|
||||
return_cmd_error(STR_ERROR_CAN_ONLY_BE_BUILT_NEAR_TOWN_CENTER);
|
||||
}
|
||||
|
||||
if (type == IT_OIL_RIG &&
|
||||
(IsTunnelInWay(tile, 0) ||
|
||||
IsTunnelInWay(tile + TileDiffXY(0, 1), 0) ||
|
||||
IsTunnelInWay(tile + TileDiffXY(1, 2), 0))) return_cmd_error(STR_ERROR_NO_DRILLING_ABOVE_CHUNNEL);
|
||||
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user