Loading

Paste #pafuuppxq

  1. // default spriteset templates
  2.         template spriteset_template_asymmetric_unreversed_geronimo_unflipped(y) {
  3.                 //[left_x, upper_y, width, height, offset_x, offset_y]
  4.                 [60, y, 8, 29, -3, -16 ]
  5.                 [73, y, 26, 24, -14, -15 ]
  6.                 [104, y, 33, 16, -16, -12 ]
  7.                 [143, y, 26, 24, -8, -16 ]
  8.                 [180, y, 8, 29, -3, -16 ]
  9.                 [193, y, 26, 24, -14, -15 ]
  10.                 [224, y, 33, 16, -16, -12 ]
  11.                 [263, y, 26, 24, -8, -16 ]
  12.         }
  13.         template spriteset_template_asymmetric_reversed_geronimo_unflipped(y) {
  14.                 //[left_x, upper_y, width, height, offset_x, offset_y]
  15.                 [180, y, 8, 29, -3, -16 ]
  16.                 [193, y, 26, 24, -14, -15 ]
  17.                 [224, y, 33, 16, -16, -12 ]
  18.                 [263, y, 26, 24, -8, -16 ]
  19.                 [60, y, 8, 29, -3, -16 ]
  20.                 [73, y, 26, 24, -14, -15 ]
  21.                 [104, y, 33, 16, -16, -12 ]
  22.                 [143, y, 26, 24, -8, -16 ]
  23.         }
  24.         template spriteset_template_asymmetric_unreversed_geronimo_flipped(y) {
  25.                 //[left_x, upper_y, width, height, offset_x, offset_y]
  26.                 [60, y, 8, 29, -3, -16 ]
  27.                 [73, y, 26, 24, -14, -15 ]
  28.                 [104, y, 33, 16, -16, -12 ]
  29.                 [143, y, 26, 24, -8, -16 ]
  30.                 [180, y, 8, 29, -3, -16 ]
  31.                 [193, y, 26, 24, -14, -15 ]
  32.                 [224, y, 33, 16, -16, -12 ]
  33.                 [263, y, 26, 24, -8, -16 ]
  34.         }
  35.         template spriteset_template_asymmetric_reversed_geronimo_flipped(y) {
  36.                 //[left_x, upper_y, width, height, offset_x, offset_y]
  37.                 [180, y, 8, 29, -3, -16 ]
  38.                 [193, y, 26, 24, -14, -15 ]
  39.                 [224, y, 33, 16, -16, -12 ]
  40.                 [263, y, 26, 24, -8, -16 ]
  41.                 [60, y, 8, 29, -3, -16 ]
  42.                 [73, y, 26, 24, -14, -15 ]
  43.                 [104, y, 33, 16, -16, -12 ]
  44.                 [143, y, 26, 24, -8, -16 ]
  45.         }
  46. // buy menu spriteset template
  47. template spriteset_template_purchase_geronimo(y) {
  48.             //[left_x,  upper_y,    width,      height,     offset_x,      offset_y]
  49.             [60,    10, 1, 1, 0, 0]
  50.             [60,    10, 1, 1, 0, 0]
  51.             [60,    10, 1, 1, 0, 0]
  52.             [60,    10, 1, 1, 0, 0]
  53.             [60,    10, 1, 1, 0, 0]
  54.             [60,    10, 1, 1, 0, 0]
  55.             // allow for buffers/couplings being 1px additional to the unit (they overlap in consists, but show in buy menu)
  56.             [224, y, 33, 16, -16, -11 ]
  57.             [60,    10, 1, 1, 0, 0]
  58. }
  59. // default graphics chain
  60.         spriteset(geronimo_ss_doors_closed_livery_1_0_unflipped, "generated/graphics/geronimo.png") {
  61.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 0)
  62.         }
  63.         spriteset(geronimo_ss_doors_open_livery_1_0_unflipped, "generated/graphics/geronimo.png") {
  64.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 0 + 30)
  65.         }
  66.         spriteset(geronimo_ss_doors_closed_livery_2_0_unflipped, "generated/graphics/geronimo.png") {
  67.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 0 + 60)
  68.         }
  69.         spriteset(geronimo_ss_doors_open_livery_2_0_unflipped, "generated/graphics/geronimo.png") {
  70.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 0 + 90)
  71.         }
  72.             spritegroup geronimo_sg_part_load_or_empty_livery_1_0_unflipped {
  73.                 loaded:  [
  74.                     geronimo_ss_doors_closed_livery_1_0_unflipped,
  75.                 ];
  76.                 loading: [
  77.                     geronimo_ss_doors_open_livery_1_0_unflipped,
  78.                 ];
  79.             }
  80.             spritegroup geronimo_sg_full_load_livery_1_0_unflipped {
  81.                 loaded:  [
  82.                     geronimo_ss_doors_closed_livery_1_0_unflipped,
  83.                 ];
  84.                 loading: [
  85.                     geronimo_ss_doors_closed_livery_1_0_unflipped,
  86.                 ];
  87.             }
  88.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_1_0_unflipped, cargo_count*100/cargo_capacity) {
  89.                     0..99: return geronimo_sg_part_load_or_empty_livery_1_0_unflipped;
  90.                 return geronimo_sg_full_load_livery_1_0_unflipped;
  91.             }
  92.             spritegroup geronimo_sg_part_load_or_empty_livery_2_0_unflipped {
  93.                 loaded:  [
  94.                     geronimo_ss_doors_closed_livery_2_0_unflipped,
  95.                 ];
  96.                 loading: [
  97.                     geronimo_ss_doors_open_livery_2_0_unflipped,
  98.                 ];
  99.             }
  100.             spritegroup geronimo_sg_full_load_livery_2_0_unflipped {
  101.                 loaded:  [
  102.                     geronimo_ss_doors_closed_livery_2_0_unflipped,
  103.                 ];
  104.                 loading: [
  105.                     geronimo_ss_doors_closed_livery_2_0_unflipped,
  106.                 ];
  107.             }
  108.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_2_0_unflipped, cargo_count*100/cargo_capacity) {
  109.                     0..99: return geronimo_sg_part_load_or_empty_livery_2_0_unflipped;
  110.                 return geronimo_sg_full_load_livery_2_0_unflipped;
  111.             }
  112.                 spriteset(geronimo_ss_pantographs_down_0_unflipped, "generated/graphics/geronimo_pantographs_down.png") {
  113.                   spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 0)
  114.                 }
  115.                 spriteset(geronimo_ss_pantographs_up_0_unflipped, "generated/graphics/geronimo_pantographs_up.png") {
  116.                   spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 0)
  117.                 }
  118.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_0_unflipped, current_railtype) {
  119.                 ELRL: return geronimo_ss_pantographs_up_0_unflipped;
  120.                 return geronimo_ss_pantographs_down_0_unflipped;
  121.             }
  122.         spriteset(geronimo_ss_doors_closed_livery_1_0_flipped, "generated/graphics/geronimo.png") {
  123.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 0)
  124.         }
  125.         spriteset(geronimo_ss_doors_open_livery_1_0_flipped, "generated/graphics/geronimo.png") {
  126.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 0 + 30)
  127.         }
  128.         spriteset(geronimo_ss_doors_closed_livery_2_0_flipped, "generated/graphics/geronimo.png") {
  129.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 0 + 60)
  130.         }
  131.         spriteset(geronimo_ss_doors_open_livery_2_0_flipped, "generated/graphics/geronimo.png") {
  132.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 0 + 90)
  133.         }
  134.             spritegroup geronimo_sg_part_load_or_empty_livery_1_0_flipped {
  135.                 loaded:  [
  136.                     geronimo_ss_doors_closed_livery_1_0_flipped,
  137.                 ];
  138.                 loading: [
  139.                     geronimo_ss_doors_open_livery_1_0_flipped,
  140.                 ];
  141.             }
  142.             spritegroup geronimo_sg_full_load_livery_1_0_flipped {
  143.                 loaded:  [
  144.                     geronimo_ss_doors_closed_livery_1_0_flipped,
  145.                 ];
  146.                 loading: [
  147.                     geronimo_ss_doors_closed_livery_1_0_flipped,
  148.                 ];
  149.             }
  150.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_1_0_flipped, cargo_count*100/cargo_capacity) {
  151.                     0..99: return geronimo_sg_part_load_or_empty_livery_1_0_flipped;
  152.                 return geronimo_sg_full_load_livery_1_0_flipped;
  153.             }
  154.             spritegroup geronimo_sg_part_load_or_empty_livery_2_0_flipped {
  155.                 loaded:  [
  156.                     geronimo_ss_doors_closed_livery_2_0_flipped,
  157.                 ];
  158.                 loading: [
  159.                     geronimo_ss_doors_open_livery_2_0_flipped,
  160.                 ];
  161.             }
  162.             spritegroup geronimo_sg_full_load_livery_2_0_flipped {
  163.                 loaded:  [
  164.                     geronimo_ss_doors_closed_livery_2_0_flipped,
  165.                 ];
  166.                 loading: [
  167.                     geronimo_ss_doors_closed_livery_2_0_flipped,
  168.                 ];
  169.             }
  170.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_2_0_flipped, cargo_count*100/cargo_capacity) {
  171.                     0..99: return geronimo_sg_part_load_or_empty_livery_2_0_flipped;
  172.                 return geronimo_sg_full_load_livery_2_0_flipped;
  173.             }
  174.                 spriteset(geronimo_ss_pantographs_down_0_flipped, "generated/graphics/geronimo_pantographs_down.png") {
  175.                   spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 0)
  176.                 }
  177.                 spriteset(geronimo_ss_pantographs_up_0_flipped, "generated/graphics/geronimo_pantographs_up.png") {
  178.                   spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 0)
  179.                 }
  180.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_0_flipped, current_railtype) {
  181.                 ELRL: return geronimo_ss_pantographs_up_0_flipped;
  182.                 return geronimo_ss_pantographs_down_0_flipped;
  183.             }
  184.     // handle user flipped state
  185.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_livery_1_0, vehicle_is_flipped) {
  186.         1: return geronimo_switch_graphics_percent_loaded_livery_2_0_flipped;
  187.         return geronimo_switch_graphics_percent_loaded_livery_1_0_unflipped;
  188.     }
  189.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_livery_2_0, vehicle_is_flipped) {
  190.         1: return geronimo_switch_graphics_percent_loaded_livery_1_0_flipped;
  191.         return geronimo_switch_graphics_percent_loaded_livery_2_0_unflipped;
  192.     }
  193.     switch (FEAT_TRAINS, PARENT, geronimo_switch_graphics_engine_id_0, vehicle_type_id) {
  194.             lark: return geronimo_switch_graphics_livery_2_0;
  195.             merrylegs: return geronimo_switch_graphics_livery_2_0;
  196.             proper_job: return geronimo_switch_graphics_livery_2_0;
  197.             shoebox: return geronimo_switch_graphics_livery_2_0;
  198.             super_shoebox: return geronimo_switch_graphics_livery_2_0;
  199.             ultra_shoebox: return geronimo_switch_graphics_livery_2_0;
  200.             hurly_burly: return geronimo_switch_graphics_livery_2_0;
  201.             moor_gallop: return geronimo_switch_graphics_livery_2_0;
  202.             roarer: return geronimo_switch_graphics_livery_2_0;
  203.             screamer: return geronimo_switch_graphics_livery_2_0;
  204.             sizzler: return geronimo_switch_graphics_livery_2_0;
  205.             athena: return geronimo_switch_graphics_livery_2_0;
  206.             geronimo: return geronimo_switch_graphics_livery_2_0;
  207.             breeze: return geronimo_switch_graphics_livery_2_0;
  208.             zeus: return geronimo_switch_graphics_livery_2_0;
  209.             ares: return geronimo_switch_graphics_livery_2_0;
  210.             dover: return geronimo_switch_graphics_livery_2_0;
  211.             jupiter: return geronimo_switch_graphics_livery_2_0;
  212.             pylon: return geronimo_switch_graphics_livery_2_0;
  213.         return geronimo_switch_graphics_livery_1_0;
  214.     }
  215.         switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_0, vehicle_is_flipped) {
  216.             1: return geronimo_switch_graphics_pantographs_0_flipped;
  217.             return geronimo_switch_graphics_pantographs_0_unflipped;
  218.         }
  219.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_vehicle_layers_0, getbits(extra_callback_info1, 8, 8)) {
  220.         0: return geronimo_switch_graphics_engine_id_0;
  221.             1: return geronimo_switch_graphics_pantographs_0;
  222.     }
  223.         spriteset(geronimo_ss_doors_closed_livery_1_1_unflipped, "generated/graphics/geronimo.png") {
  224.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 120)
  225.         }
  226.         spriteset(geronimo_ss_doors_open_livery_1_1_unflipped, "generated/graphics/geronimo.png") {
  227.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 120 + 30)
  228.         }
  229.         spriteset(geronimo_ss_doors_closed_livery_2_1_unflipped, "generated/graphics/geronimo.png") {
  230.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 120 + 60)
  231.         }
  232.         spriteset(geronimo_ss_doors_open_livery_2_1_unflipped, "generated/graphics/geronimo.png") {
  233.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 120 + 90)
  234.         }
  235.             spritegroup geronimo_sg_part_load_or_empty_livery_1_1_unflipped {
  236.                 loaded:  [
  237.                     geronimo_ss_doors_closed_livery_1_1_unflipped,
  238.                 ];
  239.                 loading: [
  240.                     geronimo_ss_doors_open_livery_1_1_unflipped,
  241.                 ];
  242.             }
  243.             spritegroup geronimo_sg_full_load_livery_1_1_unflipped {
  244.                 loaded:  [
  245.                     geronimo_ss_doors_closed_livery_1_1_unflipped,
  246.                 ];
  247.                 loading: [
  248.                     geronimo_ss_doors_closed_livery_1_1_unflipped,
  249.                 ];
  250.             }
  251.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_1_1_unflipped, cargo_count*100/cargo_capacity) {
  252.                     0..99: return geronimo_sg_part_load_or_empty_livery_1_1_unflipped;
  253.                 return geronimo_sg_full_load_livery_1_1_unflipped;
  254.             }
  255.             spritegroup geronimo_sg_part_load_or_empty_livery_2_1_unflipped {
  256.                 loaded:  [
  257.                     geronimo_ss_doors_closed_livery_2_1_unflipped,
  258.                 ];
  259.                 loading: [
  260.                     geronimo_ss_doors_open_livery_2_1_unflipped,
  261.                 ];
  262.             }
  263.             spritegroup geronimo_sg_full_load_livery_2_1_unflipped {
  264.                 loaded:  [
  265.                     geronimo_ss_doors_closed_livery_2_1_unflipped,
  266.                 ];
  267.                 loading: [
  268.                     geronimo_ss_doors_closed_livery_2_1_unflipped,
  269.                 ];
  270.             }
  271.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_2_1_unflipped, cargo_count*100/cargo_capacity) {
  272.                     0..99: return geronimo_sg_part_load_or_empty_livery_2_1_unflipped;
  273.                 return geronimo_sg_full_load_livery_2_1_unflipped;
  274.             }
  275.                 spriteset(geronimo_ss_pantographs_down_1_unflipped, "generated/graphics/geronimo_pantographs_down.png") {
  276.                   spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 60)
  277.                 }
  278.                 spriteset(geronimo_ss_pantographs_up_1_unflipped, "generated/graphics/geronimo_pantographs_up.png") {
  279.                   spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 60)
  280.                 }
  281.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_1_unflipped, current_railtype) {
  282.                 ELRL: return geronimo_ss_pantographs_up_1_unflipped;
  283.                 return geronimo_ss_pantographs_down_1_unflipped;
  284.             }
  285.         spriteset(geronimo_ss_doors_closed_livery_1_1_flipped, "generated/graphics/geronimo.png") {
  286.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 120)
  287.         }
  288.         spriteset(geronimo_ss_doors_open_livery_1_1_flipped, "generated/graphics/geronimo.png") {
  289.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 120 + 30)
  290.         }
  291.         spriteset(geronimo_ss_doors_closed_livery_2_1_flipped, "generated/graphics/geronimo.png") {
  292.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 120 + 60)
  293.         }
  294.         spriteset(geronimo_ss_doors_open_livery_2_1_flipped, "generated/graphics/geronimo.png") {
  295.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 120 + 90)
  296.         }
  297.             spritegroup geronimo_sg_part_load_or_empty_livery_1_1_flipped {
  298.                 loaded:  [
  299.                     geronimo_ss_doors_closed_livery_1_1_flipped,
  300.                 ];
  301.                 loading: [
  302.                     geronimo_ss_doors_open_livery_1_1_flipped,
  303.                 ];
  304.             }
  305.             spritegroup geronimo_sg_full_load_livery_1_1_flipped {
  306.                 loaded:  [
  307.                     geronimo_ss_doors_closed_livery_1_1_flipped,
  308.                 ];
  309.                 loading: [
  310.                     geronimo_ss_doors_closed_livery_1_1_flipped,
  311.                 ];
  312.             }
  313.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_1_1_flipped, cargo_count*100/cargo_capacity) {
  314.                     0..99: return geronimo_sg_part_load_or_empty_livery_1_1_flipped;
  315.                 return geronimo_sg_full_load_livery_1_1_flipped;
  316.             }
  317.             spritegroup geronimo_sg_part_load_or_empty_livery_2_1_flipped {
  318.                 loaded:  [
  319.                     geronimo_ss_doors_closed_livery_2_1_flipped,
  320.                 ];
  321.                 loading: [
  322.                     geronimo_ss_doors_open_livery_2_1_flipped,
  323.                 ];
  324.             }
  325.             spritegroup geronimo_sg_full_load_livery_2_1_flipped {
  326.                 loaded:  [
  327.                     geronimo_ss_doors_closed_livery_2_1_flipped,
  328.                 ];
  329.                 loading: [
  330.                     geronimo_ss_doors_closed_livery_2_1_flipped,
  331.                 ];
  332.             }
  333.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_2_1_flipped, cargo_count*100/cargo_capacity) {
  334.                     0..99: return geronimo_sg_part_load_or_empty_livery_2_1_flipped;
  335.                 return geronimo_sg_full_load_livery_2_1_flipped;
  336.             }
  337.                 spriteset(geronimo_ss_pantographs_down_1_flipped, "generated/graphics/geronimo_pantographs_down.png") {
  338.                   spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 60)
  339.                 }
  340.                 spriteset(geronimo_ss_pantographs_up_1_flipped, "generated/graphics/geronimo_pantographs_up.png") {
  341.                   spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 60)
  342.                 }
  343.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_1_flipped, current_railtype) {
  344.                 ELRL: return geronimo_ss_pantographs_up_1_flipped;
  345.                 return geronimo_ss_pantographs_down_1_flipped;
  346.             }
  347.     // handle user flipped state
  348.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_livery_1_1, vehicle_is_flipped) {
  349.         1: return geronimo_switch_graphics_percent_loaded_livery_2_1_flipped;
  350.         return geronimo_switch_graphics_percent_loaded_livery_1_1_unflipped;
  351.     }
  352.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_livery_2_1, vehicle_is_flipped) {
  353.         1: return geronimo_switch_graphics_percent_loaded_livery_1_1_flipped;
  354.         return geronimo_switch_graphics_percent_loaded_livery_2_1_unflipped;
  355.     }
  356.     switch (FEAT_TRAINS, PARENT, geronimo_switch_graphics_engine_id_1, vehicle_type_id) {
  357.             lark: return geronimo_switch_graphics_livery_2_1;
  358.             merrylegs: return geronimo_switch_graphics_livery_2_1;
  359.             proper_job: return geronimo_switch_graphics_livery_2_1;
  360.             shoebox: return geronimo_switch_graphics_livery_2_1;
  361.             super_shoebox: return geronimo_switch_graphics_livery_2_1;
  362.             ultra_shoebox: return geronimo_switch_graphics_livery_2_1;
  363.             hurly_burly: return geronimo_switch_graphics_livery_2_1;
  364.             moor_gallop: return geronimo_switch_graphics_livery_2_1;
  365.             roarer: return geronimo_switch_graphics_livery_2_1;
  366.             screamer: return geronimo_switch_graphics_livery_2_1;
  367.             sizzler: return geronimo_switch_graphics_livery_2_1;
  368.             athena: return geronimo_switch_graphics_livery_2_1;
  369.             geronimo: return geronimo_switch_graphics_livery_2_1;
  370.             breeze: return geronimo_switch_graphics_livery_2_1;
  371.             zeus: return geronimo_switch_graphics_livery_2_1;
  372.             ares: return geronimo_switch_graphics_livery_2_1;
  373.             dover: return geronimo_switch_graphics_livery_2_1;
  374.             jupiter: return geronimo_switch_graphics_livery_2_1;
  375.             pylon: return geronimo_switch_graphics_livery_2_1;
  376.         return geronimo_switch_graphics_livery_1_1;
  377.     }
  378.         switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_1, vehicle_is_flipped) {
  379.             1: return geronimo_switch_graphics_pantographs_1_flipped;
  380.             return geronimo_switch_graphics_pantographs_1_unflipped;
  381.         }
  382.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_vehicle_layers_1, getbits(extra_callback_info1, 8, 8)) {
  383.         0: return geronimo_switch_graphics_engine_id_1;
  384.             1: return geronimo_switch_graphics_pantographs_1;
  385.     }
  386.         spriteset(geronimo_ss_doors_closed_livery_1_2_unflipped, "generated/graphics/geronimo.png") {
  387.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 240)
  388.         }
  389.         spriteset(geronimo_ss_doors_open_livery_1_2_unflipped, "generated/graphics/geronimo.png") {
  390.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 240 + 30)
  391.         }
  392.         spriteset(geronimo_ss_doors_closed_livery_2_2_unflipped, "generated/graphics/geronimo.png") {
  393.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 240 + 60)
  394.         }
  395.         spriteset(geronimo_ss_doors_open_livery_2_2_unflipped, "generated/graphics/geronimo.png") {
  396.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 240 + 90)
  397.         }
  398.             spritegroup geronimo_sg_part_load_or_empty_livery_1_2_unflipped {
  399.                 loaded:  [
  400.                     geronimo_ss_doors_closed_livery_1_2_unflipped,
  401.                 ];
  402.                 loading: [
  403.                     geronimo_ss_doors_open_livery_1_2_unflipped,
  404.                 ];
  405.             }
  406.             spritegroup geronimo_sg_full_load_livery_1_2_unflipped {
  407.                 loaded:  [
  408.                     geronimo_ss_doors_closed_livery_1_2_unflipped,
  409.                 ];
  410.                 loading: [
  411.                     geronimo_ss_doors_closed_livery_1_2_unflipped,
  412.                 ];
  413.             }
  414.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_1_2_unflipped, cargo_count*100/cargo_capacity) {
  415.                     0..99: return geronimo_sg_part_load_or_empty_livery_1_2_unflipped;
  416.                 return geronimo_sg_full_load_livery_1_2_unflipped;
  417.             }
  418.             spritegroup geronimo_sg_part_load_or_empty_livery_2_2_unflipped {
  419.                 loaded:  [
  420.                     geronimo_ss_doors_closed_livery_2_2_unflipped,
  421.                 ];
  422.                 loading: [
  423.                     geronimo_ss_doors_open_livery_2_2_unflipped,
  424.                 ];
  425.             }
  426.             spritegroup geronimo_sg_full_load_livery_2_2_unflipped {
  427.                 loaded:  [
  428.                     geronimo_ss_doors_closed_livery_2_2_unflipped,
  429.                 ];
  430.                 loading: [
  431.                     geronimo_ss_doors_closed_livery_2_2_unflipped,
  432.                 ];
  433.             }
  434.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_2_2_unflipped, cargo_count*100/cargo_capacity) {
  435.                     0..99: return geronimo_sg_part_load_or_empty_livery_2_2_unflipped;
  436.                 return geronimo_sg_full_load_livery_2_2_unflipped;
  437.             }
  438.                 spriteset(geronimo_ss_pantographs_down_2_unflipped, "generated/graphics/geronimo_pantographs_down.png") {
  439.                   spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 120)
  440.                 }
  441.                 spriteset(geronimo_ss_pantographs_up_2_unflipped, "generated/graphics/geronimo_pantographs_up.png") {
  442.                   spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 120)
  443.                 }
  444.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_2_unflipped, current_railtype) {
  445.                 ELRL: return geronimo_ss_pantographs_up_2_unflipped;
  446.                 return geronimo_ss_pantographs_down_2_unflipped;
  447.             }
  448.         spriteset(geronimo_ss_doors_closed_livery_1_2_flipped, "generated/graphics/geronimo.png") {
  449.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 240)
  450.         }
  451.         spriteset(geronimo_ss_doors_open_livery_1_2_flipped, "generated/graphics/geronimo.png") {
  452.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 240 + 30)
  453.         }
  454.         spriteset(geronimo_ss_doors_closed_livery_2_2_flipped, "generated/graphics/geronimo.png") {
  455.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 240 + 60)
  456.         }
  457.         spriteset(geronimo_ss_doors_open_livery_2_2_flipped, "generated/graphics/geronimo.png") {
  458.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 240 + 90)
  459.         }
  460.             spritegroup geronimo_sg_part_load_or_empty_livery_1_2_flipped {
  461.                 loaded:  [
  462.                     geronimo_ss_doors_closed_livery_1_2_flipped,
  463.                 ];
  464.                 loading: [
  465.                     geronimo_ss_doors_open_livery_1_2_flipped,
  466.                 ];
  467.             }
  468.             spritegroup geronimo_sg_full_load_livery_1_2_flipped {
  469.                 loaded:  [
  470.                     geronimo_ss_doors_closed_livery_1_2_flipped,
  471.                 ];
  472.                 loading: [
  473.                     geronimo_ss_doors_closed_livery_1_2_flipped,
  474.                 ];
  475.             }
  476.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_1_2_flipped, cargo_count*100/cargo_capacity) {
  477.                     0..99: return geronimo_sg_part_load_or_empty_livery_1_2_flipped;
  478.                 return geronimo_sg_full_load_livery_1_2_flipped;
  479.             }
  480.             spritegroup geronimo_sg_part_load_or_empty_livery_2_2_flipped {
  481.                 loaded:  [
  482.                     geronimo_ss_doors_closed_livery_2_2_flipped,
  483.                 ];
  484.                 loading: [
  485.                     geronimo_ss_doors_open_livery_2_2_flipped,
  486.                 ];
  487.             }
  488.             spritegroup geronimo_sg_full_load_livery_2_2_flipped {
  489.                 loaded:  [
  490.                     geronimo_ss_doors_closed_livery_2_2_flipped,
  491.                 ];
  492.                 loading: [
  493.                     geronimo_ss_doors_closed_livery_2_2_flipped,
  494.                 ];
  495.             }
  496.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_2_2_flipped, cargo_count*100/cargo_capacity) {
  497.                     0..99: return geronimo_sg_part_load_or_empty_livery_2_2_flipped;
  498.                 return geronimo_sg_full_load_livery_2_2_flipped;
  499.             }
  500.                 spriteset(geronimo_ss_pantographs_down_2_flipped, "generated/graphics/geronimo_pantographs_down.png") {
  501.                   spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 120)
  502.                 }
  503.                 spriteset(geronimo_ss_pantographs_up_2_flipped, "generated/graphics/geronimo_pantographs_up.png") {
  504.                   spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 120)
  505.                 }
  506.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_2_flipped, current_railtype) {
  507.                 ELRL: return geronimo_ss_pantographs_up_2_flipped;
  508.                 return geronimo_ss_pantographs_down_2_flipped;
  509.             }
  510.     // handle user flipped state
  511.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_livery_1_2, vehicle_is_flipped) {
  512.         1: return geronimo_switch_graphics_percent_loaded_livery_2_2_flipped;
  513.         return geronimo_switch_graphics_percent_loaded_livery_1_2_unflipped;
  514.     }
  515.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_livery_2_2, vehicle_is_flipped) {
  516.         1: return geronimo_switch_graphics_percent_loaded_livery_1_2_flipped;
  517.         return geronimo_switch_graphics_percent_loaded_livery_2_2_unflipped;
  518.     }
  519.     switch (FEAT_TRAINS, PARENT, geronimo_switch_graphics_engine_id_2, vehicle_type_id) {
  520.             lark: return geronimo_switch_graphics_livery_2_2;
  521.             merrylegs: return geronimo_switch_graphics_livery_2_2;
  522.             proper_job: return geronimo_switch_graphics_livery_2_2;
  523.             shoebox: return geronimo_switch_graphics_livery_2_2;
  524.             super_shoebox: return geronimo_switch_graphics_livery_2_2;
  525.             ultra_shoebox: return geronimo_switch_graphics_livery_2_2;
  526.             hurly_burly: return geronimo_switch_graphics_livery_2_2;
  527.             moor_gallop: return geronimo_switch_graphics_livery_2_2;
  528.             roarer: return geronimo_switch_graphics_livery_2_2;
  529.             screamer: return geronimo_switch_graphics_livery_2_2;
  530.             sizzler: return geronimo_switch_graphics_livery_2_2;
  531.             athena: return geronimo_switch_graphics_livery_2_2;
  532.             geronimo: return geronimo_switch_graphics_livery_2_2;
  533.             breeze: return geronimo_switch_graphics_livery_2_2;
  534.             zeus: return geronimo_switch_graphics_livery_2_2;
  535.             ares: return geronimo_switch_graphics_livery_2_2;
  536.             dover: return geronimo_switch_graphics_livery_2_2;
  537.             jupiter: return geronimo_switch_graphics_livery_2_2;
  538.             pylon: return geronimo_switch_graphics_livery_2_2;
  539.         return geronimo_switch_graphics_livery_1_2;
  540.     }
  541.         switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_2, vehicle_is_flipped) {
  542.             1: return geronimo_switch_graphics_pantographs_2_flipped;
  543.             return geronimo_switch_graphics_pantographs_2_unflipped;
  544.         }
  545.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_vehicle_layers_2, getbits(extra_callback_info1, 8, 8)) {
  546.         0: return geronimo_switch_graphics_engine_id_2;
  547.             1: return geronimo_switch_graphics_pantographs_2;
  548.     }
  549.         spriteset(geronimo_ss_doors_closed_livery_1_3_unflipped, "generated/graphics/geronimo.png") {
  550.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 360)
  551.         }
  552.         spriteset(geronimo_ss_doors_open_livery_1_3_unflipped, "generated/graphics/geronimo.png") {
  553.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 360 + 30)
  554.         }
  555.         spriteset(geronimo_ss_doors_closed_livery_2_3_unflipped, "generated/graphics/geronimo.png") {
  556.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 360 + 60)
  557.         }
  558.         spriteset(geronimo_ss_doors_open_livery_2_3_unflipped, "generated/graphics/geronimo.png") {
  559.           spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 360 + 90)
  560.         }
  561.             spritegroup geronimo_sg_part_load_or_empty_livery_1_3_unflipped {
  562.                 loaded:  [
  563.                     geronimo_ss_doors_closed_livery_1_3_unflipped,
  564.                 ];
  565.                 loading: [
  566.                     geronimo_ss_doors_open_livery_1_3_unflipped,
  567.                 ];
  568.             }
  569.             spritegroup geronimo_sg_full_load_livery_1_3_unflipped {
  570.                 loaded:  [
  571.                     geronimo_ss_doors_closed_livery_1_3_unflipped,
  572.                 ];
  573.                 loading: [
  574.                     geronimo_ss_doors_closed_livery_1_3_unflipped,
  575.                 ];
  576.             }
  577.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_1_3_unflipped, cargo_count*100/cargo_capacity) {
  578.                     0..99: return geronimo_sg_part_load_or_empty_livery_1_3_unflipped;
  579.                 return geronimo_sg_full_load_livery_1_3_unflipped;
  580.             }
  581.             spritegroup geronimo_sg_part_load_or_empty_livery_2_3_unflipped {
  582.                 loaded:  [
  583.                     geronimo_ss_doors_closed_livery_2_3_unflipped,
  584.                 ];
  585.                 loading: [
  586.                     geronimo_ss_doors_open_livery_2_3_unflipped,
  587.                 ];
  588.             }
  589.             spritegroup geronimo_sg_full_load_livery_2_3_unflipped {
  590.                 loaded:  [
  591.                     geronimo_ss_doors_closed_livery_2_3_unflipped,
  592.                 ];
  593.                 loading: [
  594.                     geronimo_ss_doors_closed_livery_2_3_unflipped,
  595.                 ];
  596.             }
  597.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_2_3_unflipped, cargo_count*100/cargo_capacity) {
  598.                     0..99: return geronimo_sg_part_load_or_empty_livery_2_3_unflipped;
  599.                 return geronimo_sg_full_load_livery_2_3_unflipped;
  600.             }
  601.                 spriteset(geronimo_ss_pantographs_down_3_unflipped, "generated/graphics/geronimo_pantographs_down.png") {
  602.                   spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 180)
  603.                 }
  604.                 spriteset(geronimo_ss_pantographs_up_3_unflipped, "generated/graphics/geronimo_pantographs_up.png") {
  605.                   spriteset_template_asymmetric_unreversed_geronimo_unflipped(10 + 180)
  606.                 }
  607.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_3_unflipped, current_railtype) {
  608.                 ELRL: return geronimo_ss_pantographs_up_3_unflipped;
  609.                 return geronimo_ss_pantographs_down_3_unflipped;
  610.             }
  611.         spriteset(geronimo_ss_doors_closed_livery_1_3_flipped, "generated/graphics/geronimo.png") {
  612.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 360)
  613.         }
  614.         spriteset(geronimo_ss_doors_open_livery_1_3_flipped, "generated/graphics/geronimo.png") {
  615.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 360 + 30)
  616.         }
  617.         spriteset(geronimo_ss_doors_closed_livery_2_3_flipped, "generated/graphics/geronimo.png") {
  618.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 360 + 60)
  619.         }
  620.         spriteset(geronimo_ss_doors_open_livery_2_3_flipped, "generated/graphics/geronimo.png") {
  621.           spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 360 + 90)
  622.         }
  623.             spritegroup geronimo_sg_part_load_or_empty_livery_1_3_flipped {
  624.                 loaded:  [
  625.                     geronimo_ss_doors_closed_livery_1_3_flipped,
  626.                 ];
  627.                 loading: [
  628.                     geronimo_ss_doors_open_livery_1_3_flipped,
  629.                 ];
  630.             }
  631.             spritegroup geronimo_sg_full_load_livery_1_3_flipped {
  632.                 loaded:  [
  633.                     geronimo_ss_doors_closed_livery_1_3_flipped,
  634.                 ];
  635.                 loading: [
  636.                     geronimo_ss_doors_closed_livery_1_3_flipped,
  637.                 ];
  638.             }
  639.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_1_3_flipped, cargo_count*100/cargo_capacity) {
  640.                     0..99: return geronimo_sg_part_load_or_empty_livery_1_3_flipped;
  641.                 return geronimo_sg_full_load_livery_1_3_flipped;
  642.             }
  643.             spritegroup geronimo_sg_part_load_or_empty_livery_2_3_flipped {
  644.                 loaded:  [
  645.                     geronimo_ss_doors_closed_livery_2_3_flipped,
  646.                 ];
  647.                 loading: [
  648.                     geronimo_ss_doors_open_livery_2_3_flipped,
  649.                 ];
  650.             }
  651.             spritegroup geronimo_sg_full_load_livery_2_3_flipped {
  652.                 loaded:  [
  653.                     geronimo_ss_doors_closed_livery_2_3_flipped,
  654.                 ];
  655.                 loading: [
  656.                     geronimo_ss_doors_closed_livery_2_3_flipped,
  657.                 ];
  658.             }
  659.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_percent_loaded_livery_2_3_flipped, cargo_count*100/cargo_capacity) {
  660.                     0..99: return geronimo_sg_part_load_or_empty_livery_2_3_flipped;
  661.                 return geronimo_sg_full_load_livery_2_3_flipped;
  662.             }
  663.                 spriteset(geronimo_ss_pantographs_down_3_flipped, "generated/graphics/geronimo_pantographs_down.png") {
  664.                   spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 180)
  665.                 }
  666.                 spriteset(geronimo_ss_pantographs_up_3_flipped, "generated/graphics/geronimo_pantographs_up.png") {
  667.                   spriteset_template_asymmetric_reversed_geronimo_flipped(10 + 180)
  668.                 }
  669.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_3_flipped, current_railtype) {
  670.                 ELRL: return geronimo_ss_pantographs_up_3_flipped;
  671.                 return geronimo_ss_pantographs_down_3_flipped;
  672.             }
  673.     // handle user flipped state
  674.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_livery_1_3, vehicle_is_flipped) {
  675.         1: return geronimo_switch_graphics_percent_loaded_livery_2_3_flipped;
  676.         return geronimo_switch_graphics_percent_loaded_livery_1_3_unflipped;
  677.     }
  678.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_livery_2_3, vehicle_is_flipped) {
  679.         1: return geronimo_switch_graphics_percent_loaded_livery_1_3_flipped;
  680.         return geronimo_switch_graphics_percent_loaded_livery_2_3_unflipped;
  681.     }
  682.     switch (FEAT_TRAINS, PARENT, geronimo_switch_graphics_engine_id_3, vehicle_type_id) {
  683.             lark: return geronimo_switch_graphics_livery_2_3;
  684.             merrylegs: return geronimo_switch_graphics_livery_2_3;
  685.             proper_job: return geronimo_switch_graphics_livery_2_3;
  686.             shoebox: return geronimo_switch_graphics_livery_2_3;
  687.             super_shoebox: return geronimo_switch_graphics_livery_2_3;
  688.             ultra_shoebox: return geronimo_switch_graphics_livery_2_3;
  689.             hurly_burly: return geronimo_switch_graphics_livery_2_3;
  690.             moor_gallop: return geronimo_switch_graphics_livery_2_3;
  691.             roarer: return geronimo_switch_graphics_livery_2_3;
  692.             screamer: return geronimo_switch_graphics_livery_2_3;
  693.             sizzler: return geronimo_switch_graphics_livery_2_3;
  694.             athena: return geronimo_switch_graphics_livery_2_3;
  695.             geronimo: return geronimo_switch_graphics_livery_2_3;
  696.             breeze: return geronimo_switch_graphics_livery_2_3;
  697.             zeus: return geronimo_switch_graphics_livery_2_3;
  698.             ares: return geronimo_switch_graphics_livery_2_3;
  699.             dover: return geronimo_switch_graphics_livery_2_3;
  700.             jupiter: return geronimo_switch_graphics_livery_2_3;
  701.             pylon: return geronimo_switch_graphics_livery_2_3;
  702.         return geronimo_switch_graphics_livery_1_3;
  703.     }
  704.         switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_pantographs_3, vehicle_is_flipped) {
  705.             1: return geronimo_switch_graphics_pantographs_3_flipped;
  706.             return geronimo_switch_graphics_pantographs_3_unflipped;
  707.         }
  708.     switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_vehicle_layers_3, getbits(extra_callback_info1, 8, 8)) {
  709.         0: return geronimo_switch_graphics_engine_id_3;
  710.             1: return geronimo_switch_graphics_pantographs_3;
  711.     }
  712.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_1_DFLT, position_in_vehid_chain % 6) {
  713.                 0: return geronimo_switch_graphics_vehicle_layers_0;
  714.             }
  715.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_2_DFLT, position_in_vehid_chain % 6) {
  716.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  717.                 return geronimo_switch_graphics_vehicle_layers_2;
  718.             }
  719.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_3_DFLT, position_in_vehid_chain % 6) {
  720.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  721.                 1: return geronimo_switch_graphics_vehicle_layers_3;
  722.                 return geronimo_switch_graphics_vehicle_layers_2;
  723.             }
  724.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_4_DFLT, position_in_vehid_chain % 6) {
  725.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  726.                 1: return geronimo_switch_graphics_vehicle_layers_2;
  727.                 2: return geronimo_switch_graphics_vehicle_layers_1;
  728.                 return geronimo_switch_graphics_vehicle_layers_2;
  729.             }
  730.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_5_DFLT, position_in_vehid_chain % 6) {
  731.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  732.                 1: return geronimo_switch_graphics_vehicle_layers_3;
  733.                 2: return geronimo_switch_graphics_vehicle_layers_2;
  734.                 3: return geronimo_switch_graphics_vehicle_layers_1;
  735.                 return geronimo_switch_graphics_vehicle_layers_2;
  736.             }
  737.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_6_DFLT, position_in_vehid_chain % 6) {
  738.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  739.                 1: return geronimo_switch_graphics_vehicle_layers_3;
  740.                 2: return geronimo_switch_graphics_vehicle_layers_2;
  741.                 3: return geronimo_switch_graphics_vehicle_layers_1;
  742.                 4: return geronimo_switch_graphics_vehicle_layers_3;
  743.                 return geronimo_switch_graphics_vehicle_layers_2;
  744.             }
  745.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_less_than_6_remaining_DFLT, num_vehs_in_vehid_chain % 6) {
  746.                 1: return geronimo_switch_graphics_modulo_num_units_in_consist_1_DFLT;
  747.                 2: return geronimo_switch_graphics_modulo_num_units_in_consist_2_DFLT;
  748.                 3: return geronimo_switch_graphics_modulo_num_units_in_consist_3_DFLT;
  749.                 4: return geronimo_switch_graphics_modulo_num_units_in_consist_4_DFLT;
  750.                 5: return geronimo_switch_graphics_modulo_num_units_in_consist_5_DFLT;
  751.                 return geronimo_switch_graphics_modulo_num_units_in_consist_6_DFLT;
  752.             }
  753.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_position_in_consist_entry_point_DFLT, position_in_vehid_chain >= (num_vehs_in_vehid_chain - (num_vehs_in_vehid_chain  % 6))) {
  754.                 1: return geronimo_switch_graphics_less_than_6_remaining_DFLT;
  755.                 return geronimo_switch_graphics_modulo_num_units_in_consist_6_DFLT;
  756.             }
  757.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_1_PASS, position_in_vehid_chain % 6) {
  758.                 0: return geronimo_switch_graphics_vehicle_layers_0;
  759.             }
  760.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_2_PASS, position_in_vehid_chain % 6) {
  761.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  762.                 return geronimo_switch_graphics_vehicle_layers_2;
  763.             }
  764.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_3_PASS, position_in_vehid_chain % 6) {
  765.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  766.                 1: return geronimo_switch_graphics_vehicle_layers_3;
  767.                 return geronimo_switch_graphics_vehicle_layers_2;
  768.             }
  769.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_4_PASS, position_in_vehid_chain % 6) {
  770.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  771.                 1: return geronimo_switch_graphics_vehicle_layers_2;
  772.                 2: return geronimo_switch_graphics_vehicle_layers_1;
  773.                 return geronimo_switch_graphics_vehicle_layers_2;
  774.             }
  775.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_5_PASS, position_in_vehid_chain % 6) {
  776.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  777.                 1: return geronimo_switch_graphics_vehicle_layers_3;
  778.                 2: return geronimo_switch_graphics_vehicle_layers_2;
  779.                 3: return geronimo_switch_graphics_vehicle_layers_1;
  780.                 return geronimo_switch_graphics_vehicle_layers_2;
  781.             }
  782.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_modulo_num_units_in_consist_6_PASS, position_in_vehid_chain % 6) {
  783.                 0: return geronimo_switch_graphics_vehicle_layers_1;
  784.                 1: return geronimo_switch_graphics_vehicle_layers_3;
  785.                 2: return geronimo_switch_graphics_vehicle_layers_2;
  786.                 3: return geronimo_switch_graphics_vehicle_layers_1;
  787.                 4: return geronimo_switch_graphics_vehicle_layers_3;
  788.                 return geronimo_switch_graphics_vehicle_layers_2;
  789.             }
  790.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_less_than_6_remaining_PASS, num_vehs_in_vehid_chain % 6) {
  791.                 1: return geronimo_switch_graphics_modulo_num_units_in_consist_1_PASS;
  792.                 2: return geronimo_switch_graphics_modulo_num_units_in_consist_2_PASS;
  793.                 3: return geronimo_switch_graphics_modulo_num_units_in_consist_3_PASS;
  794.                 4: return geronimo_switch_graphics_modulo_num_units_in_consist_4_PASS;
  795.                 5: return geronimo_switch_graphics_modulo_num_units_in_consist_5_PASS;
  796.                 return geronimo_switch_graphics_modulo_num_units_in_consist_6_PASS;
  797.             }
  798.             switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_position_in_consist_entry_point_PASS, position_in_vehid_chain >= (num_vehs_in_vehid_chain - (num_vehs_in_vehid_chain  % 6))) {
  799.                 1: return geronimo_switch_graphics_less_than_6_remaining_PASS;
  800.                 return geronimo_switch_graphics_modulo_num_units_in_consist_6_PASS;
  801.             }
  802. switch (FEAT_TRAINS, PARENT, geronimo_switch_graphics_vehicle, most_common_cargo_type) {
  803.             PASS: return geronimo_switch_graphics_position_in_consist_entry_point_PASS;
  804.     return geronimo_switch_graphics_position_in_consist_entry_point_DFLT;
  805. }
  806. // buy menu graphics chain
  807. spriteset(geronimo_ss_vehicle_purchase, "generated/graphics/geronimo.png") {
  808.   spriteset_template_purchase_geronimo(10 + 60)
  809. }
  810.         spriteset(geronimo_ss_pantograph_purchase, "generated/graphics/geronimo_pantographs_down.png") {
  811.           spriteset_template_purchase_geronimo(10)
  812.         }
  813.         switch (FEAT_TRAINS, SELF, geronimo_switch_set_layers_register_more_sprites_purchase, STORE_TEMP(CB_FLAG_MORE_SPRITES | PALETTE_USE_DEFAULT, 0x100)) {
  814.             return geronimo_ss_vehicle_purchase;
  815.         }
  816.         switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_purchase, getbits(extra_callback_info1, 8, 8)) {
  817.             0: return geronimo_switch_set_layers_register_more_sprites_purchase;
  818.             1: return geronimo_ss_pantograph_purchase;
  819.         }
  820. switch (FEAT_TRAINS, SELF, geronimo_switch_set_layers_register_more_sprites, STORE_TEMP(CB_FLAG_MORE_SPRITES | PALETTE_USE_DEFAULT, 0x100)) {
  821.     return geronimo_switch_graphics_vehicle;
  822. }
  823. switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_rear_light, position_in_consist_from_end) {
  824.     0: return ss_rear_light_32px;
  825.     return ss_rear_light_empty;
  826. }
  827. switch (FEAT_TRAINS, SELF, geronimo_switch_graphics_layer_rear_light, STORE_TEMP(PALETTE_USE_DEFAULT, 0x100)) {
  828.     return geronimo_switch_graphics_rear_light;
  829. }
  830. switch (FEAT_TRAINS, SELF, geronimo_switch_graphics, getbits(extra_callback_info1, 8, 8)) {
  831.     0: return geronimo_switch_set_layers_register_more_sprites;
  832.         1: return geronimo_switch_set_layers_register_more_sprites;
  833.     return geronimo_switch_graphics_layer_rear_light;
  834. }
  835.     // -- capacity determined according to specific labels that might need to be handled, and otherwise cargo class -- //
  836.     switch (FEAT_TRAINS, SELF, geronimo_switch_cargo_capacity_by_cargo_0, cargo_classes & bitmask(CC_PASSENGERS, CC_MAIL, CC_ARMOURED)) {
  837.         bitmask(CC_MAIL): return 54;
  838.         bitmask(CC_ARMOURED): return 54;
  839.         return 27;
  840.     }
  841.     switch (FEAT_TRAINS, SELF, geronimo_switch_cargo_capacity_by_cargo_1, cargo_classes & bitmask(CC_PASSENGERS, CC_MAIL, CC_ARMOURED)) {
  842.         bitmask(CC_MAIL): return 80;
  843.         bitmask(CC_ARMOURED): return 80;
  844.         return 40;
  845.     }
  846.     switch (FEAT_TRAINS, SELF, geronimo_switch_cargo_capacity_by_cargo_2, cargo_classes & bitmask(CC_PASSENGERS, CC_MAIL, CC_ARMOURED)) {
  847.         bitmask(CC_MAIL): return 108;
  848.         bitmask(CC_ARMOURED): return 108;
  849.         return 54;
  850.     }
  851. switch (FEAT_TRAINS, SELF, geronimo_switch_cargo_capacity, param[0]) {
  852.     0: geronimo_switch_cargo_capacity_by_cargo_0;
  853.     1: geronimo_switch_cargo_capacity_by_cargo_1;
  854.     2: geronimo_switch_cargo_capacity_by_cargo_2;
  855. }
  856. // -- loading speed also determined by capacity, which varies by cargo -- //
  857.     switch (FEAT_TRAINS, SELF, geronimo_switch_loading_speed_by_cargo_0, cargo_classes & bitmask(CC_PASSENGERS, CC_MAIL, CC_ARMOURED)) {
  858.         bitmask(CC_PASSENGERS): return 5;
  859.         bitmask(CC_MAIL): return 5;
  860.         bitmask(CC_ARMOURED): return 5;
  861.         return 5;
  862.     }
  863.     switch (FEAT_TRAINS, SELF, geronimo_switch_loading_speed_by_cargo_1, cargo_classes & bitmask(CC_PASSENGERS, CC_MAIL, CC_ARMOURED)) {
  864.         bitmask(CC_PASSENGERS): return 7;
  865.         bitmask(CC_MAIL): return 7;
  866.         bitmask(CC_ARMOURED): return 7;
  867.         return 7;
  868.     }
  869.     switch (FEAT_TRAINS, SELF, geronimo_switch_loading_speed_by_cargo_2, cargo_classes & bitmask(CC_PASSENGERS, CC_MAIL, CC_ARMOURED)) {
  870.         bitmask(CC_PASSENGERS): return 9;
  871.         bitmask(CC_MAIL): return 9;
  872.         bitmask(CC_ARMOURED): return 9;
  873.         return 9;
  874.     }
  875. switch (FEAT_TRAINS, SELF, geronimo_switch_loading_speed, param[0]) {
  876.     0: geronimo_switch_loading_speed_by_cargo_0;
  877.     1: geronimo_switch_loading_speed_by_cargo_1;
  878.     2: geronimo_switch_loading_speed_by_cargo_2;
  879. }
  880.     // -- smoke etc -- //
  881.     switch (FEAT_TRAINS, SELF, geronimo_switch_visual_effect_and_powered_by_variant_unreversed, current_railtype) {
  882.         return visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 0, DISABLE_WAGON_POWER);
  883.     }
  884.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_21, [count_veh_id(sizzler) > 0]) {
  885.                     1: return 168;
  886.                     return 120;
  887.             }
  888.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_20, [count_veh_id(screamer) > 0]) {
  889.                     1: return 168;
  890.                     return geronimo_switch_speed_21;
  891.             }
  892.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_19, [count_veh_id(roarer) > 0]) {
  893.                     1: return 168;
  894.                     return geronimo_switch_speed_20;
  895.             }
  896.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_18, [count_veh_id(moor_gallop) > 0]) {
  897.                     1: return 168;
  898.                     return geronimo_switch_speed_19;
  899.             }
  900.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_17, [count_veh_id(hurly_burly) > 0]) {
  901.                     1: return 168;
  902.                     return geronimo_switch_speed_18;
  903.             }
  904.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_16, [count_veh_id(turtle) > 0]) {
  905.                     1: return 168;
  906.                     return geronimo_switch_speed_17;
  907.             }
  908.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_15, [count_veh_id(thunderbird) > 0]) {
  909.                     1: return 168;
  910.                     return geronimo_switch_speed_16;
  911.             }
  912.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_14, [count_veh_id(dragon) > 0]) {
  913.                     1: return 168;
  914.                     return geronimo_switch_speed_15;
  915.             }
  916.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_13, [count_veh_id(pegasus) > 0]) {
  917.                     1: return 168;
  918.                     return geronimo_switch_speed_14;
  919.             }
  920.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_12, [count_veh_id(upcountry) > 0]) {
  921.                     1: return 168;
  922.                     return geronimo_switch_speed_13;
  923.             }
  924.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_11, [count_veh_id(shredder) > 0]) {
  925.                     1: return 168;
  926.                     return geronimo_switch_speed_12;
  927.             }
  928.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_10, [count_veh_id(griffon) > 0]) {
  929.                     1: return 168;
  930.                     return geronimo_switch_speed_11;
  931.             }
  932.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_9, [count_veh_id(kelpie) > 0]) {
  933.                     1: return 168;
  934.                     return geronimo_switch_speed_10;
  935.             }
  936.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_8, [count_veh_id(tencendur) > 0]) {
  937.                     1: return 168;
  938.                     return geronimo_switch_speed_9;
  939.             }
  940.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_7, [count_veh_id(carrack) > 0]) {
  941.                     1: return 168;
  942.                     return geronimo_switch_speed_8;
  943.             }
  944.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_6, [count_veh_id(spinner) > 0]) {
  945.                     1: return 168;
  946.                     return geronimo_switch_speed_7;
  947.             }
  948.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_5, [count_veh_id(ultra_shoebox) > 0]) {
  949.                     1: return 168;
  950.                     return geronimo_switch_speed_6;
  951.             }
  952.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_4, [count_veh_id(super_shoebox) > 0]) {
  953.                     1: return 168;
  954.                     return geronimo_switch_speed_5;
  955.             }
  956.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_3, [count_veh_id(shoebox) > 0]) {
  957.                     1: return 168;
  958.                     return geronimo_switch_speed_4;
  959.             }
  960.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_2, [count_veh_id(proper_job) > 0]) {
  961.                     1: return 168;
  962.                     return geronimo_switch_speed_3;
  963.             }
  964.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_1, [count_veh_id(merrylegs) > 0]) {
  965.                     1: return 168;
  966.                     return geronimo_switch_speed_2;
  967.             }
  968.             switch (FEAT_TRAINS, PARENT, geronimo_switch_speed_0, [count_veh_id(lark) > 0]) {
  969.                     1: return 168;
  970.                     return geronimo_switch_speed_1;
  971.             }
  972. item(FEAT_TRAINS, geronimo, 2140) {
  973.     property {
  974.         name:                           string(STR_NAME_CONSIST_PARENTHESES, string(STR_NAME_geronimo), string(STR_NAME_SUFFIX_ELECTRIC));
  975.         climates_available:             NO_CLIMATE; // nml constant
  976.         engine_class:                   ENGINE_CLASS_ELECTRIC;
  977.         visual_effect_and_powered:      visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER);
  978.         introduction_date:              date(1957,01,01); // consist just supplies intro year - openttd randomises intro dates a bit anyway
  979.         cargo_capacity:                 40;
  980.         sprite_id:                      SPRITE_ID_NEW_TRAIN; //enable new graphics - nml constant
  981.         power:                          500hp;
  982.             speed:                          75mph;
  983.         weight:                         39ton;
  984.         tractive_effort_coefficient:    0.3;
  985.         cost_factor:                    0; // use the CB to set this, the prop is capped to max 255, cb is 32k
  986.         running_cost_base:              RUNNING_COST_STEAM;
  987.         running_cost_factor:            0; // use the CB to set this, the prop is capped to max 255, cb is 32k
  988.         refit_cost:                     0; // btw this needs to be 0 if we want autorefit without using cb
  989.         refittable_cargo_classes:       bitmask(CC_PASSENGERS);
  990.         non_refittable_cargo_classes:   bitmask(); // don't set non-refittable classes, increases likelihood of breaking cargo support
  991.         cargo_allow_refit:              [];
  992.         cargo_disallow_refit:           [];
  993.         cargo_age_period:               56;
  994.             default_cargo_type:             PASS;
  995.         misc_flags:                     bitmask(TRAIN_FLAG_2CC,TRAIN_FLAG_SPRITE_STACK,TRAIN_FLAG_FLIP,TRAIN_FLAG_AUTOREFIT,TRAIN_FLAG_MU); // nml constants
  996.         model_life:                     30;
  997.         retire_early:                   -10;
  998.         reliability_decay:              20; // default value
  999.         vehicle_life:                   40;
  1000.         length:                         8;
  1001.         track_type:                     ELRL;
  1002.     }
  1003.     graphics {
  1004.         default:                        geronimo_switch_graphics;
  1005.         purchase:                       geronimo_switch_graphics_purchase;
  1006.         cost_factor:                    36; // CB used as it is capped to max 32k, prop is only 255
  1007.         running_cost_factor:            764; // CB used as it is capped to max 32k, prop is only 255
  1008.             cargo_capacity:                 geronimo_switch_cargo_capacity;
  1009.             purchase_cargo_capacity:        geronimo_switch_cargo_capacity;
  1010.             loading_speed:                  geronimo_switch_loading_speed;
  1011.             speed:                          geronimo_switch_speed_0;
  1012.             purchase_speed:                 120;
  1013.             visual_effect_and_powered:      geronimo_switch_visual_effect_and_powered_by_variant_unreversed;
  1014.         additional_text:                string(STR_SPRITES_COMPLETE);
  1015.     }
  1016. }
  1017.     if (param[1]==0) {
  1018.         item(FEAT_TRAINS, geronimo, 2140) {
  1019.             property {
  1020.                 climates_available:             ALL_CLIMATES;
  1021.             }
  1022.         }
  1023.     }
  1024. // -- end 2140 --

Comments