Skip to content

Commit

Permalink
Added T-68 Tram, fixed Class 88 claiming to be a Diesel
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Jul 17, 2024
1 parent 5a3369f commit 7ceaa4d
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 1 deletion.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Added LMS Jubilee
- Added Furness Railway Rectangular Tanker Wagon
- Added Furness Railway 20-ton Hopper Wagon
- Added AnsaldoBreda T-68 (Manchester Metrolink tram)
- Fixed some introduction and model lifespans (set is now fully freight playable from 1840 onwards)
- Fixed some horizontal view lengths
- Fixed depot sprite (vertical alignment and 32px sprite flag)
Expand Down
Binary file added gfx/Tram/Metrolink_T68.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ STR_NAME_CR4000 :London Trams CR4000 (2-car Single Unit)
STR_NAME_LondonVariobahn :London Trams Variobahn (5-car Single Unit)
STR_NAME_BirminghamUrbos :West Midlands Metro Urbos 3 (5-car Single Unit)
STR_NAME_BlackpoolFlexity :Blackpool Transport Flexity 2 (5-car Single Unit)
STR_NAME_T68 :Manchester Metrolink T-68 (2-car Single Unit)
STR_NAME_T68_DOUBLE :Manchester Metrolink T-68 (4-car Double Unit)
STR_NAME_M5000 :Manchester Metrolink M5000 (2-car Single Unit)
STR_NAME_M5000_DOUBLE :Manchester Metrolink M5000 (4-car Double Unit)
STR_NAME_B07 :Docklands Light Railway B07 (2-car Single Unit)
Expand Down Expand Up @@ -220,6 +222,8 @@ str_purchase_coach :{BLACK}Liveries: {GOLD}{STRING}{BLACK}

str_purchase_type_diesel :{RED}Diesel locomotive
str_purchase_type_steam :{GREEN}Steam Locomotive
str_purchase_type_bimode :{PURPLE}Bi-Mode Locomotive
str_purchase_type_bmu :{PURPLE}Bi-Mode Multiple Unit
str_purchase_type_dmu :{RED}Diesel Multiple Unit
str_purchase_type_demu :{RED}Diesel{BLACK}-{BLUE}Electric {PURPLE}Multiple Unit
str_purchase_type_emu :{BLUE}Electric Multiple Unit
Expand Down
2 changes: 1 addition & 1 deletion src/trains/bimode_loco/88.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ item (FEAT_TRAINS, item_BR88, 594) {
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)));
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_bimode),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;
Expand Down
46 changes: 46 additions & 0 deletions src/trams/Metrolink_T68_Double.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
switch (FEAT_ROADVEHS, SELF, switch_articulated_TRAM_T68_Double, extra_callback_info1) {
1..3: return item_TRAM_T68_Double;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}


item (FEAT_ROADVEHS, item_TRAM_T68_Double, 663) {
property {
misc_flags: bitmask(ROADVEH_FLAG_TRAM);
name: string(STR_NAME_T68_DOUBLE);
climates_available: ALL_CLIMATES;
introduction_date: date(1994,4,6);
model_life: VEHICLE_NEVER_EXPIRES;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 29;
cost_factor: 30;
running_cost_factor: 27;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 50 mph;
refit_cost: 0;
power: 1128 hp;
running_cost_base: RUNNING_COST_ROADVEH;
default_cargo_type: PASS;
cargo_capacity: 1;
weight: 1 ton;
tractive_effort_coefficient: 0.08;
air_drag_coefficient: 0.05;
length: 5;
cargo_age_period: 185;
}
graphics {
cargo_subtype_text: sw_TRAM_T68_cargo_subtype_text;
articulated_part: switch_articulated_TRAM_T68_Double;
default: sw_TRAM_T68;
purchase: spriteset_T68_Double_purchase;
colour_mapping: return PALETTE_CC_FIRST;
cargo_capacity: return(332 * param_pax / 4);
cost_factor: return(GetAdjustedCostTRAM(30));
running_cost_factor: return(GetAdjustedCostTRAM(27));
weight: 196;
}
}
46 changes: 46 additions & 0 deletions src/trams/Metrolink_T68_Single.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
switch (FEAT_ROADVEHS, SELF, switch_articulated_TRAM_T68, extra_callback_info1) {
1: return item_TRAM_T68_Single;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}


item (FEAT_ROADVEHS, item_TRAM_T68_Single, 662) {
property {
misc_flags: bitmask(ROADVEH_FLAG_TRAM);
name: string(STR_NAME_T68);
climates_available: ALL_CLIMATES;
introduction_date: date(1992,4,6);
model_life: VEHICLE_NEVER_EXPIRES;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 29;
cost_factor: 20;
running_cost_factor: 18;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 50 mph;
refit_cost: 0;
power: 564 hp;
running_cost_base: RUNNING_COST_ROADVEH;
default_cargo_type: PASS;
cargo_capacity: 1;
weight: 1 ton;
tractive_effort_coefficient: 0.08;
air_drag_coefficient: 0.05;
length: 5;
cargo_age_period: 185;
}
graphics {
cargo_subtype_text: sw_TRAM_T68_cargo_subtype_text;
articulated_part: switch_articulated_TRAM_T68;
default: sw_TRAM_T68;
purchase: spriteset_T68_purchase;
colour_mapping: return PALETTE_CC_FIRST;
cargo_capacity: return(166 * param_pax / 2);
cost_factor: return(GetAdjustedCostTRAM(20));
running_cost_factor: return(GetAdjustedCostTRAM(18));
weight: 98;
}
}
28 changes: 28 additions & 0 deletions src/trams/_spriteset/T68_sprites.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
spriteset (spriteset_T68_purchase, "gfx/Tram/Metrolink_T68.png") {
template_purchase(0,0)
}

spriteset (spriteset_T68_Double_purchase, "gfx/Tram/Metrolink_T68.png") {
template_purchase(88,0)
}

spriteset (spriteset_T68_front_Metrolink, "gfx/Tram/Metrolink_T68.png") {
template_tram20px(0, 13)
}
spriteset (spriteset_T68_rear_Metrolink, "gfx/Tram/Metrolink_T68.png") {
template_tram20px(0, 33)
}

switch(FEAT_ROADVEHS,SELF,sw_TRAM_T68_cargo_subtype_text,cargo_subtype){
0: return string(str_MetrolinkYellow);
return CB_RESULT_NO_TEXT;
}

switch(FEAT_ROADVEHS,SELF, sw_TRAM_T68_Metrolink, position_in_articulated_veh % 2){
0:spriteset_T68_front_Metrolink;
1:spriteset_T68_rear_Metrolink;
}

switch(FEAT_ROADVEHS,SELF, sw_TRAM_T68,cargo_subtype){
0: sw_TRAM_T68_Metrolink;
}

0 comments on commit 7ceaa4d

Please sign in to comment.