Skip to content

Commit

Permalink
Added Class 50
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Mar 26, 2024
1 parent e56250d commit 4e00256
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 0 deletions.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
Binary file added gfx/BR50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ str_Kestrel_usage :Mixed Traffic
str_Kestrel_eos :---
str_Kestrel_liveries :Kestrel Black and Yellow

STR_NAME_BR50 :British Rail Class 50
str_BR50_usage :Express Passenger
str_BR50_eos :---
str_BR50_liveries :BR Blue, BR Large Logo, BR Green, Network SouthEast, Network SouthEast (Alternate) GBRf, Hanson & Hall

STR_NAME_BR52 :British Rail Class 52
str_BR52_usage :Mixed Traffic
str_BR52_eos :---
Expand Down Expand Up @@ -1340,6 +1345,7 @@ str_GNRGreen : (GNR "Green")
str_GWRGreen : (GWR "Green")
str_GWRPride : (GWR "Pride")
str_GWRGreenUn : (GWR "Green" Unbranded)
str_HansonHall : (Hanson & Hall)
str_HarryNeedle : (Harry Needle Railroad)
str_Hitachi : (Hitachi)
str_HitachiWhite : (Hitachi)
Expand Down
1 change: 1 addition & 0 deletions src/sortpurchase.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sort(FEAT_TRAINS, [
item_BR252, //Actually Class 41, which is why it's here
item_BR253, //Actually Class 43, which is why it's here
item_BR47,
item_BR50,
item_BR52,
item_Kestrel,
item_BR55,
Expand Down
103 changes: 103 additions & 0 deletions src/trains/diesel/BR50.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
spriteset(spriteset_BR50_Purchase, "gfx/BR50.png") {
template_purchase(0, 0)
}

spriteset(spriteset_BR50_BRBlue, "gfx/BR50.png") {
template_train32px(0, 13)
}

spriteset(spriteset_BR50_BRLLogo, "gfx/BR50.png") {
template_train32px(0, 38)
}

spriteset(spriteset_BR50_GBRF, "gfx/BR50.png") {
template_train32px(0, 63)
}

spriteset(spriteset_BR50_NSE, "gfx/BR50.png") {
template_train32px(0, 88)
}

spriteset(spriteset_BR50_NSEAlt, "gfx/BR50.png") {
template_train32px(0, 113)
}

spriteset(spriteset_BR50_HansonHall, "gfx/BR50.png") {
template_train32px(0, 138)
}

spriteset(spriteset_BR50_BRGreen, "gfx/BR50.png") {
template_train32px(0, 163)
}


switch(FEAT_TRAINS,SELF, sw_BR50,cargo_subtype){
0: spriteset_BR50_BRBlue;
1: spriteset_BR50_BRLLogo;
2: spriteset_BR50_BRGreen;
3: spriteset_BR50_NSE;
4: spriteset_BR50_NSEAlt;
5: spriteset_BR50_GBRF;
6: spriteset_BR50_HansonHall;
return CB_RESULT_NO_TEXT;
}

switch(FEAT_TRAINS,SELF,sw_BR50_cargo_subtype_text,cargo_subtype){
0: return string(str_BRBlue);
1: return string(str_BRLLogo);
2: return string(str_BRGreen);
3: return string(str_NSE);
4: return string(str_NSEAlt);
5: return string(str_GBRf);
6: return string(str_HansonHall);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_BR50, 583) {
property {
name: string(STR_NAME_BR50);
climates_available: ALL_CLIMATES;
introduction_date: date(1967,4,21);
model_life: 19;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 5;
refittable_cargo_classes: 0;
cargo_allow_refit: [GOOD];
loading_speed: 3;
cost_factor: 40;
running_cost_factor: 40;
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: 2700 hp;
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 115 ton;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.35;
air_drag_coefficient: 0.05;
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_BR50_usage),string(str_BR50_eos),string(str_BR50_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
cargo_subtype_text: sw_BR50_cargo_subtype_text;
default: sw_BR50;
purchase: spriteset_BR50_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: diesel_create_visual_effect;
sound_effect: sw_deltic_sound;
cost_factor: return(GetAdjustedCost(40));
running_cost_factor: return(GetAdjustedCost(40));
}
}

0 comments on commit 4e00256

Please sign in to comment.