Skip to content

Commit

Permalink
Added test units for 28px OLD and 32px OLD templates
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Apr 29, 2024
1 parent 3d72f4d commit 671ae9b
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 1 deletion.
Binary file modified docs/SpriteIDs.xlsx
Binary file not shown.
2 changes: 2 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ STR_NAME_Utility20px :20px alignment/test unit
STR_NAME_Utility24px :24px alignment/test unit
STR_NAME_Utility28px :28px alignment/test unit
STR_NAME_Utility32px :32px alignment/test unit
STR_NAME_Utility28pxOLD :28px alignment/test unit (OLD)
STR_NAME_Utility32pxOLD :32px alignment/test unit (OLD)

STR_NAME_EyeCandy :Invisible Locomotive (Eyecandy)
STR_DESC_EyeCandy :An invisible locomotive intended for use for eyecandy (eg putting freight wagons in a siding)
Expand Down
13 changes: 12 additions & 1 deletion src/debugmode_switch.pnml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
if (param[1] == 0) {

// Disable some trains that aren't finished
disable_item(FEAT_TRAINS, 589); // TGV


// Ignore below here, utility/template trains for alignment







// Disable some trains that only exist for template alignment or debugging
disable_item(FEAT_TRAINS, 601); // 12px
disable_item(FEAT_TRAINS, 602); // 16px
disable_item(FEAT_TRAINS, 603); // 20px
disable_item(FEAT_TRAINS, 604); // 24p
disable_item(FEAT_TRAINS, 605); // 28px
disable_item(FEAT_TRAINS, 606); // 32px
disable_item(FEAT_TRAINS, 607); // 28pxOLD
disable_item(FEAT_TRAINS, 608); // 32pxOLD
}
2 changes: 2 additions & 0 deletions src/sortpurchase.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ sort(FEAT_TRAINS, [
item_UtilityTrain24px,
item_UtilityTrain28px,
item_UtilityTrain32px,
item_UtilityTrain28pxOLD,
item_UtilityTrain32pxOLD,
item_EyeCandy,
item_Coppernob,
item_FurnessK2,
Expand Down
90 changes: 90 additions & 0 deletions src/trains/utility/TemplateTrains.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ spriteset(spriteset_Utility32, "gfx/Template/32px.png") {
template_train32px(0, 13)
}

spriteset(spriteset_Utility28OLD_Purchase, "gfx/Template/old_28px.png") {
template_purchase(0, 0)
}
spriteset(spriteset_Utility28OLD, "gfx/Template/old_28px.png") {
template_train28px_old(0, 13)
}

spriteset(spriteset_Utility32OLD_Purchase, "gfx/Template/old_32px.png") {
template_purchase(0, 0)
}
spriteset(spriteset_Utility32OLD, "gfx/Template/old_32px.png") {
template_train32px_old(0, 13)
}

switch(FEAT_TRAINS,SELF,sw_UtilityTrains_cargo_subtype_text,cargo_subtype){
return CB_RESULT_NO_TEXT;
}
Expand Down Expand Up @@ -272,4 +286,80 @@ item (FEAT_TRAINS, item_UtilityTrain32px, 606) {
default: spriteset_Utility32;
purchase: spriteset_Utility32_Purchase;
}
}

item (FEAT_TRAINS, item_UtilityTrain28pxOLD, 607) {
property {
name: string(STR_NAME_Utility28pxOLD);
climates_available: ALL_CLIMATES;
introduction_date: date(1700,1,1);
model_life: VEHICLE_NEVER_EXPIRES;
retire_early: 1;
vehicle_life: 255;
reliability_decay: 10;
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: 50 mph;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 5000 hp;
running_cost_base: RUNNING_COST_STEAM;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 1 ton;
engine_class: ENGINE_CLASS_STEAM;
tractive_effort_coefficient: 1;
air_drag_coefficient: 0.1;
length: 7;
}
graphics {
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
default: spriteset_Utility28OLD;
purchase: spriteset_Utility28OLD_Purchase;
}
}

item (FEAT_TRAINS, item_UtilityTrain32pxOLD, 608) {
property {
name: string(STR_NAME_Utility32pxOLD);
climates_available: ALL_CLIMATES;
introduction_date: date(1700,1,1);
model_life: VEHICLE_NEVER_EXPIRES;
retire_early: 1;
vehicle_life: 254;
reliability_decay: 10;
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: 50 mph;
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 5000 hp;
running_cost_base: RUNNING_COST_STEAM;
dual_headed: 0;
default_cargo_type: GOOD;
cargo_capacity: 1;
weight: 1 ton;
engine_class: ENGINE_CLASS_STEAM;
tractive_effort_coefficient: 1;
air_drag_coefficient: 0.1;
length: 8;
}
graphics {
can_attach_wagon: CB_RESULT_ATTACH_ALLOW;
cargo_capacity: return 0;
default: spriteset_Utility32OLD;
purchase: spriteset_Utility32OLD_Purchase;
}
}

0 comments on commit 671ae9b

Please sign in to comment.