Skip to content

Commit

Permalink
Added Class 68 + Mk3 rake
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Aug 10, 2024
1 parent 96ad632 commit fb3d9fa
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 1 deletion.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# v2.13
- Added LNER J70
- Added Class 68 + Mk3 rake

# v2.12 (2024-08-08)
- Added LMS Black 5
Expand Down
Binary file modified gfx/BR68_v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gfx/Rolling Stock/Mk3/BRMk3_Standalone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ STR_NAME_SheffieldSupertram :Sheffield Supertram (3-car Single Unit)
STR_NAME_SheffieldCitylink :Sheffield Class 399 Citylink (3-car Single Unit)

STR_BR_68_5A :BR Class 68 + "Nova 2" Mark 5A set (5-Car + locomotive)
STR_BR_68_6Mk3 :BR Class 68 + Mk3 set (6-Car + DVT + locomotive)

STR_BR_195_2CAR :BR Class 195/0 "Civity" (2-Car)
STR_BR_195_3CAR :BR Class 195/1 "Civity" (3-Car)
Expand Down
1 change: 1 addition & 0 deletions src/sortpurchase.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ sort(FEAT_TRAINS, [
item_BR66,
item_BR67,
item_BR68,
item_br_68_6Mk3,
item_br_68_5a,
item_BR70OG,
item_BR70,
Expand Down
2 changes: 1 addition & 1 deletion src/trains/diesel_loco/BR068.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ item (FEAT_TRAINS, item_BR68, 196) {
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 85 ton;
weight: 327 ton;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.31;
air_drag_coefficient: 0.1;
Expand Down
104 changes: 104 additions & 0 deletions src/trains/diesel_loco/BR068_6Mk3.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
spriteset (spriteset_br_68_6Mk3_purchase, "gfx/BR68_v2.png") {
template_purchase(181, 0)
}

spriteset (spriteset_BRMk3standalone_Chiltern, "gfx/Rolling Stock/Mk3/BRMk3_Standalone.png") {
template_train32px(0, 13)
}

switch(FEAT_TRAINS, PARENT, sw_br_68_6Mk3_rear, vehicle_is_reversed) {
0: spriteset_BRMk3DVT_Chiltern_reversed;
1: spriteset_BR68_Chiltern;
}

switch(FEAT_TRAINS, PARENT, sw_br_68_6Mk3_front, vehicle_is_reversed) {
0: spriteset_BR68_Chiltern;
1: spriteset_BRMk3DVT_Chiltern;
}

// Choose sprites depending on car position
switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_spriteset, position_in_articulated_veh % 8) {
0: sw_br_68_6Mk3_front;
7: sw_br_68_6Mk3_rear;
spriteset_BRMk3standalone_Chiltern;
}

// Define articulations
switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_articulated, extra_callback_info1) {
// extra_callback_info1 returns the car number, so 1 is the second car, .. so on
// The callback runs this switch until it returns NO_MORE_ARTICULATED_PARTS, which ends the growth
1..7: return item_br_68_6Mk3;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; // Stop adding more cars
}

// Start/stop switch, used to limit maximum length
switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_start_stop, num_vehs_in_consist) {
return CB_RESULT_NO_TEXT; // Allow any length
}

// Only allow the same train type to be added to itself
switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_can_attach_wagon, vehicle_type_id) {
item_br_68_6Mk3: return CB_RESULT_ATTACH_ALLOW;
return string(STR_CANNOT_ATTACH);
}

// Only the driving engine has particles
switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_particles, position_in_articulated_veh % 6) {
0: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 2, DISABLE_WAGON_POWER);
visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER);
}

// Class 195/0 (2car)
item(FEAT_TRAINS, item_br_68_6Mk3, 689) {
property {
name: string(STR_BR_68_6Mk3);
climates_available: ALL_CLIMATES; // available in all climates
introduction_date: date(2019, 08, 04);
model_life: VEHICLE_NEVER_EXPIRES; // keep available forever
vehicle_life: 30; // years after vehicle is deemed "old" and should be replaced
reliability_decay: 0; // dont reduce reliabilty, (will grow from 75% upwards over the years)
refittable_cargo_classes: bitmask(CC_PASSENGERS);
non_refittable_cargo_classes: bitmask();
cost_factor: 65;
loading_speed: 5;
running_cost_factor: 100;
cargo_allow_refit: [];
cargo_disallow_refit: [];

speed: 100 mph;
power: 3800 hp;
cargo_capacity: 1;
weight: 299 ton;

sprite_id: SPRITE_ID_NEW_TRAIN; // required
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_PASSENGER; // tell ai that this is a passenger train
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0; // set to 0 otherwise limited to 2 cars only
engine_class: ENGINE_CLASS_DIESEL; // even if ts 3rd rail, ELECTRIC would give overhead wire effects
extra_power_per_wagon: 0 kW;
tractive_effort_coefficient: 0.37;
air_drag_coefficient: 0.06;
length: 8; // full tile length vehicle
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 2, DISABLE_WAGON_POWER); // visual fx
extra_weight_per_wagon: 0 ton;
bitmask_vehicle_info: 0;
}

graphics {
default: switch_br_68_6Mk3_spriteset;
purchase: spriteset_br_68_6Mk3_purchase;

articulated_part: switch_br_68_6Mk3_articulated;
start_stop: switch_br_68_6Mk3_start_stop;
can_attach_wagon: switch_br_68_6Mk3_can_attach_wagon;
visual_effect_and_powered: switch_br_68_6Mk3_particles;

cargo_capacity: return (408/8 * param_pax);
additional_text: string(STR_DSC_BR_MK5A);
cost_factor: return(GetAdjustedCost(65));
running_cost_factor: return(GetAdjustedCost(100));

}
}

0 comments on commit fb3d9fa

Please sign in to comment.