Ejemplo n.º 1
0
    map_colour='16',
    location_checks=dict(cluster=[70, 3]),
    prospect_chance='0.75',
    name='string(STR_IND_MANGANESE_MINE)',
    nearby_station_name='string(STR_STATION_MANGANESE_MINES)',
    fund_cost_multiplier='232')

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

industry.add_tile(
    id='manganese_mine_tile_1',
    animation_length=81,
    animation_looping=True,
    animation_speed=1,
    custom_animation_next_frame=
    '((animation_frame == 80) ? 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))

industry.add_tile(id='manganese_mine_tile_2',
                  animation_length=71,
                  animation_looping=True,
                  animation_speed=2,
                  custom_animation_control={
                      'macro':
                      'random_first_frame',
                      'animation_triggers':
Ejemplo n.º 2
0
    substitute="INDUSTRYTYPE_DIAMOND_MINE",
    name="TTD_STR_INDUSTRY_NAME_DIAMOND_MINE",
    nearby_station_name="string(STR_STATION_KIMBERLITE_DEPOSITS)",
    fund_cost_multiplier="232",
    pollution_and_squalor_factor=1,
)

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

industry.add_tile(
    id="diamond_mine_tile_1",
    animation_length=81,
    animation_looping=True,
    animation_speed=1,
    custom_animation_next_frame=
    "((animation_frame == 80) ? 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),
)

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":
Ejemplo n.º 3
0
    fund_cost_multiplier='230',
    prod_multiplier='[28]',
    nearby_station_name='string(STR_STATION_WELLS)',
    intro_year=1830)

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

industry.add_tile(
    id='oil_wells_tile_1',
    location_checks=TileLocationChecks(disallow_industry_adjacent=True),
    animation_length=20,
    animation_looping=True,
    animation_speed=3,
    special_flags='bitmask(INDTILE_FLAG_RANDOM_ANIMATION)',
    random_trigger='oil_wells_tile_1_anim_control',
    custom_animation_next_frame='oil_wells_tile_1_anim_next_frame',
    custom_animation_control={
        'macro': 'oil_wells',
        'animation_triggers': 'bitmask(ANIM_TRIGGER_INDTILE_TILE_LOOP)'
    },
)
"""
item(FEAT_INDUSTRYTILES, oil_wells_tile_1, ${global_constants.tile_numeric_ids['oil_wells_tile_1']}) {
	property {
		special_flags:      bitmask(INDTILE_FLAG_RANDOM_ANIMATION);
	}
	graphics {
		anim_control:       ${industry.id}_tile_oil_well_random_trigger;
		random_trigger:     ${industry.id}_tile_oil_well_random_trigger;
		${industry.id}_tile_fences;
Ejemplo n.º 4
0
    name="TTD_STR_INDUSTRY_NAME_OIL_WELLS",
    fund_cost_multiplier="230",
    nearby_station_name="string(STR_STATION_WELLS)",
    pollution_and_squalor_factor=1,
)

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

industry.add_tile(
    id="oil_wells_tile_1",
    location_checks=TileLocationChecks(disallow_industry_adjacent=True),
    animation_length=20,
    animation_looping=True,
    animation_speed=3,
    special_flags=["INDTILE_FLAG_RANDOM_ANIMATION"],
    random_trigger="oil_wells_tile_1_anim_control",
    custom_animation_next_frame="oil_wells_tile_1_anim_next_frame",
    custom_animation_control={
        "macro": "oil_wells",
        "animation_triggers": "bitmask(ANIM_TRIGGER_INDTILE_TILE_LOOP)",
    },
)
"""
item(FEAT_INDUSTRYTILES, oil_wells_tile_1, ${global_constants.tile_numeric_ids['oil_wells_tile_1']}) {
	property {
		special_flags:      bitmask(INDTILE_FLAG_RANDOM_ANIMATION);
	}
	graphics {
		anim_control:       ${industry.id}_tile_oil_well_random_trigger;
		random_trigger:     ${industry.id}_tile_oil_well_random_trigger;
		${industry.id}_tile_fences;
Ejemplo n.º 5
0
    prod_multiplier='[17, 17]',
    map_colour='194',
    spec_flags=
    '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',
Ejemplo n.º 6
0
industry.economy_variations["IN_A_HOT_COUNTRY"].enabled = True
industry.economy_variations["IN_A_HOT_COUNTRY"].prod_cargo_types_with_multipliers = [
    ("PHOS", 16),
    ("CLAY", 10),
]
industry.economy_variations["BASIC_ARCTIC"].enabled = True
industry.economy_variations["BASIC_ARCTIC"].prod_cargo_types_with_multipliers = [
    ("PHOS", 16)
]

# 2 tiles for this industry: pit outer tile cannot be on slopes; pit inner tiles and processor tiles can be
# cases for both tiles ensure that tiles can only be built at same height as north tile
industry.add_tile(
    id="phosphate_mine_tile_1",
    location_checks=TileLocationChecks(
        require_effectively_flat=True, disallow_industry_adjacent=True
    ),
)
industry.add_tile(
    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
Ejemplo n.º 7
0
    # location_checks=dict(industry_max_distance=['copper_concentrator', 72]),
    prospect_chance="0.75",
    name="TTD_STR_INDUSTRY_NAME_COPPER_ORE_MINE",
    nearby_station_name="string(STR_STATION_COPPER_LODE)",
    fund_cost_multiplier="238",
)

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

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)",
Ejemplo n.º 8
0
    # allow longer distance on clustering than usual, and more clusters, as industry is hard to locate
    location_checks=dict(cluster=[90, 4]),
    prospect_chance='0.75',
    name='string(STR_IND_QUARRY)',
    nearby_station_name='string(STR_IND_QUARRY)',
    fund_cost_multiplier='210')

industry.economy_variations['FIRS'].enabled = True
industry.economy_variations['MISTAH_KURTZ'].enabled = True
industry.economy_variations['STEELTOWN'].enabled = True
industry.economy_variations['STEELTOWN'].prod_cargo_types = ['SAND', 'LIME']

# 2 tiles for this industry: pit outer tile cannot be on slopes; pit inner tiles and processor tiles can be
# cases for both tiles ensure that tiles can only be built at same height as north tile
industry.add_tile(id='quarry_tile_1',
                  location_checks=TileLocationChecks(
                      require_effectively_flat=True,
                      disallow_industry_adjacent=True))
industry.add_tile(
    id='quarry_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,
Ejemplo n.º 9
0
        "IND_FLAG_AI_CREATES_AIR_AND_SHIP_ROUTES",
    ],
    location_checks=dict(coast_distance=True),
    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["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,
Ejemplo n.º 10
0
    prob_in_game='4',
    prob_random='7',
    prod_multiplier='[12, 17]',
    map_colour='121',
    location_checks=dict(cluster=[70, 3]),
    prospect_chance='0.75',
    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)], )
Ejemplo n.º 11
0
    location_checks=dict(require_cluster=[90, 4]),
    prospect_chance="0.75",
    name="string(STR_IND_PEATLANDS)",
    nearby_station_name="string(STR_IND_PEATLANDS)",
    fund_cost_multiplier="210",
    pollution_and_squalor_factor=1,
)

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

# 2 tiles for this industry: pit outer tile cannot be on slopes; pit inner tiles and processor tiles can be
# cases for both tiles ensure that tiles can only be built at same height as north tile
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,
    ),
)
Ejemplo n.º 12
0
    # no industry location checks for junk yard, by design
    prospect_chance='0.75',
    name='string(STR_IND_JUNKYARD)',
    nearby_station_name='string(STR_STATION_BONEYARD)',
    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)], )
Ejemplo n.º 13
0
    spec_flags=
    '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='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,
Ejemplo n.º 14
0
    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["BASIC_TEMPERATE"].enabled = True
industry.economy_variations[
    "BASIC_TEMPERATE"].prod_cargo_types_with_multipliers = [("SAND", 17)]

###industry.economy_variations['BETTER_LIVING_THROUGH_CHEMISTRY'].enabled = True
###industry.economy_variations['BETTER_LIVING_THROUGH_CHEMISTRY'].prod_cargo_types_with_multipliers = [('SAND', 17)]

industry.add_tile(
    id="dredging_site_tile_1",
    location_checks=TileLocationChecks(disallow_industry_adjacent=True,
                                       disallow_slopes=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(
Ejemplo n.º 15
0
    location_checks=dict(cluster=[60, 3]),
    prospect_chance='0.75',
    name='TTD_STR_INDUSTRY_NAME_COPPER_ORE_MINE',
    nearby_station_name='string(STR_STATION_COPPER_LODE)',
    fund_cost_multiplier='238',
    intro_year=1800)

industry.economy_variations['MISTAH_KURTZ'].enabled = True
industry.economy_variations['BASIC_TROPIC'].enabled = True

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)',