diff --git a/docs/SpriteIDs.xlsx b/docs/SpriteIDs.xlsx index 7a8bca03..427a8963 100644 Binary files a/docs/SpriteIDs.xlsx and b/docs/SpriteIDs.xlsx differ diff --git a/gfx/BR91.png b/gfx/BR91.png index a13fee85..bb128392 100644 Binary files a/gfx/BR91.png and b/gfx/BR91.png differ diff --git a/lang/english.lng b/lang/english.lng index c14a9e7c..d8b90e54 100644 --- a/lang/english.lng +++ b/lang/english.lng @@ -404,6 +404,7 @@ str_BR90_eos :--- str_BR90_liveries :Intercity Swallow, Freightliner Grey, EWS, DB, Freightliner Green, Freightliner Powerhaul, ONE, Greater Anglie Blue, Greater Anglia White, Virgin, REX, First Scotrail, GNER STR_NAME_BR91 :British Rail Class 91 'Intercity 225' +STR_NAME_BR91_Standalone :British Rail Class 91 (Standalone) str_BR91_usage :Express Passenger str_BR91_eos :--- str_BR91_liveries :Intercity Swallow, National Express, GNER, East Coast, Virgin East Coast diff --git a/src/sortpurchase.pnml b/src/sortpurchase.pnml index 987e3e5c..36597ed9 100644 --- a/src/sortpurchase.pnml +++ b/src/sortpurchase.pnml @@ -42,6 +42,7 @@ sort(FEAT_TRAINS, [ item_BR89, item_BR90, item_BR91, + item_BR91Standalone, item_BluePullman_6Car, // Don't really belong anywhere but after the IC225 and before the DMUs seems to fit item_BluePullman_8Car, // Don't really belong anywhere but after the IC225 and before the DMUs seems to fit item_BR121, diff --git a/src/trains/_spriteset/Electric_Sprites/91.pnml b/src/trains/_spriteset/Electric_Sprites/91.pnml index 25cefce4..4e8c35a2 100644 --- a/src/trains/_spriteset/Electric_Sprites/91.pnml +++ b/src/trains/_spriteset/Electric_Sprites/91.pnml @@ -2,6 +2,10 @@ spriteset(spriteset_BR91_Purchase, "gfx/BR91.png") { template_purchase(0, 0) } +spriteset(spriteset_BR91Standalone_Purchase, "gfx/BR91.png") { + template_purchase(262, 0) +} + spriteset(spriteset_BR91_IntercitySwallow, "gfx/BR91.png") { template_train32px(0, 13) } @@ -42,4 +46,128 @@ spriteset(spriteset_BR91_LNER, "gfx/BR91.png") { } spriteset(spriteset_BR91_LNERr, "gfx/BR91.png") { template_train32px(172, 638) +} + + +// This switch called when displaying as this locomotive +// WARNING: If editing this, also edit PushPull.pnml in the Spritesets folder +// WARNING: Also edit Reversed switch below +switch(FEAT_TRAINS,SELF, sw_BR91,cargo_subtype){ + 0: spriteset_BR91_IntercitySwallow; + 1: spriteset_BR91_NatEx; + 2: spriteset_BR91_GNER; + 3: spriteset_BR91_EastCoast; + 4: spriteset_BR91_VirginEC; + 5: spriteset_BR91_LNER; +} + +// This switch called when displaying as this locomotive +// WARNING: If editing this, also edit PushPull.pnml in the Spritesets folder +// WARNING: Also edit the non-reversed switch above +switch(FEAT_TRAINS,SELF, sw_BR91_reversed,cargo_subtype){ + 0: spriteset_BRMk4DVT_IntercitySwallowr; + 1: spriteset_BRMk4DVT_NatExr; + 2: spriteset_BRMk4DVT_GNERr; + 3: spriteset_BRMk4DVT_EastCoastr; + 4: spriteset_BRMk4DVT_VirginECr; + 5: spriteset_BRMk4DVT_LNERr; +} + +switch (FEAT_TRAINS, SELF, switch_articulated_BR91, extra_callback_info1) { + 1: return item_91_BRMk4TSOE; + 2..4: return item_91_BRMk4TSO; + 5: return item_91_BRMk4TSOD; + 6: return item_91_BRMk4RFM; + 7..9: return item_91_BRMk4FO; + 10: return item_91_BRMk4DVT; + return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts +} + +switch(FEAT_TRAINS,SELF,sw_BR91_cargo_subtype_text,cargo_subtype){ + 0: return string(str_IntercitySwallow); + 1: return string(str_NatEx); + 2: return string(str_GNER); + 3: return string(str_EastCoast); + 4: return string(str_VirginECLNER); + 5: return string(str_LNER); + return CB_RESULT_NO_TEXT; +} + +switch(FEAT_TRAINS,PARENT,sw_91_front,vehicle_is_reversed){ + 0: sw_BR91; + 1: sw_BR91_reversed; +} + +switch(FEAT_TRAINS,SELF,sw_BR91_speed,param_max_speed){ + 0: return 201; + 1: return 225; +} + + +switch(FEAT_TRAINS,SELF, sw_91_BRMk4FO,cargo_subtype){ + 0: spriteset_BRMk4FO_IntercitySwallow; + 1: spriteset_BRMk4FO_NatEx; + 2: spriteset_BRMk4FO_GNER; + 3: spriteset_BRMk4FO_EastCoast; + 4: spriteset_BRMk4FO_VirginEC; + 5: spriteset_BRMk4FO_LNER; +} + +switch(FEAT_TRAINS,SELF, sw_91_BRMk4TSOE,cargo_subtype){ + 0: spriteset_BRMk4TSOE_IntercitySwallow; + 1: spriteset_BRMk4TSOE_NatEx; + 2: spriteset_BRMk4TSOE_GNER; + 3: spriteset_BRMk4TSOE_EastCoast; + 4: spriteset_BRMk4TSOE_VirginEC; + 5: spriteset_BRMk4TSOE_LNER; +} + +switch(FEAT_TRAINS,SELF, sw_91_BRMk4TSO,cargo_subtype){ + 0: spriteset_BRMk4TSO_IntercitySwallow; + 1: spriteset_BRMk4TSO_NatEx; + 2: spriteset_BRMk4TSO_GNER; + 3: spriteset_BRMk4TSO_EastCoast; + 4: spriteset_BRMk4TSO_VirginEC; + 5: spriteset_BRMk4TSO_LNER; +} + +switch(FEAT_TRAINS,SELF, sw_91_BRMk4RFM,cargo_subtype){ + 0: spriteset_BRMk4RFM_IntercitySwallow; + 1: spriteset_BRMk4RFM_NatEx; + 2: spriteset_BRMk4RFM_GNER; + 3: spriteset_BRMk4RFM_EastCoast; + 4: spriteset_BRMk4RFM_VirginEC; + 5: spriteset_BRMk4RFM_LNER; +} + +switch(FEAT_TRAINS,SELF, sw_91_BRMk4TSOD,cargo_subtype){ + 0: spriteset_BRMk4TSOD_IntercitySwallow; + 1: spriteset_BRMk4TSOD_NatEx; + 2: spriteset_BRMk4TSOD_GNER; + 3: spriteset_BRMk4TSOD_EastCoast; + 4: spriteset_BRMk4TSOD_VirginEC; + 5: spriteset_BRMk4TSOD_LNER; +} + +switch(FEAT_TRAINS,SELF, sw_91_BRMk4DVT,cargo_subtype){ + 0: spriteset_BRMk4DVT_IntercitySwallow; + 1: spriteset_BRMk4DVT_NatEx; + 2: spriteset_BRMk4DVT_GNER; + 3: spriteset_BRMk4DVT_EastCoast; + 4: spriteset_BRMk4DVT_VirginEC; + 5: spriteset_BRMk4DVT_LNER; +} + +switch(FEAT_TRAINS,SELF, sw_91_BRMk4DVT_reversed,cargo_subtype){ + 0: spriteset_BR91_IntercitySwallowr; + 1: spriteset_BR91_NatExr; + 2: spriteset_BR91_GNERr; + 3: spriteset_BR91_EastCoastr; + 4: spriteset_BR91_VirginECr; + 5: spriteset_BR91_LNERr; +} + +switch(FEAT_TRAINS,PARENT,sw_91_rear,vehicle_is_reversed){ + 0: sw_91_BRMk4DVT; + 1: sw_91_BRMk4DVT_reversed; } \ No newline at end of file diff --git a/src/trains/_spriteset/PushPull.pnml b/src/trains/_spriteset/PushPull.pnml index 52895030..f604b5e2 100644 --- a/src/trains/_spriteset/PushPull.pnml +++ b/src/trains/_spriteset/PushPull.pnml @@ -118,4 +118,14 @@ switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR90, [STORE_TEMP(0 - position_in_a 11: spriteset_BR90_FirstScotrail; 12: spriteset_BR90_GNER; return CB_RESULT_NO_TEXT; +} + +// Mirror of BR91 (IC225.pnml) +switch(FEAT_TRAINS, PARENT, sw_PUSHPULL_DVTasBR91, [STORE_TEMP(0 - position_in_articulated_veh, 0x10F), var[0x61, 0, 0x0000FFFF, 0xF2]]){ + 0: spriteset_BR91_IntercitySwallowr; + 1: spriteset_BR91_NatExr; + 2: spriteset_BR91_GNERr; + 3: spriteset_BR91_EastCoastr; + 4: spriteset_BR91_VirginECr; + 5: spriteset_BR91_LNERr; } \ No newline at end of file diff --git a/src/trains/_spriteset/Rolling Stock_Sprites/Mk4DVT.pnml b/src/trains/_spriteset/Rolling Stock_Sprites/Mk4DVT.pnml index 5ff1f044..0fd49c8a 100644 --- a/src/trains/_spriteset/Rolling Stock_Sprites/Mk4DVT.pnml +++ b/src/trains/_spriteset/Rolling Stock_Sprites/Mk4DVT.pnml @@ -61,6 +61,7 @@ switch(FEAT_TRAINS, PARENT, sw_BRMk4DVT_PushPUll, [STORE_TEMP(0 - position_in_ar 196: sw_PUSHPULL_DVTasBR68; // Class 68 418: sw_PUSHPULL_DVTasBR89; // Class 89 543: sw_PUSHPULL_DVTasBR90; // Class 90 + 588: sw_PUSHPULL_DVTasBR91; // Class 91 sw_BRMk4DVT; // No compatible locomotive found, show normal sprites } diff --git a/src/trains/electric/BR91.pnml b/src/trains/electric/BR91_IC225.pnml similarity index 68% rename from src/trains/electric/BR91.pnml rename to src/trains/electric/BR91_IC225.pnml index b9481404..5810b618 100644 --- a/src/trains/electric/BR91.pnml +++ b/src/trains/electric/BR91_IC225.pnml @@ -1,51 +1,3 @@ -switch(FEAT_TRAINS,SELF, sw_BR91,cargo_subtype){ - 0: spriteset_BR91_IntercitySwallow; - 1: spriteset_BR91_NatEx; - 2: spriteset_BR91_GNER; - 3: spriteset_BR91_EastCoast; - 4: spriteset_BR91_VirginEC; - 5: spriteset_BR91_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_BR91_reversed,cargo_subtype){ - 0: spriteset_BRMk4DVT_IntercitySwallowr; - 1: spriteset_BRMk4DVT_NatExr; - 2: spriteset_BRMk4DVT_GNERr; - 3: spriteset_BRMk4DVT_EastCoastr; - 4: spriteset_BRMk4DVT_VirginECr; - 5: spriteset_BRMk4DVT_LNERr; -} - -switch (FEAT_TRAINS, SELF, switch_articulated_BR91, extra_callback_info1) { - 1: return item_91_BRMk4TSOE; - 2..4: return item_91_BRMk4TSO; - 5: return item_91_BRMk4TSOD; - 6: return item_91_BRMk4RFM; - 7..9: return item_91_BRMk4FO; - 10: return item_91_BRMk4DVT; - return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts -} - -switch(FEAT_TRAINS,SELF,sw_BR91_cargo_subtype_text,cargo_subtype){ - 0: return string(str_IntercitySwallow); - 1: return string(str_NatEx); - 2: return string(str_GNER); - 3: return string(str_EastCoast); - 4: return string(str_VirginECLNER); - 5: return string(str_LNER); - return CB_RESULT_NO_TEXT; -} - -switch(FEAT_TRAINS,PARENT,sw_91_front,vehicle_is_reversed){ - 0: sw_BR91; - 1: sw_BR91_reversed; -} - -switch(FEAT_TRAINS,SELF,sw_BR91_speed,param_max_speed){ - 0: return 201; - 1: return 225; -} - item (FEAT_TRAINS, item_BR91, 108) { property { name: string(STR_NAME_BR91); @@ -95,74 +47,6 @@ item (FEAT_TRAINS, item_BR91, 108) { } } -switch(FEAT_TRAINS,SELF, sw_91_BRMk4FO,cargo_subtype){ - 0: spriteset_BRMk4FO_IntercitySwallow; - 1: spriteset_BRMk4FO_NatEx; - 2: spriteset_BRMk4FO_GNER; - 3: spriteset_BRMk4FO_EastCoast; - 4: spriteset_BRMk4FO_VirginEC; - 5: spriteset_BRMk4FO_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4TSOE,cargo_subtype){ - 0: spriteset_BRMk4TSOE_IntercitySwallow; - 1: spriteset_BRMk4TSOE_NatEx; - 2: spriteset_BRMk4TSOE_GNER; - 3: spriteset_BRMk4TSOE_EastCoast; - 4: spriteset_BRMk4TSOE_VirginEC; - 5: spriteset_BRMk4TSOE_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4TSO,cargo_subtype){ - 0: spriteset_BRMk4TSO_IntercitySwallow; - 1: spriteset_BRMk4TSO_NatEx; - 2: spriteset_BRMk4TSO_GNER; - 3: spriteset_BRMk4TSO_EastCoast; - 4: spriteset_BRMk4TSO_VirginEC; - 5: spriteset_BRMk4TSO_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4RFM,cargo_subtype){ - 0: spriteset_BRMk4RFM_IntercitySwallow; - 1: spriteset_BRMk4RFM_NatEx; - 2: spriteset_BRMk4RFM_GNER; - 3: spriteset_BRMk4RFM_EastCoast; - 4: spriteset_BRMk4RFM_VirginEC; - 5: spriteset_BRMk4RFM_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4TSOD,cargo_subtype){ - 0: spriteset_BRMk4TSOD_IntercitySwallow; - 1: spriteset_BRMk4TSOD_NatEx; - 2: spriteset_BRMk4TSOD_GNER; - 3: spriteset_BRMk4TSOD_EastCoast; - 4: spriteset_BRMk4TSOD_VirginEC; - 5: spriteset_BRMk4TSOD_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4DVT,cargo_subtype){ - 0: spriteset_BRMk4DVT_IntercitySwallow; - 1: spriteset_BRMk4DVT_NatEx; - 2: spriteset_BRMk4DVT_GNER; - 3: spriteset_BRMk4DVT_EastCoast; - 4: spriteset_BRMk4DVT_VirginEC; - 5: spriteset_BRMk4DVT_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4DVT_reversed,cargo_subtype){ - 0: spriteset_BR91_IntercitySwallowr; - 1: spriteset_BR91_NatExr; - 2: spriteset_BR91_GNERr; - 3: spriteset_BR91_EastCoastr; - 4: spriteset_BR91_VirginECr; - 5: spriteset_BR91_LNERr; -} - -switch(FEAT_TRAINS,PARENT,sw_91_rear,vehicle_is_reversed){ - 0: sw_91_BRMk4DVT; - 1: sw_91_BRMk4DVT_reversed; -} - // The independent DVT is a separate item, item_BRMk4DVT item (FEAT_TRAINS, item_91_BRMk4DVT, 113) { property { diff --git a/src/trains/electric/BR91_Standalone.pnml b/src/trains/electric/BR91_Standalone.pnml new file mode 100644 index 00000000..7aecfbe9 --- /dev/null +++ b/src/trains/electric/BR91_Standalone.pnml @@ -0,0 +1,64 @@ +// If the rear of this consist is a compatible Driving Trailer, call that vehicles's remote sprite call switch +switch(FEAT_TRAINS, PARENT, sw_BR91_PushPUll, [STORE_TEMP(num_vehs_in_consist - 1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]) { + 585: sw_PUSHPULL_LocomotiveAsMk4DVT; // Mk4 DVT + sw_BR91; // No compatible locomotive found, show normal sprites +} + +switch(FEAT_TRAINS,PARENT,sw_BR91_CheckPosition, position_in_consist){ + 0: sw_BR91_PushPUll; // Attempt push pull + sw_BR91; // We aren't at the front of the consist, show normal sprites +} + +switch(FEAT_TRAINS,PARENT,sw_BR91_Sprites ,vehicle_is_reversed){ + 0: sw_BR91; // We're heading foward, show normal sprites + 1: sw_BR91_CheckPosition; // Attempt push pull +} + + +item (FEAT_TRAINS, item_BR91Standalone, 588) { + property { + name: string(STR_NAME_BR91_Standalone); + climates_available: ALL_CLIMATES; + introduction_date: date(1989,4,21); + model_life: 12; + retire_early: 1; + vehicle_life: 50; + reliability_decay: 7; + refittable_cargo_classes: CC_PASSENGERS; + cargo_allow_refit: [PASS, TOUR]; + loading_speed: 3; + cost_factor: 131; + running_cost_factor: 114; + sprite_id: SPRITE_ID_NEW_TRAIN; + speed: 125 mph; + misc_flags: TRAIN_FLAG_MU; + refit_cost: 0; + track_type: ELRL; + ai_special_flag: AI_FLAG_CARGO; + power: 6480 hp; + running_cost_base: RUNNING_COST_ELECTRIC; + dual_headed: 0; + default_cargo_type: PASS; + cargo_capacity: 1; + weight: 486 ton; + engine_class: ENGINE_CLASS_ELECTRIC; + tractive_effort_coefficient: 0.3; + air_drag_coefficient: 0.1; + length: 8; + effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_ELECTRIC; + extra_weight_per_wagon: 0; + bitmask_vehicle_info: 0; + } + graphics { + additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_emu),string(str_route_7),string(str_BR91_usage),string(str_BR91_eos),string(str_BR91_liveries))); + can_attach_wagon: CB_RESULT_ATTACH_ALLOW; + cargo_capacity: return 0; + cargo_subtype_text: sw_BR91_cargo_subtype_text; + default: sw_BR91_Sprites; + purchase: spriteset_BR91Standalone_Purchase; + colour_mapping: return PALETTE_CC_FIRST; + speed: sw_BR91_speed; + cost_factor: return(GetAdjustedCost(38)); + running_cost_factor: return(GetAdjustedCost(37)); +} +} \ No newline at end of file diff --git a/src/trains/electric/IC225.pnml b/src/trains/electric/IC225.pnml deleted file mode 100644 index b9481404..00000000 --- a/src/trains/electric/IC225.pnml +++ /dev/null @@ -1,382 +0,0 @@ -switch(FEAT_TRAINS,SELF, sw_BR91,cargo_subtype){ - 0: spriteset_BR91_IntercitySwallow; - 1: spriteset_BR91_NatEx; - 2: spriteset_BR91_GNER; - 3: spriteset_BR91_EastCoast; - 4: spriteset_BR91_VirginEC; - 5: spriteset_BR91_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_BR91_reversed,cargo_subtype){ - 0: spriteset_BRMk4DVT_IntercitySwallowr; - 1: spriteset_BRMk4DVT_NatExr; - 2: spriteset_BRMk4DVT_GNERr; - 3: spriteset_BRMk4DVT_EastCoastr; - 4: spriteset_BRMk4DVT_VirginECr; - 5: spriteset_BRMk4DVT_LNERr; -} - -switch (FEAT_TRAINS, SELF, switch_articulated_BR91, extra_callback_info1) { - 1: return item_91_BRMk4TSOE; - 2..4: return item_91_BRMk4TSO; - 5: return item_91_BRMk4TSOD; - 6: return item_91_BRMk4RFM; - 7..9: return item_91_BRMk4FO; - 10: return item_91_BRMk4DVT; - return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts -} - -switch(FEAT_TRAINS,SELF,sw_BR91_cargo_subtype_text,cargo_subtype){ - 0: return string(str_IntercitySwallow); - 1: return string(str_NatEx); - 2: return string(str_GNER); - 3: return string(str_EastCoast); - 4: return string(str_VirginECLNER); - 5: return string(str_LNER); - return CB_RESULT_NO_TEXT; -} - -switch(FEAT_TRAINS,PARENT,sw_91_front,vehicle_is_reversed){ - 0: sw_BR91; - 1: sw_BR91_reversed; -} - -switch(FEAT_TRAINS,SELF,sw_BR91_speed,param_max_speed){ - 0: return 201; - 1: return 225; -} - -item (FEAT_TRAINS, item_BR91, 108) { - property { - name: string(STR_NAME_BR91); - climates_available: ALL_CLIMATES; - introduction_date: date(1989,4,21); - model_life: 12; - retire_early: 1; - vehicle_life: 50; - reliability_decay: 7; - refittable_cargo_classes: CC_PASSENGERS; - cargo_allow_refit: [PASS, TOUR]; - loading_speed: 3; - cost_factor: 131; - running_cost_factor: 114; - sprite_id: SPRITE_ID_NEW_TRAIN; - speed: 125 mph; - misc_flags: TRAIN_FLAG_MU; - refit_cost: 0; - track_type: ELRL; - ai_special_flag: AI_FLAG_CARGO; - power: 6480 hp; - running_cost_base: RUNNING_COST_ELECTRIC; - dual_headed: 0; - default_cargo_type: PASS; - cargo_capacity: 1; - weight: 486 ton; - engine_class: ENGINE_CLASS_ELECTRIC; - tractive_effort_coefficient: 0.3; - air_drag_coefficient: 0.1; - length: 8; - effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_ELECTRIC; - extra_weight_per_wagon: 0; - bitmask_vehicle_info: 0; - } - graphics { - additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_emu),string(str_route_7),string(str_BR91_usage),string(str_BR91_eos),string(str_BR91_liveries))); - can_attach_wagon: CB_RESULT_ATTACH_ALLOW; - cargo_capacity: return 0; - cargo_subtype_text: sw_BR91_cargo_subtype_text; - articulated_part: switch_articulated_BR91; - default: sw_91_front; - purchase: spriteset_BR91_Purchase; - colour_mapping: return PALETTE_CC_FIRST; - speed: sw_BR91_speed; - cost_factor: return(GetAdjustedCost(38)); - running_cost_factor: return(GetAdjustedCost(37)); -} -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4FO,cargo_subtype){ - 0: spriteset_BRMk4FO_IntercitySwallow; - 1: spriteset_BRMk4FO_NatEx; - 2: spriteset_BRMk4FO_GNER; - 3: spriteset_BRMk4FO_EastCoast; - 4: spriteset_BRMk4FO_VirginEC; - 5: spriteset_BRMk4FO_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4TSOE,cargo_subtype){ - 0: spriteset_BRMk4TSOE_IntercitySwallow; - 1: spriteset_BRMk4TSOE_NatEx; - 2: spriteset_BRMk4TSOE_GNER; - 3: spriteset_BRMk4TSOE_EastCoast; - 4: spriteset_BRMk4TSOE_VirginEC; - 5: spriteset_BRMk4TSOE_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4TSO,cargo_subtype){ - 0: spriteset_BRMk4TSO_IntercitySwallow; - 1: spriteset_BRMk4TSO_NatEx; - 2: spriteset_BRMk4TSO_GNER; - 3: spriteset_BRMk4TSO_EastCoast; - 4: spriteset_BRMk4TSO_VirginEC; - 5: spriteset_BRMk4TSO_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4RFM,cargo_subtype){ - 0: spriteset_BRMk4RFM_IntercitySwallow; - 1: spriteset_BRMk4RFM_NatEx; - 2: spriteset_BRMk4RFM_GNER; - 3: spriteset_BRMk4RFM_EastCoast; - 4: spriteset_BRMk4RFM_VirginEC; - 5: spriteset_BRMk4RFM_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4TSOD,cargo_subtype){ - 0: spriteset_BRMk4TSOD_IntercitySwallow; - 1: spriteset_BRMk4TSOD_NatEx; - 2: spriteset_BRMk4TSOD_GNER; - 3: spriteset_BRMk4TSOD_EastCoast; - 4: spriteset_BRMk4TSOD_VirginEC; - 5: spriteset_BRMk4TSOD_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4DVT,cargo_subtype){ - 0: spriteset_BRMk4DVT_IntercitySwallow; - 1: spriteset_BRMk4DVT_NatEx; - 2: spriteset_BRMk4DVT_GNER; - 3: spriteset_BRMk4DVT_EastCoast; - 4: spriteset_BRMk4DVT_VirginEC; - 5: spriteset_BRMk4DVT_LNER; -} - -switch(FEAT_TRAINS,SELF, sw_91_BRMk4DVT_reversed,cargo_subtype){ - 0: spriteset_BR91_IntercitySwallowr; - 1: spriteset_BR91_NatExr; - 2: spriteset_BR91_GNERr; - 3: spriteset_BR91_EastCoastr; - 4: spriteset_BR91_VirginECr; - 5: spriteset_BR91_LNERr; -} - -switch(FEAT_TRAINS,PARENT,sw_91_rear,vehicle_is_reversed){ - 0: sw_91_BRMk4DVT; - 1: sw_91_BRMk4DVT_reversed; -} - -// The independent DVT is a separate item, item_BRMk4DVT -item (FEAT_TRAINS, item_91_BRMk4DVT, 113) { - property { - name: string(STR_NAME_BRMk4DVT); - climates_available: NO_CLIMATE; - introduction_date: date(1989,4,21); - model_life: 12; - retire_early: 1; - vehicle_life: 50; - reliability_decay: 7; - refittable_cargo_classes: 0; - cargo_allow_refit: [PASS]; - loading_speed: 14; - cost_factor: 1; - running_cost_factor: 1; - sprite_id: SPRITE_ID_NEW_TRAIN; - speed: 125 mph; - misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE; - refit_cost: 0; - track_type: ELRL; - ai_special_flag: AI_FLAG_CARGO; - power: 0; - running_cost_base: RUNNING_COST_ELECTRIC; - dual_headed: 0; - default_cargo_type: PASS; - cargo_capacity: 1; - weight: 0; - engine_class: ENGINE_CLASS_ELECTRIC; - tractive_effort_coefficient: 0.3; - air_drag_coefficient: 0.1; - length: 8; - effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_ELECTRIC; - extra_weight_per_wagon: 0; - bitmask_vehicle_info: 0; - } - graphics { - can_attach_wagon: CB_RESULT_ATTACH_ALLOW; - cargo_capacity: return 0; - default: sw_91_rear; - colour_mapping: return PALETTE_CC_FIRST; -} -} - -item (FEAT_TRAINS, item_91_BRMk4FO, 112) { - property { - name: string(STR_NAME_BRMk4FO); - climates_available: ALL_CLIMATES; - refittable_cargo_classes: 0; - cargo_allow_refit: [PASS]; - loading_speed: 14; - cost_factor: 0; - running_cost_factor: 0; - sprite_id: SPRITE_ID_NEW_TRAIN; - refit_cost: 0; - track_type: ELRL; - power: 0; - running_cost_base: RUNNING_COST_NONE; - dual_headed: 0; - default_cargo_type: PASS; - cargo_capacity: 43; - weight: 0; - tractive_effort_coefficient: 0; - air_drag_coefficient: 0; - length: 8; - effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_NONE; - extra_weight_per_wagon: 0; - bitmask_vehicle_info: 0; - } - graphics { - can_attach_wagon: CB_RESULT_ATTACH_ALLOW; - default: sw_91_BRMk4FO; - colour_mapping: return PALETTE_CC_FIRST; - cargo_capacity: return(43 * param_pax); - cargo_subtype_text: sw_BR91_cargo_subtype_text; - purchase: spriteset_BRMk4FO_purchase; -} -} - -item (FEAT_TRAINS, item_91_BRMk4TSOE, 109) { - property { - name: string(STR_NAME_BRMk4TSOE); - climates_available: ALL_CLIMATES; - refittable_cargo_classes: 0; - cargo_allow_refit: [PASS]; - loading_speed: 14; - cost_factor: 0; - running_cost_factor: 0; - sprite_id: SPRITE_ID_NEW_TRAIN; - refit_cost: 0; - track_type: ELRL; - power: 0; - running_cost_base: RUNNING_COST_NONE; - dual_headed: 0; - default_cargo_type: PASS; - cargo_capacity: 76; - weight: 0; - tractive_effort_coefficient: 0; - air_drag_coefficient: 0; - length: 8; - effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_NONE; - extra_weight_per_wagon: 0; - bitmask_vehicle_info: 0; - } - graphics { - can_attach_wagon: CB_RESULT_ATTACH_ALLOW; - default: sw_91_BRMk4TSOE; - colour_mapping: return PALETTE_CC_FIRST; - cargo_capacity: return(76 * param_pax); - cargo_subtype_text: sw_BR91_cargo_subtype_text; - purchase: spriteset_BRMk4TS_purchase; -} -} - -item (FEAT_TRAINS, item_91_BRMk4TSO, 110) { - property { - name: string(STR_NAME_BRMk4TSO); - climates_available: ALL_CLIMATES; - refittable_cargo_classes: 0; - cargo_allow_refit: [PASS]; - loading_speed: 14; - cost_factor: 0; - running_cost_factor: 0; - sprite_id: SPRITE_ID_NEW_TRAIN; - refit_cost: 0; - track_type: ELRL; - power: 0; - running_cost_base: RUNNING_COST_NONE; - dual_headed: 0; - default_cargo_type: PASS; - cargo_capacity: 76; - weight: 0; - tractive_effort_coefficient: 0; - air_drag_coefficient: 0; - length: 8; - effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_NONE; - extra_weight_per_wagon: 0; - bitmask_vehicle_info: 0; - } - graphics { - can_attach_wagon: CB_RESULT_ATTACH_ALLOW; - default: sw_91_BRMk4TSO; - colour_mapping: return PALETTE_CC_FIRST; - cargo_capacity: return(76 * param_pax); - cargo_subtype_text: sw_BR91_cargo_subtype_text; - purchase: spriteset_BRMk4TS_purchase; -} -} - -item (FEAT_TRAINS, item_91_BRMk4RFM, 111) { - property { - name: string(STR_NAME_BRMk4RFM); - climates_available: ALL_CLIMATES; - refittable_cargo_classes: 0; - cargo_allow_refit: [PASS]; - loading_speed: 14; - cost_factor: 0; - running_cost_factor: 0; - sprite_id: SPRITE_ID_NEW_TRAIN; - refit_cost: 0; - track_type: ELRL; - power: 0; - running_cost_base: RUNNING_COST_NONE; - dual_headed: 0; - default_cargo_type: PASS; - cargo_capacity: 30; - weight: 0; - tractive_effort_coefficient: 0; - air_drag_coefficient: 0; - length: 8; - effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_NONE; - extra_weight_per_wagon: 0; - bitmask_vehicle_info: 0; - } - graphics { - can_attach_wagon: CB_RESULT_ATTACH_ALLOW; - default: sw_91_BRMk4RFM; - colour_mapping: return PALETTE_CC_FIRST; - cargo_capacity: return(30 * param_pax); - cargo_subtype_text: sw_BR91_cargo_subtype_text; - purchase: spriteset_BRMk4RFM_purchase; -} -} - -item (FEAT_TRAINS, item_91_BRMk4TSOD, 114) { - property { - name: string(STR_NAME_BRMk4TSOD); - climates_available: ALL_CLIMATES; - refittable_cargo_classes: 0; - cargo_allow_refit: [PASS]; - loading_speed: 14; - cost_factor: 0; - running_cost_factor: 0; - sprite_id: SPRITE_ID_NEW_TRAIN; - refit_cost: 0; - track_type: ELRL; - power: 0; - running_cost_base: RUNNING_COST_NONE; - dual_headed: 0; - default_cargo_type: PASS; - cargo_capacity: 72; - weight: 0; - tractive_effort_coefficient: 0; - air_drag_coefficient: 0; - length: 8; - effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_NONE; - extra_weight_per_wagon: 0; - bitmask_vehicle_info: 0; - } - graphics { - can_attach_wagon: CB_RESULT_ATTACH_ALLOW; - default: sw_91_BRMk4TSOD; - colour_mapping: return PALETTE_CC_FIRST; - cargo_capacity: return(72 * param_pax); - cargo_subtype_text: sw_BR91_cargo_subtype_text; - purchase: spriteset_BRMk4TS_purchase; -} -} \ No newline at end of file diff --git a/src/trains/rollingstock/Mk4DVT.pnml b/src/trains/rollingstock/Mk4DVT.pnml index 7d5f0cd1..5b02057a 100644 --- a/src/trains/rollingstock/Mk4DVT.pnml +++ b/src/trains/rollingstock/Mk4DVT.pnml @@ -37,18 +37,4 @@ item (FEAT_TRAINS, item_BRMk4DVT, 585) { cost_factor: return(GetAdjustedCost(52)); running_cost_factor: return(GetAdjustedCost(17)); } -} - - -/* switch(FEAT_TRAINS, SELF, test, [STORE_TEMP(0 - pos_in_articulated_veh, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]) { - 1: do something if other train's ID is 1 -} - -0xC6 vehicle ID -0xF2 cargo_subtype - -[STORE_TEMP(position_in_consist_from_end , 0x10F), - -TEMP[0x10F] var(0x61, param=0xF2, shift=0, and=0xFF) - -*/ \ No newline at end of file +} \ No newline at end of file