summaryrefslogtreecommitdiff
path: root/industry_cmd.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-09-03 17:57:27 +0000
committerdarkvater <darkvater@openttd.org>2004-09-03 17:57:27 +0000
commit7b02cd3248650d0ece425b7640a9631f2d26c067 (patch)
treea7cb9d6999e2ad750ce6c0217f7e84aa1920584e /industry_cmd.c
parentb5a0840621d291ed384f2abac305a850bf1eeea3 (diff)
downloadopenttd-7b02cd3248650d0ece425b7640a9631f2d26c067.tar.xz
(svn r150) -Fix: [1010833] Turning on the magic bulldozer removes oil rigs
-Fix: [993493] Buildings on water -Feature: Water floods everything, including vehicles.
Diffstat (limited to 'industry_cmd.c')
-rw-r--r--industry_cmd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index 067a91458..bd955dbab 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -378,7 +378,14 @@ static int32 ClearTile_Industry(uint tile, byte flags)
{
Industry *i = DEREF_INDUSTRY(_map2[tile]);
- if ((_current_player == OWNER_WATER || _game_mode != GM_EDITOR) && !_cheats.magic_bulldozer.value) {
+ /* * water can destroy industries
+ * in editor you can bulldoze industries
+ * with magic_bulldozer cheat you can destroy industries
+ * (area around OILRIG is water, so water shouldn't flood it
+ */
+ if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR &&
+ !_cheats.magic_bulldozer.value) ||
+ (_current_player == OWNER_WATER && i->type == IT_OIL_RIG) ) {
SET_DPARAM16(0, STR_4802_COAL_MINE + i->type);
return_cmd_error(STR_4800_IN_THE_WAY);
}