Skip to content

Commit

Permalink
Added London Underground 1992 stock
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Aug 15, 2021
1 parent 87ab0eb commit 8b032b9
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 1 deletion.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
Binary file added gfx/LondonUnderground/LU_1992.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 @@ -990,6 +990,11 @@ str_LUDStock_usage :Metro
str_LUDStock_eos :---
str_LUDStock_liveries :London Underground

STR_NAME_LU1992 :London Underground 1992 Stock (8-car)
str_LU1992_usage :Metro
str_LU1992_eos :---
str_LU1992_liveries :London Underground, Network SouthEast

STR_NAME_LU1995 :London Underground 1995 Stock (6-car)
str_LU1995_usage :Metro
str_LU1995_eos :---
Expand Down
3 changes: 2 additions & 1 deletion src/sortpurchase.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,12 @@ sort(FEAT_TRAINS, [
item_LU1967,
item_LUDStock,
item_LU1986,
item_LU1992,
item_LU1995,
item_LU1996,
item_LU2009,
item_LULS7,
item_LULS8,
item_LU2009,
item_BR325,
item_BRHHA,
item_BRTTA,
Expand Down
187 changes: 187 additions & 0 deletions src/trains/london_underground/LU1992.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
spriteset(spriteset_LU1992_Purchase, "gfx/LondonUnderground/LU_1992.png") {
template_purchase(0, 0)
}

spriteset(spriteset_LU1992a_TfL, "gfx/LondonUnderground/LU_1992.png") {
template_train32px(0, 13)
}
spriteset(spriteset_LU1992b_TfL, "gfx/LondonUnderground/LU_1992.png") {
template_train32px(0, 38)
}
spriteset(spriteset_LU1992c_TfL, "gfx/LondonUnderground/LU_1992.png") {
template_train32px(0, 63)
}

spriteset(spriteset_LU1992a_NSE, "gfx/LondonUnderground/LU_1992.png") {
template_train32px(0, 88)
}
spriteset(spriteset_LU1992b_NSE, "gfx/LondonUnderground/LU_1992.png") {
template_train32px(0, 113)
}
spriteset(spriteset_LU1992c_NSE, "gfx/LondonUnderground/LU_1992.png") {
template_train32px(0, 138)
}

switch(FEAT_TRAINS,SELF, sw_LU1992a,cargo_subtype){
0:spriteset_LU1992a_TfL;
1:spriteset_LU1992a_NSE;
}

switch(FEAT_TRAINS,SELF, sw_LU1992b,cargo_subtype){
0:spriteset_LU1992b_TfL;
1:spriteset_LU1992b_NSE;
}

switch(FEAT_TRAINS,SELF, sw_LU1992c,cargo_subtype){
0:spriteset_LU1992c_TfL;
1:spriteset_LU1992c_NSE;
}

switch (FEAT_TRAINS, SELF, switch_articulated_LU1992, extra_callback_info1) {
1..6: return item_LU1992c;
7: return item_LU1992b;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

switch(FEAT_TRAINS,SELF,sw_LU1992_cargo_subtype_text,cargo_subtype){
0: return string(str_LU_TfL);
1: return string(str_NSE);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_LU1992, 528) {
property {
name: string(STR_NAME_LU1992);
climates_available: ALL_CLIMATES;
introduction_date: date(1992,1,1);
model_life: 15;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 25;
cost_factor: 61;
running_cost_factor: 37;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 62 mph;
misc_flags: TRAIN_FLAG_MU;
refit_cost: 0;
track_type: BR_4RDR;
ai_special_flag: AI_FLAG_CARGO;
power: 2500 hp;
running_cost_base: RUNNING_COST_ELECTRIC;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 141;
weight: 180 ton;
engine_class: ENGINE_CLASS_ELECTRIC;
tractive_effort_coefficient: 0.08;
air_drag_coefficient: 0.05;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_ELECTRIC;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 185;
}
graphics {
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_emu),string(str_route_2),string(str_LU1992_usage),string(str_LU1992_eos),string(str_LU1992_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_subtype_text: sw_LU1992_cargo_subtype_text;
articulated_part: switch_articulated_LU1992;
default: sw_LU1992a;
purchase: spriteset_LU1992_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: electric_create_visual_effect;
sound_effect: sw_electric_sound;
cargo_capacity: return(34 * param_pax);
}
}

item (FEAT_TRAINS, item_LU1992b, 529) {
property {
name: string(STR_NAME_LU1992);
climates_available: NO_CLIMATE;
introduction_date: date(1992,1,1);
model_life: 15;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 25;
cost_factor: 1;
running_cost_factor: 1;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 62 mph;
misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE;
refit_cost: 0;
track_type: BR_4RDR;
ai_special_flag: AI_FLAG_CARGO;
power: 0 hp;
running_cost_base: RUNNING_COST_ELECTRIC;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 141;
weight: 0 ton;
engine_class: ENGINE_CLASS_ELECTRIC;
tractive_effort_coefficient: 0.08;
air_drag_coefficient: 0.05;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_ELECTRIC;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 185;
}
graphics {
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
default: sw_LU1992b;
colour_mapping: return PALETTE_CC_FIRST;
sound_effect: sw_electric_sound;
cargo_capacity: return(34 * param_pax);
}
}

item (FEAT_TRAINS, item_LU1992c, 530) {
property {
name: string(STR_NAME_LU1992);
climates_available: NO_CLIMATE;
introduction_date: date(1992,1,1);
model_life: 15;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 25;
cost_factor: 1;
running_cost_factor: 1;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 62 mph;
misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE;
refit_cost: 0;
track_type: BR_4RDR;
ai_special_flag: AI_FLAG_CARGO;
power: 0 hp;
running_cost_base: RUNNING_COST_ELECTRIC;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 141;
weight: 0 ton;
engine_class: ENGINE_CLASS_ELECTRIC;
tractive_effort_coefficient: 0.08;
air_drag_coefficient: 0.05;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_ELECTRIC;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 185;
}
graphics {
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
default: sw_LU1992c;
colour_mapping: return PALETTE_CC_FIRST;
sound_effect: sw_electric_sound;
cargo_capacity: return(34 * param_pax);
}
}

0 comments on commit 8b032b9

Please sign in to comment.