Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADDED GH70B AND G70A #103

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions chinasettrains.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@
#include "src/wagons/g50.pnml"
#include "src/wagons/g60.pnml"
#include "src/wagons/g70.pnml"
#include "src/wagons/g70a.pnml"
#include "src/wagons/gh70b.pnml"
#include "src/wagons/gn70.pnml"
#include "src/wagons/gn80.pnml"
#include "src/wagons/n60.pnml"
Expand Down
2 changes: 2 additions & 0 deletions docs/contributor.csv
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ C80,,wuwu,Sunjuzhensun,
G70,,wuwu,Sunjuzhensun,
P1,,wuwu,Sunjuzhensun,
P50,,wuwu,Sunjuzhensun,
GH70B,,5033,Sunjuzhensun,
G70A,,5034,Sunjuzhensun,
YZ25G,yz25g,JF,Haiyan,"Nanhu: wuwu,Other: Haiyan"
RZ25G,rz25g,JF,Haiyan,All: Haiyan
YW25G,yw25g,JF,Haiyan,All: Haiyan
Expand Down
4 changes: 4 additions & 0 deletions docs/str.CSV
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ STR_NAME_G17,G17 (Tanker),G17 (罐车)
STR_NAME_G50,G50 (Tanker),G50 (罐车)
STR_NAME_G60,G60 (Tanker),G60 (罐车)
STR_NAME_G70,G70 (Tanker),G70 (罐车)
STR_NAME_G70A,G70A (Tanker),G70A (罐车)
STR_NAME_GH70B,GH70B (Tanker),GH70B (罐车)
STR_NAME_GN70,GN70 (Tanker),GN70 (罐车)
STR_NAME_GN80,GN80 (Tanker),GN80 (罐车)
STR_NAME_N5,N5 (Flatcar),N5 (平车)
Expand Down Expand Up @@ -619,6 +621,8 @@ STR_25ML_LIVERY_AVAILABILITY,"{BLACK}Livery Availability: {WHITE}White-{GREEN}-G
STR_G17_LIVERY_AVAILABILITY,{BLACK}Livery Availability: {BLACK}Black {GOLD}with Random-Colour Stripes (unfinished),{BLACK}可供选择的涂装:{GRAY}黑色{GOLD}加随机颜色条带 (未完成)
STR_G60_LIVERY_AVAILABILITY,{BLACK}Livery Availability: {GRAY}Gray {GOLD}with Random-Colour Stripes ,{BLACK}可供选择的涂装:{GRAY}灰色{GOLD}加随机颜色条带
STR_G70_LIVERY_AVAILABILITY,{BLACK}Livery Availability: {GRAY}Gray {GOLD}with Random-Colour Stripes ,{BLACK}可供选择的涂装:{GRAY}灰色{GOLD}加随机颜色条带
STR_G70A_LIVERY_AVAILABILITY,{BLACK}Livery Availability: {GRAY}Gray {GOLD}with Random-Colour Stripes ,{BLACK}可供选择的涂装:{GRAY}灰色{GOLD}加随机颜色条带
STR_GH70B_LIVERY_AVAILABILITY,{BLACK}Livery Availability: {GRAY}Gray {GOLD}with Random-Colour Stripes ,{BLACK}可供选择的涂装:{GRAY}灰色{GOLD}加随机颜色条带
STR_GN70_LIVERY_AVAILABILITY,{BLACK}Livery Availability: {BLACK}Black {GOLD}with Random-Colour Stripes (unfinished),{BLACK}可供选择的涂装:{BLACK}黑色{GOLD}加随机颜色条带 (未完成)
STR_GN80_LIVERY_AVAILABILITY,{BLACK}Livery Availability: {BLACK}Black {GOLD}with Random-Colour Stripes (unfinished),{BLACK}可供选择的涂装:{BLACK}黑色{GOLD}加随机颜色条带 (未完成)
STR_C62_LIVERY_AVAILABILITY,{BLACK}Livery Availability: {GOLD}Random (unfinished),{BLACK}可供选择的涂装:{GOLD}随机 (未完成)
Expand Down
Binary file added gfx/wagons/GH70B-old.vox
Binary file not shown.
Binary file added gfx/wagons/GH70B.vox
Binary file not shown.
Binary file added gfx/wagons/g70/g70A-new-red.vox
Binary file not shown.
Binary file added gfx/wagons/g70/g70A-old-red.vox
Binary file not shown.
Binary file added gfx/wagons/g70/g70A-old.vox
Binary file not shown.
2 changes: 2 additions & 0 deletions src/vehicleid.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ item (FEAT_TRAINS, c1, 3112) {}
item (FEAT_TRAINS, c11956, 3113) {}
item (FEAT_TRAINS, g70, 3114) {}
item (FEAT_TRAINS, p1, 3115) {}
item (FEAT_TRAINS, gh70b, 3116) {}
item (FEAT_TRAINS, g70a, 3117) {}

//Steam, available ID range: 4096-5119 (hex 0x1000..0x13FF)
#define id_range_steam 0x1000..0x13FF
Expand Down
2 changes: 2 additions & 0 deletions src/vehiclesort.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ sort (FEAT_TRAINS, [
g50,
g60,
g70,
g70a,
gh70b,
gn70,
gn80,
n5,
Expand Down
116 changes: 116 additions & 0 deletions src/wagons/g70a.pnml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

g70a能折叠到g70下面吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没加这个ww

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

游戏里原本就有g70啊

Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
//Begin g70a
switch (FEAT_TRAINS, SELF, switch_g70a_name, getbits(extra_callback_info1, 0, 8) == 0x20? getbits(extra_callback_info1, 8, 8) : 0xFFFF) {
0: return string(STR_TANKER);
return CB_RESULT_NO_TEXT;
}

spriteset (spriteset_g70a_purchase, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {
template_purchase ("wagons/g70", "g70a-new-red")
}

spriteset (spriteset_g70a_old, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {
template_standard ("wagons/g70", "g70a-old")
}
spriteset (spriteset_g70a_new_red, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {
template_standard ("wagons/g70", "g70a-new-red")
}
spriteset (spriteset_g70a_old_red, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {
template_standard ("wagons/g70", "g70a-old-red")
}

random_switch (FEAT_TRAINS, SELF, random_g70a_colour) {
2: spriteset_g70a_old_red;
1: spriteset_g70a_new_red;
1: spriteset_g70a_old;
}

switch (FEAT_TRAINS, SELF, switch_g70a_cargo_subtype, cargo_subtype) {
0: return string(STR_RANDOM_COLOR);
1: return string(STR_RED);
2: return string(STR_DETERIORATE);
3: return string(STR_LV_COLOR_PREFIX, string(STR_LV_PRE_DETERIORATE), string(STR_RED));
return CB_RESULT_NO_TEXT;
}

switch (FEAT_TRAINS, SELF, switch_g70a_graphics_subtype, cargo_subtype) {
0: random_g70a_colour;
1: spriteset_g70a_new_red;
2: spriteset_g70a_old;
3: spriteset_g70a_old_red;
}

switch (FEAT_TRAINS, SELF, switch_g70a_articulated_part, extra_callback_info1) {
1..2: return g70a;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS;
}

switch (FEAT_TRAINS, SELF, switch_g70a_graphics, position_in_articulated_veh % 3) {
1: switch_g70a_graphics_subtype;
empty_sprites;
}

switch (FEAT_TRAINS, SELF, switch_g70a_capacity, position_in_articulated_veh % 3) {
1: return 60;
return 0;
}

item (FEAT_TRAINS, g70a) {
property {
// Menu
name: string(STR_NAME_G70A);
sprite_id: SPRITE_ID_NEW_TRAIN;
misc_flags: bitmask(TRAIN_FLAG_AUTOREFIT);
variant_group: 3088;

// Availability
climates_available: ALL_CLIMATES;
introduction_date: date(2016,08,01);
model_life: VEHICLE_NEVER_EXPIRES;
vehicle_life: 30;
track_type: SACN;

// Cargo
refittable_cargo_classes: bitmask(CC_LIQUID, CC_HAZARDOUS);
non_refittable_cargo_classes: 0;
cargo_allow_refit: [];
cargo_disallow_refit: [];
refit_cost: 0;
default_cargo_type: DEFAULT_CARGO_FIRST_REFITTABLE;
ai_special_flag: AI_FLAG_CARGO;
cargo_capacity: 60;
loading_speed: 4 << param_loading_speed;
cargo_age_period: 185 << param_cargo_decay;

// Stats
speed: 100 km/h;
power: 0 hp;
weight: 21.3 ton;
cost_factor: 8;
running_cost_base: RUNNING_COST_ELECTRIC;
running_cost_factor: 6;
}
graphics {
// Menu
additional_text: string(STR_DESC_2, string(STR_G70A_LIVERY_AVAILABILITY), string(STR_FRESHNESS_MEDIUM, 185));
can_attach_wagon: locowagon;
cargo_subtype_text: switch_g70a_cargo_subtype;

// Graphics
default: switch_g70a_graphics;
purchase: spriteset_g70a_purchase;
articulated_part: switch_g70a_articulated_part;

// Stats
length: switch_length_2_3_2;
cargo_capacity: switch_g70a_capacity;
cargo_age_period: 185 << (param_cargo_decay + param_wagoncargodecay);
cost_factor: 5;
running_cost_factor: 4 * runningcostfactor();
purchase_running_cost_factor: 16;
purchase_cargo_capacity: 20;
name: switch_g70_name;

}
}

//End g70a
110 changes: 110 additions & 0 deletions src/wagons/gh70b.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
//Begin gh70b
switch (FEAT_TRAINS, SELF, switch_gh70b_name, getbits(extra_callback_info1, 0, 8) == 0x20? getbits(extra_callback_info1, 8, 8) : 0xFFFF) {
0: return string(STR_TANKER);
return CB_RESULT_NO_TEXT;
}

spriteset (spriteset_gh70b_purchase, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {
template_purchase ("wagons", "gh70b")
}

spriteset (spriteset_gh70b, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {
template_standard ("wagons", "gh70b")
}
spriteset (spriteset_gh70b_old, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {
template_standard ("wagons", "gh70b-old")
}

random_switch (FEAT_TRAINS, SELF, random_gh70b_colour) {
3: spriteset_gh70b_old;
1: spriteset_gh70b;
}

switch (FEAT_TRAINS, SELF, switch_gh70b_cargo_subtype, cargo_subtype) {
0: return string(STR_RANDOM_COLOR);
1: return string(STR_FACTORY);
2: return string(STR_DETERIORATE);
return CB_RESULT_NO_TEXT;
}

switch (FEAT_TRAINS, SELF, switch_gh70b_graphics_subtype, cargo_subtype) {
0: random_gh70b_colour;
1: spriteset_gh70b;
2: spriteset_gh70b_old;
}

switch (FEAT_TRAINS, SELF, switch_gh70b_articulated_part, extra_callback_info1) {
1..2: return gh70b;
return CB_RESULT_NO_MORE_ARTICULATED_PARTS;
}

switch (FEAT_TRAINS, SELF, switch_gh70b_graphics, position_in_articulated_veh % 3) {
1: switch_gh70b_graphics_subtype;
empty_sprites;
}

switch (FEAT_TRAINS, SELF, switch_gh70b_capacity, position_in_articulated_veh % 3) {
1: return 62;
return 0;
}

item (FEAT_TRAINS, gh70b) {
property {
// Menu
name: string(STR_NAME_GH70B);
sprite_id: SPRITE_ID_NEW_TRAIN;
misc_flags: bitmask(TRAIN_FLAG_AUTOREFIT);
variant_group: 3088;

// Availability
climates_available: ALL_CLIMATES;
introduction_date: date(2015,04,01);
model_life: VEHICLE_NEVER_EXPIRES;
vehicle_life: 30;
track_type: SACN;

// Cargo
refittable_cargo_classes: 0;
non_refittable_cargo_classes: 0;
cargo_allow_refit: [SULP, FERT, NITR, NHNO, CHLO, NH3_, ACID, C2H4, SOAP, N7__, RFPR];
cargo_disallow_refit: [];
refit_cost: 0;
default_cargo_type: DEFAULT_CARGO_FIRST_REFITTABLE;
ai_special_flag: AI_FLAG_CARGO;
cargo_capacity: 68;
loading_speed: 4 << param_loading_speed;
cargo_age_period: 185 << param_cargo_decay;

// Stats
speed: 100 km/h;
power: 0 hp;
weight: 25.8 ton;
cost_factor: 8;
running_cost_base: RUNNING_COST_ELECTRIC;
running_cost_factor: 6;
}
graphics {
// Menu
additional_text: string(STR_DESC_2, string(STR_GH70B_LIVERY_AVAILABILITY), string(STR_FRESHNESS_MEDIUM, 185));
can_attach_wagon: locowagon;
cargo_subtype_text: switch_gh70b_cargo_subtype;

// Graphics
default: switch_gh70b_graphics;
purchase: spriteset_gh70b_purchase;
articulated_part: switch_gh70b_articulated_part;

// Stats
length: switch_length_2_2_2;
cargo_capacity: switch_gh70b_capacity;
cargo_age_period: 185 << (param_cargo_decay + param_wagoncargodecay);
cost_factor: 5;
running_cost_factor: 4 * runningcostfactor();
purchase_running_cost_factor: 16;
purchase_cargo_capacity: 68/3;
name: switch_gh70b_name;

}
}

// End gh70b