Skip to content

Commit

Permalink
Re-worked Class 458/0
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed May 19, 2024
1 parent b7c0c0a commit 05e5b4b
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 251 deletions.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
Binary file modified gfx/EMU/458_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/trains/_spriteset/EMU_Sprites/458-0.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
spriteset(spriteset_BR458_0_Purchase, "gfx/EMU/458_0.png") {
template_purchase(0, 0)
}

spriteset(spriteset_BR458_front_SWT, "gfx/EMU/458_0.png") {
template_train32px(0, 13)
}

spriteset(spriteset_BR458_rear_SWT, "gfx/EMU/458_0.png") {
template_train32px(0, 39)
}

spriteset(spriteset_BR458_middle_SWT, "gfx/EMU/458_0.png") {
template_train32px(0, 65)
}

spriteset(spriteset_BR458_middle_pantowell_SWT, "gfx/EMU/458_0.png") {
template_train32px(0, 91)
}
86 changes: 86 additions & 0 deletions src/trains/emu/458-0.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@


switch(FEAT_TRAINS,SELF, sw_BR458_front, cargo_subtype){
0: spriteset_BR458_front_SWT;
}

switch(FEAT_TRAINS,SELF, sw_BR458_0b, cargo_subtype){
0: spriteset_BR458_middle_SWT;
}

switch(FEAT_TRAINS,SELF, sw_BR458_0c, cargo_subtype){
0: spriteset_BR458_middle_pantowell_SWT;
}

switch(FEAT_TRAINS,SELF, sw_BR458_0do, cargo_subtype){
0: spriteset_BR458_rear_SWT;
}

switch(FEAT_TRAINS,SELF, sw_BR458, position_in_consist % 4){
0: spriteset_BR458_front_SWT;
1: spriteset_BR458_middle_SWT;
2: spriteset_BR458_middle_pantowell_SWT;
3: spriteset_BR458_rear_SWT;
}

switch (FEAT_TRAINS, SELF, switch_articulated_BR458_0, extra_callback_info1) {
1..3: return item_BR458_0;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS; //stop adding vehicle parts
}

switch(FEAT_TRAINS,SELF,sw_BR458_0_cargo_subtype_text,cargo_subtype){
0: return string(str_SWT);
return CB_RESULT_NO_TEXT;
}

item (FEAT_TRAINS, item_BR458_0, 332) {
property {
name: string(STR_NAME_BR458_0);
climates_available: ALL_CLIMATES;
introduction_date: date(1999,4,21);
model_life: 15;
retire_early: 1;
vehicle_life: 50;
reliability_decay: 7;
refittable_cargo_classes: CC_PASSENGERS;
cargo_allow_refit: [PASS, TOUR];
loading_speed: 25;
cost_factor: 71;
running_cost_factor: 43;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 100 mph;
misc_flags: TRAIN_FLAG_MU;
refit_cost: 0;
track_type: BR_3RDR;
ai_special_flag: AI_FLAG_CARGO;
cargo_capacity: (220/4);
power: 2172 hp;
running_cost_base: RUNNING_COST_ELECTRIC;
dual_headed: 0;
default_cargo_type: PASS;
weight: 170 ton;
engine_class: ENGINE_CLASS_ELECTRIC;
tractive_effort_coefficient: 0.06;
air_drag_coefficient: 0.05;
length: 8;
effect_spawn_model_and_powered: EFFECT_SPAWN_MODEL_ELECTRIC;
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_emu),string(str_route_2),string(str_BR458_usage),string(str_BR458_0_eos),string(str_BR458_0_liveries)));
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_subtype_text: sw_BR458_0_cargo_subtype_text;
articulated_part: switch_articulated_BR458_0;
default: sw_BR458;
purchase: spriteset_BR458_0_Purchase;
colour_mapping: return PALETTE_CC_FIRST;
create_effect: electric_create_visual_effect_SAA3;
sound_effect: sw_electric_sound;
cargo_capacity: return((220/4) * param_pax);
cost_factor: return(GetAdjustedCost(71));
running_cost_factor: return(GetAdjustedCost(43));

}
}
File renamed without changes.
File renamed without changes.
251 changes: 0 additions & 251 deletions src/trains/emu/BR458.pnml

This file was deleted.

0 comments on commit 05e5b4b

Please sign in to comment.