//------------------------------------------------------------------------------------------------------------
switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw1, position_in_consist){
0: spriteset_train_railmedium9;
railuniversal2_wagon_switch;
}
//--------------------------------------
switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw2_end, position_in_consist_from_end){
0: spriteset_train_railmedium9;
railuniversal2_wagon_switch;
}
switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw2, position_in_consist){
0: spriteset_train_railmedium9;
switch_railmedium_9_graphics_both_draw2_end;
}
//--------------------------------------
switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw3_end, position_in_consist_from_end){
0: spriteset_train_railmedium9;
railuniversal2_wagon_switch;
}
switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw3, position_in_consist){
0: spriteset_train_railmedium9;
1: spriteset_train_railmedium9;
switch_railmedium_9_graphics_both_draw3_end;
}
//--------------------------------------
switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw4_end, position_in_consist_from_end){
0: spriteset_train_railmedium9;
1: spriteset_train_railmedium9;
railuniversal2_wagon_switch;
}
switch(FEAT_TRAINS, SELF, switch_railmedium_9_graphics_both_draw4, position_in_consist){
0: spriteset_train_railmedium9;
1: spriteset_train_railmedium9;
switch_railmedium_9_graphics_both_draw4_end;
}
switch(FEAT_TRAINS, SELF, switch_railmedium9_graphics_both, count_veh_id(47)){
0..2: switch_railmedium_9_graphics_both_draw1;
3..4: switch_railmedium_9_graphics_both_draw2;
5..6: switch_railmedium_9_graphics_both_draw3;
7..8: switch_railmedium_9_graphics_both_draw4;
switch_railmedium_9_graphics_both_draw4;
}
//--------------------------------------------------------------------------------------------
//----- Articulation
switch (FEAT_TRAINS, SELF, switch_railmedium9_articulated, extra_callback_info1){
1: item_railmedium9;
CB_RESULT_NO_MORE_ARTICULATED_PARTS;
}
//------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------
switch (FEAT_TRAINS, SELF, switch_railmedium9_attach, vehicle_type_id){
item_railmedium9: CB_RESULT_ATTACH_ALLOW;
item_CABOOSE_1: CB_RESULT_ATTACH_ALLOW;
item_CABOOSE_2: CB_RESULT_ATTACH_ALLOW;
item_railpax: CB_RESULT_ATTACH_ALLOW;
item_railflatbed1: CB_RESULT_ATTACH_ALLOW;
item_railflatbed2: CB_RESULT_ATTACH_ALLOW;
item_railflatbed3: CB_RESULT_ATTACH_ALLOW;
item_railhopper1: CB_RESULT_ATTACH_ALLOW;
item_railhopper2: CB_RESULT_ATTACH_ALLOW;
item_railhopper3: CB_RESULT_ATTACH_ALLOW;
item_railtanker1: CB_RESULT_ATTACH_ALLOW;
item_railtanker2: CB_RESULT_ATTACH_ALLOW;
item_railtanker3: CB_RESULT_ATTACH_ALLOW;
item_railuniversal1: CB_RESULT_ATTACH_ALLOW;
item_railuniversal2: CB_RESULT_ATTACH_ALLOW;
item_railuniversal3: CB_RESULT_ATTACH_ALLOW;
return string(error_attach_rail_freight);
}
item(FEAT_TRAINS, item_railmedium9, 47) { //ID47
property {
name: string(STR_NAME_RM9);
climates_available: ALL_CLIMATES;
introduction_date: date(2041, 1, 1);
model_life: VEHICLE_NEVER_EXPIRES;
vehicle_life: 255;
reliability_decay: 5;
//Just an engine, no refit
refittable_cargo_classes: ALL_CARGO_CLASSES;
non_refittable_cargo_classes: bitmask();
default_cargo_type: GOOD;
loading_speed: 5;
cost_factor: 10;
running_cost_factor: 100;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 201 km/h; // actually 140, but there are rounding errors
misc_flags: bitmask(TRAIN_FLAG_FLIP, TRAIN_FLAG_2CC);
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 7000 hp;
running_cost_base: RUNNING_COST_ELECTRIC;
dual_headed: 0;
cargo_capacity: 35;
weight: 50 ton;
ai_engine_rank: 0;
engine_class: ENGINE_CLASS_ELECTRIC;
extra_power_per_wagon: 0 kW;
tractive_effort_coefficient: 1;
air_drag_coefficient: 0;
length: 8;
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DEFAULT, 2, DISABLE_WAGON_POWER);
extra_weight_per_wagon: 0 ton;
bitmask_vehicle_info: 0;
}
graphics {
default: switch_railmedium9_graphics_both;//switch_railmedium9_reversing;//spriteset_train_railmedium9;
articulated_part: switch_railmedium9_articulated;
purchase: spriteset_purchaseMenu_railmedium9;
can_attach_wagon: switch_railmedium9_attach;
additional_text: string(info_rail_medium_9);
speed: 196; //maybe for wagons later, not now
power: 7000; //engine only
weight: 80; //engine only
tractive_effort_coefficient: 178; //engine only
cost_factor: 15; //everything
running_cost_factor: 100; //only engines
loading_speed: switch_railmedium9_loadspeed;
cargo_capacity: switch_railmedium9_capacity;
}
}