// graphics chain for containers random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_reefer_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_reefer_DFLT_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_box_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_box_DFLT_24px_0; 1: return switch_intermodal_containers_default_box_DFLT_24px_1; 1: return switch_intermodal_containers_default_box_DFLT_24px_2; 1: return switch_intermodal_containers_default_box_DFLT_24px_3; 1: return switch_intermodal_containers_default_box_DFLT_24px_4; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_cryo_tank_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_cryo_tank_DFLT_24px_0; 1: return switch_intermodal_containers_default_cryo_tank_DFLT_24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_chemicals_tank_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_chemicals_tank_DFLT_24px_0; 1: return switch_intermodal_containers_default_chemicals_tank_DFLT_24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_livestock_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_livestock_DFLT_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_tank_DFLT_24px_0; 1: return switch_intermodal_containers_default_tank_DFLT_24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_edibles_tank_DFLT_24px_0; 1: return switch_intermodal_containers_default_edibles_tank_DFLT_24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_OIL_, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_tank_OIL__24px_0; 1: return switch_intermodal_containers_default_tank_OIL__24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SLAG, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_SLAG_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_KAOL, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_KAOL_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_AORE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_AORE_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_COKE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_COKE_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_NITR, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_NITR_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CLAY, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_CLAY_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_POTA, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_POTA_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_COAL, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_COAL_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_PETR, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_tank_PETR_24px_0; 1: return switch_intermodal_containers_default_tank_PETR_24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_PORE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_PORE_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CORE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_CORE_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_CTAR, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_tank_CTAR_24px_0; 1: return switch_intermodal_containers_default_tank_CTAR_24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_IORE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_IORE_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_GRVL, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_GRVL_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_cryo_tank_CHLO, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_cryo_tank_CHLO_24px_0; 1: return switch_intermodal_containers_default_cryo_tank_CHLO_24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SCMT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_SCMT_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_SULP, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_tank_SULP_24px_0; 1: return switch_intermodal_containers_default_tank_SULP_24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CASS, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_CASS_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_PHOS, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_PHOS_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_RUBR, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_tank_RUBR_24px_0; 1: return switch_intermodal_containers_default_tank_RUBR_24px_1; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SASH, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_SASH_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SAND, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_SAND_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_LIME, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_LIME_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SALT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_SALT_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_MNO2, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_MNO2_24px_0; } random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SGBT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) { 1: return switch_intermodal_containers_default_bulk_SGBT_24px_0; } // check generic cargo classes // bulk class is explicitly not checked as there are no meaningful default bulk sprites switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_class_liquid, cargo_classes & bitmask(CC_LIQUID)) { 0: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_box_DFLT; return express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_DFLT; } switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_class_refrigerated, cargo_classes & bitmask(CC_REFRIGERATED)) { 0: express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_class_liquid; return express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_reefer_DFLT; } // check explicit cargo labels switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_label, cargo_type_in_veh) { BEER: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT; SALT: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SALT; CASS: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CASS; POTA: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_POTA; CORE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CORE; SCMT: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SCMT; CHLO: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_cryo_tank_CHLO; NITR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_NITR; WATR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT; RUBR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_RUBR; SGBT: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SGBT; SLAG: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SLAG; ACID: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_chemicals_tank_DFLT; COAL: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_COAL; SASH: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SASH; COKE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_COKE; SAND: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SAND; AORE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_AORE; PHOS: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_PHOS; CLAY: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CLAY; MILK: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT; KAOL: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_KAOL; CTAR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_CTAR; IORE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_IORE; O2__: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_cryo_tank_DFLT; FOOD: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT; PETR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_PETR; RFPR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_chemicals_tank_DFLT; GRVL: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_GRVL; PORE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_PORE; LIME: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_LIME; EOIL: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT; MNO2: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_MNO2; SULP: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_SULP; LVST: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_livestock_DFLT; OIL_: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_OIL_; return express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_class_refrigerated; } switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo, cargo_count) { 0: return ss_intermodal_containers_empty; return express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_label; } switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers, STORE_TEMP(base_sprite_2cc + 16 * company_colour2 + company_colour1, 0x100)) { return express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo; } // switch layers: base platform / containers switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_vehicle, getbits(extra_callback_info1, 8, 8)) { 0: return express_intermodal_car_pony_gen_5B_switch_graphics_platform_position_in_consist_entry_point; 1: return express_intermodal_car_pony_gen_5B_switch_graphics_containers; }