diff --git a/docs/SpriteIDs.xlsx b/docs/SpriteIDs.xlsx index cf483e7c..ad230c14 100644 Binary files a/docs/SpriteIDs.xlsx and b/docs/SpriteIDs.xlsx differ diff --git a/gfx/BR504.png b/gfx/BR504.png index a822057f..1b856e52 100644 Binary files a/gfx/BR504.png and b/gfx/BR504.png differ diff --git a/lang/english.lng b/lang/english.lng index a751bf24..6882b42f 100644 --- a/lang/english.lng +++ b/lang/english.lng @@ -895,6 +895,11 @@ str_BR73GatEx_eos :1999 str_BR73GatEx_liveries :Gatwick Express BR488 :Class 488 Coach +STR_NAME_BR504 :British Rail Class 504 +str_BR504_usage :Urban Passenger +str_BR504_eos :--- +str_BR504_liveries :BR Blue, BR Green, GMPTE, BR Blue (Wlternate), BR Blue (Wraparound) + STR_NAME_BR507 :British Rail Class 507 str_BR507_usage :Urban Passenger str_BR507_eos :--- @@ -1203,6 +1208,8 @@ str_BangerBlue_Stripe : (Banger Blue with White Stripe) str_BP : (BP) str_BRBlack : (BR Black) str_BRBlue : (BR Blue) +str_BRBlueAlt : (BR Blue - Alternate) +str_BRBlueWrap : (BR Blue - Wraparound) str_BRBlueHeadlight : (BR Blue with Headlight) str_BRBlueGrey : (BR Blue Grey) str_BRBlueCentre : (BR Blue - Centre Headcode) diff --git a/src/sortpurchase.pnml b/src/sortpurchase.pnml index 260555ec..cdf24756 100644 --- a/src/sortpurchase.pnml +++ b/src/sortpurchase.pnml @@ -159,6 +159,7 @@ sort(FEAT_TRAINS, [ item_BR480, item_BR483, item_BR484, + item_BR504, item_BR507, item_BR508_1, item_BR508_2, diff --git a/src/trains/_spriteset/EMU_Sprites/504.pnml b/src/trains/_spriteset/EMU_Sprites/504.pnml new file mode 100644 index 00000000..434d91ea --- /dev/null +++ b/src/trains/_spriteset/EMU_Sprites/504.pnml @@ -0,0 +1,77 @@ +spriteset(spriteset_BR504_Purchase, "gfx/BR504.png") { + template_purchase(0, 0) +} + +spriteset(spriteset_BR504a_BRBlue, "gfx/BR504.png") { + template_train32px(0, 13) +} +spriteset(spriteset_BR504b_BRBlue, "gfx/BR504.png") { + template_train32px(0, 38) +} +spriteset(spriteset_BR504c_BRBlue, "gfx/BR504.png") { + template_train32px(0, 63) +} + +spriteset(spriteset_BR504a_GMPTE, "gfx/BR504.png") { + template_train32px(0, 88) +} +spriteset(spriteset_BR504b_GMPTE, "gfx/BR504.png") { + template_train32px(0, 113) +} +spriteset(spriteset_BR504c_GMPTE, "gfx/BR504.png") { + template_train32px(0, 138) +} + +spriteset(spriteset_BR504a_BRGreen, "gfx/BR504.png") { + template_train32px(0, 163) +} +spriteset(spriteset_BR504b_BRGreen, "gfx/BR504.png") { + template_train32px(0, 188) +} +spriteset(spriteset_BR504c_BRGreen, "gfx/BR504.png") { + template_train32px(0, 213) +} + +spriteset(spriteset_BR504a_BRBlueAlt, "gfx/BR504.png") { + template_train32px(0, 238) +} +spriteset(spriteset_BR504b_BRBlueAlt, "gfx/BR504.png") { + template_train32px(0, 263) +} +spriteset(spriteset_BR504c_BRBlueAlt, "gfx/BR504.png") { + template_train32px(0, 288) +} + +spriteset(spriteset_BR504a_BRBlueWrap, "gfx/BR504.png") { + template_train32px(0, 313) +} +spriteset(spriteset_BR504b_BRBlueWrap, "gfx/BR504.png") { + template_train32px(0, 338) +} +spriteset(spriteset_BR504c_BRBlueWrap, "gfx/BR504.png") { + template_train32px(0, 363) +} + +switch(FEAT_TRAINS,SELF, sw_BR504a,cargo_subtype){ + 0: spriteset_BR504a_BRBlue; + 1: spriteset_BR504a_GMPTE; + 2: spriteset_BR504a_BRGreen; + 3: spriteset_BR504a_BRBlueAlt; + 4: spriteset_BR504a_BRBlueWrap; +} + +switch(FEAT_TRAINS,SELF, sw_BR504b,cargo_subtype){ + 0: spriteset_BR504b_BRBlue; + 1: spriteset_BR504b_GMPTE; + 2: spriteset_BR504b_BRGreen; + 3: spriteset_BR504b_BRBlueAlt; + 4: spriteset_BR504b_BRBlueWrap; +} + +switch(FEAT_TRAINS,SELF, sw_BR504c,cargo_subtype){ + 0: spriteset_BR504c_BRBlue; + 1: spriteset_BR504c_GMPTE; + 2: spriteset_BR504c_BRGreen; + 3: spriteset_BR504c_BRBlueAlt; + 4: spriteset_BR504c_BRBlueWrap; +} \ No newline at end of file diff --git a/src/trains/emu/BR504.pnml b/src/trains/emu/BR504.pnml new file mode 100644 index 00000000..36009675 --- /dev/null +++ b/src/trains/emu/BR504.pnml @@ -0,0 +1,67 @@ +switch(FEAT_TRAINS, SELF, switch_br504_spriteset, position_in_articulated_veh % 2) { + 0: sw_BR504a; + sw_BR504b; +} + +switch (FEAT_TRAINS, SELF, switch_articulated_BR504, extra_callback_info1) { + 1: return item_BR504; + return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts +} + +switch(FEAT_TRAINS,SELF,sw_BR504_cargo_subtype_text,cargo_subtype){ + 0: return string(str_BRBlue); + 1: return string(str_GMPTE); + 2: return string(str_BRGreen); + 3: return string(str_BRBlueAlt); + 4: return string(str_BRBlueWrap); + return CB_RESULT_NO_TEXT; +} + +item (FEAT_TRAINS, item_BR504, 577) { + property { + name: string(STR_NAME_BR504); + climates_available: ALL_CLIMATES; + introduction_date: date(1959,4,21); + 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: 65; + running_cost_factor: 38; + sprite_id: SPRITE_ID_NEW_TRAIN; + speed: 65 mph; + misc_flags: TRAIN_FLAG_MU; + refit_cost: 0; + track_type: BR_3RDR; + ai_special_flag: AI_FLAG_CARGO; + power: 561 hp; + running_cost_base: RUNNING_COST_ELECTRIC; + dual_headed: 0; + default_cargo_type: PASS; + cargo_capacity: 90; + weight: 41 ton; + engine_class: ENGINE_CLASS_ELECTRIC; + tractive_effort_coefficient: 0.07; + air_drag_coefficient: 0.07; + length: 8; + effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_ELECTRIC; + extra_weight_per_wagon: 0; + bitmask_vehicle_info: 0; + cargo_age_period: 185; + } + graphics { + additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_emu),string(str_route_2),string(str_BR504_usage),string(str_BR504_eos),string(str_BR504_liveries))); + can_attach_wagon: CB_RESULT_ATTACH_ALLOW; + cargo_subtype_text: sw_BR504_cargo_subtype_text; + articulated_part: switch_articulated_BR504; + default: switch_br504_spriteset; + purchase: spriteset_BR504_Purchase; + colour_mapping: return PALETTE_CC_FIRST; + create_effect: electric_create_visual_effect; + sound_effect: sw_classic_emu_sound; + cargo_capacity: return(90 * param_pax); +} +} \ No newline at end of file