Skip to content

Commit

Permalink
Fixed S7, S8, 1938 stock tram sprites
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Jul 31, 2024
1 parent 1005e76 commit d4a18c2
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 56 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- Added LMS Stanier P3 coach
- Added LNER Thompson 61ft FK and 63ft TK coaches
- Added AnsaldoBreda T-68 (Manchester Metrolink tram)
- Added LU S7/S8 stock Tram variants
- Added LU 1938 stock Tram Variant
- Improved LNER Teak coach windows and roofs to fit scale better
- Improved Standard 9F
- Fixed some introduction and model lifespans (set is now fully freight playable from ~1850 onwards)
Expand Down
2 changes: 1 addition & 1 deletion src/trams/Metro/LU1938_Tram.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ item (FEAT_ROADVEHS, item_TRAM_LU1938, 490) {
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_emu),string(str_LU1938_usage),string(str_LU1938_eos),string(str_LU1938_liveries)));
cargo_subtype_text: sw_TRAM_LU1938_cargo_subtype_text;
articulated_part: switch_articulated_TRAM_LU1938;
default: sw_TRAM_LU1938a;
default: sw_TRAM_LU1938;
purchase: spriteset_TRAM_LU1938_Purchase;
cargo_capacity: return(141 * param_pax / 8);
cost_factor: return(GetAdjustedCostTRAM(61));
Expand Down
55 changes: 0 additions & 55 deletions src/trams/Metro/LUS7S8_Tram.pnml
Original file line number Diff line number Diff line change
@@ -1,58 +1,3 @@
spriteset(spriteset_TRAM_LUS7S8_Purchase, "gfx/Metro/LU_S7S8.png") {
template_purchase(200, 0)
}

spriteset(spriteset_TRAM_LULS7S8_front_TfL, "gfx/Metro/LU_S7S8.png") {
template_tram32px(0, 0)
}
spriteset(spriteset_TRAM_LULS7S8_middle_TfL, "gfx/Metro/LU_S7S8.png") {
template_tram32px(0, 26)
}
spriteset(spriteset_TRAM_LULS7S8_rear_TfL, "gfx/Metro/LU_S7S8.png") {
template_tram32px(0, 52)
}


switch(FEAT_ROADVEHS,SELF, sw_TRAM_LULS_front,cargo_subtype){
0: spriteset_TRAM_LULS7S8_front_TfL;
}

switch(FEAT_ROADVEHS,SELF, sw_TRAM_LULS_middle,cargo_subtype){
0: spriteset_TRAM_LULS7S8_middle_TfL;
}

switch(FEAT_ROADVEHS,SELF, sw_TRAM_LULS_rear,cargo_subtype){
0: spriteset_TRAM_LULS7S8_rear_TfL;
}

switch (FEAT_ROADVEHS, SELF, switch_articulated_TRAM_LULS7, extra_callback_info1) {
1..6: return item_TRAM_LULS7;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

switch (FEAT_ROADVEHS, SELF, switch_articulated_TRAM_LULS8, extra_callback_info1) {
1..7: return item_TRAM_LULS8;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

switch(FEAT_ROADVEHS,SELF,sw_TRAM_LULS_cargo_subtype_text,cargo_subtype){
0: return string(str_LU_TfL);
return CB_RESULT_NO_TEXT;
}

switch (FEAT_ROADVEHS, SELF, switch_TRAM_LULS7, position_in_articulated_veh) {
1: spriteset_TRAM_LULS7S8_front_TfL;
6: spriteset_TRAM_LULS7S8_rear_TfL;
spriteset_TRAM_LULS7S8_middle_TfL;
}

switch (FEAT_ROADVEHS, SELF, switch_TRAM_LULS8, position_in_articulated_veh) {
1: spriteset_TRAM_LULS7S8_front_TfL;
7: spriteset_TRAM_LULS7S8_rear_TfL;
spriteset_TRAM_LULS7S8_middle_TfL;
}


item (FEAT_ROADVEHS, item_TRAM_LULS7, 292) {
property {
misc_flags: bitmask(ROADVEH_FLAG_TRAM);
Expand Down
7 changes: 7 additions & 0 deletions src/trams/_spriteset/LU1938_Tram_sprites.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,11 @@ switch(FEAT_ROADVEHS,SELF,sw_TRAM_LU1938_cargo_subtype_text,cargo_subtype){
0: return string(str_LU_TfL);
1: return string(str_LU_Alt);
return CB_RESULT_NO_TEXT;
}

switch(FEAT_ROADVEHS, SELF, sw_TRAM_LU1938, position_in_articulated_veh)
{
0: sw_TRAM_LU1938a;
7: sw_TRAM_LU1938b;
sw_TRAM_LU1938c;
}
55 changes: 55 additions & 0 deletions src/trams/_spriteset/LUS7S8_sprites.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
spriteset(spriteset_TRAM_LUS7S8_Purchase, "gfx/Metro/LU_S7S8.png") {
template_purchase(200, 0)
}

spriteset(spriteset_TRAM_LULS7S8_front_TfL, "gfx/Metro/LU_S7S8.png") {
template_tram32px(0, 0)
}
spriteset(spriteset_TRAM_LULS7S8_middle_TfL, "gfx/Metro/LU_S7S8.png") {
template_tram32px(0, 26)
}
spriteset(spriteset_TRAM_LULS7S8_rear_TfL, "gfx/Metro/LU_S7S8.png") {
template_tram32px(0, 52)
}


switch(FEAT_ROADVEHS,SELF, sw_TRAM_LULS_front,cargo_subtype){
0: spriteset_TRAM_LULS7S8_front_TfL;
}

switch(FEAT_ROADVEHS,SELF, sw_TRAM_LULS_middle,cargo_subtype){
0: spriteset_TRAM_LULS7S8_middle_TfL;
}

switch(FEAT_ROADVEHS,SELF, sw_TRAM_LULS_rear,cargo_subtype){
0: spriteset_TRAM_LULS7S8_rear_TfL;
}

switch (FEAT_ROADVEHS, SELF, switch_articulated_TRAM_LULS7, extra_callback_info1) {
1..6: return item_TRAM_LULS7;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

switch (FEAT_ROADVEHS, SELF, switch_articulated_TRAM_LULS8, extra_callback_info1) {
1..7: return item_TRAM_LULS8;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

switch(FEAT_ROADVEHS,SELF,sw_TRAM_LULS_cargo_subtype_text,cargo_subtype){
0: return string(str_LU_TfL);
return CB_RESULT_NO_TEXT;
}

switch (FEAT_ROADVEHS, SELF, switch_TRAM_LULS7, position_in_articulated_veh) {
0: spriteset_TRAM_LULS7S8_front_TfL;
6: spriteset_TRAM_LULS7S8_rear_TfL;
spriteset_TRAM_LULS7S8_middle_TfL;
}

switch (FEAT_ROADVEHS, SELF, switch_TRAM_LULS8, position_in_articulated_veh) {
0: spriteset_TRAM_LULS7S8_front_TfL;
7: spriteset_TRAM_LULS7S8_rear_TfL;
spriteset_TRAM_LULS7S8_middle_TfL;
}


0 comments on commit d4a18c2

Please sign in to comment.