From adc3c7e52f66c55c6cff0f9518685722f443fd77 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 25 Jul 2024 18:53:34 +0100 Subject: [PATCH] Added LU 1938 Stock as Tram Needs moving to new sprite template --- docs/changelog.txt | 1 + src/trams/LU1938_Tram.pnml | 43 ++++++++++ src/trams/_spriteset/LU1938_Tram_sprites.pnml | 85 +++++++++---------- 3 files changed, 86 insertions(+), 43 deletions(-) create mode 100644 src/trams/LU1938_Tram.pnml diff --git a/docs/changelog.txt b/docs/changelog.txt index c8fd7188..45f7d845 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,6 +1,7 @@ # In progress/nightly releases, not yet on BaNaNaS (may require debug mode parameter to be enabled, graphics may not yet be coded etc) - Furness Railway Railmotor? - LNER P2 Streamlined version (gfx done need coding) +- LU 1938 Stock as Tram # v2.12 - Added LMS Black 5 diff --git a/src/trams/LU1938_Tram.pnml b/src/trams/LU1938_Tram.pnml new file mode 100644 index 00000000..6ef976b0 --- /dev/null +++ b/src/trams/LU1938_Tram.pnml @@ -0,0 +1,43 @@ +item (FEAT_ROADVEHS, item_TRAM_LU1938, 700) { + property { + misc_flags: bitmask(ROADVEH_FLAG_TRAM); + name: string(STR_NAME_LU1938); + climates_available: ALL_CLIMATES; + introduction_date: date(1938,1,1); + model_life: 15; + retire_early: 1; + vehicle_life: 50; + reliability_decay: 7; + refittable_cargo_classes: CC_PASSENGERS; + cargo_allow_refit: [PASS, TOUR]; + loading_speed: 25; + cost_factor: 61; + running_cost_factor: 37; + sprite_id: SPRITE_ID_NEW_TRAIN; + speed: 60 mph; + power: 2500 hp; + refit_cost: 0; + running_cost_base: RUNNING_COST_ROADVEH; + default_cargo_type: PASS; + cargo_capacity: 1; + weight: 1 ton; + tractive_effort_coefficient: 0.08; + air_drag_coefficient: 0.05; + length: 8; + cargo_age_period: 185; + } + graphics { + 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; + purchase: spriteset_TRAM_LU1938_Purchase; + cargo_capacity: return(141 * param_pax / 8); + cost_factor: return(GetAdjustedCostTRAM(61)); + running_cost_factor: return(GetAdjustedCostTRAM(37)); + weight: 197; + power: 2500; + colour_mapping: return PALETTE_CC_FIRST; + +} +} \ No newline at end of file diff --git a/src/trams/_spriteset/LU1938_Tram_sprites.pnml b/src/trams/_spriteset/LU1938_Tram_sprites.pnml index 2284caa5..d35c4d50 100644 --- a/src/trams/_spriteset/LU1938_Tram_sprites.pnml +++ b/src/trams/_spriteset/LU1938_Tram_sprites.pnml @@ -1,50 +1,49 @@ -// spriteset(spriteset_TRAM_LU1938_Purchase, "gfx/Metro/LU_1938.png") { -// template_purchase(0, 0) -// } +spriteset(spriteset_TRAM_LU1938_Purchase, "gfx/Metro/LU_1938.png") { + template_purchase(0, 0) +} -// spriteset(spriteset_TRAM_LU1938a_LURedRoof, "gfx/Metro/LU_1938.png") { -// template_tram32px(0, 13) -// } -// spriteset(spriteset_TRAM_LU1938b_LURedRoof, "gfx/Metro/LU_1938.png") { -// template_tram32px(0, 38) -// } -// spriteset(spriteset_TRAM_LU1938c_LURedRoof, "gfx/Metro/LU_1938.png") { -// template_tram32px(0, 63) -// } +spriteset(spriteset_TRAM_LU1938a_LURedRoof, "gfx/Metro/LU_1938.png") { + template_tram32px(0, 13) +} +spriteset(spriteset_TRAM_LU1938b_LURedRoof, "gfx/Metro/LU_1938.png") { + template_tram32px(0, 38) +} +spriteset(spriteset_TRAM_LU1938c_LURedRoof, "gfx/Metro/LU_1938.png") { + template_tram32px(0, 63) +} -// spriteset(spriteset_TRAM_LU1938a_LUGreyRoof, "gfx/Metro/LU_1938.png") { -// template_tram32px(0, 88) -// } -// spriteset(spriteset_TRAM_LU1938b_LUGreyRoof, "gfx/Metro/LU_1938.png") { -// template_tram32px(0, 113) -// } -// spriteset(spriteset_TRAM_LU1938c_LUGreyRoof, "gfx/Metro/LU_1938.png") { -// template_tram32px(0, 138) -// } +spriteset(spriteset_TRAM_LU1938a_LUGreyRoof, "gfx/Metro/LU_1938.png") { + template_tram32px(0, 88) +} +spriteset(spriteset_TRAM_LU1938b_LUGreyRoof, "gfx/Metro/LU_1938.png") { + template_tram32px(0, 113) +} +spriteset(spriteset_TRAM_LU1938c_LUGreyRoof, "gfx/Metro/LU_1938.png") { + template_tram32px(0, 138) +} -// switch(FEAT_ROADVEHS,SELF, sw_TRAM_LU1938a,cargo_subtype){ -// 0:spriteset_TRAM_LU1938a_LUGreyRoof; -// 1:spriteset_TRAM_LU1938a_LURedRoof; -// } +switch(FEAT_ROADVEHS,SELF, sw_TRAM_LU1938a,cargo_subtype){ + 0:spriteset_TRAM_LU1938a_LUGreyRoof; + 1:spriteset_TRAM_LU1938a_LURedRoof; +} -// switch(FEAT_ROADVEHS,SELF, sw_TRAM_LU1938b,cargo_subtype){ -// 0:spriteset_TRAM_LU1938b_LUGreyRoof; -// 1:spriteset_TRAM_LU1938b_LURedRoof; -// } +switch(FEAT_ROADVEHS,SELF, sw_TRAM_LU1938b,cargo_subtype){ + 0:spriteset_TRAM_LU1938b_LUGreyRoof; + 1:spriteset_TRAM_LU1938b_LURedRoof; +} -// switch(FEAT_ROADVEHS,SELF, sw_TRAM_LU1938c,cargo_subtype){ -// 0:spriteset_TRAM_LU1938c_LUGreyRoof; -// 1:spriteset_TRAM_LU1938c_LURedRoof; -// } +switch(FEAT_ROADVEHS,SELF, sw_TRAM_LU1938c,cargo_subtype){ + 0:spriteset_TRAM_LU1938c_LUGreyRoof; + 1:spriteset_TRAM_LU1938c_LURedRoof; +} -// switch (FEAT_ROADVEHS, SELF, switch_articulated_TRAM_LU1938, extra_callback_info1) { -// 1..6: return item_TRAM_LU1938c; -// 7: return item_TRAM_LU1938b; -// return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts -// } +switch (FEAT_ROADVEHS, SELF, switch_articulated_TRAM_LU1938, extra_callback_info1) { + 1..7: return item_TRAM_LU1938; + return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts +} -// 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; -// } \ No newline at end of file +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; +} \ No newline at end of file