Example #1
0
industry.add_tile(
    id="diamond_mine_tile_2",
    animation_length=71,
    animation_looping=True,
    animation_speed=2,
    custom_animation_control={
        "macro": "random_first_frame",
        "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)
], )
Example #2
0
    'bitmask(IND_FLAG_BUILT_ON_WATER, IND_FLAG_AI_CREATES_AIR_AND_SHIP_ROUTES)',
    location_checks=dict(coast_distance=True),
    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])
Example #3
0
		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"],
)
Example #4
0
    name='string(STR_IND_NITRATE_MINE)',
    nearby_station_name='string(STR_STATION_SALTPETER_WORKS)',
    fund_cost_multiplier='180')

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',
Example #5
0
industry.add_tile(
    id="copper_mine_tile_1",
    animation_length=71,
    animation_looping=True,
    animation_speed=2,
    custom_animation_control={
        "macro": "random_first_frame",
        "animation_triggers":
        "bitmask(ANIM_TRIGGER_INDTILE_CONSTRUCTION_STATE)",
    },
    location_checks=TileLocationChecks(disallow_industry_adjacent=True),
)

sprite_ground = industry.add_sprite(
    sprite_number="GROUNDTILE_MUD_TRACKS"  # ground tile same as overlay tile
)
sprite_ground_overlay = industry.add_sprite(
    sprite_number="GROUNDTILE_MUD_TRACKS")
sprite_1 = industry.add_sprite(sprite_number=2039, )
# there is no sprite 2 for this industry, spritelayout_2 doesn't need a building sprite
sprite_3_anim = industry.add_sprite(
    sprite_number="2028 + ((animation_frame < 33) ? (animation_frame %3) : 0)",
    xoffset=2,
    yoffset=3,
    xextent=13,
    yextent=12,
)
sprite_4 = industry.add_sprite(sprite_number=2036, )
sprite_5 = industry.add_sprite(sprite_number=2033, )
sprite_smoke = industry.add_smoke_sprite(
Example #6
0
    fund_cost_multiplier="255",
    override="5",
    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",
Example #7
0
    ),
)
industry.add_tile(
    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=[],
)
Example #8
0
    fund_cost_multiplier='101',
    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,
Example #9
0
industry.add_tile(id='peatlands_tile_1',
                  location_checks=TileLocationChecks(
                      require_effectively_flat=True,
                      disallow_desert=True,
                      disallow_industry_adjacent=True))
industry.add_tile(
    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=[],
)
Example #10
0
    prospect_chance='0.75',
    name='TTD_STR_INDUSTRY_NAME_OIL_RIG',
    nearby_station_name='string(STR_STATION_OIL_RIG)',
    fund_cost_multiplier='255',
    override='5',
    intro_year=1967)

industry.economy_variations['FIRS'].enabled = True
industry.economy_variations['FERNZ'].enabled = True
industry.economy_variations['MISTAH_KURTZ'].enabled = True

industry.add_tile(
    id='oil_rig_tile_1',
    location_checks=TileLocationChecks(disallow_industry_adjacent=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,
                          building_sprites=[sprite_2])
industry.add_spritelayout(id='oil_rig_spritelayout_3',