Skip to content

Commit

Permalink
Added Class 168 (Needs Chiltern Grey livery)
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Aug 18, 2021
1 parent 9b23dcf commit e8446ac
Show file tree
Hide file tree
Showing 7 changed files with 330 additions and 0 deletions.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
Binary file added gfx/BR168.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,13 @@ str_BR166_usage :Passenger
str_BR166_eos :---
str_BR166_liveries :Network SouthEast, Thames Trains, First Great Western 'Link', First Great Western 'Dynamic Lines', Great Western Railway

STR_NAME_BR168 :British Rail Class 168 'Clubman' (2-Car)
str_BR168_usage :Passenger
str_BR168_eos :---
str_BR168_liveries :Chiltern Blue, Chiltern Grey
STR_NAME_BR168_3 :British Rail Class 168 'Clubman' (3-Car)
STR_NAME_BR168_4 :British Rail Class 168 'Clubman' (4-Car)

STR_NAME_BR170 :British Rail Class 170 'Turbostar' (2-Car)
str_BR170_usage :Passenger
str_BR170_eos :---
Expand Down Expand Up @@ -1086,6 +1093,7 @@ str_Central : (Central Trains)
str_CentralAnglia : (Central/Anglia Hybrid)
str_Centro : (Centro)
str_Chiltern : (Chiltern Railways)
str_ChilternBlue : (Chiltern Railways - Blue)
str_CivilDutch : (Civil Engineers 'Dutch')
str_ColasRail : (Colas Rail)
str_Connex : (Connex)
Expand Down
4 changes: 4 additions & 0 deletions src/sortpurchase.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ sort(FEAT_TRAINS, [
item_BR165_1_2,
item_BR165_1_3,
item_BR166,
item_BR168,
item_BR168_3,
item_BR168_4,
item_BR170,
item_BR170_3,
item_BR171,
Expand Down Expand Up @@ -80,6 +83,7 @@ sort(FEAT_TRAINS, [
item_BR334,
item_br_345,
item_BR350,
item_BR357,
item_BR370,
item_BR373,
item_BR373_2,
Expand Down
133 changes: 133 additions & 0 deletions src/trains/dmu/BR168_2car.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
spriteset(spriteset_BR168_Purchase, "gfx/BR168.png") {
template_purchase(0, 0)
}

spriteset(spriteset_BR168a_ChilternBlue, "gfx/BR168.png") {
template_train32px(0, 13)
}
spriteset(spriteset_BR168b_ChilternBlue, "gfx/BR168.png") {
template_train32px(0, 63)
}

spriteset(spriteset_BR168a_ChilternGrey, "gfx/BR168.png") {
template_train32px(0, 88)
}
spriteset(spriteset_BR168b_ChilternGrey, "gfx/BR168.png") {
template_train32px(0, 138)
}


switch(FEAT_TRAINS,SELF, sw_BR168a,cargo_subtype){
0: spriteset_BR168a_ChilternBlue;
1: spriteset_BR168a_ChilternGrey;
}

switch(FEAT_TRAINS,SELF, sw_BR168b,cargo_subtype){
0: spriteset_BR168b_ChilternBlue;
1: spriteset_BR168b_ChilternGrey;
}

switch (FEAT_TRAINS, SELF, switch_articulated_BR168_2car, extra_callback_info1) {
1: return item_168b;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

switch(FEAT_TRAINS,SELF,sw_BR168_cargo_subtype_text,cargo_subtype){
0: return string(str_ChilternBlue);
1: return string(str_Chiltern);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_BR168, 535) {
property {
name: string(STR_NAME_BR168);
climates_available: ALL_CLIMATES;
introduction_date: date(1998,4,21);
model_life: 8;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 20;
cost_factor: 41;
running_cost_factor: 25;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 100 mph;
misc_flags: TRAIN_FLAG_MU;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 844 hp;
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 50;
weight: 90 ton;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.3;
air_drag_coefficient: 0.1;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_DIESEL;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 195;
}
graphics {
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_dmu),string(str_route_2),string(str_BR168_usage),string(str_BR168_eos),string(str_BR168_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_subtype_text: sw_BR168_cargo_subtype_text;
articulated_part: switch_articulated_BR168_2car;
default: sw_BR168a;
purchase: spriteset_BR168_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: diesel_create_visual_effect;
sound_effect: sw_dmu_sound;
cargo_capacity: return(50 * param_pax);
}
}

item (FEAT_TRAINS, item_168b, 536) {
property {
name: string(STR_NAME_BR168);
climates_available: NO_CLIMATE;
introduction_date: date(1998,4,21);
model_life: 8;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 20;
cost_factor: 1;
running_cost_factor: 1;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 100 mph;
misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 0;
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 57;
weight: 0;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.3;
air_drag_coefficient: 0.1;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_DIESEL;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 185;
}
graphics {
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
default: sw_BR168b;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: diesel_create_visual_effect;
sound_effect: sw_dmu_sound;
cargo_capacity: return(57 * param_pax);
}
}
121 changes: 121 additions & 0 deletions src/trains/dmu/BR168_3car.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
spriteset(spriteset_BR168_3_Purchase, "gfx/BR168.png") {
template_purchase(0, 0)
}

spriteset(spriteset_BR168c_ChilternBlue, "gfx/BR168.png") {
template_train32px(0, 38)
}
spriteset(spriteset_BR168c_ChilternGrey, "gfx/BR168.png") {
template_train32px(0, 113)
}

switch(FEAT_TRAINS,SELF, sw_BR168c,cargo_subtype){
0: spriteset_BR168c_ChilternBlue;
1: spriteset_BR168c_ChilternGrey;
}

switch (FEAT_TRAINS, SELF, switch_articulated_BR168_3car, extra_callback_info1) {
1: return item_168c;
2: return item_168b;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

switch(FEAT_TRAINS,SELF,sw_BR168_3_cargo_subtype_text,cargo_subtype){
0: return string(str_ChilternBlue);
1: return string(str_Chiltern);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_BR168_3, 538) {
property {
name: string(STR_NAME_BR168_3);
climates_available: ALL_CLIMATES;
introduction_date: date(1998,4,21);
model_life: 8;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 20;
cost_factor: 54;
running_cost_factor: 34;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 100 mph;
misc_flags: TRAIN_FLAG_MU;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 1266 hp;
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 50;
weight: 135 ton;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.3;
air_drag_coefficient: 0.1;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_DIESEL;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 195;
}
graphics {
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_dmu),string(str_route_2),string(str_BR168_usage),string(str_BR168_eos),string(str_BR168_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_subtype_text: sw_BR168_3_cargo_subtype_text;
articulated_part: switch_articulated_BR168_3car;
default: sw_BR168a;
purchase: spriteset_BR168_3_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: diesel_create_visual_effect;
sound_effect: sw_dmu_sound;
cargo_capacity: return(50 * param_pax);
}
}

item (FEAT_TRAINS, item_168c, 537) {
property {
name: string(STR_NAME_BR168_3);
climates_available: NO_CLIMATE;
introduction_date: date(1998,4,21);
model_life: 8;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 20;
cost_factor: 1;
running_cost_factor: 1;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 100 mph;
misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 0;
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 67;
weight: 0;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.3;
air_drag_coefficient: 0.1;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_DIESEL;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 185;
}
graphics {
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
default: sw_BR168c;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: diesel_create_visual_effect;
sound_effect: sw_dmu_sound;
cargo_capacity: return(67 * param_pax);
}
}
64 changes: 64 additions & 0 deletions src/trains/dmu/BR168_4car.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
spriteset(spriteset_BR168_4_Purchase, "gfx/BR168.png") {
template_purchase(0, 0)
}

switch (FEAT_TRAINS, SELF, switch_articulated_BR168_4car, extra_callback_info1) {
1..2: return item_168c;
3: return item_168b;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

switch(FEAT_TRAINS,SELF,sw_BR168_4_cargo_subtype_text,cargo_subtype){
0: return string(str_ChilternBlue);
1: return string(str_Chiltern);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_BR168_4, 539) {
property {
name: string(STR_NAME_BR168_4);
climates_available: ALL_CLIMATES;
introduction_date: date(1998,4,21);
model_life: 8;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 20;
cost_factor: 54;
running_cost_factor: 34;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 100 mph;
misc_flags: TRAIN_FLAG_MU;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 1266 hp;
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
default_cargo_type: PASS;
cargo_capacity: 50;
weight: 135 ton;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.3;
air_drag_coefficient: 0.1;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_DIESEL;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
cargo_age_period: 195;
}
graphics {
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_dmu),string(str_route_2),string(str_BR168_usage),string(str_BR168_eos),string(str_BR168_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_subtype_text: sw_BR168_4_cargo_subtype_text;
articulated_part: switch_articulated_BR168_4car;
default: sw_BR168a;
purchase: spriteset_BR168_4_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: diesel_create_visual_effect;
sound_effect: sw_dmu_sound;
cargo_capacity: return(50 * param_pax);
}
}

0 comments on commit e8446ac

Please sign in to comment.