switch (FEAT_TRAINS,SELF, switch_mglv_hopper_layers, [
STORE_TEMP((getbits(extra_callback_info1, 8, 8) < 4 ? CB_FLAG_MORE_SPRITES : 0) + PALETTE_USE_DEFAULT, 0x100),
getbits(extra_callback_info1, 8, 8)
]){
0: spritegroup_maglevhopper_wagon_layer;
1: spritegroup_maglevhopper_cargo_layer;
//return spritegroup_maglevhopper_cargo_layer;
}
switch (FEAT_TRAINS,SELF, switch_mglv_hopper_layers_colouring, getbits(extra_callback_info1, 8, 8)){
0: base_sprite_2cc + 3 + 16 * company_colour2;//CC yellow
1: base_sprite_2cc + 4 + 16 * company_colour2;//CC red
3: base_sprite_2cc + 11 + 16 * company_colour2;//CC purple
4: base_sprite_2cc + 6 + 16 * company_colour2;//CC green
}
//ARTICULATION
switch (FEAT_TRAINS, SELF, switch_maglevhopper_articulated, extra_callback_info1){
1: return item_maglevhopper;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS;
}
item(FEAT_TRAINS, item_maglevhopper, 621) { //ID621
property {
name: string(STR_NAME_MGLVHOPPER);
climates_available: ALL_CLIMATES;
introduction_date: date(1997, 1, 1);
model_life: VEHICLE_NEVER_EXPIRES;
vehicle_life: 255;
reliability_decay: 5;
refittable_cargo_classes: bitmask(CC_BULK, CC_COVERED);
non_refittable_cargo_classes: bitmask(CC_REFRIGERATED);
cargo_allow_refit: [RUBR, FMSP];
cargo_disallow_refit: [WDPR, FRUT, BDMT, PLST, LUMB];
default_cargo_type: COAL;
loading_speed: 5;
cost_factor: 10;
running_cost_factor: 0;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 0;
misc_flags: bitmask(TRAIN_FLAG_SPRITE_STACK, TRAIN_FLAG_TILT, TRAIN_FLAG_FLIP, TRAIN_FLAG_2CC);
refit_cost: 0;
track_type: MGLV;
ai_special_flag: AI_FLAG_CARGO;
power: 0;
running_cost_base: RUNNING_COST_NONE;
dual_headed: 0;
cargo_capacity: 10;
weight: 40 ton;
ai_engine_rank: 0;
extra_power_per_wagon: 0 kW;
tractive_effort_coefficient: 0;
air_drag_coefficient: 0;
length: 4;
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 2, DISABLE_WAGON_POWER);
extra_weight_per_wagon: 0 ton;
bitmask_vehicle_info: 0;
}
graphics {
default: switch_mglv_hopper_layers;//switch_mglv_freight_short_graphics_decider;
additional_text: string(STR_MAGLEVWAGON);
purchase: spriteset_purchaseMenu_maghopper;
articulated_part: switch_maglevhopper_articulated;
cargo_capacity: switch_capacity_maglevuniversal;
purchase_cargo_capacity: 11;
loading_speed: 4;
cost_factor: 40;
//weight: switch_weight_global;
weight: 40;
colour_mapping: switch_mglv_hopper_layers_colouring;//RAINBOWWAGONS_enginecheck;
purchase_colour_mapping: CB_FAILED;
}
}
if (param_wagons == 0) {
item(FEAT_TRAINS, item_maglevhopper, 621) {
property {
climates_available: NO_CLIMATE;
}
}
} else {
item(FEAT_TRAINS, item_maglevhopper, 621) {
property {
climates_available: ALL_CLIMATES;
}
}
}