Loading

layers recolour

  1. switch (FEAT_TRAINS,SELF, switch_mglv_hopper_layer0, [
  2.   STORE_TEMP(CB_FLAG_MORE_SPRITES + base_sprite_2cc + 3 + 16 * company_colour2, 0x100)
  3. ]{
  4.   return spritegroup_maglevhopper_wagon_layer;
  5. }
  6.  
  7. switch (FEAT_TRAINS,SELF, switch_mglv_hopper_layer1, [
  8.   STORE_TEMP(base_sprite_2cc + 4 + 16 * company_colour2, 0x100)
  9. ]{
  10.   return spritegroup_maglevhopper_cargo_layer;
  11. }
  12.  
  13.  
  14. switch (FEAT_TRAINS,SELF, switch_mglv_hopper_layers, getbits(extra_callback_info1, 8, 8)){
  15.   0: switch_mglv_hopper_layer0;
  16.   1: switch_mglv_hopper_layer1;
  17.   //return spritegroup_maglevhopper_cargo_layer;
  18. }
  19.  
  20. //ARTICULATION
  21. switch (FEAT_TRAINS, SELF, switch_maglevhopper_articulated, extra_callback_info1){
  22. 1: return item_maglevhopper;
  23. return CB_RESULT_NO_MORE_ARTICULATED_PARTS;
  24. }
  25.  
  26. item(FEAT_TRAINS, item_maglevhopper, 621) { //ID621
  27.     property {
  28.         name:                         string(STR_NAME_MGLVHOPPER);
  29.         climates_available:           ALL_CLIMATES;
  30.         introduction_date:            date(1997, 1, 1);
  31.         model_life:                   VEHICLE_NEVER_EXPIRES;
  32.         vehicle_life:                 255;
  33.         reliability_decay:            5;
  34.         refittable_cargo_classes:     bitmask(CC_BULK, CC_COVERED);
  35.         non_refittable_cargo_classes: bitmask(CC_REFRIGERATED);
  36.  
  37.                 cargo_allow_refit:            [RUBR, FMSP];
  38.                 cargo_disallow_refit:         [WDPR, FRUT, BDMT, PLST, LUMB];
  39.                 default_cargo_type:           COAL;
  40.                 loading_speed:                5;
  41.         cost_factor:                  10;
  42.         running_cost_factor:          0;
  43.         sprite_id:                    SPRITE_ID_NEW_TRAIN;
  44.         speed:                        0;
  45.         misc_flags:                   bitmask(TRAIN_FLAG_SPRITE_STACK, TRAIN_FLAG_TILT, TRAIN_FLAG_FLIP, TRAIN_FLAG_2CC);
  46.         refit_cost:                   0;
  47.         track_type:                   MGLV;
  48.         ai_special_flag:              AI_FLAG_CARGO;
  49.         power:                        0;
  50.         running_cost_base:            RUNNING_COST_NONE;
  51.         dual_headed:                  0;
  52.         cargo_capacity:               10;
  53.         weight:                       40 ton;
  54.         ai_engine_rank:               0;
  55.         extra_power_per_wagon:        0 kW;
  56.         tractive_effort_coefficient:  0;
  57.         air_drag_coefficient:         0;
  58.         length: 4;
  59.         visual_effect_and_powered:    visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 2, DISABLE_WAGON_POWER);
  60.         extra_weight_per_wagon:       0 ton;
  61.         bitmask_vehicle_info:         0;
  62.     }
  63.     graphics {
  64.         default: switch_mglv_hopper_layers;//switch_mglv_freight_short_graphics_decider;
  65.         additional_text: string(STR_MAGLEVWAGON);
  66.         purchase: spriteset_purchaseMenu_maghopper;
  67.         articulated_part: switch_maglevhopper_articulated;
  68.         cargo_capacity:   switch_capacity_maglevuniversal;
  69.         purchase_cargo_capacity:   11;
  70.         loading_speed:      4;
  71.         cost_factor:        40;
  72.         //weight:               switch_weight_global;
  73.         weight:             40;
  74.     }
  75. }
  76. if (param_wagons == 0) {
  77.     item(FEAT_TRAINS, item_maglevhopper, 621) {
  78.         property {
  79.         climates_available: NO_CLIMATE;
  80.         }
  81.     }
  82. } else  {
  83.     item(FEAT_TRAINS, item_maglevhopper, 621) {
  84.         property {
  85.         climates_available: ALL_CLIMATES;
  86.         }
  87.     }
  88. }

Version history

Revision # Author Created at
p8gqpmblz Anonymous 09 May 2019, 17:43:47 UTC Diff

Comments