-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from CR400-BF-5033/main
ADD CRH380AL_2541
- Loading branch information
Showing
5 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
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
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,104 @@ | ||
switch (FEAT_TRAINS, SELF, switch_crh380al_2541_name_purchase, getbits(extra_callback_info1, 0, 8) == 0x20? getbits(extra_callback_info1, 8, 8) : 0xFFFF) { | ||
0: return string(STR_CRH380A_SERIES); | ||
1: return string(STR_NAME_CRH380AL_2541); | ||
return CB_RESULT_NO_TEXT; | ||
} | ||
|
||
switch (FEAT_TRAINS, SELF, switch_crh380al_2541_name, getbits(extra_callback_info1, 0, 8)) { | ||
0x20: switch_crh380al_2541_name_purchase; | ||
return CB_RESULT_NO_TEXT; | ||
} | ||
|
||
switch (FEAT_TRAINS, SELF, switch_crh380al_2541_articulated_part, extra_callback_info1) { | ||
1..47: return crh380al_2541; | ||
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; | ||
} | ||
|
||
switch (FEAT_TRAINS, SELF, switch_crh380al_2541_graphics, position_in_articulated_veh % 48) { | ||
1: spriteset_crh380al_front; | ||
4: spriteset_crh380al_middle_m; | ||
7: spriteset_crh380al_middle_m; | ||
10: spriteset_crh380al_middle_m; | ||
13: spriteset_crh380al_middle_p; | ||
16: spriteset_crh380al_middle_m; | ||
19: spriteset_crh380al_middle_m; | ||
22: spriteset_crh380al_middle_m; | ||
25: spriteset_crh380al_middle_m; | ||
28: spriteset_crh380al_middle_m; | ||
31: spriteset_crh380al_middle_m; | ||
34: spriteset_crh380al_middle_m; | ||
37: spriteset_crh380al_middle_p; | ||
40: spriteset_crh380al_middle_m; | ||
43: spriteset_crh380al_middle_m; | ||
46: spriteset_crh380al_cab; | ||
empty_sprites; | ||
} | ||
|
||
switch (FEAT_TRAINS, SELF, onlycrh380al_2541, vehicle_type_id) { | ||
crh380al_2541: onlyallowcst; | ||
return CB_RESULT_ATTACH_DISALLOW; | ||
} | ||
|
||
item (FEAT_TRAINS, crh380al_2541) { | ||
property { | ||
// Menu | ||
name: string(STR_NAME_CRH380AL_2541); | ||
sprite_id: SPRITE_ID_NEW_TRAIN; | ||
misc_flags: bitmask(TRAIN_FLAG_AUTOREFIT, TRAIN_FLAG_MU); | ||
engine_class: ENGINE_CLASS_ELECTRIC; | ||
variant_group: 9238; | ||
|
||
// Availability | ||
climates_available: ALL_CLIMATES; | ||
introduction_date: date(2010,10,01); | ||
model_life: VEHICLE_NEVER_EXPIRES; | ||
vehicle_life: 25; | ||
track_type: SAAA; | ||
|
||
// Cargo | ||
refittable_cargo_classes: bitmask(CC_PASSENGERS); | ||
non_refittable_cargo_classes: 0; | ||
cargo_allow_refit: [PASS, TOUR, YETI, YETY]; | ||
cargo_disallow_refit: []; | ||
refit_cost: 0; | ||
default_cargo_type: PASS; | ||
ai_special_flag: AI_FLAG_PASSENGER; | ||
cargo_capacity: 1; | ||
loading_speed: 8 << param_loading_speed; | ||
cargo_age_period: 400 << param_cargo_decay; | ||
|
||
// Stats | ||
speed: 486 km/h; | ||
power: 11200 kW; | ||
weight: 409 ton; | ||
tractive_effort_coefficient: 0.6225; | ||
cost_factor: 68; | ||
running_cost_base: RUNNING_COST_ELECTRIC; | ||
running_cost_factor: 0; | ||
reliability_decay: 12; | ||
bitmask_vehicle_info: bitmask(2); | ||
|
||
} | ||
graphics { | ||
// Menu | ||
additional_text: string(STR_DESC_2, string(STR_CRH380AL_2541_486_AVAILABLE), string(STR_RELDEC_LOW, 12)); | ||
can_attach_wagon: onlycrh380al_2541; | ||
start_stop: mu4to24car; | ||
|
||
// Graphics | ||
default: switch_crh380al_2541_graphics; | ||
purchase: spriteset_crh380al_purchase_original; | ||
articulated_part: switch_crh380al_2541_articulated_part; | ||
|
||
// Stats | ||
length: switch_length_2_8_2; | ||
purchase_tractive_effort_coefficient: return int(0.083*255); | ||
cargo_capacity: 0; | ||
cargo_age_period: 0; | ||
cost_factor: 850; | ||
running_cost_factor: 0; | ||
purchase_running_cost_factor: 0; | ||
purchase_cargo_capacity: 0; | ||
name: switch_crh380al_2541_name; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -122,6 +122,7 @@ sort (FEAT_TRAINS, [ | |
crh6f, | ||
crh380a, | ||
crh380al, | ||
crh380al_2541, | ||
crh380aj, | ||
crh380b, | ||
crh380bl, | ||
|