Skip to content

Commit

Permalink
Change: WIP on improved covered hoppers, including food and farm hoppers
Browse files Browse the repository at this point in the history
  • Loading branch information
andythenorth committed Sep 28, 2024
1 parent 1619e6d commit d58d9c1
Show file tree
Hide file tree
Showing 35 changed files with 224 additions and 19 deletions.
2 changes: 2 additions & 0 deletions src/global_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"cryo_tank_cars",
"covered_hopper_cars_type_1",
"covered_hopper_cars_type_2",
"covered_hopper_cars_type_3",
"covered_hopper_cars_randomised",
"swing_roof_hopper_cars",
"mineral_covered_hopper_cars_type_1",
Expand All @@ -145,6 +146,7 @@
"farm_product_hopper_cars_randomised",
"food_hopper_cars_type_1",
"food_hopper_cars_type_2",
"food_hopper_cars_type_3",
"food_hopper_cars_randomised",
"farm_product_box_cars_type_1",
"farm_product_box_cars_type_2",
Expand Down
Binary file modified src/graphics/pony/covered_hopper_car_type_1_pony_gen_2A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/covered_hopper_car_type_1_pony_gen_3A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/covered_hopper_car_type_1_pony_gen_4A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/covered_hopper_car_type_1_pony_gen_4B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/covered_hopper_car_type_1_pony_gen_5B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/covered_hopper_car_type_2_pony_gen_2A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/covered_hopper_car_type_2_pony_gen_3A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/covered_hopper_car_type_2_pony_gen_4A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/covered_hopper_car_type_2_pony_gen_4B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/farm_product_hopper_car_type_1_pony_gen_4A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/farm_product_hopper_car_type_1_pony_gen_4B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/farm_product_hopper_car_type_1_pony_gen_5B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/farm_product_hopper_car_type_1_pony_gen_5C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/farm_product_hopper_car_type_2_pony_gen_5B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/farm_product_hopper_car_type_2_pony_gen_5C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/food_hopper_car_type_1_pony_gen_4A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/food_hopper_car_type_1_pony_gen_4B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/food_hopper_car_type_2_pony_gen_4A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/food_hopper_car_type_2_pony_gen_4B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/food_hopper_car_type_2_pony_gen_5B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/graphics/pony/food_hopper_car_type_2_pony_gen_5C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/lang/english.toml
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,9 @@ base = "Covered Hopper"
[STR_NAME_SUFFIX_COVERED_HOPPER_CAR_TYPE_2]
base = "Covered Hopper"

[STR_NAME_SUFFIX_COVERED_HOPPER_CAR_TYPE_3]
base = "Covered Hopper"

[STR_NAME_SUFFIX_COVERED_HOPPER_CAR_RANDOMISED]
base = "Covered Hopper"

Expand Down Expand Up @@ -683,6 +686,9 @@ base = "Food Hopper"
[STR_NAME_SUFFIX_FOOD_HOPPER_CAR_TYPE_2]
base = "Food Hopper"

[STR_NAME_SUFFIX_FOOD_HOPPER_CAR_TYPE_3]
base = "Food Hopper"

[STR_NAME_SUFFIX_FOOD_EXPRESS_TANK_CAR_RANDOMISED]
base = "Express Food Tanker"

Expand Down
2 changes: 2 additions & 0 deletions src/rosters/pony.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
"covered_hopper_cars_randomised": "pony",
"covered_hopper_cars_type_1": "pony",
"covered_hopper_cars_type_2": "pony",
"covered_hopper_cars_type_3": "pony",
"cryo_tank_cars": "pony",
"curtain_side_box_cars": "pony",
"dedicated_coil_cars_randomised": "pony",
Expand All @@ -286,6 +287,7 @@
"flat_cars_randomised": "pony",
"food_hopper_cars_type_1": "pony",
"food_hopper_cars_type_2": "pony",
"food_hopper_cars_type_3": "pony",
"food_hopper_cars_randomised": "pony",
"food_express_tank_cars_type_1": "pony",
"food_express_tank_cars_type_2": "pony",
Expand Down
29 changes: 29 additions & 0 deletions src/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -4379,6 +4379,22 @@ def __init__(self, **kwargs):
self._joker = True


class CoveredHopperCarConsistType3(CoveredHopperCarConsistBase):
"""
Default covered hopper type.
"""

def __init__(self, **kwargs):
self.base_id = "covered_hopper_car_type_3"
super().__init__(**kwargs)
self.default_cargos = polar_fox.constants.default_cargos["covered_pellet"]
self.randomised_candidate_groups = ["covered_hopper_car_randomised"]
# buyable variant groups are created post-hoc and can group across subclasses
# any buyable variants (liveries) within the subclass will be automatically added to the group
self.use_named_buyable_variant_group = "wagon_group_covered_hopper_cars"
self._joker = True


class CoveredHopperCarChemicalConsist(CoveredHopperCarConsistBase):
"""
Covered hopper for chemical industry cargos, same refits as standard covered hopper, just a visual variant.
Expand Down Expand Up @@ -5382,6 +5398,19 @@ def __init__(self, **kwargs):
]


class FoodHopperCarConsistType3(FoodHopperCarConsistBase):
"""
Food type covered hoppers - same refits as farm product cars.
"""

def __init__(self, **kwargs):
self.base_id = "food_hopper_car_type_3"
super().__init__(**kwargs)
self.randomised_candidate_groups = [
"food_hopper_car_randomised",
]


class FoodHopperCarRandomisedConsist(RandomisedConsistMixin, FoodHopperCarConsistBase):
"""
Random choice of food hopper sprite.
Expand Down
73 changes: 73 additions & 0 deletions src/vehicles/pony/covered_hopper_cars_type_3_pony.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
from train import CoveredHopperCarConsistType3, FreightCar


def main(roster_id, **kwargs):
# --------------- standard gauge ---------------------------------------------------------------
"""
consist = CoveredHopperCarConsistType3(
roster_id=roster_id,
roster_id_providing_module=kwargs["roster_id_providing_module"],
base_numeric_id=24010,
gen=2,
subtype="A",
sprites_complete=False,
)
consist.add_unit(type=FreightCar, chassis="2_axle_gapped_16px")
consist = CoveredHopperCarConsistType3(
roster_id=roster_id,
roster_id_providing_module=kwargs["roster_id_providing_module"],
base_numeric_id=17800,
gen=3,
subtype="A",
sprites_complete=False,
)
consist.add_unit(type=FreightCar, chassis="2_axle_gapped_16px")
"""
consist = CoveredHopperCarConsistType3(
roster_id=roster_id,
roster_id_providing_module=kwargs["roster_id_providing_module"],
base_numeric_id=34860,
gen=4,
subtype="A",
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_16px")

consist = CoveredHopperCarConsistType3(
roster_id=roster_id,
roster_id_providing_module=kwargs["roster_id_providing_module"],
base_numeric_id=32880,
gen=4,
subtype="B",
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_24px")
"""
consist = CoveredHopperCarConsistType3(
roster_id=roster_id,
roster_id_providing_module=kwargs["roster_id_providing_module"],
base_numeric_id=36320,
gen=5,
subtype="B",
sprites_complete=False,
)
consist.add_unit(type=FreightCar, chassis="2_axle_filled_greebled_24px")
consist = CoveredHopperCarConsistType3(
roster_id=roster_id,
roster_id_providing_module=kwargs["roster_id_providing_module"],
base_numeric_id=17840,
gen=5,
subtype="C",
sprites_complete=False,
)
consist.add_unit(type=FreightCar, chassis="4_axle_filled_greebled_32px")
"""
22 changes: 11 additions & 11 deletions src/vehicles/pony/farm_product_hopper_cars_type_1_pony.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def main(roster_id, **kwargs):
gen=2,
subtype="A",
base_track_type_name="NG",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="4_axle_ng_16px")
Expand All @@ -24,7 +24,7 @@ def main(roster_id, **kwargs):
gen=3,
subtype="A",
base_track_type_name="NG",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="4_axle_ng_16px")
Expand All @@ -36,7 +36,7 @@ def main(roster_id, **kwargs):
gen=3,
subtype="B",
base_track_type_name="NG",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="4_axle_ng_24px")
Expand All @@ -49,7 +49,7 @@ def main(roster_id, **kwargs):
base_numeric_id=23480,
gen=2,
subtype="A",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_16px")
Expand All @@ -60,7 +60,7 @@ def main(roster_id, **kwargs):
base_numeric_id=23770,
gen=2,
subtype="B",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_24px")
Expand All @@ -71,7 +71,7 @@ def main(roster_id, **kwargs):
base_numeric_id=24000,
gen=3,
subtype="A",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_16px")
Expand All @@ -82,7 +82,7 @@ def main(roster_id, **kwargs):
base_numeric_id=23430,
gen=3,
subtype="B",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_24px")
Expand All @@ -93,7 +93,7 @@ def main(roster_id, **kwargs):
base_numeric_id=23440,
gen=4,
subtype="A",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_16px")
Expand All @@ -104,7 +104,7 @@ def main(roster_id, **kwargs):
base_numeric_id=23450,
gen=4,
subtype="B",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_24px")
Expand All @@ -115,7 +115,7 @@ def main(roster_id, **kwargs):
base_numeric_id=23460,
gen=5,
subtype="B",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_greebled_24px")
Expand All @@ -126,7 +126,7 @@ def main(roster_id, **kwargs):
base_numeric_id=23470,
gen=5,
subtype="C",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="4_axle_gapped_greebled_alt_32px")
16 changes: 8 additions & 8 deletions src/vehicles/pony/farm_product_hopper_cars_type_2_pony.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def main(roster_id, **kwargs):
base_numeric_id=26940,
gen=2,
subtype="A",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_16px")
Expand All @@ -21,7 +21,7 @@ def main(roster_id, **kwargs):
base_numeric_id=26950,
gen=2,
subtype="B",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_24px")
Expand All @@ -32,7 +32,7 @@ def main(roster_id, **kwargs):
base_numeric_id=26960,
gen=3,
subtype="A",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_16px")
Expand All @@ -43,7 +43,7 @@ def main(roster_id, **kwargs):
base_numeric_id=26970,
gen=3,
subtype="B",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_24px")
Expand All @@ -54,7 +54,7 @@ def main(roster_id, **kwargs):
base_numeric_id=17990,
gen=4,
subtype="A",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_16px")
Expand All @@ -65,7 +65,7 @@ def main(roster_id, **kwargs):
base_numeric_id=17460,
gen=4,
subtype="B",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_24px")
Expand All @@ -76,7 +76,7 @@ def main(roster_id, **kwargs):
base_numeric_id=17980,
gen=5,
subtype="B",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="2_axle_gapped_greebled_24px")
Expand All @@ -87,7 +87,7 @@ def main(roster_id, **kwargs):
base_numeric_id=16620,
gen=5,
subtype="C",
sprites_complete=True,
sprites_complete=False,
)

consist.add_unit(type=FreightCar, chassis="4_axle_gapped_greebled_alt_32px")
Loading

0 comments on commit d58d9c1

Please sign in to comment.