Skip to content

Commit

Permalink
Added GWR 2801 Dean Goods WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Jul 16, 2024
1 parent 8112c69 commit 9e07a09
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 3 deletions.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
12 changes: 9 additions & 3 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ str_LNWRWebb_usage :Low speed freight
str_LNWRWebb_eos :1988
str_LNWRWebb_liveries :LNWR Black, BR Black

STR_NAME_GWR_DeanGoods :GWR 2301 0-6-0 "Dean Goods"
str_GWR_DeanGoods_usage :Freight and local passenger services
str_GWR_DeanGoods_eos :1883
str_GWR_DeanGoods_liveries :GWR Green, GWR Green & Chrome

STR_NAME_GreatBear :GWR 4-6-2 "Great Bear"
str_GreatBear_usage :Express Passenger
str_GreatBear_eos :1908
Expand Down Expand Up @@ -1504,10 +1509,11 @@ str_gtrb : (Govia Thameslink "Blue")
str_gtrp : (Govia Thameslink "Pink")
str_GTRPride : (Govia Thameslink "Pride")
str_Gulf : (Gulf)
str_GNRGreen : (GNR "Green")
str_GWRGreen : (GWR "Green")
str_GNRGreen : (GNR Green)
str_GWRGreen : (GWR Green)
str_GWRGreenChrome : (GWR Green & Chrome)
str_GWRPride : (GWR "Pride")
str_GWRGreenUn : (GWR "Green" Unbranded)
str_GWRGreenUn : (GWR Green Unbranded)
str_HansonHall : (Hanson & Hall)
str_HarryNeedle : (Harry Needle Railroad)
str_Hitachi : (Hitachi)
Expand Down
1 change: 1 addition & 0 deletions src/sortpurchase.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sort(FEAT_TRAINS, [
item_LNWRWebb,
item_SRZClass,
item_GER_L77,
item_GWR_DeanGoods,
item_GreatBear,
item_GWRHall,
item_LMSBlack5,
Expand Down
46 changes: 46 additions & 0 deletions src/trains/_spriteset/Steam_Sprites/GWR_DeanGoods.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
spriteset(spriteset_GWR_DeanGoods_Purchase, "gfx/Steam/GWR_DeanGoods.png") {
template_purchase_anim(0, 0)
}

spriteset(spriteset_GWR_DeanGoods_GWRGreen, "gfx/Steam/GWR_DeanGoods.png") {
template_train20px(0, 13)
}

spriteset(spriteset_GWR_DeanGoods_GWRGreenChrome, "gfx/Steam/GWR_DeanGoods.png") {
template_train20px(0, 39)
}

spriteset(spriteset_GWR_DeanGoods_Tender_GWRGreen, "gfx/Steam/GWR_DeanGoods_Tender.png") {
template_train16px(0, 13)
}

switch(FEAT_TRAINS,SELF, sw_GWR_DeanGoodsLoco,cargo_subtype){
0: spriteset_GWR_DeanGoods_GWRGreen;
1: spriteset_GWR_DeanGoods_GWRGreenChrome;
}

switch(FEAT_TRAINS,SELF, sw_GWR_DeanGoodsTender,cargo_subtype){
spriteset_GWR_DeanGoods_Tender_GWRGreen;
}


switch(FEAT_TRAINS, SELF, sw_GWR_DeanGoods, position_in_articulated_veh){
0: sw_GWR_DeanGoodsLoco;
1: sw_GWR_DeanGoodsTender;
}

switch(FEAT_TRAINS, SELF, switch_GWR_DeanGoods_length, position_in_articulated_veh) {
0: return 5;
1: return 4;
}

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

switch(FEAT_TRAINS,SELF,sw_GWR_DeanGoods_cargo_subtype_text,cargo_subtype){
0: return string(str_GWRGreen);
1: return string(str_GWRGreenChrome);
return CB_RESULT_NO_TEXT;
}
50 changes: 50 additions & 0 deletions src/trains/steam/GWR_DeanGoods.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
item (FEAT_TRAINS, item_GWR_DeanGoods, 661) {
property {
name: string(STR_NAME_GWR_DeanGoods);
climates_available: ALL_CLIMATES;
introduction_date: date(1883,2,1);
model_life: 17;
retire_early: 1;
vehicle_life: 74;
reliability_decay: 7;
refittable_cargo_classes: 0;
cargo_allow_refit: [GOOD, FOOD];
loading_speed: 3;
cost_factor: 20;
running_cost_factor: 24;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 40 mph;
misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 700 hp;
running_cost_base: RUNNING_COST_STEAM;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 74 ton;
engine_class: ENGINE_CLASS_STEAM;
tractive_effort_coefficient: 0.112;
air_drag_coefficient: 0.1;
length: 5;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_STEAM;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
}
graphics {
length: switch_GWR_DeanGoods_length;
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_steam),string(str_route_9),string(str_GWR_DeanGoods_usage),string(str_GWR_DeanGoods_eos),string(str_GWR_DeanGoods_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
cargo_subtype_text: sw_GWR_DeanGoods_cargo_subtype_text;
articulated_part: switch_articulated_GWR_DeanGoods;
default: sw_GWR_DeanGoods;
purchase: spriteset_GWR_DeanGoods_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: steam_create_visual_effect;
sound_effect: sw_steam_sound;
cost_factor: return(GetAdjustedCost(21));
running_cost_factor: return(GetAdjustedCost(17));
}
}

0 comments on commit 9e07a09

Please sign in to comment.