/* ******************************************************************
* Definition of the industry tile, its callbacks, and graphics chain
* ******************************************************************/
spriteset(assembly_plant_spriteset_0_0, "src/graphics/industries/groundtiles.png") {
tmpl_ground_tile(80, 10)
}
spriteset(assembly_plant_spriteset_0_0_snow, "src/graphics/industries/groundtiles.png") {
tmpl_ground_tile(220, 10)
}
spriteset(assembly_plant_spriteset_1_0, "src/graphics/industries/groundtiles.png") {
tmpl_ground_tile(360, 10)
}
spriteset(assembly_plant_spriteset_1_0_snow, "src/graphics/industries/groundtiles.png") {
tmpl_ground_tile(220, 10)
}
spriteset(assembly_plant_spriteset_2_0) {
[10, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_2_0_snow) {
[10, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_3_0) {
[150, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_3_0_snow) {
[150, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_4_0) {
[220, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_4_0_snow) {
[220, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_5_0) {
[290, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_5_0_snow) {
[290, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_6_0) {
[360, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_6_0_snow) {
[360, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_7_0) {
[430, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_7_0_snow) {
[430, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_8_0) {
[500, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_8_0_snow) {
[500, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_9_0) {
[570, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_9_0_snow) {
[570, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_10_0) {
[640, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_10_0_snow) {
[640, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_11_0) {
[710, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_11_0_snow) {
[710, 10, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spriteset(assembly_plant_spriteset_12_0) {
[640, 100, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1.png"]
}
spriteset(assembly_plant_spriteset_12_0_snow) {
[640, 100, 64, 80, -31, -49, ANIM | NOCROP, "src/graphics/industries/assembly_plant_1_snow.png"]
}
spritelayout assembly_plant_spritelayout_rear_assembly_hall_windows {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_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: assembly_plant_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
spritelayout assembly_plant_spritelayout_central_assembly_hall {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_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: assembly_plant_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
spritelayout assembly_plant_spritelayout_front_assembly_hall_windows {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_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: assembly_plant_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
spritelayout assembly_plant_spritelayout_front_assembly_hall_doors {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_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: assembly_plant_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
spritelayout assembly_plant_spritelayout_goods_in_1 {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_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: assembly_plant_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
spritelayout assembly_plant_spritelayout_offices {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_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: assembly_plant_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
spritelayout assembly_plant_spritelayout_tyres {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_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: assembly_plant_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
spritelayout assembly_plant_spritelayout_vehicles_1 {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_spriteset_10_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: assembly_plant_spriteset_10_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
spritelayout assembly_plant_spritelayout_vehicles_2 {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_spriteset_11_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: assembly_plant_spriteset_11_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
spritelayout assembly_plant_spritelayout_vehicles_3 {
// Industry-specific ground (snow aware)
// non-snow
childsprite {
sprite: assembly_plant_spriteset_0_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (LOAD_TEMP(13));
always_draw: 1;
}
// snow
childsprite {
sprite: assembly_plant_spriteset_0_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
childsprite {
sprite: assembly_plant_spriteset_1_0_snow(0);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (!LOAD_TEMP(13));
always_draw: 1;
}
// fences NE
building {
sprite: 1302 + LOAD_TEMP(1);
hide_sprite: (LOAD_TEMP(9) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(5) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences NW
building {
sprite: 1301 + LOAD_TEMP(2);
hide_sprite: (LOAD_TEMP(10) == 0);
xoffset: 0;
yoffset: 0;
zoffset: LOAD_TEMP(6) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// buildings (snow aware)
building {
sprite: assembly_plant_spriteset_12_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: assembly_plant_spriteset_12_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));
}
// fences SE
building {
sprite: 1301 + LOAD_TEMP(3);
hide_sprite: (LOAD_TEMP(11) == 0);
xoffset: 0;
yoffset: 16;
zoffset: LOAD_TEMP(7) * 8;
xextent: 16;
yextent: 1;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// fences SW
building {
sprite: 1302 + LOAD_TEMP(4);
hide_sprite: (LOAD_TEMP(12) == 0);
xoffset: 16;
yoffset: 0;
zoffset: LOAD_TEMP(8) * 8;
xextent: 1;
yextent: 16;
zextent: 6;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
switch(FEAT_INDUSTRYTILES, SELF, assembly_plant_industry_layout_1_graphics_switch, relative_pos) {
relative_coord(0, 0): assembly_plant_spritelayout_rear_assembly_hall_windows;
relative_coord(0, 1): assembly_plant_spritelayout_central_assembly_hall;
relative_coord(0, 2): assembly_plant_spritelayout_front_assembly_hall_doors;
relative_coord(0, 3): assembly_plant_spritelayout_vehicles_1;
relative_coord(1, 0): assembly_plant_spritelayout_rear_assembly_hall_windows;
relative_coord(1, 1): assembly_plant_spritelayout_central_assembly_hall;
relative_coord(1, 2): assembly_plant_spritelayout_front_assembly_hall_windows;
relative_coord(1, 3): assembly_plant_spritelayout_vehicles_2;
relative_coord(2, 0): assembly_plant_spritelayout_rear_assembly_hall_windows;
relative_coord(2, 1): assembly_plant_spritelayout_central_assembly_hall;
relative_coord(2, 2): assembly_plant_spritelayout_front_assembly_hall_doors;
relative_coord(2, 3): assembly_plant_spritelayout_vehicles_1;
relative_coord(3, 0): assembly_plant_spritelayout_offices;
relative_coord(3, 1): assembly_plant_spritelayout_offices;
relative_coord(3, 2): assembly_plant_spritelayout_tyres;
relative_coord(3, 3): assembly_plant_spritelayout_vehicles_2;
relative_coord(4, 0): assembly_plant_spritelayout_goods_in_1;
relative_coord(4, 1): assembly_plant_spritelayout_tyres;
relative_coord(4, 2): assembly_plant_spritelayout_vehicles_3;
relative_coord(4, 3): assembly_plant_spritelayout_vehicles_3;
assembly_plant_spritelayout_rear_assembly_hall_windows; // a default is needed, but should never be reached, layout definitions are explicit
}
switch(FEAT_INDUSTRYTILES, PARENT, assembly_plant_industry_graphics_switch_layouts, layout_num) {
1: assembly_plant_industry_layout_1_graphics_switch;
assembly_plant_industry_layout_1_graphics_switch; // default
}
switch(FEAT_INDUSTRYTILES, SELF, assembly_plant_industry_construction_state_graphics_switch, construction_state) {
0..2: spritelayout_default_construction_states;
assembly_plant_industry_graphics_switch_layouts; // default
}
switch(FEAT_INDUSTRYTILES, SELF, assembly_plant_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)
]) {
assembly_plant_industry_construction_state_graphics_switch; // default
}
switch(FEAT_INDUSTRYTILES, PARENT, assembly_plant_industry_master_graphics_switch, STORE_TEMP(random_bits, 14)) {
assembly_plant_store_temp_vars; // default
}
switch (FEAT_INDUSTRYTILES, SELF, assembly_plant_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),
]) {
assembly_plant_industry_master_graphics_switch;
}
switch (FEAT_INDUSTRYTILES, SELF, assembly_plant_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),
]) {
assembly_plant_tile_fence_station;
}
switch (FEAT_INDUSTRYTILES, SELF, assembly_plant_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),
]) {
assembly_plant_tile_fence_industry;
}
switch(FEAT_INDUSTRYTILES, SELF, assembly_plant_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, assembly_plant_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;
assembly_plant_tile_1_lc_2;
}
switch (FEAT_INDUSTRYTILES, SELF, assembly_plant_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: assembly_plant_tile_1_lc_1;
return CB_RESULT_LOCATION_DISALLOW;
}
item(FEAT_INDUSTRYTILES, assembly_plant_tile_1, 232) {
property {
substitute: 0;
land_shape_flags: 0;
special_flags: bitmask(INDTILE_FLAG_ACCEPT_ALL);
animation_info: [ANIMATION_LOOPING, 71];
animation_speed: 2;
animation_triggers: bitmask();
}
graphics {
tile_check: assembly_plant_tile_1_lc_0;
assembly_plant_tile_fences;
}
}
/* *************************************************
* Definition of the industry
* *************************************************/
tilelayout assembly_plant_industry_layout_1_tilelayout {
0, 0: assembly_plant_tile_1;
0, 1: assembly_plant_tile_1;
0, 2: assembly_plant_tile_1;
0, 3: assembly_plant_tile_1;
1, 0: assembly_plant_tile_1;
1, 1: assembly_plant_tile_1;
1, 2: assembly_plant_tile_1;
1, 3: assembly_plant_tile_1;
2, 0: assembly_plant_tile_1;
2, 1: assembly_plant_tile_1;
2, 2: assembly_plant_tile_1;
2, 3: assembly_plant_tile_1;
3, 0: assembly_plant_tile_1;
3, 1: assembly_plant_tile_1;
3, 2: assembly_plant_tile_1;
3, 3: assembly_plant_tile_1;
4, 0: assembly_plant_tile_1;
4, 1: assembly_plant_tile_1;
4, 2: assembly_plant_tile_1;
4, 3: assembly_plant_tile_1;
}
produce (assembly_plant_produce_0,
[
VPTS: incoming_cargo_waiting("VPTS");
VBOD: incoming_cargo_waiting("VBOD");
VENG: incoming_cargo_waiting("VENG");
TYRE: incoming_cargo_waiting("TYRE");
],
[
VEHI: (LOAD_PERM(2) * 4) / 8;
ENSP: (LOAD_PERM(2) * 2) / 8;
FMSP: (LOAD_PERM(2) * 2) / 8;
],
0)
switch (FEAT_INDUSTRIES, SELF, assembly_plant_produce_calculation_0,
[
STORE_PERM(0, 1),
STORE_PERM(0, 2),
STORE_PERM(
max(LOAD_PERM(3), (incoming_cargo_waiting("VPTS") > 0) * current_date),
3
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(3)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(4), (incoming_cargo_waiting("VBOD") > 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("VENG") > 0) * current_date),
5
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(5)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(6), (incoming_cargo_waiting("TYRE") > 0) * current_date),
6
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(6)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VPTS") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VBOD") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VENG") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("TYRE") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
(LOAD_PERM(2) == 0)
? LOAD_PERM(0) : 0,
0
),
]) {
assembly_plant_produce_0;
}
produce (assembly_plant_produce_1,
[
VPTS: incoming_cargo_waiting("VPTS");
VBOD: incoming_cargo_waiting("VBOD");
VENG: incoming_cargo_waiting("VENG");
TYRE: incoming_cargo_waiting("TYRE");
],
[
VEHI: (LOAD_PERM(2) * 4) / 8;
ENSP: (LOAD_PERM(2) * 2) / 8;
FMSP: (LOAD_PERM(2) * 2) / 8;
],
0)
switch (FEAT_INDUSTRIES, SELF, assembly_plant_produce_calculation_1,
[
STORE_PERM(0, 1),
STORE_PERM(0, 2),
STORE_PERM(
max(LOAD_PERM(3), (incoming_cargo_waiting("VPTS") > 0) * current_date),
3
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(3)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(4), (incoming_cargo_waiting("VBOD") > 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("VENG") > 0) * current_date),
5
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(5)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(6), (incoming_cargo_waiting("TYRE") > 0) * current_date),
6
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(6)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VPTS") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VBOD") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VENG") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("TYRE") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
(LOAD_PERM(2) == 0)
? LOAD_PERM(0) : 0,
0
),
]) {
assembly_plant_produce_1;
}
produce (assembly_plant_produce_4,
[
VPTS: incoming_cargo_waiting("VPTS");
VBOD: incoming_cargo_waiting("VBOD");
VENG: incoming_cargo_waiting("VENG");
TYRE: incoming_cargo_waiting("TYRE");
],
[
VEHI: (LOAD_PERM(2) * 4) / 8;
ENSP: (LOAD_PERM(2) * 2) / 8;
FMSP: (LOAD_PERM(2) * 2) / 8;
],
0)
switch (FEAT_INDUSTRIES, SELF, assembly_plant_produce_calculation_4,
[
STORE_PERM(0, 1),
STORE_PERM(0, 2),
STORE_PERM(
max(LOAD_PERM(3), (incoming_cargo_waiting("VPTS") > 0) * current_date),
3
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(3)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(4), (incoming_cargo_waiting("VBOD") > 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("VENG") > 0) * current_date),
5
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(5)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(6), (incoming_cargo_waiting("TYRE") > 0) * current_date),
6
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(6)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VPTS") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VBOD") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VENG") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("TYRE") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
(LOAD_PERM(2) == 0)
? LOAD_PERM(0) : 0,
0
),
]) {
assembly_plant_produce_4;
}
produce (assembly_plant_produce_5,
[
VPTS: incoming_cargo_waiting("VPTS");
VBOD: incoming_cargo_waiting("VBOD");
VENG: incoming_cargo_waiting("VENG");
TYRE: incoming_cargo_waiting("TYRE");
],
[
VEHI: (LOAD_PERM(2) * 4) / 8;
ENSP: (LOAD_PERM(2) * 2) / 8;
FMSP: (LOAD_PERM(2) * 2) / 8;
],
0)
switch (FEAT_INDUSTRIES, SELF, assembly_plant_produce_calculation_5,
[
STORE_PERM(0, 1),
STORE_PERM(0, 2),
STORE_PERM(
max(LOAD_PERM(3), (incoming_cargo_waiting("VPTS") > 0) * current_date),
3
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(3)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(4), (incoming_cargo_waiting("VBOD") > 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("VENG") > 0) * current_date),
5
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(5)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(6), (incoming_cargo_waiting("TYRE") > 0) * current_date),
6
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(6)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VPTS") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VBOD") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VENG") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("TYRE") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
(LOAD_PERM(2) == 0)
? LOAD_PERM(0) : 0,
0
),
]) {
assembly_plant_produce_5;
}
produce (assembly_plant_produce_3,
[
VPTS: incoming_cargo_waiting("VPTS");
VBOD: incoming_cargo_waiting("VBOD");
VENG: incoming_cargo_waiting("VENG");
TYRE: incoming_cargo_waiting("TYRE");
],
[
VEHI: (LOAD_PERM(2) * 4) / 8;
ENSP: (LOAD_PERM(2) * 2) / 8;
FMSP: (LOAD_PERM(2) * 2) / 8;
],
0)
switch (FEAT_INDUSTRIES, SELF, assembly_plant_produce_calculation_3,
[
STORE_PERM(0, 1),
STORE_PERM(0, 2),
STORE_PERM(
max(LOAD_PERM(3), (incoming_cargo_waiting("VPTS") > 0) * current_date),
3
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(3)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(4), (incoming_cargo_waiting("VBOD") > 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("VENG") > 0) * current_date),
5
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(5)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(6), (incoming_cargo_waiting("TYRE") > 0) * current_date),
6
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(6)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VPTS") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VBOD") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VENG") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("TYRE") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
(LOAD_PERM(2) == 0)
? LOAD_PERM(0) : 0,
0
),
]) {
assembly_plant_produce_3;
}
produce (assembly_plant_produce_2,
[
VPTS: incoming_cargo_waiting("VPTS");
VBOD: incoming_cargo_waiting("VBOD");
VENG: incoming_cargo_waiting("VENG");
TYRE: incoming_cargo_waiting("TYRE");
],
[
VEHI: (LOAD_PERM(2) * 4) / 8;
ENSP: (LOAD_PERM(2) * 2) / 8;
FMSP: (LOAD_PERM(2) * 2) / 8;
],
0)
switch (FEAT_INDUSTRIES, SELF, assembly_plant_produce_calculation_2,
[
STORE_PERM(0, 1),
STORE_PERM(0, 2),
STORE_PERM(
max(LOAD_PERM(3), (incoming_cargo_waiting("VPTS") > 0) * current_date),
3
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(3)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(4), (incoming_cargo_waiting("VBOD") > 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("VENG") > 0) * current_date),
5
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(5)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
max(LOAD_PERM(6), (incoming_cargo_waiting("TYRE") > 0) * current_date),
6
),
STORE_PERM(
LOAD_PERM(1)
+ (
(current_date - LOAD_PERM(6)) <= 90
? 2 : 0
),
1
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VPTS") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VBOD") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("VENG") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
LOAD_PERM(2)
+ ((incoming_cargo_waiting("TYRE") * LOAD_PERM(1)) / 8),
2
),
STORE_PERM(
(LOAD_PERM(2) == 0)
? LOAD_PERM(0) : 0,
0
),
]) {
assembly_plant_produce_2;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_produce_cargo_arrival, economy) {
0: assembly_plant_produce_calculation_0;
1: assembly_plant_produce_calculation_1;
4: assembly_plant_produce_calculation_4;
5: assembly_plant_produce_calculation_5;
3: assembly_plant_produce_calculation_3;
2: assembly_plant_produce_calculation_2;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_extra_text, economy) {
5: return string(STR_EXTRA_TEXT_SECONDARY_COMBINATORY);
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_cargo_subtype_display_cargo_VPTS_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, assembly_plant_cargo_subtype_display_cargo_VBOD_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, assembly_plant_cargo_subtype_display_cargo_VENG_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, assembly_plant_cargo_subtype_display_cargo_TYRE_economy_5, [
current_date - LOAD_PERM(6) > 90
]) {
0: return 0x3800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED);
1: return 0x3800 + string(STR_EMPTY);
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_cargo_subtype_display_switch_cargo_economy_5, getbits(extra_callback_info2, 16, 23)) {
VPTS: assembly_plant_cargo_subtype_display_cargo_VPTS_economy_5;
VBOD: assembly_plant_cargo_subtype_display_cargo_VBOD_economy_5;
VENG: assembly_plant_cargo_subtype_display_cargo_VENG_economy_5;
TYRE: assembly_plant_cargo_subtype_display_cargo_TYRE_economy_5;
return CB_RESULT_NO_TEXT;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_cargo_subtype_display_switch_economy, economy) {
5: assembly_plant_cargo_subtype_display_switch_cargo_economy_5;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_cargo_subtype_display, getbits(extra_callback_info2, 8, 8)) {
1: assembly_plant_cargo_subtype_display_switch_economy;
return CB_RESULT_NO_TEXT;
}
switch(FEAT_INDUSTRIES, SELF, assembly_plant_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, assembly_plant_check_map_gen, extra_callback_info2 == IND_CREATION_GENERATION) {
1: return CB_RESULT_IND_PROBABILITY_FROM_PROPERTY;
assembly_plant_check_availability_param;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_available_game_mode, game_mode == GAMEMODE_GAME) {
1: assembly_plant_check_map_gen;
return CB_RESULT_IND_PROBABILITY_FROM_PROPERTY;
}
/* 0 */
switch (FEAT_INDUSTRIES, SELF, assembly_plant_check_availability_0, current_date) {
date(0,1,1) .. date(5000000,12,31): assembly_plant_available_game_mode;
return CB_RESULT_IND_NO_CONSTRUCTION;
}
/* 0 */
switch (FEAT_INDUSTRIES, SELF, assembly_plant_check_availability_1, current_date) {
date(0,1,1) .. date(5000000,12,31): assembly_plant_available_game_mode;
return CB_RESULT_IND_NO_CONSTRUCTION;
}
/* 0 */
switch (FEAT_INDUSTRIES, SELF, assembly_plant_check_availability_4, current_date) {
date(0,1,1) .. date(5000000,12,31): assembly_plant_available_game_mode;
return CB_RESULT_IND_NO_CONSTRUCTION;
}
/* 0 */
switch (FEAT_INDUSTRIES, SELF, assembly_plant_check_availability_5, current_date) {
date(0,1,1) .. date(5000000,12,31): assembly_plant_available_game_mode;
return CB_RESULT_IND_NO_CONSTRUCTION;
}
/* 0 */
switch (FEAT_INDUSTRIES, SELF, assembly_plant_check_availability_3, current_date) {
date(0,1,1) .. date(5000000,12,31): assembly_plant_available_game_mode;
return CB_RESULT_IND_NO_CONSTRUCTION;
}
/* 0 */
switch (FEAT_INDUSTRIES, SELF, assembly_plant_check_availability_2, current_date) {
date(0,1,1) .. date(5000000,12,31): assembly_plant_available_game_mode;
return CB_RESULT_IND_NO_CONSTRUCTION;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_check_availability, economy) {
0: assembly_plant_check_availability_0;
1: assembly_plant_check_availability_1;
4: assembly_plant_check_availability_4;
5: assembly_plant_check_availability_5;
3: assembly_plant_check_availability_3;
2: assembly_plant_check_availability_2;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_min_distance_70, industry_distance(70)) {
0 .. 16: return CB_RESULT_LOCATION_DISALLOW;
return CB_RESULT_LOCATION_ALLOW;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_min_distance_33, industry_distance(33)) {
0 .. 16: return CB_RESULT_LOCATION_DISALLOW;
assembly_plant_min_distance_70;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_min_distance_2, industry_distance(2)) {
0 .. 16: return CB_RESULT_LOCATION_DISALLOW;
assembly_plant_min_distance_33;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_min_distance_81, industry_distance(81)) {
0 .. 16: return CB_RESULT_LOCATION_DISALLOW;
assembly_plant_min_distance_2;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_min_distance_88, industry_distance(88)) {
0 .. 16: return CB_RESULT_LOCATION_DISALLOW;
assembly_plant_min_distance_81;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_min_distance_62, industry_distance(62)) {
0 .. 56: return CB_RESULT_LOCATION_DISALLOW;
assembly_plant_min_distance_88;
}
switch (FEAT_INDUSTRIES, SELF, assembly_plant_check_location, (
(extra_callback_info2 == IND_CREATION_FUND) ||
(extra_callback_info2 == IND_CREATION_PROSPECT)
)
) {
1: return CB_RESULT_LOCATION_ALLOW;
assembly_plant_min_distance_62;
}
if (economy==5) {
item(FEAT_INDUSTRIES, assembly_plant, 62) {
property {
substitute: 0;
override: 0;
map_colour: 141;
life_type: IND_LIFE_TYPE_PROCESSING;
min_cargo_distr: 1;
layouts: [assembly_plant_industry_layout_1_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_ASSEMBLY_PLANT);
prob_random: 5;
prob_in_game: 3;
fund_cost_multiplier: 145;
remove_cost_multiplier: 0;
remove_cost_multiplier: 0;
cargo_types: [accept_cargo("VPTS"),accept_cargo("VBOD"),accept_cargo("VENG"),accept_cargo("TYRE"),produce_cargo("VEHI",0),produce_cargo("ENSP",0),produce_cargo("FMSP",0)];
nearby_station_name: string(STR_STATION, string(STR_TOWN),string(STR_STATION_AUTOMOTIVE));
}
}
}
if (economy==5) {
item(FEAT_INDUSTRIES, assembly_plant, 62) {
graphics {
construction_probability: assembly_plant_check_availability;
produce_cargo_arrival: assembly_plant_produce_cargo_arrival;
monthly_prod_change: CB_RESULT_IND_PROD_NO_CHANGE;
random_prod_change: CB_RESULT_IND_PROD_NO_CHANGE;
location_check: assembly_plant_check_location;
extra_text_fund: return CB_RESULT_NO_TEXT;
extra_text_industry: assembly_plant_extra_text;
cargo_subtype_display: assembly_plant_cargo_subtype_display;
colour: switch_colour;
}
}
}