Skip to content

Commit

Permalink
Added Class 28
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Aug 18, 2024
1 parent b239288 commit f9f0a2d
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 5 deletions.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# In progress/nightly releases, not yet on BaNaNaS (may require debug mode parameter to be enabled, graphics may not yet be coded etc)
- GWR 5700/6700/8750 Class (gfx done need coding)
- Class 28 (gfx done need coding)
- Class 20 (WIP: ... looks like the wheels etc need to be taller on some views, definitely needs more liveries)
- Stephenson's Planet (tweak graphics, add wagons?)

# v2.13
- Added LNER J70
- Added Class 28
- Added Class 58
- Added Class 68 + Mk3 rake
- Added Class 93
Expand Down
17 changes: 15 additions & 2 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,21 @@ STR_PARAM_DESC_PAX_MULTIPLIER :Increase passenger capacity to allow use of real
STR_PARAM_NAME_COST_MULTIPLIER :Purchase/Running Cost Multiplier
STR_PARAM_DESC_COST_MULTIPLIER :Increase or decrease purchase price and running costs, if you find they aren't balanced to your taste

STR_PARAM_NAME_TRAM :Metro Trains and Tram availability
STR_PARAM_DESC_TRAM :Should Trams and Metro units be available as trams or trains?
STR_PARAM_NAME_TRAMMETRO :Metro Trains and Tram availability
STR_PARAM_DESC_TRAMMETRO :Should Trams and Metro units be available as trams or trains?
STR_TRAM_DEFAULT :(Default) Realistic Heavy/Light rail split (Trams and light rail as trams, heavy rail as trains)
STR_TRAM_TRAINONLY :Display all Metro units as Trains only (no trams)
STR_TRAM_TRAMONLY :Display all Metro Units as Trams only (no London Underground trains etc, only as trams)
STR_TRAM_BOTH :Display Trams and Trains as both Trams and Trains (all purchaseable as either)
STR_TRAM_EXTRA :(Experimental) Display as both AND include some extra heavy rail units (Thameslink, Crossrail etc)
STR_TRAM_SUPEREXTRA :(Experimental) Include a slightly ridiculous number of extra units (London Overground, trains used for suburban routes)

STR_PARAM_NAME_METRO :Metro-as-Tram availability
STR_PARAM_DESC_METRO :Should Metro units be available as trams?
STR_METRO_OFF :No
STR_METRO_ON :Yes
STR_METRO_SUPER :Yes (And include some suburban trains)

STR_PARAM_NAME_2CC :Parameter not in use (yet)
STR_PARAM_DESC_2CC :Parameter reserved for future feature
STR_NO_2CC :No
Expand Down Expand Up @@ -462,6 +468,11 @@ str_BR20_usage :Light freight
str_BR20_eos :---
str_BR20_liveries :BR Blue

STR_NAME_BR28 :BR Class 28 "Co-Bo"
str_BR28_usage :Freight, Local Passenger
str_BR28_eos :---
str_BR28_liveries :BR Green, BR Green (Yellow Panel), BR Green (Yellow Front), BR Blue, BR Research Department

STR_NAME_BR31 :BR Class 31 "Type 2"
str_BR31_usage :Express Passenger
str_BR31_eos :---
Expand Down Expand Up @@ -1550,6 +1561,7 @@ str_BRGreen : (BR - Green)
str_BRGreenCentre : (BR - Green, Centre Headcode)
str_BRGreenSplit : (BR - Green, Split Box)
str_BRGreenYellow : (BR - Green, Yellow Front)
str_BRGreenPanel : (BR - Green, Yellow Panel)
str_BRGrey : (BR - General Grey)
str_BRGreyBlue : (BR - Grey and Blue)
str_BRLion : (BR - Black & Lion)
Expand All @@ -1562,6 +1574,7 @@ str_BRMaroon : (BR - Maroon)
str_BROchre : (BR - Golden Ochre)
str_BRPrototype : (BR - Prototype)
str_BRProvincial : (BR - Provincial)
str_BRResearch : (BR - Research Department)
str_BRRefurb : (BR - Refurbished)
str_BRTransitionalRed : (BR - TransitionalRed)
str_BRTest : (BR - Track Test Train)
Expand Down
4 changes: 2 additions & 2 deletions src/grf.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ grf {
}
param 6 {
param_tram{
name: string(STR_PARAM_NAME_TRAM);
desc: string(STR_PARAM_DESC_TRAM);
name: string(STR_PARAM_NAME_TRAMMETRO);
desc: string(STR_PARAM_DESC_TRAMMETRO);
min_value: 0;
max_value: 5;
def_value: 0;
Expand Down
88 changes: 88 additions & 0 deletions src/trains/diesel_loco/28.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
spriteset(spriteset_BR28_Purchase, "gfx/Diesel/28.png") {
template_purchase(0, 0)
}

spriteset(spriteset_BR28_BRGreen, "gfx/Diesel/28.png") {
template_train28px(0, 13)
}

spriteset(spriteset_BR28_BRGreenPanel, "gfx/Diesel/28.png") {
template_train28px(0, 39)
}

spriteset(spriteset_BR28_BRGreenYellow, "gfx/Diesel/28.png") {
template_train28px(0, 65)
}

spriteset(spriteset_BR28_BRBlue, "gfx/Diesel/28.png") {
template_train28px(0, 91)
}

spriteset(spriteset_BR28_BRResearch, "gfx/Diesel/28.png") {
template_train28px(0, 117)
}

switch(FEAT_TRAINS,SELF, sw_BR28,cargo_subtype){
0: spriteset_BR28_BRGreen;
1: spriteset_BR28_BRGreenPanel;
2: spriteset_BR28_BRGreenYellow;
3: spriteset_BR28_BRBlue;
4: spriteset_BR28_BRResearch;
}

switch(FEAT_TRAINS,SELF,sw_BR28_cargo_subtype_text,cargo_subtype){
0: return string(str_BRGreen);
1: return string(str_BRGreenPanel);
2: return string(str_BRGreenYellow);
3: return string(str_BRBlue);
4: return string(str_BRResearch);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_BR28, 692) {
property {
name: string(STR_NAME_BR28);
climates_available: ALL_CLIMATES;
introduction_date: date(1959,1,1);
model_life: 15;
retire_early: 1;
vehicle_life: 60;
reliability_decay: 7;
refittable_cargo_classes: 0;
cargo_allow_refit: [GOOD, FOOD];
loading_speed: 3;
cost_factor: 1;
running_cost_factor: 1;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 75 mph;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 1200 hp;
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 97 ton;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.229;
air_drag_coefficient: 0.1;
length: 5;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_DIESEL;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
}
graphics {
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_diesel),string(str_BR28_usage),string(str_BR28_eos),string(str_BR28_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
cargo_subtype_text: sw_BR28_cargo_subtype_text;
default: sw_BR28;
purchase: spriteset_BR28_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: diesel_create_visual_effect;
sound_effect: sw_gronk_sound;
cost_factor: return(GetAdjustedCost(27));
running_cost_factor: return(GetAdjustedCost(14));
}
}

0 comments on commit f9f0a2d

Please sign in to comment.