Skip to content

Commit

Permalink
Added Class 88
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed May 1, 2024
1 parent 813c125 commit 12f7fe4
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
5 changes: 5 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ str_BR68_usage :Mixed Traffic
str_BR68_eos :---
str_BR68_liveries :DRS, ScotRail, Chiltern Railways

STR_NAME_BR88 :BR Class 88 (Bi-Mode)
str_BR88_usage :Mixed Traffic
str_BR88_eos :---
str_BR88_liveries :DRS

STR_NAME_BR67Royal :BR Class 67 'British Royal Train'
str_BR67Royal_usage :Mixed Traffic
str_BR67Royal_eos :---
Expand Down
1 change: 1 addition & 0 deletions src/sortpurchase.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ sort(FEAT_TRAINS, [
item_BR85,
item_BR86,
item_BR87,
item_BR88,
item_BR89,
item_BR90,
item_BR91,
Expand Down
77 changes: 77 additions & 0 deletions src/trains/bimode_loco/88.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
spriteset(spriteset_BR88_Purchase, "gfx/BR68_v2.png") {
template_purchase(0, 0)
}

spriteset(spriteset_BR88_DRS, "gfx/BR68_v2.png") {
template_train32px_old(0, 13)
}

switch(FEAT_TRAINS,SELF, switch_BR88,cargo_subtype){
0: spriteset_BR88_DRS;
}

switch(FEAT_TRAINS,SELF,switch_BR88_cargo_subtype_text,cargo_subtype){
0: return string(str_DRSCompass);
return CB_RESULT_NO_TEXT;
}

switch(FEAT_TRAINS, SELF, switch_br88_power, current_railtype) {
ELRL: return 5400;
return 940;
}


switch(FEAT_TRAINS, SELF, switch_br88_sound, current_railtype) {
RAIL: sw_66_sound;
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_BR88, 594) {
property {
name: string(STR_NAME_BR88);
climates_available: ALL_CLIMATES;
introduction_date: date(2024,4,21);
model_life: VEHICLE_NEVER_EXPIRES;
retire_early: 1;
vehicle_life: 70;
reliability_decay: 7;
refittable_cargo_classes: 0;
cargo_allow_refit: [GOOD, FOOD];
loading_speed: 3;
cost_factor: 52;
running_cost_factor: 30;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 100 mph;
misc_flags: TRAIN_FLAG_FLIP;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 5400 hp;
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 86 ton;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.37;
air_drag_coefficient: 0.1;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_DIESEL;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
}
graphics {
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_diesel),string(str_route_7),string(str_BR88_usage),string(str_BR88_eos),string(str_BR88_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
cargo_subtype_text: switch_BR88_cargo_subtype_text;
default: switch_BR88;
purchase: spriteset_BR88_Purchase;
power: switch_br88_power;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: diesel_create_visual_effect;
sound_effect: switch_br88_sound;
cost_factor: return(GetAdjustedCost(52));
running_cost_factor: return(GetAdjustedCost(30));
}
}

0 comments on commit 12f7fe4

Please sign in to comment.