Skip to content

Commit

Permalink
Added LU 1938 Stock as Tram
Browse files Browse the repository at this point in the history
Needs moving to new sprite template
  • Loading branch information
audigex committed Jul 25, 2024
1 parent 957d83d commit adc3c7e
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 43 deletions.
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
43 changes: 43 additions & 0 deletions src/trams/LU1938_Tram.pnml
Original file line number Diff line number Diff line change
@@ -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;

}
}
85 changes: 42 additions & 43 deletions src/trams/_spriteset/LU1938_Tram_sprites.pnml
Original file line number Diff line number Diff line change
@@ -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;
// }
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;
}

0 comments on commit adc3c7e

Please sign in to comment.