mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(svn r3416) - Fix: Disallow building an oil rig above sea level.
This commit is contained in:
parent
a1342c9d52
commit
128249e63e
@ -1170,7 +1170,8 @@ static bool CheckNewIndustry_Oil(TileIndex tile, int type)
|
|||||||
{
|
{
|
||||||
if (_game_mode == GM_EDITOR && _ignore_restrictions) return true;
|
if (_game_mode == GM_EDITOR && _ignore_restrictions) return true;
|
||||||
if (_game_mode == GM_EDITOR && type != IT_OIL_RIG) return true;
|
if (_game_mode == GM_EDITOR && type != IT_OIL_RIG) return true;
|
||||||
if (DistanceFromEdge(TILE_ADDXY(tile, 1, 1)) < 16) return true;
|
if ((type != IT_OIL_RIG || TileHeight(tile) == 0) &&
|
||||||
|
DistanceFromEdge(TILE_ADDXY(tile, 1, 1)) < 16) return true;
|
||||||
|
|
||||||
_error_message = STR_483B_CAN_ONLY_BE_POSITIONED;
|
_error_message = STR_483B_CAN_ONLY_BE_POSITIONED;
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user