Loading

changing articulated leng

  1. //--------------------------------------------------------------------------------------------
  2. //----- Articulation
  3. switch (FEAT_TRAINS, SELF, switch_railstrong3_articulated, extra_callback_info1){
  4.     1: item_railstrong3;
  5.     1: item_railstrong3;
  6.     1: item_railstrong3;
  7.     1: item_railstrong3;
  8.     CB_RESULT_NO_MORE_ARTICULATED_PARTS;
  9. }
  10. switch (FEAT_TRAINS, SELF, switch_railstrong3_length, position_in_vehid_chain % 5){
  11.     0: 1;
  12.     1: 2;
  13.     2: 2;
  14.     3: 2;
  15.     4: 1;
  16.     8;
  17. }
  18.  
  19. switch (FEAT_TRAINS, SELF, switch_railstrong3_attach, vehicle_type_id){
  20.     item_railstrong3: CB_RESULT_ATTACH_ALLOW;
  21.  
  22.     item_CABOOSE_1:        CB_RESULT_ATTACH_ALLOW;
  23.     item_CABOOSE_2:        CB_RESULT_ATTACH_ALLOW;
  24.     item_railpax:          CB_RESULT_ATTACH_ALLOW;
  25.     item_railflatbed1:     CB_RESULT_ATTACH_ALLOW;
  26.     item_railflatbed2:     CB_RESULT_ATTACH_ALLOW;
  27.     item_railflatbed3:     CB_RESULT_ATTACH_ALLOW;
  28.     item_railhopper1:      CB_RESULT_ATTACH_ALLOW;
  29.     item_railhopper2:      CB_RESULT_ATTACH_ALLOW;
  30.     item_railhopper3:      CB_RESULT_ATTACH_ALLOW;
  31.     item_railtanker1:      CB_RESULT_ATTACH_ALLOW;
  32.     item_railtanker2:      CB_RESULT_ATTACH_ALLOW;
  33.     item_railtanker3:      CB_RESULT_ATTACH_ALLOW;
  34.     item_railuniversal1:   CB_RESULT_ATTACH_ALLOW;
  35.     item_railuniversal2:   CB_RESULT_ATTACH_ALLOW;
  36.     item_railuniversal3:   CB_RESULT_ATTACH_ALLOW;
  37.     return string(error_attach_rail_freight);
  38. }
  39. item(FEAT_TRAINS, item_railstrong3, 15) { //ID15
  40.     property {
  41.         name:                         string(STR_NAME_RS3);
  42.         climates_available:           ALL_CLIMATES;
  43.         introduction_date:            date(1940, 1, 1);
  44.         model_life:                   15;
  45.         vehicle_life:                 255;
  46.         reliability_decay:            5;
  47.         //Just an engine, no refit
  48.         refittable_cargo_classes:     bitmask(NO_CARGO_CLASS);
  49.         non_refittable_cargo_classes: bitmask();
  50.  
  51.         loading_speed:                5;
  52.         cost_factor:                  10;
  53.         running_cost_factor:          100;
  54.         sprite_id:                    SPRITE_ID_NEW_TRAIN;
  55.         speed:                        110 km/h; // actually 140, but there are rounding errors
  56.         misc_flags:                   bitmask(TRAIN_FLAG_FLIP, TRAIN_FLAG_2CC);
  57.         refit_cost:                   0;
  58.         track_type:                   RAIL;
  59.         ai_special_flag:              AI_FLAG_CARGO;
  60.         power:                        2000 hp;
  61.         running_cost_base:            RUNNING_COST_STEAM;
  62.         dual_headed:                  0;
  63.         cargo_capacity:               0;
  64.         weight:                       150 ton;
  65.         ai_engine_rank:               0;
  66.         engine_class:                 ENGINE_CLASS_STEAM;
  67.         extra_power_per_wagon:        0 kW;
  68.         tractive_effort_coefficient:  1;
  69.         air_drag_coefficient:         0;
  70.         length: 8;
  71.         visual_effect_and_powered:    visual_effect_and_powered(VISUAL_EFFECT_DEFAULT, -2, DISABLE_WAGON_POWER);
  72.         extra_weight_per_wagon:       0 ton;
  73.         bitmask_vehicle_info:         0;
  74.     }
  75.     graphics {
  76.         articulated_part: switch_railstrong3_articulated;
  77.         length: switch_railstrong3_length;              
  78.  
  79.         default:                        spriteset_train_railstrong3;
  80.         purchase:                       spriteset_purchaseMenu_railstrong3;
  81.         can_attach_wagon:               switch_railstrong3_attach;
  82.         additional_text:                              string(info_rail_strong_3);
  83.         speed:                                        100;
  84.         power:                                        2000;
  85.         weight:                                       80;  
  86.         tractive_effort_coefficient:        168;
  87.         cost_factor:                                10  
  88.         running_cost_factor:                    100;
  89.         }
  90. }

Comments