Skip to content

Commit

Permalink
Added Stephenson's Planet (debug mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Aug 6, 2024
1 parent 6cf466d commit c1ee650
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 0 deletions.
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 @@ -2,6 +2,7 @@
- Furness Railway Railmotor?
- GWR 5700/6700/8750 Class (gfx done need coding)
- Class 20 (graphics drawn? Need to check if they're actually right.... looksl ike the wheels etc need to be taller on some views, definitely needs more liveries)
- Stephenson's Planet

# v2.12
- Added Class 58
Expand Down
Binary file modified gfx/Ref/Company_Logos.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/Steam/Stephensons_Planet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ str_MPV_Geometry :Track Geometry (Covered)
str_MPV_GeometryOpen :Track Geometry (Open)
str_MPV_Leaf :Leaf Removal

STR_NAME_StephensonPlanet :Stephenson's 2-2-0 "Planet"
str_StephensonPlanet_usage :Mixed Traffic
str_StephensonPlanet_eos :1830
str_StephensonPlanet_liveries :Teak

STR_NAME_Coppernob :Furness Railway 0-4-0 "Coppernob"
str_Coppernob_usage :Mixed Traffic
Expand Down Expand Up @@ -1787,6 +1791,7 @@ str_SWT_refurb : (South West Trains - Refurbished)
str_SWT_stagecoach : (South West Trains - Stagecoach)
str_SWR : (South Western Railway)
str_SWRPride : (South Western Railway - Pride)
str_Teak : (Teak)
str_Tesco : (Tesco)
str_TescoEyeCandy : (Tesco - Always show container)
str_TfL : (TfL Rail)
Expand Down
1 change: 1 addition & 0 deletions src/debugmode_switch.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

// Disable some trains that aren't finished
disable_item(FEAT_TRAINS, 671); // Class 20
disable_item(FEAT_TRAINS, 674); // Stephenson's Planet

// Disable some trains that only exist for template alignment or debugging
disable_item(FEAT_TRAINS, 601); // 12px
Expand Down
91 changes: 91 additions & 0 deletions src/trains/steam/LivMan/StephensonsPlanet.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
spriteset(spriteset_StephensonPlanet_Purchase, "gfx/Steam/Stephensons_Planet.png") {
template_purchase_anim(0, 0)
}

spriteset(spriteset_StephensonPlanet_Teak, "gfx/Steam/Stephensons_Planet.png") {
template_train16px(0, 13)
}

spriteset(spriteset_StephensonPlanetTender_Teak, "gfx/Steam/Stephensons_Planet.png") {
template_train12px(0, 32)
}

switch(FEAT_TRAINS,SELF, sw_StephensonPlanetLoco,cargo_subtype){
0: spriteset_StephensonPlanet_Teak;
}

switch(FEAT_TRAINS,SELF, sw_StephensonPlanetTender,cargo_subtype){
0: spriteset_StephensonPlanetTender_Teak;
}

switch(FEAT_TRAINS, SELF, sw_StephensonPlanet, position_in_articulated_veh){
0: sw_StephensonPlanetLoco;
1: sw_StephensonPlanetTender;
}

switch(FEAT_TRAINS, SELF, switch_StephensonPlanet_length, position_in_articulated_veh) {
0: return 4;
1: return 3;
}

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

switch(FEAT_TRAINS,SELF,sw_StephensonPlanet_cargo_subtype_text,cargo_subtype){
0: return string(str_Teak);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_StephensonPlanet, 674) {
property {
variant_group: header_Steam;
name: string(STR_NAME_StephensonPlanet);
climates_available: ALL_CLIMATES;
introduction_date: date(1830,9,1);
model_life: 20;
retire_early: 1;
vehicle_life: 20;
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: 30 mph;
misc_flags: TRAIN_FLAG_NO_BREAKDOWN_SMOKE;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 300 hp;
running_cost_base: RUNNING_COST_STEAM;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 14 ton;
engine_class: ENGINE_CLASS_STEAM;
tractive_effort_coefficient: 0.13;
air_drag_coefficient: 0.1;
length: 4;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_STEAM;
extra_weight_per_wagon: 0;
bitmask_vehicle_info: 0;
}
graphics {
length: switch_StephensonPlanet_length;
additional_text: return(string(str_purchase_loco_with_liveries,string(str_purchase_type_steam),string(str_StephensonPlanet_usage),string(str_StephensonPlanet_eos),string(str_StephensonPlanet_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
cargo_subtype_text: sw_StephensonPlanet_cargo_subtype_text;
articulated_part: switch_articulated_StephensonPlanet;
default: sw_StephensonPlanet;
purchase: spriteset_StephensonPlanet_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: steam_create_visual_effect;
sound_effect: sw_steam_sound;
cost_factor: return(GetAdjustedCost(1));
running_cost_factor: return(GetAdjustedCost(1));
}
}

0 comments on commit c1ee650

Please sign in to comment.