Skip to content

Commit

Permalink
Added Bombardier (Metrolink) M5000 tram and updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed May 23, 2024
1 parent be0c7aa commit 1639794
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 0 deletions.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# v2.10
- Added Class 555
- Re-drew Class 458/0
- Removed 10-car Class 720 (never entered service)
- Added Bombardier M5000 (Manchester Metrolink tram)

# v2.9 (2024-05-18)
- Added Furness Railway 0-4-0 "Coppernob"
Expand Down
Binary file added gfx/Tram/Metrolink_M5000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ STR_NAME_EyeCandy :Invisible Locomotive (Eyecandy)
STR_DESC_EyeCandy :An invisible locomotive intended for use for eyecandy (eg putting freight wagons in a siding)
STR_EyeCandy_NoAttachedUnit :Cannot start Eye Candy locomotive without an attached unit

STR_NAME_M5000 :Bombardier M5000 (Manchester Metrolink)

STR_BR_68_5A :BR Class 68 + "Nova 2" Mark 5A set (5-Car + locomotive)

STR_BR_195_2CAR :BR Class 195/0 "Civity" (2-Car)
Expand Down Expand Up @@ -1473,6 +1475,7 @@ str_MainlineFreight : (Mainline Freight)
str_MerseyRail : (MerseyRail)
str_MerseyRailGoodComs : (MerseyRail - Good Communications)
str_MerseyRailOld : (MerseyRail - Old)
str_MetrolinkYellow : (Manchester Metrolink - Yellow)
str_Maersk : (Maersk)
str_MaerskEyeCandy : (Maersk - Always show container)
str_MMLBlue : (Midland Mainline Blue)
Expand Down
60 changes: 60 additions & 0 deletions src/trams/Metrolink_M5000.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
switch(FEAT_ROADVEHS,SELF, sw_TRAM_M5000_Metrolink, position_in_articulated_veh % 2){
0:spriteset_M5000_front_Metrolink;
1:spriteset_M5000_rear_Metrolink;
}

switch(FEAT_ROADVEHS,SELF, sw_TRAM_M5000,cargo_subtype){
0: sw_TRAM_M5000_Metrolink;
}

switch (FEAT_ROADVEHS, SELF, switch_articulated_TRAM_M5000, extra_callback_info1) {
1: return item_TRAM_M5000;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

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


item (FEAT_ROADVEHS, item_TRAM_M5000, 637) {
property {
misc_flags: bitmask(ROADVEH_FLAG_TRAM);
name: string(STR_NAME_M5000);
climates_available: ALL_CLIMATES;
introduction_date: date(2007,4,1);
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: 640 hp;
running_cost_base: RUNNING_COST_ROADVEH;
default_cargo_type: PASS;
cargo_capacity: 200;
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_M5000_cargo_subtype_text;
articulated_part: switch_articulated_TRAM_M5000;
default: sw_TRAM_M5000;
purchase: spriteset_M5000_purchase;
colour_mapping: return PALETTE_CC_FIRST;
cargo_capacity: return(200 * param_pax);
cost_factor: return(GetAdjustedCostTRAM(20));
running_cost_factor: return(GetAdjustedCostTRAM(18));
weight: 80;
}
}
10 changes: 10 additions & 0 deletions src/trams/_spriteset/M5000_sprites.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
spriteset (spriteset_M5000_purchase, "gfx/Tram/Metrolink_M5000.png") {
template_purchase(0,0)
}

spriteset (spriteset_M5000_front_Metrolink, "gfx/Tram/Metrolink_M5000.png") {
template_train20px(0, 13)
}
spriteset (spriteset_M5000_rear_Metrolink, "gfx/Tram/Metrolink_M5000.png") {
template_train20px(0, 33)
}

0 comments on commit 1639794

Please sign in to comment.