Skip to content

Commit

Permalink
Added LNER P2
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Apr 14, 2024
1 parent b7727ab commit 6684268
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 0 deletions.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
Binary file added gfx/Steam/LNERP2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ str_LNERA3_usage :Express Passenger
str_LNERA3_eos :1959-1966
str_LNERA3_liveries :LNER Green, BR Wartime Black, BR Apple Green, BR Brunswick Green

STR_NAME_LNERP2 :LNER Gresley P2
str_LNERP2_usage :Express Passenger
str_LNERP2_eos :1934-1936
str_LNERP2_liveries :LNER Green

STR_NAME_Standard9F :BR Standard Class 9F
str_Standard9F_usage :Freight/Mixed Traffic
str_Standard9F_eos :1935
Expand Down
1 change: 1 addition & 0 deletions src/sortpurchase.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ sort(FEAT_TRAINS, [
item_GreatBear,
item_GWRHall,
item_GNRA1,
item_LNERP2,
item_LNERA3,
item_Standard9F,
item_BR08,
Expand Down
89 changes: 89 additions & 0 deletions src/trains/steam/LNERP2.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
spriteset(spriteset_LNERP2_Purchase, "gfx/Steam/LNERP2.png") {
template_purchase_anim(0, 0)
}

spriteset(spriteset_LNERP2_LNERGreen, "gfx/Steam/LNERP2.png") {
template_train32px(0, 13)
}
spriteset(spriteset_LNERP2Tender_LNERGreen, "gfx/Steam/LNERP2.png") {
template_train16px(0, 39)
}

switch(FEAT_TRAINS,SELF, sw_LNERP2Loco,cargo_subtype){
0: spriteset_LNERP2_LNERGreen;
}

switch(FEAT_TRAINS,SELF, sw_LNERP2Tender,cargo_subtype){
0: spriteset_LNERP2Tender_LNERGreen;
}

switch(FEAT_TRAINS,SELF,sw_LNERP2_cargo_subtype_text,cargo_subtype){
0: return string(str_LNERGreen);
return CB_RESULT_NO_TEXT;
}

switch(FEAT_TRAINS, SELF, sw_LNERP2, position_in_articulated_veh){
0: sw_LNERP2Loco;
1: sw_LNERP2Tender;
}

switch(FEAT_TRAINS, SELF, sw_LNERP2_length, position_in_articulated_veh) {
0: return 8;
1: return 4;
}

switch (FEAT_TRAINS, SELF, sw_articulated_LNERP2, extra_callback_info1) {
1: return item_LNERP2;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

item (FEAT_TRAINS, item_LNERP2, 591) {
property {
name: string(STR_NAME_LNERP2);
climates_available: ALL_CLIMATES;
introduction_date: date(1934,1,1);
model_life: 20;
retire_early: 1;
vehicle_life: 20;
reliability_decay: 7;
refittable_cargo_classes: 0;
cargo_allow_refit: [GOOD, FOOD];
loading_speed: 3;
cost_factor: 25;
running_cost_factor: 26;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 75 mph;
misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 2800 hp;
running_cost_base: RUNNING_COST_STEAM;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 165 ton;
engine_class: ENGINE_CLASS_STEAM;
tractive_effort_coefficient: 0.35;
air_drag_coefficient: 0.1;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_STEAM;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
}
graphics {
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_steam),string(str_route_9),string(str_LNERP2_usage),string(str_LNERP2_eos),string(str_LNERP2_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
cargo_subtype_text: sw_LNERP2_cargo_subtype_text;
articulated_part: sw_articulated_LNERP2;
default: sw_LNERP2;
purchase: spriteset_LNERP2_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: steam_create_visual_effect;
sound_effect: sw_steam_sound;
cost_factor: return(GetAdjustedCost(26));
running_cost_factor: return(GetAdjustedCost(30));
length: sw_LNERP2_length;
}
}

0 comments on commit 6684268

Please sign in to comment.