Пример #1
0
    custom_animation_next_frame=
    '((animation_frame == 18) ? CB_RESULT_STOP_ANIMATION : CB_RESULT_NEXT_FRAME)',
    custom_animation_control={
        'macro': 'first_frame_is_0',
        'animation_triggers': 'bitmask(ANIM_TRIGGER_INDTILE_TILE_LOOP)'
    },
    location_checks=TileLocationChecks(require_effectively_flat=True,
                                       disallow_industry_adjacent=True))

sprite_ground = industry.add_sprite(sprite_number='GROUNDTILE_MUD_TRACKS')
sprite_ground_overlay = industry.add_sprite(
    sprite_number='GROUNDTILE_MUD_TRACKS')

spriteset_headgear_animated = industry.add_spriteset(
    sprites=[(10, 310, 64, 122, -31, -88), (80, 310, 64, 122, -31, -88),
             (150, 310, 64, 122, -31, -88)],
    animation_rate=1,
    custom_sprite_selector='(animation_frame % 3)',
)
spriteset_exit_trestle_animated = industry.add_spriteset(
    sprites=[(10, 160, 64, 122, -31, -88), (80, 160, 64, 122, -31, -88),
             (150, 160, 64, 122, -31, -88), (220, 160, 64, 122, -31, -88),
             (290, 160, 64, 122, -31, -88), (360, 160, 64, 122, -31, -88),
             (430, 160, 64, 122, -31, -88), (500, 160, 64, 122, -31, -88),
             (500, 160, 64, 122, -31, -88), (570, 160, 64, 122, -31, -88),
             (570, 160, 64, 122, -31, -88), (640, 160, 64, 122, -31, -88),
             (640, 160, 64, 122, -31, -88), (710, 160, 64, 122, -31, -88),
             (780, 160, 64, 122, -31, -88), (850, 160, 64, 122, -31, -88),
             (920, 160, 64, 122, -31, -88), (990, 160, 64, 122, -31, -88),
             (1060, 160, 64, 122, -31, -88)],
    animation_rate=1,
)
Пример #2
0
        "animation_triggers":
        "bitmask(ANIM_TRIGGER_INDTILE_CONSTRUCTION_STATE)",
    },
    location_checks=TileLocationChecks(require_effectively_flat=True,
                                       disallow_industry_adjacent=True),
)

sprite_ground = industry.add_sprite(sprite_number="GROUNDTILE_MUD_TRACKS")
sprite_ground_overlay = industry.add_sprite(
    sprite_number="GROUNDTILE_MUD_TRACKS")

spriteset_headgear_animated = industry.add_spriteset(
    sprites=[
        (10, 160, 64, 122, -31, -88),
        (80, 160, 64, 122, -31, -88),
        (150, 160, 64, 122, -31, -88),
    ],
    animation_rate=1,
    custom_sprite_selector="(animation_frame % 3)",
)
spriteset_crusher_front_part = industry.add_spriteset(sprites=[
    (10, 10, 64, 122, -31, -90)
], )
spriteset_crusher_rear_part = industry.add_spriteset(sprites=[(80, 10, 64, 122,
                                                               -31, -74)], )
spriteset_misc_building = industry.add_spriteset(sprites=[(150, 10, 64, 122,
                                                           -31, -90)], )
spriteset_vents_shed = industry.add_spriteset(sprites=[(220, 10, 64, 122, -31,
                                                        -90)], )
spriteset_winding_house = industry.add_spriteset(sprites=[(290, 10, 64, 122,
                                                           -31, -90)], )
Пример #3
0
    animation_length=71,
    animation_looping=True,
    animation_speed=2,
    location_checks=TileLocationChecks(require_effectively_flat=True,
                                       disallow_industry_adjacent=True),
)

sprite_ground = industry.add_sprite(sprite_number="GROUNDTILE_MUD_TRACKS")
sprite_ground_overlay = industry.add_sprite(
    sprite_number="GROUNDTILE_MUD_TRACKS")

spriteset_headgear_animated = industry.add_spriteset(
    sprites=[
        (10, 160, 64, 122, -31, -88),
        (80, 160, 64, 122, -31, -88),
        (150, 160, 64, 122, -31, -88),
    ],
    animation_rate=1,
    custom_sprite_selector="(animation_frame % 3)",
)
spriteset_crusher_front_part = industry.add_spriteset(sprites=[
    (10, 10, 64, 122, -31, -90)
], )
spriteset_crusher_rear_part = industry.add_spriteset(sprites=[(80, 10, 64, 122,
                                                               -31, -74)], )
spriteset_misc_building_tanks = industry.add_spriteset(sprites=[
    (150, 10, 64, 122, -31, -90)
], )
spriteset_ore_1 = industry.add_spriteset(sprites=[(220, 10, 64, 122, -31, -90)
                                                  ], )
spriteset_ore_2 = industry.add_spriteset(sprites=[(290, 10, 64, 122, -31, -90)
Пример #4
0
	}
	graphics {
		anim_control:       ${industry.id}_tile_oil_well_random_trigger;
		random_trigger:     ${industry.id}_tile_oil_well_random_trigger;
		${industry.id}_tile_fences;
	}
}

"""
industry.add_tile(
    id="oil_wells_tile_2",
    location_checks=TileLocationChecks(disallow_industry_adjacent=True),
)

spriteset_ground_pump = industry.add_spriteset(
    type="empty",
)
sprite_ground_overlay_pump = industry.add_sprite(sprite_number=2173)
sprite_pump = industry.add_sprite(
    sprite_number="2174 + (((animation_frame % 11) < 6) ? (animation_frame % 11) : 10 - (animation_frame % 11))",
    xoffset=1,
    yoffset=2,
    xextent=15,
    yextent=14,
)
industry.add_spritelayout(
    id="oil_wells_spritelayout_pump",
    ground_sprite=spriteset_ground_pump,
    ground_overlay=sprite_ground_overlay_pump,
    building_sprites=[sprite_pump],
    fences=["nw", "ne", "se", "sw"],
Пример #5
0
    prospect_chance='0.75',
    name='string(STR_IND_DREDGING_SITE)',
    nearby_station_name='string(STR_STATION_WATER)',
    fund_cost_multiplier='180',
    graphics_change_dates=[1906, 1945])

industry.economy_variations['FIRS'].enabled = True
industry.economy_variations['BASIC_TEMPERATE'].enabled = True

industry.add_tile(
    id='dredging_site_tile_1',
    location_checks=TileLocationChecks(disallow_industry_adjacent=True))

sprite_ground = industry.add_sprite(sprite_number='GROUNDSPRITE_WATER', )

spriteset_ground_overlay = industry.add_spriteset(type='empty', )

spriteset_platform = industry.add_spriteset(sprites=[(10, 10, 64, 100, -31,
                                                      -67)], )
spriteset_greeble = industry.add_spriteset(sprites=[(80, 10, 64, 39, -31, -12)
                                                    ], )
spriteset_crane_animated = industry.add_spriteset(sprites=[(150, 10, 64, 64,
                                                            -33, -37)], )

industry.add_spritelayout(
    id='dredging_site_spritelayout_1',
    ground_sprite=sprite_ground,
    ground_overlay=spriteset_platform,
    building_sprites=[spriteset_crane_animated, spriteset_greeble])
industry.add_spritelayout(id='dredging_site_spritelayout_null',
                          ground_sprite=sprite_ground,
Пример #6
0
    id="phosphate_mine_tile_2",
    animation_length=56,
    animation_looping=True,
    animation_speed=4,
    custom_animation_control={
        "macro": "random_first_frame",
        "animation_triggers": "bitmask(ANIM_TRIGGER_INDTILE_CONSTRUCTION_STATE)",
    },
    foundations="return CB_RESULT_NO_FOUNDATIONS",  # might not be needed, cargo-culted from previous code, didn't test; may be needed to stop rear foundations showing in some cases?
    autoslope="return CB_RESULT_NO_AUTOSLOPE",
    location_checks=TileLocationChecks(
        disallow_slopes=True, disallow_coast=True, disallow_industry_adjacent=True
    ),
)

spriteset_ground = industry.add_spriteset(type="empty")
spriteset_animated_dozer = industry.add_spriteset(
    sprites=[
        (440, 90, 64, 31, -31, 0),
        (510, 90, 64, 31, -31, 0),
        (580, 90, 64, 31, -31, 0),
        (650, 90, 64, 31, -31, 0),
        (720, 90, 64, 31, -31, 0),
        (790, 90, 64, 31, -31, 0),
        (790, 90, 64, 31, -31, 0),
        (720, 90, 64, 31, -31, 0),
        (650, 90, 64, 31, -31, 0),
        (580, 90, 64, 31, -31, 0),
        (510, 90, 64, 31, -31, 0),
        (440, 90, 64, 31, -31, 0),
    ],
Пример #7
0
industry.economy_variations['FIRS'].enabled = True

industry.add_tile(id='nitrate_mine_tile_1',
                  animation_length=7,
                  animation_looping=True,
                  animation_speed=3,
                  location_checks=TileLocationChecks(
                      require_effectively_flat=True,
                      disallow_industry_adjacent=True))

sprite_ground = industry.add_sprite(
    sprite_number='GROUNDTILE_MUD_TRACKS'  # ground tile same as overlay tile
)

spriteset_ground_overlay = industry.add_spriteset(type='empty')

spriteset_1 = industry.add_spriteset(sprites=[(10, 10, 64, 110, -31, -70)], )
spriteset_2 = industry.add_spriteset(sprites=[(80, 10, 64, 64, -31, -32)], )
spriteset_3 = industry.add_spriteset(sprites=[(150, 10, 64, 64, -31, -31)], )
spriteset_4 = industry.add_spriteset(sprites=[(220, 10, 64, 64, -31, -31)], )
spriteset_5 = industry.add_spriteset(sprites=[(290, 10, 64, 64, -31, -31)], )
spriteset_6 = industry.add_spriteset(sprites=[(360, 10, 64, 64, -31, -31)], )
spriteset_7 = industry.add_spriteset(sprites=[(430, 10, 64, 64, -31, -31)], )
spriteset_8 = industry.add_spriteset(sprites=[(500, 10, 64, 64, -31, -31)], )
spriteset_9 = industry.add_spriteset(sprites=[(570, 10, 64, 64, -31, -31)], )
sprite_smoke_1 = industry.add_smoke_sprite(
    smoke_type='white_smoke_big',
    xoffset=8,
    yoffset=2,
    zoffset=70,
Пример #8
0
    intro_year=1967,
)

industry.economy_variations["IN_A_HOT_COUNTRY"].enabled = True

industry.add_tile(
    id="oil_rig_tile_1",
    location_checks=TileLocationChecks(
        disallow_industry_adjacent=True, disallow_slopes=True
    ),
)

sprite_ground = industry.add_sprite(
    sprite_number="GROUNDSPRITE_WATER",
)
spriteset_ground_empty = industry.add_spriteset(type="empty")
sprite_1 = industry.add_sprite(sprite_number="2096")
sprite_2 = industry.add_sprite(sprite_number="2097")
sprite_3 = industry.add_sprite(sprite_number="2098")
sprite_4 = industry.add_sprite(sprite_number="2099")

industry.add_spritelayout(
    id="oil_rig_spritelayout_1",
    ground_sprite=sprite_ground,
    ground_overlay=spriteset_ground_empty,
    building_sprites=[sprite_1],
)
industry.add_spritelayout(
    id="oil_rig_spritelayout_2",
    ground_sprite=sprite_ground,
    ground_overlay=spriteset_ground_empty,
Пример #9
0
    id="peatlands_tile_2",
    foundations=
    "return CB_RESULT_NO_FOUNDATIONS",  # might not be needed, cargo-culted from previous code, didn't test; may be needed to stop rear foundations showing in some cases?
    autoslope="return CB_RESULT_NO_AUTOSLOPE",
    location_checks=TileLocationChecks(
        disallow_slopes=True,
        disallow_desert=True,
        disallow_coast=True,
        disallow_industry_adjacent=True,
    ),
)

sprite_ground = industry.add_sprite(sprite_number="4126")
sprite_ground_tracks = industry.add_sprite(
    sprite_number="GROUNDTILE_MUD_TRACKS")
spriteset_1 = industry.add_spriteset(sprites=[(10, 10, 64, 64, -31, -31)], )
spriteset_2 = industry.add_spriteset(sprites=[(80, 10, 64, 64, -31, -31)], )
spriteset_3 = industry.add_spriteset(sprites=[(150, 10, 64, 64, -31, -31)], )
spriteset_4 = industry.add_spriteset(sprites=[(220, 10, 64, 64, -31, -31)], )
spriteset_5 = industry.add_spriteset(sprites=[(290, 10, 64, 64, -31, -31)], )
spriteset_6 = industry.add_spriteset(sprites=[(360, 10, 64, 64, -31, -31)], )
spriteset_7 = industry.add_spriteset(sprites=[(430, 10, 64, 64, -31, -31)], )
industry.add_spritelayout(
    id="peatlands_spritelayout_bare_ground",
    ground_sprite=sprite_ground,
    ground_overlay=sprite_ground,
    building_sprites=[],
)
industry.add_spritelayout(
    id="peatlands_spritelayout_tractor",
    ground_sprite=sprite_ground,
Пример #10
0
    graphics_change_dates=[1949, 1960, 1980, 2000],
    intro_year=1850)

industry.economy_variations['FIRS'].enabled = True
industry.economy_variations['BASIC_TEMPERATE'].enabled = True
industry.economy_variations['STEELTOWN'].enabled = True
industry.economy_variations['STEELTOWN'].prob_random = '14'

industry.add_tile(id='junk_yard_tile_1',
                  location_checks=TileLocationChecks(
                      disallow_steep_slopes=True,
                      require_houses_nearby=True,
                      disallow_industry_adjacent=True))

sprite_ground = industry.add_sprite(sprite_number='GROUNDTILE_MUD_TRACKS')
spriteset_ground_overlay = industry.add_spriteset(type='empty')
spriteset_1 = industry.add_spriteset(sprites=[(10, 10, 64, 55, -31, -24)], )
spriteset_2 = industry.add_spriteset(sprites=[(80, 10, 64, 55, -31, -24)], )
spriteset_3 = industry.add_spriteset(sprites=[(150, 10, 64, 55, -31, -24)], )
spriteset_4 = industry.add_spriteset(sprites=[(220, 10, 64, 55, -31, -24)], )
spriteset_5 = industry.add_spriteset(sprites=[(290, 10, 64, 55, -31, -24)], )
spriteset_6 = industry.add_spriteset(sprites=[(360, 10, 64, 55, -31, -24)], )
spriteset_7 = industry.add_spriteset(sprites=[(430, 10, 64, 55, -31, -24)], )
spriteset_8 = industry.add_spriteset(sprites=[(500, 10, 64, 55, -31, -24)], )
spriteset_9 = industry.add_spriteset(sprites=[(570, 10, 64, 55, -31, -24)], )

industry.add_spritelayout(
    id='junk_yard_spritelayout_1',
    ground_sprite=sprite_ground,
    ground_overlay=spriteset_ground_overlay,
    building_sprites=[spriteset_1],
Пример #11
0
        "macro": "first_frame_is_0",
        "animation_triggers": "bitmask(ANIM_TRIGGER_INDTILE_TILE_LOOP)",
    },
    location_checks=TileLocationChecks(require_effectively_flat=True,
                                       disallow_industry_adjacent=True),
)

sprite_ground = industry.add_sprite(sprite_number="GROUNDTILE_MUD_TRACKS")
sprite_ground_overlay = industry.add_sprite(
    sprite_number="GROUNDTILE_MUD_TRACKS")

spriteset_1 = industry.add_spriteset(
    sprites=[
        (10, 10, 64, 110, -31, -70),
        (10, 130, 64, 110, -31, -70),
        (10, 250, 64, 110, -31, -70),
    ],
    animation_rate=1,
    custom_sprite_selector="(animation_frame % 3)",
)
spriteset_2 = industry.add_spriteset(
    sprites=[(80, 10, 64, 110, -31, -70)],
    # autofills number of frames to match another spriteset which is animated etc (can get frame count from the other spriteset if defined already)
    num_sprites_to_autofill=len(spriteset_1.sprites),
)
spriteset_3 = industry.add_spriteset(
    sprites=[(150, 10, 64, 64, -31, -30)],
    # autofills number of frames to match another spriteset which is animated etc (can get frame count from the other spriteset if defined already)
    num_sprites_to_autofill=len(spriteset_1.sprites),
)
spriteset_4 = industry.add_spriteset(