Skip to content

Commit

Permalink
Fixed Class 47 and 68 push pull code preventing them from reversing a…
Browse files Browse the repository at this point in the history
…t all
  • Loading branch information
audigex committed Nov 24, 2024
1 parent 9cf897b commit cadaed0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- Added Harry Needle Orange livery for Class 37
- Added Freightliner Orange livery for Class 70
- Improved steam train naming conventions and consistency
- Fixed Class 47 and 68 push pull code preventing them from reversing at all
- Fixed some animated pixels on HST rear power car
- Fixed some tram capacities
- Fixed Tram parameter switch
Expand Down
2 changes: 1 addition & 1 deletion src/trains/_spriteset/PushPull/BR047.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ switch(FEAT_TRAINS, PARENT, sw_BR47_PushPUll, [STORE_TEMP(num_vehs_in_consist -
sw_BR47; // No compatible locomotive found, show normal sprites
}

switch(FEAT_TRAINS, SELF,sw_BR47_CheckPosition, position_in_consist){
switch(FEAT_TRAINS, PARENT,sw_BR47_CheckPosition, position_in_consist){
0: sw_BR47_PushPUll; // Attempt push pull
sw_BR47; // We aren't at the front of the consist, show normal sprites
}
Expand Down
20 changes: 11 additions & 9 deletions src/trains/_spriteset/PushPull/PushPull.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,21 @@ 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
// Not a mirror for once, as Mk5 DVT only has one livery. SECOND LIVERY ITEM IS REQUIRED TO AVOID NML BREAKING. The 0: item is a dummy!
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_LocomotiveAsMk5DVT, [STORE_TEMP(num_vehs_in_consist - 1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){
spriteset_br5a_dvt_reversed;
0: spriteset_br5a_dvt;
spriteset_br5a_dvt_reversed;
}

// Not a mirror for once, as RMTPO PCV only has one livery
// Not a mirror for once, as RMTPO PCV only has one livery. SECOND LIVERY ITEM IS REQUIRED TO AVOID NML BREAKING. The 0: item is a dummy!
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_LocomotiveAsRMTPO, [STORE_TEMP(num_vehs_in_consist - 1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){
spriteset_RMTPO_PCVr;
0: spriteset_RMTPO_PCV;
spriteset_RMTPO_PCVr;
}


// Mirror of BR47
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR47,cargo_subtype){
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR47,[STORE_TEMP(0 - position_in_articulated_veh, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){
0: spriteset_BR47_BRGreen;
1: spriteset_BR47_BRBlue;
2: spriteset_BR47_Porterbrook;
Expand All @@ -82,7 +84,7 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR47,cargo_subtype){
}

// Mirror of BR68
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR68,cargo_subtype){
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR68,[STORE_TEMP(0 - position_in_articulated_veh, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){
0: spriteset_BR68_DRS;
1: spriteset_BR68_ScotRail;
2: spriteset_BR68_Chiltern;
Expand All @@ -91,7 +93,7 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR68,cargo_subtype){
}

// Mirror of BR67
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR67,cargo_subtype){
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR67,[STORE_TEMP(0 - position_in_articulated_veh, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){
0: spriteset_BR67_EWS;
1: spriteset_BR67_Colas;
2: spriteset_BR67_ATW;
Expand All @@ -105,7 +107,7 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR67,cargo_subtype){
}

// Mirror of 86
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR86, cargo_subtype){
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR86, [STORE_TEMP(0 - position_in_articulated_veh, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){
0: spriteset_BR86_BRBlue;
1: spriteset_BR86_InterCityExecutive;
2: spriteset_BR86_InterCitySwallow;
Expand All @@ -116,7 +118,7 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR86, cargo_subtype){
}

// Mirror of 87
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR87, cargo_subtype){
switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR87, [STORE_TEMP(0 - position_in_articulated_veh, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){
0: spriteset_BR87_BRBlue;
1: spriteset_BR87_InterCitySwallow;
2: spriteset_BR87_Virgin;
Expand Down

0 comments on commit cadaed0

Please sign in to comment.