I found this but i not understand at all.
Code: Select all
/**************************************
oilrig
***************************************/
spriteset(oilrig_spriteset_ground_0, "gfx/groundtiles.png") {
tmpl_ground_tile(360, 10)
}
spriteset(oilrig_spriteset_ground_overlay_0, "gfx/groundtiles.png") {
tmpl_ground_tile(360, 10)
}
spriteset(oilrig_spriteset_1_0) {
[96, 0, 64, 254, -31, -223, ANIM | NOCROP, "gfx/oilrig.png"]
}
alternative_sprites(oilrig_spriteset_1_0, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, ""){
[257, 36, 257, 217, -126, -284, ANIM | NOCROP, "gfx/oilrig_32.png"]
}
spriteset(oilrig_spriteset_2_0) {
[128, 0, 64, 270, -31, -239, ANIM | NOCROP, "gfx/oilrig.png"]
}
alternative_sprites(oilrig_spriteset_2_0, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, ""){
[515, 63, 128, 446, 4, -322, ANIM | NOCROP, "gfx/oilrig_32.png"]
}
spriteset(oilrig_spriteset_3_0) {
[160, 0, 64, 286, -31, -255, ANIM | NOCROP, "gfx/oilrig.png"]
}
alternative_sprites(oilrig_spriteset_3_0, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, ""){
[643, 127, 129, 446, 4, -322, ANIM | NOCROP, "gfx/oilrig_32.png"]
}
spriteset(oilrig_spriteset_4_0) {
[192, 0, 64, 302, -31, -271, ANIM | NOCROP, "gfx/oilrig.png"]
}
alternative_sprites(oilrig_spriteset_4_0, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, ""){
[130, 63, 128, 446, -125, -322, ANIM | NOCROP, "gfx/oilrig_32.png"]
}
spriteset(oilrig_spriteset_5_0) {
[64, 0, 64, 270, -31, -239, ANIM | NOCROP, "gfx/oilrig.png"]
}
alternative_sprites(oilrig_spriteset_5_0, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, ""){
[258, 254, 257, 192, -125, -195, ANIM | NOCROP, "gfx/oilrig_32.png"]
}
spriteset(oilrig_spriteset_6_0) {
[96, 0, 64, 286, -31, -255, ANIM | NOCROP, "gfx/oilrig.png"]
}
alternative_sprites(oilrig_spriteset_6_0, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, ""){
[515, 509, 129, 128, 3, -4, ANIM | NOCROP, "gfx/oilrig_32.png"]
}
spriteset(oilrig_spriteset_7_0) {
[128, 0, 64, 302, -31, -271, ANIM | NOCROP, "gfx/oilrig.png"]
}
alternative_sprites(oilrig_spriteset_7_0, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, ""){
[0, 127, 130, 446, -127, -321, ANIM | NOCROP, "gfx/oilrig_32.png"]
}
spriteset(oilrig_spriteset_8_0) {
[160, 0, 64, 318, -31, -287, ANIM | NOCROP, "gfx/oilrig.png"]
}
alternative_sprites(oilrig_spriteset_8_0, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, ""){
[130, 509, 128, 130, -125, -4, ANIM | NOCROP, "gfx/oilrig_32.png"]
}
spriteset(oilrig_spriteset_9_0) {
[32, 0, 64, 286, -31, -255, ANIM | NOCROP, "gfx/oilrig.png"]
}
alternative_sprites(oilrig_spriteset_9_0, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, ""){
[258, 446, 257, 254, -125, -131, ANIM | NOCROP, "gfx/oilrig_32.png"]
}
spritelayout oilrig_spritelayout_1 {
// generic ground (terrain aware / climate aware)
ground {
sprite: GROUNDSPRITE_WATER ;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// industry-specific ground (snow aware)
// normal
childsprite {
sprite: oilrig_spriteset_ground_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
childsprite {
sprite: oilrig_spriteset_ground_overlay_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
// construction stages - optional
// construction states (no snow awareness)
building {
sprite: oilrig_spriteset_1_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 0);
}
building {
sprite: oilrig_spriteset_1_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 1);
}
building {
sprite: oilrig_spriteset_1_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 2);
}
// buildings (snow aware)
building {
sprite: oilrig_spriteset_1_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 3) || (terrain_type == TILETYPE_SNOW) ;
}
}
spritelayout oilrig_spritelayout_2 {
// generic ground (terrain aware / climate aware)
ground {
sprite: GROUNDSPRITE_WATER ;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// industry-specific ground (snow aware)
// normal
childsprite {
sprite: oilrig_spriteset_ground_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
childsprite {
sprite: oilrig_spriteset_ground_overlay_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
// construction stages - optional
// construction states (no snow awareness)
building {
sprite: oilrig_spriteset_2_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 0);
}
building {
sprite: oilrig_spriteset_2_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 1);
}
building {
sprite: oilrig_spriteset_2_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 2);
}
// buildings (snow aware)
building {
sprite: oilrig_spriteset_2_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 3) || (terrain_type == TILETYPE_SNOW) ;
}
}
spritelayout oilrig_spritelayout_3 {
// generic ground (terrain aware / climate aware)
ground {
sprite: GROUNDSPRITE_WATER ;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// industry-specific ground (snow aware)
// normal
childsprite {
sprite: oilrig_spriteset_ground_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
childsprite {
sprite: oilrig_spriteset_ground_overlay_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
// construction stages - optional
// construction states (no snow awareness)
building {
sprite: oilrig_spriteset_3_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 0);
}
building {
sprite: oilrig_spriteset_3_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 1);
}
building {
sprite: oilrig_spriteset_3_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 2);
}
// buildings (snow aware)
building {
sprite: oilrig_spriteset_3_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 3) || (terrain_type == TILETYPE_SNOW) ;
}
}
spritelayout oilrig_spritelayout_4 {
// generic ground (terrain aware / climate aware)
ground {
sprite: GROUNDSPRITE_WATER ;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// industry-specific ground (snow aware)
// normal
childsprite {
sprite: oilrig_spriteset_ground_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
childsprite {
sprite: oilrig_spriteset_ground_overlay_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
// construction stages - optional
// construction states (no snow awareness)
building {
sprite: oilrig_spriteset_4_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 0);
}
building {
sprite: oilrig_spriteset_4_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 1);
}
building {
sprite: oilrig_spriteset_4_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 2);
}
// buildings (snow aware)
building {
sprite: oilrig_spriteset_4_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 3) || (terrain_type == TILETYPE_SNOW) ;
}
}
spritelayout oilrig_spritelayout_5 {
// generic ground (terrain aware / climate aware)
ground {
sprite: GROUNDSPRITE_WATER ;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// industry-specific ground (snow aware)
// normal
childsprite {
sprite: oilrig_spriteset_ground_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
childsprite {
sprite: oilrig_spriteset_ground_overlay_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
// construction stages - optional
// construction states (no snow awareness)
building {
sprite: oilrig_spriteset_5_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 0);
}
building {
sprite: oilrig_spriteset_5_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 1);
}
building {
sprite: oilrig_spriteset_5_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 2);
}
// buildings (snow aware)
building {
sprite: oilrig_spriteset_5_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 3) || (terrain_type == TILETYPE_SNOW) ;
}
}
spritelayout oilrig_spritelayout_6 {
// generic ground (terrain aware / climate aware)
ground {
sprite: GROUNDSPRITE_WATER ;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// industry-specific ground (snow aware)
// normal
childsprite {
sprite: oilrig_spriteset_ground_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
childsprite {
sprite: oilrig_spriteset_ground_overlay_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
// construction stages - optional
// construction states (no snow awareness)
building {
sprite: oilrig_spriteset_6_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 0);
}
building {
sprite: oilrig_spriteset_6_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 1);
}
building {
sprite: oilrig_spriteset_6_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 2);
}
// buildings (snow aware)
building {
sprite: oilrig_spriteset_6_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 3) || (terrain_type == TILETYPE_SNOW) ;
}
}
spritelayout oilrig_spritelayout_7 {
// generic ground (terrain aware / climate aware)
ground {
sprite: GROUNDSPRITE_WATER ;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// industry-specific ground (snow aware)
// normal
childsprite {
sprite: oilrig_spriteset_ground_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
childsprite {
sprite: oilrig_spriteset_ground_overlay_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
// construction stages - optional
// construction states (no snow awareness)
building {
sprite: oilrig_spriteset_7_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 0);
}
building {
sprite: oilrig_spriteset_7_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 1);
}
building {
sprite: oilrig_spriteset_7_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 2);
}
// buildings (snow aware)
building {
sprite: oilrig_spriteset_7_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 3) || (terrain_type == TILETYPE_SNOW) ;
}
}
spritelayout oilrig_spritelayout_8 {
// generic ground (terrain aware / climate aware)
ground {
sprite: GROUNDSPRITE_WATER ;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// industry-specific ground (snow aware)
// normal
childsprite {
sprite: oilrig_spriteset_ground_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
childsprite {
sprite: oilrig_spriteset_ground_overlay_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
// construction stages - optional
// construction states (no snow awareness)
building {
sprite: oilrig_spriteset_8_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 0);
}
building {
sprite: oilrig_spriteset_8_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 1);
}
building {
sprite: oilrig_spriteset_8_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 2);
}
// buildings (snow aware)
building {
sprite: oilrig_spriteset_8_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 3) || (terrain_type == TILETYPE_SNOW) ;
}
}
spritelayout oilrig_spritelayout_9 {
// generic ground (terrain aware / climate aware)
ground {
sprite: GROUNDSPRITE_WATER ;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
// industry-specific ground (snow aware)
// normal
childsprite {
sprite: oilrig_spriteset_ground_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
childsprite {
sprite: oilrig_spriteset_ground_overlay_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
hide_sprite: (terrain_type == TILETYPE_SNOW); always_draw: 1;
}
// construction stages - optional
// construction states (no snow awareness)
building {
sprite: oilrig_spriteset_9_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 0);
}
building {
sprite: oilrig_spriteset_9_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 1);
}
building {
sprite: oilrig_spriteset_9_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 2);
}
// buildings (snow aware)
building {
sprite: oilrig_spriteset_9_0(0* animation_frame);
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
always_draw: 0;
hide_sprite: (construction_state != 3) || (terrain_type == TILETYPE_SNOW) ;
}
}
switch(FEAT_INDUSTRYTILES, SELF, oilrig_industry_layout_1_graphics_switch, relative_pos) {
relative_coord(0, 0): oilrig_spritelayout_1;
relative_coord(0, 1): oilrig_spritelayout_2;
relative_coord(0, 2): oilrig_spritelayout_3;
relative_coord(1, 0): oilrig_spritelayout_4;
relative_coord(1, 1): oilrig_spritelayout_5;
relative_coord(1, 2): oilrig_spritelayout_6;
relative_coord(2, 0): oilrig_spritelayout_7;
relative_coord(2, 1): oilrig_spritelayout_8;
relative_coord(2, 2): oilrig_spritelayout_9;
oilrig_spritelayout_2; // a default is needed, but should never be reached, layout definitions are explicit
}
switch(FEAT_INDUSTRYTILES, PARENT, oilrig_industry_graphics_switch_layouts, layout_num) {
1: oilrig_industry_layout_1_graphics_switch;
oilrig_industry_layout_1_graphics_switch; // default
}
switch(FEAT_INDUSTRYTILES, SELF, oilrig_industry_construction_state_graphics_switch, construction_state) {
0..2: spritelayout_default_construction_states;
oilrig_industry_graphics_switch_layouts; // default
}
switch(FEAT_INDUSTRYTILES, PARENT, oilrig_industry_master_graphics_switch, STORE_TEMP(random_bits, 0)) {
oilrig_industry_construction_state_graphics_switch; // default
}
switch (FEAT_INDUSTRYTILES, SELF, oilrig_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), ]) { oilrig_industry_master_graphics_switch; }
switch (FEAT_INDUSTRYTILES, SELF, oilrig_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), ]) { oilrig_tile_fence_station; }
switch (FEAT_INDUSTRYTILES, SELF, oilrig_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), ]) { oilrig_tile_fence_industry; }
/* *************************************************
* Definition of the industry tile and its callbacks
* *************************************************/
switch (FEAT_INDUSTRYTILES, SELF, oilrig_nearby_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) | (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, oilrig_player_check, ( (((extra_callback_info2 & 0xFF00) >> 8) == IND_CREATION_FUND) || (((extra_callback_info2 & 0xFF00) >> 8) == IND_CREATION_PROSPECT) ) ) { 1: return CB_RESULT_LOCATION_ALLOW; oilrig_nearby_industry; }
switch (FEAT_INDUSTRYTILES, SELF, oilrig_location_check, nearby_tile_slope(0,0) == SLOPE_FLAT) { 1: oilrig_player_check; return CB_RESULT_LOCATION_DISALLOW; }
item(FEAT_INDUSTRYTILES, oilrig_tile, 113) {
property {
substitute: 0;
special_flags: bitmask(IND_FLAG_BUILT_ON_WATER,INDTILE_FLAG_ACCEPT_ALL);
animation_triggers: bitmask(ANIM_TRIGGER_INDTILE_CONSTRUCTION_STATE);
}
graphics {
tile_check: oilrig_location_check;
oilrig_tile_fences;
}
}
/* *************************************************
* Definition of the industry layouts
* *************************************************/
tilelayout oilrig_industry_layout_1_tilelayout {
0, 0: oilrig_tile;
0, 1: oilrig_tile;
0, 2: oilrig_tile;
1, 0: oilrig_tile;
1, 1: oilrig_tile;
1, 2: oilrig_tile;
2, 0: oilrig_tile;
2, 1: oilrig_tile;
2, 2: oilrig_tile;
}
/* *************************************************
* Definition of the industry
* *************************************************/
/* THIS SECTION TELLS THE INDUSTRY TO PRODUCE CARGOS DEPENDING ON TOWN SIZE */
switch (FEAT_INDUSTRIES, SELF, oilrig_oilrig, industry_distance(oilrig)) { 0 .. 60: return CB_RESULT_LOCATION_DISALLOW; return CB_RESULT_LOCATION_ALLOW; }
switch (FEAT_INDUSTRIES, SELF, oilrig_check_location, ( (extra_callback_info2 == IND_CREATION_FUND) || (extra_callback_info2 == IND_CREATION_PROSPECT) ) ) { 1: return CB_RESULT_LOCATION_ALLOW; oilrig_oilrig; }
item(FEAT_INDUSTRIES, oilrig, 113) {
property {
substitute: 5;
override: 5;
life_type: IND_LIFE_TYPE_PROCESSING;
closure_msg: TTD_STR_NEWS_INDUSTRY_CLOSURE_SUPPLY_PROBLEMS;
prod_increase_msg: TTD_STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_GENERAL;
prod_decrease_msg: TTD_STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_GENERAL;
new_ind_msg: TTD_STR_NEWS_INDUSTRY_CONSTRUCTION;
min_cargo_distr: 5;
map_colour: 151;
spec_flags: bitmask(IND_FLAG_LONG_CARGO_TYPE_LISTS, IND_FLAG_BUILT_ON_WATER, IND_FLAG_AI_CREATES_AIR_AND_SHIP_ROUTES,INDTILE_FLAG_ACCEPT_ALL);
layouts:
[
oilrig_industry_layout_1_tilelayout,
];
conflicting_ind_types: []; // set this prop empty, FIRS has it's own better checks for this
name: string(STR_IND_oilrig);
nearby_station_name: string(STR_STATION, string(STR_TOWN), string(STR_STATION_OIL_RIG));
prob_random: 12;
prob_in_game: 4;
prospect_chance: 0.75;
fund_cost_multiplier: 1;
remove_cost_multiplier: 0;
cargo_types:[produce_cargo("PASS",4),produce_cargo("OIL_",12)];
}
}
item(FEAT_INDUSTRIES, oilrig, 113) {
graphics {
extra_text_industry: return string(STR_EXTRA_oilrig);
location_check: oilrig_check_location;
}
}
/***************************
END oilrig
****************************/