338 |
338 |
339 static int32 ClearTile_Industry(TileIndex tile, byte flags) |
339 static int32 ClearTile_Industry(TileIndex tile, byte flags) |
340 { |
340 { |
341 Industry *i = GetIndustryByTile(tile); |
341 Industry *i = GetIndustryByTile(tile); |
342 |
342 |
343 /* * water can destroy industries |
343 /* water can destroy industries |
344 * in editor you can bulldoze industries |
344 * in editor you can bulldoze industries |
345 * with magic_bulldozer cheat you can destroy industries |
345 * with magic_bulldozer cheat you can destroy industries |
346 * (area around OILRIG is water, so water shouldn't flood it |
346 * (area around OILRIG is water, so water shouldn't flood it |
347 */ |
347 */ |
348 if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR && |
348 if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR && |
349 !_cheats.magic_bulldozer.value) || |
349 !_cheats.magic_bulldozer.value) || |
350 (_current_player == OWNER_WATER && i->type == IT_OIL_RIG)) { |
350 (_current_player == OWNER_WATER && i->type == IT_OIL_RIG)) { |
351 SetDParam(0, STR_4802_COAL_MINE + i->type); |
351 SetDParam(0, STR_4802_COAL_MINE + i->type); |
352 return_cmd_error(STR_4800_IN_THE_WAY); |
352 return_cmd_error(STR_4800_IN_THE_WAY); |
407 case GFX_SUGAR_MINE_SIEVE: |
407 case GFX_SUGAR_MINE_SIEVE: |
408 if ((_tick_counter & 1) == 0) { |
408 if ((_tick_counter & 1) == 0) { |
409 m = _m[tile].m3 + 1; |
409 m = _m[tile].m3 + 1; |
410 |
410 |
411 switch (m & 7) { |
411 switch (m & 7) { |
412 case 2: SndPlayTileFx(SND_2D_RIP_2, tile); break; |
412 case 2: SndPlayTileFx(SND_2D_RIP_2, tile); break; |
413 case 6: SndPlayTileFx(SND_29_RIP, tile); break; |
413 case 6: SndPlayTileFx(SND_29_RIP, tile); break; |
414 } |
414 } |
415 |
415 |
416 if (m >= 96) { |
416 if (m >= 96) { |
417 m = 0; |
417 m = 0; |
1901 |
1901 |
1902 const TileTypeProcs _tile_type_industry_procs = { |
1902 const TileTypeProcs _tile_type_industry_procs = { |
1903 DrawTile_Industry, /* draw_tile_proc */ |
1903 DrawTile_Industry, /* draw_tile_proc */ |
1904 GetSlopeZ_Industry, /* get_slope_z_proc */ |
1904 GetSlopeZ_Industry, /* get_slope_z_proc */ |
1905 ClearTile_Industry, /* clear_tile_proc */ |
1905 ClearTile_Industry, /* clear_tile_proc */ |
1906 GetAcceptedCargo_Industry, /* get_accepted_cargo_proc */ |
1906 GetAcceptedCargo_Industry, /* get_accepted_cargo_proc */ |
1907 GetTileDesc_Industry, /* get_tile_desc_proc */ |
1907 GetTileDesc_Industry, /* get_tile_desc_proc */ |
1908 GetTileTrackStatus_Industry, /* get_tile_track_status_proc */ |
1908 GetTileTrackStatus_Industry, /* get_tile_track_status_proc */ |
1909 ClickTile_Industry, /* click_tile_proc */ |
1909 ClickTile_Industry, /* click_tile_proc */ |
1910 AnimateTile_Industry, /* animate_tile_proc */ |
1910 AnimateTile_Industry, /* animate_tile_proc */ |
1911 TileLoop_Industry, /* tile_loop_proc */ |
1911 TileLoop_Industry, /* tile_loop_proc */ |