diff --git a/gfx/Diesel/20.png b/gfx/Diesel/20.png index 7406008..1a3e888 100644 Binary files a/gfx/Diesel/20.png and b/gfx/Diesel/20.png differ diff --git a/lang/english.lng b/lang/english.lng index a188148..6a70a9e 100644 --- a/lang/english.lng +++ b/lang/english.lng @@ -1545,6 +1545,7 @@ str_Biffa : (Biffa) str_BlackpoolTransport : (Blackpool Transport) str_BoltonCorporation : (BoltonCorporation) str_BP : (BP) +str_BR2ToneGrey : (BR - 2 Tone Grey) str_BRBlack : (BR - Black) str_BRBlue : (BR - Blue) str_BRBlueAlt : (BR - Blue, Alternate) @@ -1574,6 +1575,7 @@ str_BRMaroon : (BR - Maroon) str_BROchre : (BR - Golden Ochre) str_BRPrototype : (BR - Prototype) str_BRProvincial : (BR - Provincial) +str_BRRailfreightGrey : (BR - Railfreight Grey) str_BRResearch : (BR - Research Department) str_BRRefurb : (BR - Refurbished) str_BRTransitionalRed : (BR - TransitionalRed) diff --git a/src/templates_trains.pnml b/src/templates_trains.pnml index bcf4d06..72defb3 100644 --- a/src/templates_trains.pnml +++ b/src/templates_trains.pnml @@ -27,7 +27,6 @@ template template_train8px(x,y){ [ x+71, y, 10, 13, -5, -11] //nw } - template template_train12px(x,y){ //left_x, upper_y, width, height, offset_x, offset_y [ x, y, 8, 15, -3, -12] //n @@ -52,7 +51,7 @@ template template_train16px(x,y){ [ x+99, y, 14, 15, -5, -11] //nw } -template template_train20px(x,y){ // Clone to 4view when changed +template template_train20px(x,y){ //left_x, upper_y, width, height, offset_x, offset_y [ x, y, 8, 19, -3, -13] // n [ x+9, y, 16, 16, -7, -12] //ne @@ -63,6 +62,17 @@ template template_train20px(x,y){ // Clone to 4view when changed [ x+91, y, 21, 13, -15, -9] //w [ x+113, y, 16, 16, -5, -11] //nw } +template template_train20px_reversed(x,y){ + //left_x, upper_y, width, height, offset_x, offset_y + [ x+65, y, 8, 19, -3, -13] //s as n + [ x+74, y, 16, 16, -7, -12] //sw as ne + [ x+91, y, 21, 13, -8, -9] //w as e + [ x+113, y, 16, 16, 0, -8] //nw as se (might be -1 -8 with the class 20 sprite NW being wrong?) + [ x, y, 8, 19, -3, -13] // n as s + [ x+9, y, 16, 16, -13, -9] //ne as sw + [ x+26, y, 21, 13, -15, -9] //e as w + [ x+48, y, 16, 16, -5, -11] //se as nw +} template template_train24px(x,y){ //left_x, upper_y, width, height, offset_x, offset_y diff --git a/src/trains/diesel_loco/20.pnml b/src/trains/diesel_loco/20.pnml index fa0acb1..da9e613 100644 --- a/src/trains/diesel_loco/20.pnml +++ b/src/trains/diesel_loco/20.pnml @@ -5,13 +5,75 @@ spriteset(spriteset_BR20_Purchase, "gfx/Diesel/20.png") { spriteset(spriteset_BR20_BRBlue, "gfx/Diesel/20.png") { template_train20px(0, 13) } +spriteset(spriteset_BR20_reversed_BRBlue, "gfx/Diesel/20.png") { + template_train20px_reversed(0, 13) +} + +spriteset(spriteset_BR20_GBRf, "gfx/Diesel/20.png") { + template_train20px(0, 39) +} +spriteset(spriteset_BR20_reversed_GBRf, "gfx/Diesel/20.png") { + template_train20px_reversed(0, 39) +} + +spriteset(spriteset_BR20_GBRf2Tone, "gfx/Diesel/20.png") { + template_train20px(0, 65) +} +spriteset(spriteset_BR20_reversed_GBRf2Tone, "gfx/Diesel/20.png") { + template_train20px_reversed(0, 65) +} + +spriteset(spriteset_BR20_BR2Tone, "gfx/Diesel/20.png") { + template_train20px(0, 91) +} +spriteset(spriteset_BR20_reversed_BR2Tone, "gfx/Diesel/20.png") { + template_train20px_reversed(0, 91) +} + +spriteset(spriteset_BR20_EWS, "gfx/Diesel/20.png") { + template_train20px(0, 117) +} +spriteset(spriteset_BR20_reversed_EWS, "gfx/Diesel/20.png") { + template_train20px_reversed(0, 117) +} + +spriteset(spriteset_BR20_BRRailfreightGrey, "gfx/Diesel/20.png") { + template_train20px(0, 143) +} +spriteset(spriteset_BR20_reversed_BRRailfreightGrey, "gfx/Diesel/20.png") { + template_train20px_reversed(0, 143) +} + +switch(FEAT_TRAINS,SELF, sw_BR20_normal,cargo_subtype){ + 0: spriteset_BR20_BRRailfreightGrey; + 1: spriteset_BR20_BRBlue; + 2: spriteset_BR20_GBRf; + 3: spriteset_BR20_GBRf2Tone; + 4: spriteset_BR20_BR2Tone; + 5: spriteset_BR20_EWS; +} +switch(FEAT_TRAINS,SELF, sw_BR20_reversed,cargo_subtype){ + 0: spriteset_BR20_reversed_BRRailfreightGrey; + 1: spriteset_BR20_reversed_BRBlue; + 2: spriteset_BR20_reversed_GBRf; + 3: spriteset_BR20_reversed_GBRf2Tone; + 4: spriteset_BR20_reversed_BR2Tone; + 5: spriteset_BR20_reversed_EWS; +} -switch(FEAT_TRAINS,SELF, sw_BR20,cargo_subtype){ - 0: spriteset_BR20_BRBlue; +// Automatically flip second vehicle +switch(FEAT_TRAINS,SELF, sw_BR20, position_in_consist % 2){ + 0: sw_BR20_reversed; + sw_BR20_normal; } switch(FEAT_TRAINS,SELF,sw_BR20_cargo_subtype_text,cargo_subtype){ - 0: return string(str_BRBlue); + 0: return string(str_BRRailfreightGrey); + 1: return string(str_BRBlue); + 2: return string(str_GBRf); + 3: return string(str_GBRf2ToneGrey); + 4: return string(str_BR2ToneGrey); + 5: return string(str_EWSRed); return CB_RESULT_NO_TEXT; }