Skip to content

Commit

Permalink
Added separate purchasable Mk5a Coach and DVT
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed May 5, 2024
1 parent 6de4714 commit 5de2356
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 6 deletions.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
3 changes: 3 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@
- Added Class 48
- Added Class 88
- Added London Underground 2024 Stock
- Added Mk5a coach and DVT as separate purchase items (inc PushPull with Class 68)
- Re-drew Class 70
- Re-drew Class 175
- Re-drew Class 334
- Re-drew Class 777
- Re-drew Class 195
- Re-drew Class 331
- Re-drew Class 397
- Re-drew Mk5 coaches and DVT
- Improved Class 67
- Added GWR livery for Class 230
- Added Pride livery for Class 334
- Added Tesco livery for Container wagon
- Fixed 378/2 "celebration" livery only working on the first unit
- Fixed Class 390 diagonals (some views 1px too short)
- Fixed 802 TPE livery not matching other TPE liveries
- Improved consistency of some liveries between units
- Improved Hitach A-Train (Class 8XX) family power outputs on diesel and electric
- Improved LNER company logo (purchase sprites)
Expand Down
Binary file modified gfx/Rolling Stock/Mk5a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,12 @@ str_BRMk4RFM_liveries :Intercity Swallow, National Express, GNER, East Coast,
STR_NAME_BRMk4DVT :BR Mark 4 Driving Van Trailer
str_BRMk4DVT_liveries :Intercity Swallow, National Express, GNER, East Coast, Virgin East Coast

STR_NAME_BRMk5DVT :BR Mark 5 Driving Van Trailer
str_BRMk5DVT_liveries :Transpennine Express

STR_NAME_BRMk5a :BR Mark 5 Driving Van Trailer
str_BRMk5a_liveries :Transpennine Express

STR_NAME_BRMk5Sleeper :BR Mark 5 Sleeper Coach
str_BRMk5Sleeper_liveries :Caledonian Sleaper

Expand Down
3 changes: 2 additions & 1 deletion src/sortpurchase.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ sort(FEAT_TRAINS, [
item_91_BRMk4TSO,
item_91_BRMk4RFM,
item_91_BRMk4TSOD,

item_BRMk5a,
item_BRMk5DVT,
item_BRMk5Sleeper,
item_IE2800
]);
22 changes: 17 additions & 5 deletions src/trains/_spriteset/PushPull.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Switches in this file are mirrors of their respective DVT or locomotive for push
Changes to the locomotive should be mirrored here or strange things might happen
It is recommended to always include a default...

Everything I've found should refer PARENT not SELF

*/

// Mirror of Mk3DVT
Expand All @@ -17,6 +19,7 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_LocomotiveAsMk3DVT, [STORE_TEMP(num_vehs
6: spriteset_BRMk3DVT_VirginPretendolino;
7: spriteset_BRMk3DVT_ArrivaWales;
8: spriteset_BRMk3DVT_NetworkRail;
spriteset_BRMk3DVT_IntercitySwallow;
}

// Mirror of Mk4DVT
Expand All @@ -30,11 +33,17 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_LocomotiveAsMk4DVT, [STORE_TEMP(num_vehs
spriteset_BR91_IntercitySwallowr;
}

// Not a mirror for once, as Mk5 DVT only has one livery
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_LocomotiveAsMk5DVT, [STORE_TEMP(num_vehs_in_consist - 1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){
spriteset_br5a_dvt_reversed;
}

// Not a mirror for once, as RMTPO PCV only has one livery
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_LocomotiveAsRMTPO, [STORE_TEMP(num_vehs_in_consist - 1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){
spriteset_RMTPO_PCVr;
}


// Mirror of BR47
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR47,cargo_subtype){
0: spriteset_BR47_BRGreen;
Expand All @@ -51,15 +60,16 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR47,cargo_subtype){
11: spriteset_BR47_Colas;
12: spriteset_BR47_One;
13: spriteset_BR47_Freightliner;
return CB_RESULT_NO_TEXT;
spriteset_BR47_BRGreen;
}

// Mirror of BR68
switch(FEAT_TRAINS, SELF, sw_PUSHPULL_DVTasBR68,cargo_subtype){
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR68,cargo_subtype){
0: spriteset_BR68_DRS;
1: spriteset_BR68_ScotRail;
2: spriteset_BR68_Chiltern;
3: spriteset_BR68_TPE;
spriteset_BR68_DRS;
}

// Mirror of BR67
Expand All @@ -73,6 +83,7 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR67,cargo_subtype){
6: spriteset_BR67_BrownPullman;
7: spriteset_BR67_Wrexham;
8: spriteset_BR67_DBCompany;
spriteset_BR67_EWS;
}

// Mirror of 86
Expand All @@ -83,15 +94,15 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR86, cargo_subtype){
3: spriteset_BR86_RailfreightDistribution;
4: spriteset_BR86_RailExpress;
5: spriteset_BR86_EWS;
return CB_RESULT_NO_TEXT;
spriteset_BR86_BRBlue;
}

// Mirror of 87
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR87, cargo_subtype){
0: spriteset_BR87_BRBlue;
1: spriteset_BR87_IntercitySwallow;
2: spriteset_BR87_Virgin;
return CB_RESULT_NO_TEXT;
spriteset_BR87_BRBlue;
}

// Mirror of BR89
Expand All @@ -117,7 +128,7 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR90, [STORE_TEMP(0 - position_in_a
10: spriteset_BR90_REX;
11: spriteset_BR90_FirstScotrail;
12: spriteset_BR90_GNER;
return CB_RESULT_NO_TEXT;
spriteset_BR90_IntercitySwallow;
}

// Mirror of BR91 (IC225.pnml)
Expand All @@ -128,4 +139,5 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR91, [STORE_TEMP(0 - position_in_a
3: spriteset_BR91_EastCoastr;
4: spriteset_BR91_VirginECr;
5: spriteset_BR91_LNERr;
spriteset_BR91_IntercitySwallowr;
}
25 changes: 25 additions & 0 deletions src/trains/_spriteset/Rolling Stock_Sprites/Mk5DVT.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
spriteset(spriteset_BRMk5DVT_purchase, "gfx/Rolling Stock/Mk5a.png") {
template_purchase(0, 0)
}

// Show own graphics when facing forward
// WARNING: If editing this, also edit PushPull.pnml in the Spritesets folder
switch(FEAT_TRAINS,SELF, sw_BRMk5DVT,cargo_subtype){
0: spriteset_br5a_dvt;
}

// If the front of this consist is a compatible locomotive, call that locomotive's remote sprite call switch
switch(FEAT_TRAINS, PARENT, sw_BRMk5DVT_PushPUll, [STORE_TEMP(0 - position_in_articulated_veh, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]) {
196: sw_PUSHPULL_DVTasBR68; // Class 68
sw_BRMk5DVT; // No compatible locomotive found, show normal sprites
}

switch(FEAT_TRAINS, SELF,sw_BRMk5DVT_CheckPosition, position_in_articulated_veh_from_end){
0: sw_BRMk5DVT_PushPUll; // Attempt push pull
sw_BRMk5DVT; // We aren't at the back of theconsist, show normal sprites
}

switch(FEAT_TRAINS,PARENT,sw_BRMk5DVT_Sprites ,vehicle_is_reversed){
0: sw_BRMk5DVT; // We're heading foward, show normal sprites
1: sw_BRMk5DVT_CheckPosition; // Attempt push pull (skipping check position for now for testing)
}
1 change: 1 addition & 0 deletions src/trains/diesel/BR068.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ switch(FEAT_TRAINS,SELF,sw_BR68_cargo_subtype_text,cargo_subtype){
switch(FEAT_TRAINS, PARENT, sw_BR68_PushPUll, [STORE_TEMP(num_vehs_in_consist - 1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]) {
586: sw_PUSHPULL_LocomotiveAsMk3DVT; // Mk3 DVT
585: sw_PUSHPULL_LocomotiveAsMk4DVT; // Mk4 DVT
596: sw_PUSHPULL_LocomotiveAsMk5DVT; // Mk5 DVT
sw_BR68; // No compatible locomotive found, show normal sprites
}

Expand Down
38 changes: 38 additions & 0 deletions src/trains/rollingstock/Mk5DVT.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
item (FEAT_TRAINS, item_BRMk5DVT, 596) {
property {
name: string(STR_NAME_BRMk5DVT);
climates_available: ALL_CLIMATES;
refittable_cargo_classes: CC_PASSENGERS;
introduction_date: date(1989,1,1);
cargo_allow_refit: [PASS, TOUR];
loading_speed: 14;
cost_factor: 30;
running_cost_factor: 12;
sprite_id: SPRITE_ID_NEW_TRAIN;
refit_cost: 0;
track_type: RAIL;
speed: 125 mph;
power: 0;
running_cost_base: RUNNING_COST_STEAM;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 60;
weight: 43 ton;
tractive_effort_coefficient: 0;
air_drag_coefficient: 0;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_NONE;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 185;
}
graphics {
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
default: sw_BRMk5DVT_Sprites;
colour_mapping: return PALETTE_CC_FIRST;
purchase: spriteset_BRMk5DVT_purchase;
cargo_capacity: return(60 * param_pax);
cost_factor: return(GetAdjustedCost(30));
running_cost_factor: return(GetAdjustedCost(17));
}
}
42 changes: 42 additions & 0 deletions src/trains/rollingstock/Mk5a.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
spriteset(spriteset_BRMk5a_purchase, "gfx/Rolling Stock/Mk5a.png") {
template_purchase(88, 0)
}

item (FEAT_TRAINS, item_BRMk5a, 545) {
property {
name: string(STR_NAME_BRMk5a);
climates_available: ALL_CLIMATES;
refittable_cargo_classes: CC_PASSENGERS;
introduction_date: date(2019, 08, 04);
cargo_allow_refit: [PASS, TOUR];
loading_speed: 14;
cost_factor: 52;
running_cost_factor: 17;
sprite_id: SPRITE_ID_NEW_TRAIN;
refit_cost: 0;
track_type: RAIL;
speed: 125 mph;
power: 0;
running_cost_base: RUNNING_COST_STEAM;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 60;
weight: 40 ton;
tractive_effort_coefficient: 0;
air_drag_coefficient: 0;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_NONE;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 185;
}
graphics {
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
default: sw_br_68_5a_middle;
colour_mapping: return PALETTE_CC_FIRST;
purchase: spriteset_BRMk5a_purchase;
cargo_capacity: return(60 * param_pax);
cost_factor: return(GetAdjustedCost(52));
running_cost_factor: return(GetAdjustedCost(17));
}
}

0 comments on commit 5de2356

Please sign in to comment.