Loading

Paste #pghvobgew

  1. // graphics chain for containers
  2.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_reefer_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  3.             1: return switch_intermodal_containers_default_reefer_DFLT_24px_0;
  4.     }
  5.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_box_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  6.             1: return switch_intermodal_containers_default_box_DFLT_24px_0;
  7.             1: return switch_intermodal_containers_default_box_DFLT_24px_1;
  8.             1: return switch_intermodal_containers_default_box_DFLT_24px_2;
  9.             1: return switch_intermodal_containers_default_box_DFLT_24px_3;
  10.             1: return switch_intermodal_containers_default_box_DFLT_24px_4;
  11.     }
  12.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_cryo_tank_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  13.             1: return switch_intermodal_containers_default_cryo_tank_DFLT_24px_0;
  14.             1: return switch_intermodal_containers_default_cryo_tank_DFLT_24px_1;
  15.     }
  16.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_chemicals_tank_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  17.             1: return switch_intermodal_containers_default_chemicals_tank_DFLT_24px_0;
  18.             1: return switch_intermodal_containers_default_chemicals_tank_DFLT_24px_1;
  19.     }
  20.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_livestock_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  21.             1: return switch_intermodal_containers_default_livestock_DFLT_24px_0;
  22.     }
  23.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  24.             1: return switch_intermodal_containers_default_tank_DFLT_24px_0;
  25.             1: return switch_intermodal_containers_default_tank_DFLT_24px_1;
  26.     }
  27.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  28.             1: return switch_intermodal_containers_default_edibles_tank_DFLT_24px_0;
  29.             1: return switch_intermodal_containers_default_edibles_tank_DFLT_24px_1;
  30.     }
  31.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_OIL_, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  32.             1: return switch_intermodal_containers_default_tank_OIL__24px_0;
  33.             1: return switch_intermodal_containers_default_tank_OIL__24px_1;
  34.     }
  35.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SLAG, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  36.             1: return switch_intermodal_containers_default_bulk_SLAG_24px_0;
  37.     }
  38.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_KAOL, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  39.             1: return switch_intermodal_containers_default_bulk_KAOL_24px_0;
  40.     }
  41.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_AORE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  42.             1: return switch_intermodal_containers_default_bulk_AORE_24px_0;
  43.     }
  44.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_COKE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  45.             1: return switch_intermodal_containers_default_bulk_COKE_24px_0;
  46.     }
  47.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_NITR, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  48.             1: return switch_intermodal_containers_default_bulk_NITR_24px_0;
  49.     }
  50.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CLAY, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  51.             1: return switch_intermodal_containers_default_bulk_CLAY_24px_0;
  52.     }
  53.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_POTA, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  54.             1: return switch_intermodal_containers_default_bulk_POTA_24px_0;
  55.     }
  56.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_COAL, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  57.             1: return switch_intermodal_containers_default_bulk_COAL_24px_0;
  58.     }
  59.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_PETR, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  60.             1: return switch_intermodal_containers_default_tank_PETR_24px_0;
  61.             1: return switch_intermodal_containers_default_tank_PETR_24px_1;
  62.     }
  63.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_PORE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  64.             1: return switch_intermodal_containers_default_bulk_PORE_24px_0;
  65.     }
  66.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CORE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  67.             1: return switch_intermodal_containers_default_bulk_CORE_24px_0;
  68.     }
  69.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_CTAR, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  70.             1: return switch_intermodal_containers_default_tank_CTAR_24px_0;
  71.             1: return switch_intermodal_containers_default_tank_CTAR_24px_1;
  72.     }
  73.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_IORE, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  74.             1: return switch_intermodal_containers_default_bulk_IORE_24px_0;
  75.     }
  76.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_GRVL, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  77.             1: return switch_intermodal_containers_default_bulk_GRVL_24px_0;
  78.     }
  79.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_cryo_tank_CHLO, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  80.             1: return switch_intermodal_containers_default_cryo_tank_CHLO_24px_0;
  81.             1: return switch_intermodal_containers_default_cryo_tank_CHLO_24px_1;
  82.     }
  83.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SCMT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  84.             1: return switch_intermodal_containers_default_bulk_SCMT_24px_0;
  85.     }
  86.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_SULP, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  87.             1: return switch_intermodal_containers_default_tank_SULP_24px_0;
  88.             1: return switch_intermodal_containers_default_tank_SULP_24px_1;
  89.     }
  90.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CASS, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  91.             1: return switch_intermodal_containers_default_bulk_CASS_24px_0;
  92.     }
  93.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_PHOS, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  94.             1: return switch_intermodal_containers_default_bulk_PHOS_24px_0;
  95.     }
  96.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_RUBR, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  97.             1: return switch_intermodal_containers_default_tank_RUBR_24px_0;
  98.             1: return switch_intermodal_containers_default_tank_RUBR_24px_1;
  99.     }
  100.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SASH, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  101.             1: return switch_intermodal_containers_default_bulk_SASH_24px_0;
  102.     }
  103.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SAND, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  104.             1: return switch_intermodal_containers_default_bulk_SAND_24px_0;
  105.     }
  106.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_LIME, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  107.             1: return switch_intermodal_containers_default_bulk_LIME_24px_0;
  108.     }
  109.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SALT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  110.             1: return switch_intermodal_containers_default_bulk_SALT_24px_0;
  111.     }
  112.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_MNO2, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  113.             1: return switch_intermodal_containers_default_bulk_MNO2_24px_0;
  114.     }
  115.     random_switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SGBT, bitmask(TRIGGER_VEHICLE_NEW_LOAD)) {
  116.             1: return switch_intermodal_containers_default_bulk_SGBT_24px_0;
  117.     }
  118. // check generic cargo classes
  119. // bulk class is explicitly not checked as there are no meaningful default bulk sprites
  120. switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_class_liquid, cargo_classes & bitmask(CC_LIQUID)) {
  121.     0: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_box_DFLT;
  122.     return express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_DFLT;
  123. }
  124. switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_class_refrigerated, cargo_classes & bitmask(CC_REFRIGERATED)) {
  125.     0: express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_class_liquid;
  126.     return express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_reefer_DFLT;
  127. }
  128. // check explicit cargo labels
  129. switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_label, cargo_type_in_veh) {
  130.         BEER: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT;
  131.         SALT: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SALT;
  132.         CASS: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CASS;
  133.         POTA: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_POTA;
  134.         CORE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CORE;
  135.         SCMT: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SCMT;
  136.         CHLO: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_cryo_tank_CHLO;
  137.         NITR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_NITR;
  138.         WATR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT;
  139.         RUBR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_RUBR;
  140.         SGBT: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SGBT;
  141.         SLAG: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SLAG;
  142.         ACID: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_chemicals_tank_DFLT;
  143.         COAL: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_COAL;
  144.         SASH: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SASH;
  145.         COKE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_COKE;
  146.         SAND: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_SAND;
  147.         AORE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_AORE;
  148.         PHOS: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_PHOS;
  149.         CLAY: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_CLAY;
  150.         MILK: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT;
  151.         KAOL: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_KAOL;
  152.         CTAR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_CTAR;
  153.         IORE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_IORE;
  154.         O2__: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_cryo_tank_DFLT;
  155.         FOOD: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT;
  156.         PETR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_PETR;
  157.         RFPR: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_chemicals_tank_DFLT;
  158.         GRVL: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_GRVL;
  159.         PORE: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_PORE;
  160.         LIME: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_LIME;
  161.         EOIL: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_edibles_tank_DFLT;
  162.         MNO2: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_bulk_MNO2;
  163.         SULP: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_SULP;
  164.         LVST: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_livestock_DFLT;
  165.         OIL_: express_intermodal_car_pony_gen_5B_switch_graphics_containers_random_tank_OIL_;
  166.     return express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_class_refrigerated;
  167. }
  168. switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo, cargo_count) {
  169.         0: return ss_intermodal_containers_empty;
  170.     return express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo_label;
  171. }
  172. switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_containers, STORE_TEMP(base_sprite_2cc + 16 * company_colour2 + company_colour1, 0x100)) {
  173.     return express_intermodal_car_pony_gen_5B_switch_graphics_containers_check_cargo;
  174. }
  175. // switch layers: base platform / containers
  176. switch (FEAT_TRAINS, SELF, express_intermodal_car_pony_gen_5B_switch_graphics_vehicle, getbits(extra_callback_info1, 8, 8)) {
  177.     0: return express_intermodal_car_pony_gen_5B_switch_graphics_platform_position_in_consist_entry_point;
  178.     1: return express_intermodal_car_pony_gen_5B_switch_graphics_containers;
  179. }

Comments