-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Class 345 7-car, renamed Class 345 to Class 345 9-car
- Loading branch information
Showing
4 changed files
with
95 additions
and
21 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// Choose sprites depending on car position | ||
switch(FEAT_TRAINS, SELF, switch_br_345_7car_spriteset, position_in_articulated_veh % 9) { | ||
0: spriteset_br_345_front; | ||
5: spriteset_br_345_middle_panto; | ||
6: spriteset_br_345_rear; | ||
spriteset_br_345_middle; | ||
} | ||
|
||
// Define articulations | ||
switch(FEAT_TRAINS, SELF, switch_br_345_7car_articulated, extra_callback_info1) { | ||
// extra_callback_info1 returns the car number, so 1 is the second car, 2 the third, .. so on | ||
// The callback runs this switch until it returns NO_MORE_ARTICULATED_PARTS, which ends the growth | ||
1..6: return item_br_345; | ||
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; // Stop adding more cars | ||
} | ||
|
||
// Only give particle effects to front/rear cars | ||
switch(FEAT_TRAINS, SELF, switch_br_345_7car_particles, position_in_articulated_veh % 9) { | ||
5: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 2, DISABLE_WAGON_POWER); | ||
visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); | ||
} | ||
|
||
// Class 345 | ||
item(FEAT_TRAINS, item_br_345_7car), 599) { | ||
property { | ||
name: string(STR_BR_345_7CAR); | ||
climates_available: ALL_CLIMATES; // available in all climates | ||
introduction_date: date(2017, 06, 02); | ||
model_life: 5; // replaced by 9 car after a few years | ||
vehicle_life: 30; // years after vehicle is deemed "old" and should be replaced | ||
reliability_decay: 0; // dont reduce reliabilty, (will grow from 75% upwards over the years) | ||
refittable_cargo_classes: bitmask(CC_PASSENGERS); | ||
non_refittable_cargo_classes: bitmask(); | ||
cost_factor: 105; | ||
loading_speed: 25; | ||
running_cost_factor: 80; | ||
cargo_allow_refit: []; | ||
cargo_disallow_refit: []; | ||
|
||
speed: 90 mph; | ||
power: 3100 hp; | ||
cargo_capacity: (1160/7); | ||
weight: 264.21 ton; | ||
|
||
sprite_id: SPRITE_ID_NEW_TRAIN; // required | ||
misc_flags: bitmask(TRAIN_FLAG_MU); // acts as multiple-unit | ||
refit_cost: 0; | ||
track_type: railtype("ELRL"); | ||
ai_special_flag: AI_FLAG_PASSENGER; // tell ai that this is a passenger train | ||
running_cost_base: RUNNING_COST_ELECTRIC; | ||
dual_headed: 0; | ||
engine_class: ENGINE_CLASS_ELECTRIC; | ||
extra_power_per_wagon: 0 kW; | ||
tractive_effort_coefficient: 0.3; | ||
air_drag_coefficient: 0.06; | ||
length: 8; // full tile length vehicle | ||
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 2, DISABLE_WAGON_POWER); // visual fx | ||
extra_weight_per_wagon: 0 ton; | ||
bitmask_vehicle_info: 0; | ||
} | ||
|
||
graphics { | ||
default: switch_br_345_7car_spriteset; | ||
purchase: spriteset_br_345_purchase; | ||
cargo_capacity: return(1160/7 * param_pax); | ||
articulated_part: switch_br_345_7car_articulated; | ||
start_stop: switch_br_345_start_stop; | ||
can_attach_wagon: switch_br_345_can_attach_wagon; | ||
visual_effect_and_powered: switch_br_345_7car_particles; | ||
additional_text: string(STR_DSC_BR_345); | ||
cost_factor: return(GetAdjustedCost(105)); | ||
running_cost_factor: return(GetAdjustedCost(80)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters