Skip to content

Commit

Permalink
Started coding Jubilee and Black 5
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Jul 13, 2024
1 parent 7c2f18c commit 085e98d
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 4 deletions.
18 changes: 14 additions & 4 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -284,21 +284,31 @@ str_GWRHall_usage :Express Passenger
str_GWRHall_eos :1946
str_GWRHall_liveries :GWR Green, Hogwarts Express

STR_NAME_GNRA1 :GNR Gresley A1
STR_NAME_GNRA1 :GNR Gresley 4-6-2 A1
str_GNRA1_usage :Express Passenger
str_GNRA1_eos :1928-1935
str_GNRA1_liveries :GNR Green, LNER Green

STR_NAME_LNERA3 :LNER Gresley A3
STR_NAME_LNERA3 :LNER Gresley 4-6-2 A3
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_NAME_LNERP2 :LNER Gresley 2-8-2 P2
str_LNERP2_usage :Express Passenger
str_LNERP2_eos :1934-1936
str_LNERP2_eos :1934-1936ß
str_LNERP2_liveries :LNER Green

STR_NAME_LMSJubilee :LMS 4-6-0 Jubilee
str_LMSJubilee_usage :Express Passenger
str_LMSJubilee_eos :1934-1936
str_LMSJubilee_liveries :LNER Green

STR_NAME_LMSBlack5 :LMS 4-6-0 Black5
str_LMSBlack5_usage :Mixed Traffic
str_LMSBlack5_eos :1934-1951
str_LMSBlack5_liveries :LNER Green

STR_NAME_WDTank :War Department 0-6-0 "Austerity Tank"
str_WDTank_usage :Low speed freight/shunting
str_WDTank_eos :1960
Expand Down
91 changes: 91 additions & 0 deletions src/trains/steam/LMSBlack5.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@

spriteset(spriteset_LMSBlack5_Purchase, "gfx/Steam/LMSJubilee.png") {
template_purchase_anim(0, 0)
}

spriteset(spriteset_LMSBlack5_FurnessRed, "gfx/Steam/LMSJubilee.png") {
template_train20px(0, 13)
}

spriteset(spriteset_LMSBlack5T_FurnessRed, "gfx/Steam/LMSJubilee.png") {
template_train12px(0, 33)
}

switch(FEAT_TRAINS,SELF, sw_LMSBlack5Loco,cargo_subtype){
0: spriteset_LMSBlack5_FurnessRed;
}

switch(FEAT_TRAINS,SELF, sw_LMSBlack5Tender,cargo_subtype){
0: spriteset_LMSBlack5T_FurnessRed;
}

switch(FEAT_TRAINS, SELF, sw_LMSBlack5, position_in_articulated_veh){
0: sw_LMSBlack5Loco;
1: sw_LMSBlack5Tender;
}

switch(FEAT_TRAINS, SELF, switch_LMSBlack5_length, position_in_articulated_veh) {
0: return 5;
1: return 3;
}

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

switch(FEAT_TRAINS,SELF,sw_LMSBlack5_cargo_subtype_text,cargo_subtype){
0: return string(str_FurnessRed);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_LMSBlack5, 590) {
property {
name: string(STR_NAME_LMSBlack5);
climates_available: ALL_CLIMATES;
introduction_date: date(1934,2,1);
model_life: 40;
retire_early: 1;
vehicle_life: 40;
reliability_decay: 7;
refittable_cargo_classes: 0;
cargo_allow_refit: [GOOD, FOOD];
loading_speed: 3;
cost_factor: 18;
running_cost_factor: 21;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 80 mph;
misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 1300 hp;
running_cost_base: RUNNING_COST_STEAM;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 130 ton;
engine_class: ENGINE_CLASS_STEAM;
tractive_effort_coefficient: 0.4;
air_drag_coefficient: 0.1;
length: 5;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_STEAM;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
}
graphics {
length: switch_LMSBlack5_length;
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_steam),string(str_route_9),string(str_LMSBlack5_usage),string(str_LMSBlack5_eos),string(str_LMSBlack5_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
cargo_subtype_text: sw_LMSBlack5_cargo_subtype_text;
articulated_part: switch_articulated_LMSBlack5;
default: sw_LMSBlack5;
purchase: spriteset_LMSBlack5_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: steam_create_visual_effect;
sound_effect: sw_steam_sound;
cost_factor: return(GetAdjustedCost(10));
running_cost_factor: return(GetAdjustedCost(10));
}
}
90 changes: 90 additions & 0 deletions src/trains/steam/LMSJubilee.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
spriteset(spriteset_LMSJubilee_Purchase, "gfx/Steam/LMSJubilee.png") {
template_purchase_anim(0, 0)
}

spriteset(spriteset_LMSJubilee_FurnessRed, "gfx/Steam/LMSJubilee.png") {
template_train20px(0, 13)
}

spriteset(spriteset_LMSJubileeT_FurnessRed, "gfx/Steam/LMSJubilee.png") {
template_train12px(0, 33)
}

switch(FEAT_TRAINS,SELF, sw_LMSJubileeLoco,cargo_subtype){
0: spriteset_LMSJubilee_FurnessRed;
}

switch(FEAT_TRAINS,SELF, sw_LMSJubileeTender,cargo_subtype){
0: spriteset_LMSJubileeT_FurnessRed;
}

switch(FEAT_TRAINS, SELF, sw_LMSJubilee, position_in_articulated_veh){
0: sw_LMSJubileeLoco;
1: sw_LMSJubileeTender;
}

switch(FEAT_TRAINS, SELF, switch_LMSJubilee_length, position_in_articulated_veh) {
0: return 5;
1: return 3;
}

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

switch(FEAT_TRAINS,SELF,sw_LMSJubilee_cargo_subtype_text,cargo_subtype){
0: return string(str_FurnessRed);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_LMSJubilee, 590) {
property {
name: string(STR_NAME_LMSJubilee);
climates_available: ALL_CLIMATES;
introduction_date: date(1934,2,1);
model_life: 5;
retire_early: 1;
vehicle_life: 25;
reliability_decay: 7;
refittable_cargo_classes: 0;
cargo_allow_refit: [GOOD, FOOD];
loading_speed: 3;
cost_factor: 20;
running_cost_factor: 24;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 90 mph;
misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 1200 hp;
running_cost_base: RUNNING_COST_STEAM;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 130 ton;
engine_class: ENGINE_CLASS_STEAM;
tractive_effort_coefficient: 0.4;
air_drag_coefficient: 0.1;
length: 5;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_STEAM;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
}
graphics {
length: switch_LMSJubilee_length;
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_steam),string(str_route_9),string(str_LMSJubilee_usage),string(str_LMSJubilee_eos),string(str_LMSJubilee_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
cargo_subtype_text: sw_LMSJubilee_cargo_subtype_text;
articulated_part: switch_articulated_LMSJubilee;
default: sw_LMSJubilee;
purchase: spriteset_LMSJubilee_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: steam_create_visual_effect;
sound_effect: sw_steam_sound;
cost_factor: return(GetAdjustedCost(10));
running_cost_factor: return(GetAdjustedCost(10));
}
}

0 comments on commit 085e98d

Please sign in to comment.