Loading

engines from both ends

  1. //------------------------------------------------------------------------------------------------------------
  2. switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw1, position_in_consist){
  3.     0: spriteset_train_railmedium9;
  4.     railuniversal2_wagon_switch;
  5. }
  6. //--------------------------------------
  7. switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw2_end, position_in_consist_from_end){
  8.     0: spriteset_train_railmedium9;
  9.     railuniversal2_wagon_switch;
  10. }
  11. switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw2, position_in_consist){
  12.     0: spriteset_train_railmedium9;
  13.     switch_railmedium_9_graphics_both_draw2_end;
  14. }
  15. //--------------------------------------
  16. switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw3_end, position_in_consist_from_end){
  17.     0: spriteset_train_railmedium9;
  18.     railuniversal2_wagon_switch;
  19. }
  20. switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw3, position_in_consist){
  21.     0: spriteset_train_railmedium9;
  22.     1: spriteset_train_railmedium9;
  23.     switch_railmedium_9_graphics_both_draw3_end;
  24. }
  25. //--------------------------------------
  26. switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw4_end, position_in_consist_from_end){
  27.     0: spriteset_train_railmedium9;
  28.     1: spriteset_train_railmedium9;
  29.     railuniversal2_wagon_switch;
  30. }
  31. switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw4, position_in_consist){
  32.     0: spriteset_train_railmedium9;
  33.     1: spriteset_train_railmedium9;
  34.     switch_railmedium_9_graphics_both_draw4_end;
  35. }
  36. switch(FEAT_TRAINS, SELF, switch_railmedium9_graphics_both, count_veh_id(47)){
  37.     0..2: switch_railmedium_9_graphics_both_draw1;
  38.     3..4: switch_railmedium_9_graphics_both_draw2;
  39.     5..6: switch_railmedium_9_graphics_both_draw3;
  40.     7..8: switch_railmedium_9_graphics_both_draw4;
  41.     switch_railmedium_9_graphics_both_draw4;
  42. }
  43.  
  44.  
  45.  
  46.  
  47.  
  48. //--------------------------------------------------------------------------------------------
  49. //----- Articulation
  50. switch (FEAT_TRAINS, SELF, switch_railmedium9_articulated, extra_callback_info1){
  51.     1: item_railmedium9;
  52.     CB_RESULT_NO_MORE_ARTICULATED_PARTS;
  53. }
  54. //------------------------------------------------------------------------------------------------------------
  55. //------------------------------------------------------------------------------------------------------------
  56. //------------------------------------------------------------------------------------------------------------
  57.  
  58.  
  59. switch (FEAT_TRAINS, SELF, switch_railmedium9_attach, vehicle_type_id){
  60.     item_railmedium9: CB_RESULT_ATTACH_ALLOW;
  61.  
  62.     item_CABOOSE_1:        CB_RESULT_ATTACH_ALLOW;
  63.     item_CABOOSE_2:        CB_RESULT_ATTACH_ALLOW;
  64.     item_railpax:          CB_RESULT_ATTACH_ALLOW;
  65.     item_railflatbed1:     CB_RESULT_ATTACH_ALLOW;
  66.     item_railflatbed2:     CB_RESULT_ATTACH_ALLOW;
  67.     item_railflatbed3:     CB_RESULT_ATTACH_ALLOW;
  68.     item_railhopper1:      CB_RESULT_ATTACH_ALLOW;
  69.     item_railhopper2:      CB_RESULT_ATTACH_ALLOW;
  70.     item_railhopper3:      CB_RESULT_ATTACH_ALLOW;
  71.     item_railtanker1:      CB_RESULT_ATTACH_ALLOW;
  72.     item_railtanker2:      CB_RESULT_ATTACH_ALLOW;
  73.     item_railtanker3:      CB_RESULT_ATTACH_ALLOW;
  74.     item_railuniversal1:   CB_RESULT_ATTACH_ALLOW;
  75.     item_railuniversal2:   CB_RESULT_ATTACH_ALLOW;
  76.     item_railuniversal3:   CB_RESULT_ATTACH_ALLOW;
  77.     return string(error_attach_rail_freight);
  78. }
  79. item(FEAT_TRAINS, item_railmedium9, 47) { //ID47
  80.     property {
  81.         name:                         string(STR_NAME_RM9);
  82.         climates_available:           ALL_CLIMATES;
  83.         introduction_date:            date(2041, 1, 1);
  84.         model_life:                   VEHICLE_NEVER_EXPIRES;
  85.         vehicle_life:                 255;
  86.         reliability_decay:            5;
  87.         //Just an engine, no refit
  88.         refittable_cargo_classes:     ALL_CARGO_CLASSES;
  89.         non_refittable_cargo_classes: bitmask();
  90.                 default_cargo_type:           GOOD;
  91.  
  92.         loading_speed:                5;
  93.         cost_factor:                  10;
  94.         running_cost_factor:          100;
  95.         sprite_id:                    SPRITE_ID_NEW_TRAIN;
  96.         speed:                        201 km/h; // actually 140, but there are rounding errors
  97.         misc_flags:                   bitmask(TRAIN_FLAG_FLIP, TRAIN_FLAG_2CC);
  98.         refit_cost:                   0;
  99.         track_type:                   RAIL;
  100.         ai_special_flag:              AI_FLAG_CARGO;
  101.         power:                        7000 hp;
  102.         running_cost_base:            RUNNING_COST_ELECTRIC;
  103.         dual_headed:                  0;
  104.         cargo_capacity:               35;
  105.         weight:                       50 ton;
  106.         ai_engine_rank:               0;
  107.         engine_class:                 ENGINE_CLASS_ELECTRIC;
  108.         extra_power_per_wagon:        0 kW;
  109.         tractive_effort_coefficient:  1;
  110.         air_drag_coefficient:         0;
  111.         length: 8;
  112.         visual_effect_and_powered:    visual_effect_and_powered(VISUAL_EFFECT_DEFAULT, 2, DISABLE_WAGON_POWER);
  113.         extra_weight_per_wagon:       0 ton;
  114.         bitmask_vehicle_info:         0;
  115.     }
  116.     graphics {
  117.         default: switch_railmedium9_graphics_both;//switch_railmedium9_reversing;//spriteset_train_railmedium9;
  118.         articulated_part: switch_railmedium9_articulated;
  119.         purchase: spriteset_purchaseMenu_railmedium9;
  120.         can_attach_wagon: switch_railmedium9_attach;
  121.         additional_text: string(info_rail_medium_9);
  122.         speed:                              196; //maybe for wagons later, not now
  123.         power:                              7000; //engine only
  124.         weight:                             80; //engine only
  125.         tractive_effort_coefficient:        178; //engine only
  126.         cost_factor:                        15; //everything
  127.         running_cost_factor:                100; //only engines
  128.         loading_speed:   switch_railmedium9_loadspeed;
  129.         cargo_capacity:  switch_railmedium9_capacity;
  130.         }
  131. }

Comments