/* ****************************************************************** * Definition of the industry tile, its callbacks, and graphics chain * ******************************************************************/ spriteset(blast_furnace_spriteset_0_0, "src/graphics/industries/groundtiles.png") { tmpl_ground_tile(360, 10) } spriteset(blast_furnace_spriteset_0_0_snow, "src/graphics/industries/groundtiles.png") { tmpl_ground_tile(220, 10) } spriteset(blast_furnace_spriteset_1_0) { [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_1_0_snow) { [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_2_0) { [150, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_2_0_snow) { [150, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_3_0) { [10, 10, 64, 144, -31, -114, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_3_0_snow) { [10, 10, 64, 144, -31, -114, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_4_0) { [80, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_4_0_snow) { [80, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_5_0) { [220, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_5_0_snow) { [220, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_6_0) { [290, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_6_0_snow) { [290, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_7_0) { [360, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_7_0_snow) { [360, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_8_0) { [430, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_8_0_snow) { [430, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_9_0) { [570, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_9_0_snow) { [570, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_10_0) { [10, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [80, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [150, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [220, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [290, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [360, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [430, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [570, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [640, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_10_0_snow) { [10, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [80, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [150, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [220, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [290, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [360, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [430, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [570, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [640, 160, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_11_0) { [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_11_0_snow) { [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 10, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spriteset(blast_furnace_spriteset_12_0) { [10, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [80, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [150, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [220, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [290, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [360, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [430, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [500, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [570, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] [640, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1.png"] } spriteset(blast_furnace_spriteset_12_0_snow) { [10, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [80, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [150, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [220, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [290, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [360, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [430, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [500, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [570, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] [640, 310, 64, 122, -31, -91, ANIM | NOCROP, "src/graphics/industries/blast_furnace_1_snow.png"] } spritelayout blast_furnace_spritelayout_empty { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } } spritelayout blast_furnace_spritelayout_greeble { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_2_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_2_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } } spritelayout blast_furnace_spritelayout_blast_furnace_1 { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_4_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_4_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } // smoke sprites building { sprite: 3701 + ((animation_frame + 0)%8); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 5; yoffset: 6; zoffset: 68; xextent: 15; yextent: 7; zextent: 7; hide_sprite: 0; } } spritelayout blast_furnace_spritelayout_blast_furnace_2 { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_3_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_3_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } } spritelayout blast_furnace_spritelayout_small_shed { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_5_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_5_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } } spritelayout blast_furnace_spritelayout_ladle_transporter { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_6_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_6_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } } spritelayout blast_furnace_spritelayout_brick_building { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_7_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_7_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } } spritelayout blast_furnace_spritelayout_small_tanks { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_8_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_8_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } } spritelayout blast_furnace_spritelayout_large_shed_rear_part { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: 2022; recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_0_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_9_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_9_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } } spritelayout blast_furnace_spritelayout_large_shed_front_part { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: blast_furnace_spriteset_11_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_11_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: blast_furnace_spriteset_11_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_11_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_10_0(1*(animation_frame < 10) ? (animation_frame % 10) : 0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_10_0_snow(1*(animation_frame < 10) ? (animation_frame % 10) : 0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } } spritelayout blast_furnace_spritelayout_casting_shed { // Industry-specific ground (snow aware) // non-snow childsprite { sprite: blast_furnace_spriteset_11_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_11_0(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (LOAD_TEMP(13)); always_draw: 1; } // snow childsprite { sprite: blast_furnace_spriteset_11_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } childsprite { sprite: blast_furnace_spriteset_11_0_snow(0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; hide_sprite: (!LOAD_TEMP(13)); always_draw: 1; } // buildings (snow aware) building { sprite: blast_furnace_spriteset_12_0(1*(animation_frame < 10) ? (animation_frame % 10) : 0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(255)); } building { sprite: blast_furnace_spriteset_12_0_snow(1*(animation_frame < 10) ? (animation_frame % 10) : 0); recolour_mode: RECOLOUR_REMAP; palette: PALETTE_USE_DEFAULT; xoffset: 0; yoffset: 0; zoffset: 0; xextent: 16; yextent: 16; zextent: 32; always_draw: 0; hide_sprite: (LOAD_TEMP(245)); } } switch(FEAT_INDUSTRYTILES, SELF, blast_furnace_industry_layout_1_graphics_switch, relative_pos) { relative_coord(0, 0): blast_furnace_spritelayout_small_shed; relative_coord(0, 1): blast_furnace_spritelayout_empty; relative_coord(0, 2): blast_furnace_spritelayout_large_shed_rear_part; relative_coord(1, 0): blast_furnace_spritelayout_small_tanks; relative_coord(1, 1): blast_furnace_spritelayout_casting_shed; relative_coord(1, 2): blast_furnace_spritelayout_large_shed_front_part; relative_coord(2, 0): blast_furnace_spritelayout_blast_furnace_1; relative_coord(2, 1): blast_furnace_spritelayout_blast_furnace_2; relative_coord(2, 2): blast_furnace_spritelayout_ladle_transporter; relative_coord(3, 0): blast_furnace_spritelayout_blast_furnace_1; relative_coord(3, 1): blast_furnace_spritelayout_blast_furnace_2; relative_coord(3, 2): blast_furnace_spritelayout_small_shed; relative_coord(4, 0): blast_furnace_spritelayout_small_tanks; relative_coord(4, 1): blast_furnace_spritelayout_brick_building; relative_coord(4, 2): blast_furnace_spritelayout_greeble; blast_furnace_spritelayout_small_shed; // a default is needed, but should never be reached, layout definitions are explicit } switch(FEAT_INDUSTRYTILES, SELF, blast_furnace_industry_layout_2_graphics_switch, relative_pos) { relative_coord(0, 0): blast_furnace_spritelayout_small_tanks; relative_coord(0, 1): blast_furnace_spritelayout_large_shed_rear_part; relative_coord(0, 2): blast_furnace_spritelayout_small_shed; relative_coord(0, 3): blast_furnace_spritelayout_blast_furnace_1; relative_coord(0, 4): blast_furnace_spritelayout_blast_furnace_2; relative_coord(1, 0): blast_furnace_spritelayout_casting_shed; relative_coord(1, 1): blast_furnace_spritelayout_large_shed_front_part; relative_coord(1, 2): blast_furnace_spritelayout_blast_furnace_1; relative_coord(1, 3): blast_furnace_spritelayout_blast_furnace_2; relative_coord(1, 4): blast_furnace_spritelayout_brick_building; relative_coord(2, 0): blast_furnace_spritelayout_empty; relative_coord(2, 1): blast_furnace_spritelayout_large_shed_rear_part; relative_coord(2, 2): blast_furnace_spritelayout_blast_furnace_1; relative_coord(2, 3): blast_furnace_spritelayout_blast_furnace_2; relative_coord(2, 4): blast_furnace_spritelayout_small_shed; relative_coord(3, 0): blast_furnace_spritelayout_casting_shed; relative_coord(3, 1): blast_furnace_spritelayout_large_shed_front_part; relative_coord(3, 2): blast_furnace_spritelayout_ladle_transporter; relative_coord(3, 3): blast_furnace_spritelayout_empty; relative_coord(3, 4): blast_furnace_spritelayout_greeble; blast_furnace_spritelayout_small_tanks; // a default is needed, but should never be reached, layout definitions are explicit } switch(FEAT_INDUSTRYTILES, PARENT, blast_furnace_industry_graphics_switch_layouts, layout_num) { 1: blast_furnace_industry_layout_1_graphics_switch; 2: blast_furnace_industry_layout_2_graphics_switch; blast_furnace_industry_layout_1_graphics_switch; // default } switch(FEAT_INDUSTRYTILES, SELF, blast_furnace_industry_construction_state_graphics_switch, construction_state) { 0..2: spritelayout_default_construction_states; blast_furnace_industry_graphics_switch_layouts; // default } switch(FEAT_INDUSTRYTILES, SELF, blast_furnace_store_temp_vars, [STORE_TEMP(terrain_type == TILETYPE_SNOW, 13) , STORE_TEMP(0, 255) , STORE_TEMP(construction_state != 3 ? 1 : LOAD_TEMP(255), 255) , STORE_TEMP(LOAD_TEMP(13) == 0 ? 1 : LOAD_TEMP(255), 245) , STORE_TEMP(LOAD_TEMP(13) == 1 ? 1 : LOAD_TEMP(255), 255) ]) { blast_furnace_industry_construction_state_graphics_switch; // default } switch(FEAT_INDUSTRYTILES, PARENT, blast_furnace_industry_master_graphics_switch, STORE_TEMP(random_bits, 14)) { blast_furnace_store_temp_vars; // default } switch (FEAT_INDUSTRYTILES, SELF, blast_furnace_tile_fence_station, [ STORE_TEMP(LOAD_TEMP(9) * (nearby_tile_class(-1, 0) != TILE_CLASS_STATION), 9), STORE_TEMP(LOAD_TEMP(10) * (nearby_tile_class( 0, -1) != TILE_CLASS_STATION), 10), STORE_TEMP(LOAD_TEMP(11) * (nearby_tile_class( 0, 1) != TILE_CLASS_STATION), 11), STORE_TEMP(LOAD_TEMP(12) * (nearby_tile_class( 1, 0) != TILE_CLASS_STATION), 12), ]) { blast_furnace_industry_master_graphics_switch; } switch (FEAT_INDUSTRYTILES, SELF, blast_furnace_tile_fence_industry, [ STORE_TEMP(LOAD_TEMP(9) * !nearby_tile_is_same_industry(-1, 0), 9), STORE_TEMP(LOAD_TEMP(10) * !nearby_tile_is_same_industry( 0, -1), 10), STORE_TEMP(LOAD_TEMP(11) * !nearby_tile_is_same_industry( 0, 1), 11), STORE_TEMP(LOAD_TEMP(12) * !nearby_tile_is_same_industry( 1, 0), 12), ]) { blast_furnace_tile_fence_station; } switch (FEAT_INDUSTRYTILES, SELF, blast_furnace_tile_fences, [ STORE_TEMP(0, 1), STORE_TEMP(0, 2), STORE_TEMP(0, 3), STORE_TEMP(0, 4), STORE_TEMP(1, 9), STORE_TEMP(1, 10), STORE_TEMP(1, 11), STORE_TEMP(1, 12), STORE_TEMP(0, 5), STORE_TEMP(0, 6), STORE_TEMP(0, 7), STORE_TEMP(0, 8), ]) { blast_furnace_tile_fence_industry; } switch(FEAT_INDUSTRYTILES, SELF, blast_furnace_tile_1_lc_2, (nearby_tile_class( 1, 1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 1, 0) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 1, -1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 0, -1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class(-1, -1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class(-1, 0) == TILE_CLASS_INDUSTRY) | (nearby_tile_class(-1, 1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 0, 1) == TILE_CLASS_INDUSTRY)) { 1: return CB_RESULT_LOCATION_DISALLOW; return CB_RESULT_LOCATION_ALLOW; } switch (FEAT_INDUSTRYTILES, PARENT, blast_furnace_tile_1_lc_1, ( (((extra_callback_info2 & 0xFF00) >> 8) == IND_CREATION_FUND) || (((extra_callback_info2 & 0xFF00) >> 8) == IND_CREATION_PROSPECT) ) ) { 1: return CB_RESULT_LOCATION_ALLOW; blast_furnace_tile_1_lc_2; } switch (FEAT_INDUSTRYTILES, SELF, blast_furnace_tile_1_lc_0, ( nearby_tile_height(-relative_x, -relative_y) + (nearby_tile_slope(-relative_x, -relative_y) == SLOPE_FLAT ? 0 : nearby_tile_slope(-relative_x, -relative_y) == bitmask(IS_STEEP_SLOPE) ? 2 : 1 )) == (nearby_tile_height(0, 0) + (nearby_tile_slope(0, 0) == SLOPE_FLAT ? 0 : nearby_tile_slope(0, 0) == bitmask(IS_STEEP_SLOPE) ? 2 : 1)) ) { 1: blast_furnace_tile_1_lc_1; return CB_RESULT_LOCATION_DISALLOW; } switch(FEAT_INDUSTRYTILES, SELF, blast_furnace_tile_2_lc_2, (nearby_tile_class( 1, 1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 1, 0) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 1, -1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 0, -1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class(-1, -1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class(-1, 0) == TILE_CLASS_INDUSTRY) | (nearby_tile_class(-1, 1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 0, 1) == TILE_CLASS_INDUSTRY)) { 1: return CB_RESULT_LOCATION_DISALLOW; return CB_RESULT_LOCATION_ALLOW; } switch (FEAT_INDUSTRYTILES, PARENT, blast_furnace_tile_2_lc_1, ( (((extra_callback_info2 & 0xFF00) >> 8) == IND_CREATION_FUND) || (((extra_callback_info2 & 0xFF00) >> 8) == IND_CREATION_PROSPECT) ) ) { 1: return CB_RESULT_LOCATION_ALLOW; blast_furnace_tile_2_lc_2; } switch (FEAT_INDUSTRYTILES, SELF, blast_furnace_tile_2_lc_0, ( nearby_tile_height(-relative_x, -relative_y) + (nearby_tile_slope(-relative_x, -relative_y) == SLOPE_FLAT ? 0 : nearby_tile_slope(-relative_x, -relative_y) == bitmask(IS_STEEP_SLOPE) ? 2 : 1 )) == (nearby_tile_height(0, 0) + (nearby_tile_slope(0, 0) == SLOPE_FLAT ? 0 : nearby_tile_slope(0, 0) == bitmask(IS_STEEP_SLOPE) ? 2 : 1)) ) { 1: blast_furnace_tile_2_lc_1; return CB_RESULT_LOCATION_DISALLOW; } switch(FEAT_INDUSTRYTILES, SELF, blast_furnace_tile_1_anim_control, (extra_callback_info1 % 7)) { 0: return 0; 1: return 1; 2: return 2; 3: return 3; 4: return 4; 5: return 5; 6: return 6; return CB_RESULT_NEXT_FRAME; } item(FEAT_INDUSTRYTILES, blast_furnace_tile_1, 158) { property { substitute: 0; land_shape_flags: 0; special_flags: bitmask(INDTILE_FLAG_ACCEPT_ALL); animation_info: [ANIMATION_LOOPING, 7]; animation_speed: 3; animation_triggers: bitmask(ANIM_TRIGGER_INDTILE_CONSTRUCTION_STATE); } graphics { tile_check: blast_furnace_tile_1_lc_0; anim_control: blast_furnace_tile_1_anim_control; blast_furnace_tile_fences; } } item(FEAT_INDUSTRYTILES, blast_furnace_tile_2, 159) { property { substitute: 0; land_shape_flags: 0; special_flags: bitmask(INDTILE_FLAG_ACCEPT_ALL); animation_info: [ANIMATION_LOOPING, 30]; animation_speed: 4; animation_triggers: bitmask(); } graphics { tile_check: blast_furnace_tile_2_lc_0; blast_furnace_tile_fences; } } /* ************************************************* * Definition of the industry * *************************************************/ tilelayout blast_furnace_industry_layout_1_tilelayout { 0, 0: blast_furnace_tile_1; 0, 1: blast_furnace_tile_1; 0, 2: blast_furnace_tile_1; 1, 0: blast_furnace_tile_1; 1, 1: blast_furnace_tile_2; 1, 2: blast_furnace_tile_2; 2, 0: blast_furnace_tile_1; 2, 1: blast_furnace_tile_1; 2, 2: blast_furnace_tile_1; 3, 0: blast_furnace_tile_1; 3, 1: blast_furnace_tile_1; 3, 2: blast_furnace_tile_1; 4, 0: blast_furnace_tile_1; 4, 1: blast_furnace_tile_1; 4, 2: blast_furnace_tile_1; } tilelayout blast_furnace_industry_layout_2_tilelayout { 0, 0: blast_furnace_tile_1; 0, 1: blast_furnace_tile_1; 0, 2: blast_furnace_tile_1; 0, 3: blast_furnace_tile_1; 0, 4: blast_furnace_tile_1; 1, 0: blast_furnace_tile_1; 1, 1: blast_furnace_tile_2; 1, 2: blast_furnace_tile_2; 1, 3: blast_furnace_tile_1; 1, 4: blast_furnace_tile_1; 2, 0: blast_furnace_tile_1; 2, 1: blast_furnace_tile_1; 2, 2: blast_furnace_tile_1; 2, 3: blast_furnace_tile_1; 2, 4: blast_furnace_tile_1; 3, 0: blast_furnace_tile_2; 3, 1: blast_furnace_tile_2; 3, 2: blast_furnace_tile_1; 3, 3: blast_furnace_tile_1; 3, 4: blast_furnace_tile_1; } produce (blast_furnace_produce_0, [ IORE: incoming_cargo_waiting("IORE"); COAL: incoming_cargo_waiting("COAL"); SCMT: incoming_cargo_waiting("SCMT"); ], [ STEL: (LOAD_PERM(2) * 8) / 8; ], 0) switch (FEAT_INDUSTRIES, SELF, blast_furnace_produce_calculation_0, [ STORE_PERM(0, 1), STORE_PERM(0, 2), STORE_PERM( max(LOAD_PERM(3), (incoming_cargo_waiting("IORE") > 0) * current_date), 3 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(3)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(4), (incoming_cargo_waiting("COAL") > 0) * current_date), 4 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(4)) <= 90 ? 2 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(5), (incoming_cargo_waiting("SCMT") > 0) * current_date), 5 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(5)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("IORE") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("COAL") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("SCMT") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( (LOAD_PERM(2) == 0) ? LOAD_PERM(0) : 0, 0 ), ]) { blast_furnace_produce_0; } produce (blast_furnace_produce_1, [ IORE: incoming_cargo_waiting("IORE"); COAL: incoming_cargo_waiting("COAL"); SCMT: incoming_cargo_waiting("SCMT"); ], [ METL: (LOAD_PERM(2) * 8) / 8; ], 0) switch (FEAT_INDUSTRIES, SELF, blast_furnace_produce_calculation_1, [ STORE_PERM(0, 1), STORE_PERM(0, 2), STORE_PERM( max(LOAD_PERM(3), (incoming_cargo_waiting("IORE") > 0) * current_date), 3 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(3)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(4), (incoming_cargo_waiting("COAL") > 0) * current_date), 4 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(4)) <= 90 ? 2 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(5), (incoming_cargo_waiting("SCMT") > 0) * current_date), 5 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(5)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("IORE") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("COAL") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("SCMT") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( (LOAD_PERM(2) == 0) ? LOAD_PERM(0) : 0, 0 ), ]) { blast_furnace_produce_1; } produce (blast_furnace_produce_4, [ IORE: incoming_cargo_waiting("IORE"); COAL: incoming_cargo_waiting("COAL"); SCMT: incoming_cargo_waiting("SCMT"); ], [ METL: (LOAD_PERM(2) * 8) / 8; ], 0) switch (FEAT_INDUSTRIES, SELF, blast_furnace_produce_calculation_4, [ STORE_PERM(0, 1), STORE_PERM(0, 2), STORE_PERM( max(LOAD_PERM(3), (incoming_cargo_waiting("IORE") > 0) * current_date), 3 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(3)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(4), (incoming_cargo_waiting("COAL") > 0) * current_date), 4 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(4)) <= 90 ? 2 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(5), (incoming_cargo_waiting("SCMT") > 0) * current_date), 5 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(5)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("IORE") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("COAL") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("SCMT") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( (LOAD_PERM(2) == 0) ? LOAD_PERM(0) : 0, 0 ), ]) { blast_furnace_produce_4; } produce (blast_furnace_produce_5, [ IORE: incoming_cargo_waiting("IORE"); COKE: incoming_cargo_waiting("COKE"); LIME: incoming_cargo_waiting("LIME"); ], [ IRON: (LOAD_PERM(2) * 4) / 8; CSTI: (LOAD_PERM(2) * 2) / 8; SLAG: (LOAD_PERM(2) * 2) / 8; ], 0) switch (FEAT_INDUSTRIES, SELF, blast_furnace_produce_calculation_5, [ STORE_PERM(0, 1), STORE_PERM(0, 2), STORE_PERM( max(LOAD_PERM(3), (incoming_cargo_waiting("IORE") > 0) * current_date), 3 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(3)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(4), (incoming_cargo_waiting("COKE") > 0) * current_date), 4 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(4)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(5), (incoming_cargo_waiting("LIME") > 0) * current_date), 5 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(5)) <= 90 ? 2 : 0 ), 1 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("IORE") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("COKE") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("LIME") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( (LOAD_PERM(2) == 0) ? LOAD_PERM(0) : 0, 0 ), ]) { blast_furnace_produce_5; } produce (blast_furnace_produce_3, [ IORE: incoming_cargo_waiting("IORE"); COAL: incoming_cargo_waiting("COAL"); SCMT: incoming_cargo_waiting("SCMT"); ], [ METL: (LOAD_PERM(2) * 8) / 8; ], 0) switch (FEAT_INDUSTRIES, SELF, blast_furnace_produce_calculation_3, [ STORE_PERM(0, 1), STORE_PERM(0, 2), STORE_PERM( max(LOAD_PERM(3), (incoming_cargo_waiting("IORE") > 0) * current_date), 3 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(3)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(4), (incoming_cargo_waiting("COAL") > 0) * current_date), 4 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(4)) <= 90 ? 2 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(5), (incoming_cargo_waiting("SCMT") > 0) * current_date), 5 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(5)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("IORE") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("COAL") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("SCMT") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( (LOAD_PERM(2) == 0) ? LOAD_PERM(0) : 0, 0 ), ]) { blast_furnace_produce_3; } produce (blast_furnace_produce_2, [ IORE: incoming_cargo_waiting("IORE"); COAL: incoming_cargo_waiting("COAL"); SCMT: incoming_cargo_waiting("SCMT"); ], [ METL: (LOAD_PERM(2) * 8) / 8; ], 0) switch (FEAT_INDUSTRIES, SELF, blast_furnace_produce_calculation_2, [ STORE_PERM(0, 1), STORE_PERM(0, 2), STORE_PERM( max(LOAD_PERM(3), (incoming_cargo_waiting("IORE") > 0) * current_date), 3 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(3)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(4), (incoming_cargo_waiting("COAL") > 0) * current_date), 4 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(4)) <= 90 ? 2 : 0 ), 1 ), STORE_PERM( max(LOAD_PERM(5), (incoming_cargo_waiting("SCMT") > 0) * current_date), 5 ), STORE_PERM( LOAD_PERM(1) + ( (current_date - LOAD_PERM(5)) <= 90 ? 3 : 0 ), 1 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("IORE") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("COAL") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( LOAD_PERM(2) + ((incoming_cargo_waiting("SCMT") * LOAD_PERM(1)) / 8), 2 ), STORE_PERM( (LOAD_PERM(2) == 0) ? LOAD_PERM(0) : 0, 0 ), ]) { blast_furnace_produce_2; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_produce_cargo_arrival, economy) { 0: blast_furnace_produce_calculation_0; 1: blast_furnace_produce_calculation_1; 4: blast_furnace_produce_calculation_4; 5: blast_furnace_produce_calculation_5; 3: blast_furnace_produce_calculation_3; 2: blast_furnace_produce_calculation_2; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_extra_text, economy) { 0: return string(STR_EXTRA_TEXT_SECONDARY_COMBINATORY); 5: return string(STR_EXTRA_TEXT_SECONDARY_COMBINATORY); 2: return string(STR_EXTRA_TEXT_SECONDARY_COMBINATORY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_cargo_IORE_economy_0, [ current_date - LOAD_PERM(3) > 90 ]) { 0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED); 1: return 0x3800 + string(STR_EMPTY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_cargo_COAL_economy_0, [ current_date - LOAD_PERM(4) > 90 ]) { 0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED); 1: return 0x3800 + string(STR_EMPTY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_cargo_SCMT_economy_0, [ current_date - LOAD_PERM(5) > 90 ]) { 0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED); 1: return 0x3800 + string(STR_EMPTY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_switch_cargo_economy_0, getbits(extra_callback_info2, 16, 23)) { IORE: blast_furnace_cargo_subtype_display_cargo_IORE_economy_0; COAL: blast_furnace_cargo_subtype_display_cargo_COAL_economy_0; SCMT: blast_furnace_cargo_subtype_display_cargo_SCMT_economy_0; return CB_RESULT_NO_TEXT; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_cargo_IORE_economy_5, [ current_date - LOAD_PERM(3) > 90 ]) { 0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED); 1: return 0x3800 + string(STR_EMPTY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_cargo_COKE_economy_5, [ current_date - LOAD_PERM(4) > 90 ]) { 0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED); 1: return 0x3800 + string(STR_EMPTY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_cargo_LIME_economy_5, [ current_date - LOAD_PERM(5) > 90 ]) { 0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED); 1: return 0x3800 + string(STR_EMPTY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_switch_cargo_economy_5, getbits(extra_callback_info2, 16, 23)) { IORE: blast_furnace_cargo_subtype_display_cargo_IORE_economy_5; COKE: blast_furnace_cargo_subtype_display_cargo_COKE_economy_5; LIME: blast_furnace_cargo_subtype_display_cargo_LIME_economy_5; return CB_RESULT_NO_TEXT; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_cargo_IORE_economy_2, [ current_date - LOAD_PERM(3) > 90 ]) { 0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED); 1: return 0x3800 + string(STR_EMPTY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_cargo_COAL_economy_2, [ current_date - LOAD_PERM(4) > 90 ]) { 0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED); 1: return 0x3800 + string(STR_EMPTY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_cargo_SCMT_economy_2, [ current_date - LOAD_PERM(5) > 90 ]) { 0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED); 1: return 0x3800 + string(STR_EMPTY); } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_switch_cargo_economy_2, getbits(extra_callback_info2, 16, 23)) { IORE: blast_furnace_cargo_subtype_display_cargo_IORE_economy_2; COAL: blast_furnace_cargo_subtype_display_cargo_COAL_economy_2; SCMT: blast_furnace_cargo_subtype_display_cargo_SCMT_economy_2; return CB_RESULT_NO_TEXT; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display_switch_economy, economy) { 0: blast_furnace_cargo_subtype_display_switch_cargo_economy_0; 5: blast_furnace_cargo_subtype_display_switch_cargo_economy_5; 2: blast_furnace_cargo_subtype_display_switch_cargo_economy_2; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_cargo_subtype_display, getbits(extra_callback_info2, 8, 8)) { 1: blast_furnace_cargo_subtype_display_switch_economy; return CB_RESULT_NO_TEXT; } switch(FEAT_INDUSTRIES, SELF, blast_furnace_check_availability_param, restrict_open_during_gameplay) { 1..255: return CB_RESULT_IND_NO_CONSTRUCTION; // disallow when restrictions in place return CB_RESULT_IND_PROBABILITY_FROM_PROPERTY; // we may build } switch (FEAT_INDUSTRIES, SELF, blast_furnace_check_map_gen, extra_callback_info2 == IND_CREATION_GENERATION) { 1: return CB_RESULT_IND_PROBABILITY_FROM_PROPERTY; blast_furnace_check_availability_param; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_available_game_mode, game_mode == GAMEMODE_GAME) { 1: blast_furnace_check_map_gen; return CB_RESULT_IND_PROBABILITY_FROM_PROPERTY; } /* 1800 */ switch (FEAT_INDUSTRIES, SELF, blast_furnace_check_availability_0, current_date) { date(1800,1,1) .. date(5000000,12,31): blast_furnace_available_game_mode; return CB_RESULT_IND_NO_CONSTRUCTION; } /* 1850 */ switch (FEAT_INDUSTRIES, SELF, blast_furnace_check_availability_1, current_date) { date(1850,1,1) .. date(5000000,12,31): blast_furnace_available_game_mode; return CB_RESULT_IND_NO_CONSTRUCTION; } /* 1850 */ switch (FEAT_INDUSTRIES, SELF, blast_furnace_check_availability_4, current_date) { date(1850,1,1) .. date(5000000,12,31): blast_furnace_available_game_mode; return CB_RESULT_IND_NO_CONSTRUCTION; } /* 1850 */ switch (FEAT_INDUSTRIES, SELF, blast_furnace_check_availability_5, current_date) { date(1850,1,1) .. date(5000000,12,31): blast_furnace_available_game_mode; return CB_RESULT_IND_NO_CONSTRUCTION; } /* 1850 */ switch (FEAT_INDUSTRIES, SELF, blast_furnace_check_availability_3, current_date) { date(1850,1,1) .. date(5000000,12,31): blast_furnace_available_game_mode; return CB_RESULT_IND_NO_CONSTRUCTION; } /* 1850 */ switch (FEAT_INDUSTRIES, SELF, blast_furnace_check_availability_2, current_date) { date(1850,1,1) .. date(5000000,12,31): blast_furnace_available_game_mode; return CB_RESULT_IND_NO_CONSTRUCTION; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_check_availability, economy) { 0: blast_furnace_check_availability_0; 1: blast_furnace_check_availability_1; 4: blast_furnace_check_availability_4; 5: blast_furnace_check_availability_5; 3: blast_furnace_check_availability_3; 2: blast_furnace_check_availability_2; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_80, industry_distance(80)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; return CB_RESULT_LOCATION_ALLOW; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_10, industry_distance(10)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_80; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_38, industry_distance(38)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_10; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_9, industry_distance(9)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_38; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_77, industry_distance(77)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_9; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_0, industry_distance(0)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_77; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_23, industry_distance(23)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_0; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_25, industry_distance(25)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_23; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_6, industry_distance(6)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_25; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_2, industry_distance(2)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_6; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_4, industry_distance(4)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_2; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_54, industry_distance(54)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_4; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_81, industry_distance(81)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_54; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_78, industry_distance(78)) { 0 .. 16: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_81; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_min_distance_7, industry_distance(7)) { 0 .. 56: return CB_RESULT_LOCATION_DISALLOW; blast_furnace_min_distance_78; } switch (FEAT_INDUSTRIES, SELF, blast_furnace_check_location, ( (extra_callback_info2 == IND_CREATION_FUND) || (extra_callback_info2 == IND_CREATION_PROSPECT) ) ) { 1: return CB_RESULT_LOCATION_ALLOW; blast_furnace_min_distance_7; } if (economy==0) { item(FEAT_INDUSTRIES, blast_furnace, 7) { property { substitute: 0; override: 0; map_colour: 10; life_type: IND_LIFE_TYPE_PROCESSING; min_cargo_distr: 1; layouts: [blast_furnace_industry_layout_1_tilelayout,blast_furnace_industry_layout_2_tilelayout]; spec_flags: bitmask(IND_FLAG_LONG_CARGO_TYPE_LISTS); conflicting_ind_types: []; // set this prop empty, FIRS has it's own better checks for this random_sound_effects: []; // set this empty to avoid spurious default industry sounds (as of May 2017 FIRS does not yet use sound effects) name: TTD_STR_INDUSTRY_NAME_STEEL_MILL; prob_random: 5; prob_in_game: 3; fund_cost_multiplier: 190; remove_cost_multiplier: 0; remove_cost_multiplier: 0; cargo_types: [accept_cargo("IORE"),accept_cargo("COAL"),accept_cargo("SCMT"),produce_cargo("STEL",0)]; nearby_station_name: string(STR_STATION, string(STR_TOWN),string(STR_STATION_FURNACE)); } } } if (economy==5) { item(FEAT_INDUSTRIES, blast_furnace, 7) { property { substitute: 0; override: 0; map_colour: 10; life_type: IND_LIFE_TYPE_PROCESSING; min_cargo_distr: 1; layouts: [blast_furnace_industry_layout_1_tilelayout,blast_furnace_industry_layout_2_tilelayout]; spec_flags: bitmask(IND_FLAG_LONG_CARGO_TYPE_LISTS); conflicting_ind_types: []; // set this prop empty, FIRS has it's own better checks for this random_sound_effects: []; // set this empty to avoid spurious default industry sounds (as of May 2017 FIRS does not yet use sound effects) name: string(STR_IND_BLAST_FURNACE); prob_random: 3; prob_in_game: 3; fund_cost_multiplier: 190; remove_cost_multiplier: 0; remove_cost_multiplier: 0; cargo_types: [accept_cargo("IORE"),accept_cargo("COKE"),accept_cargo("LIME"),produce_cargo("IRON",0),produce_cargo("CSTI",0),produce_cargo("SLAG",0)]; nearby_station_name: string(STR_STATION, string(STR_TOWN),string(STR_STATION_FURNACE)); } } } if (economy==2) { item(FEAT_INDUSTRIES, blast_furnace, 7) { property { substitute: 0; override: 0; map_colour: 10; life_type: IND_LIFE_TYPE_PROCESSING; min_cargo_distr: 1; layouts: [blast_furnace_industry_layout_1_tilelayout,blast_furnace_industry_layout_2_tilelayout]; spec_flags: bitmask(IND_FLAG_LONG_CARGO_TYPE_LISTS); conflicting_ind_types: []; // set this prop empty, FIRS has it's own better checks for this random_sound_effects: []; // set this empty to avoid spurious default industry sounds (as of May 2017 FIRS does not yet use sound effects) name: TTD_STR_INDUSTRY_NAME_STEEL_MILL; prob_random: 5; prob_in_game: 3; fund_cost_multiplier: 190; remove_cost_multiplier: 0; remove_cost_multiplier: 0; cargo_types: [accept_cargo("IORE"),accept_cargo("COAL"),accept_cargo("SCMT"),produce_cargo("METL",0)]; nearby_station_name: string(STR_STATION, string(STR_TOWN),string(STR_STATION_FURNACE)); } } } if (economy==0) { item(FEAT_INDUSTRIES, blast_furnace, 7) { graphics { construction_probability: blast_furnace_check_availability; produce_cargo_arrival: blast_furnace_produce_cargo_arrival; monthly_prod_change: CB_RESULT_IND_PROD_NO_CHANGE; random_prod_change: CB_RESULT_IND_PROD_NO_CHANGE; location_check: blast_furnace_check_location; extra_text_fund: return string(STR_FUND_AVAILABLE_FROM, 1800); extra_text_industry: blast_furnace_extra_text; cargo_subtype_display: blast_furnace_cargo_subtype_display; colour: switch_colour; } } } if (economy==5) { item(FEAT_INDUSTRIES, blast_furnace, 7) { graphics { construction_probability: blast_furnace_check_availability; produce_cargo_arrival: blast_furnace_produce_cargo_arrival; monthly_prod_change: CB_RESULT_IND_PROD_NO_CHANGE; random_prod_change: CB_RESULT_IND_PROD_NO_CHANGE; location_check: blast_furnace_check_location; extra_text_fund: return string(STR_FUND_AVAILABLE_FROM, 1850); extra_text_industry: blast_furnace_extra_text; cargo_subtype_display: blast_furnace_cargo_subtype_display; colour: switch_colour; } } } if (economy==2) { item(FEAT_INDUSTRIES, blast_furnace, 7) { graphics { construction_probability: blast_furnace_check_availability; produce_cargo_arrival: blast_furnace_produce_cargo_arrival; monthly_prod_change: CB_RESULT_IND_PROD_NO_CHANGE; random_prod_change: CB_RESULT_IND_PROD_NO_CHANGE; location_check: blast_furnace_check_location; extra_text_fund: return string(STR_FUND_AVAILABLE_FROM, 1850); extra_text_industry: blast_furnace_extra_text; cargo_subtype_display: blast_furnace_cargo_subtype_display; colour: switch_colour; } } }