-
Notifications
You must be signed in to change notification settings - Fork 6
/
ko_train_set.pnml
103 lines (82 loc) · 3.19 KB
/
ko_train_set.pnml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*------------------------------------------------------------------------------
한국 열차 세트(Korean Train Set)
* Official download site : https://telk.kr/ottd/newgrf/ko_train_set
* Github repository : https://github.com/KoreanGRF/KoreanTrainSet
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
* NewGRF basic information
*----------------------------------------------------------------------------*/
grf {
grfid: "TK\55\55";
name: string(STR_GRF_NAME_WITH_VER);
desc: string(STR_GRF_DESC);
url: string(STR_GRF_URL);
version: 281;
min_compatible_version: 250;
// Parameters
#include "src/parameter.pnml"
}
// Check OpenTTD Version
if (ttd_platform != PLATFORM_OPENTTD || openttd_version < version_openttd(1, 13, 0)) {
error(FATAL, REQUIRES_OPENTTD, "13.0/JGRPPP-0.53.0");
}
// Tables
cargotable {
// TTD
PASS, COAL, MAIL, OIL_, LVST, GOOD, GRAI, WOOD, IORE, STEL, VALU, PAPR, WHEA, FOOD, GOLD, RUBR,
FRUT, MAIZ, CORE, WATR, DIAM, SUGR, BATT, BUBL, COLA, CTCD, FZDR, PLST, SWET, TOFF, TOYS,
// FIRS (under 4.0.0)
AORE, RCYC, SGBT, FICR, MNSP, METL,
// FIRS (from 4.0.0)
ACID, BEER, STAL, ALUM, NH3_, BEAN, BDMT, CBLK, STCB, CASS, CSTI, CMNT, RFPR, CHLO, CLAY, SOAP,
CTAR, JAVA, COKE, COPR, EOIL, POWR, ENSP, BOOM, FMSP, FECR, FERT, FISH, GLAS, KAOL, LIME, MNO2,
MILK, NITR, NUTS, O2__, COAT, PEAT, PETR, PHOS, IRON, PIPE, PLAS, POTA, PORE, QLME, SALT, SAND,
SCMT, SLAG, SASH, LYE_, STST, STSE, STSH, STWR, GRVL, SULP, WDPR, TYRE, VBOD, VENG, VPTS, VEHI,
WOOL, ZINC
}
// Railtypetable
railtypetable {
// Vanilla
"RAIL", "ELRL", "MGLV",
// Korean Train Set 3rd rail
"KRLR",
// Korean Tracks
"KRNR", // Narrow 762mm
"KLSE", // Low speed
"KLSU", // Low speed (Urban)
"KDS_", // Main line
"KDSU", // Main line (Urban, electrified)
"KSSU", // Semi high speed
"KHS_", // High speed
"KMTR", // Metro
"KLAG", // Rubber wheel
"KLMN", // Monorail
"KL3L", // Third rail
KR_3RD_RAIL: ["3RDR", "KL3L", "KMTR", "KDSU", "KLSU", "KRLR", "ELRL"],
KTS_RUBBER_RAIL: ["KLAG", "KMTR", "KDSU", "KLSU", "KRLR", "ELRL"],
KTS_MONORAIL: ["KLMN", "KMTR", "KDSU", "KLSU", "KRLR", "ELRL"]
}
// Cost, running cost, capacity, loading speed coefficients
sw_cost_factor = 1 << (max(0, min(coeff_cost_factor, 10)));
sw_running_cost_factor = 1 << (max(0, min(coeff_running_cost_factor, 12)));
sw_cargo_capacity_factor = 1 << (max(1, min(coeff_cargo_capacity_factor, 8)) - 1);
sw_loading_speed_factor = 1 << (max(0, min(coeff_loading_speed_factor, 3)));
// Macro
#include "src/macro.pnml"
// Load templates
#include "src/template_list.pnml"
// Load spec
#include "generated/spec.pnml"
// Load Switches
#include "src/switch_list.pnml"
// Load trains
#include "src/train_list.pnml"
// Railtypes
#include "src/railtype/KR_LIGHTRAIL.pnml"
#include "src/railtype/NARROW_GAUGE.pnml"
// Simple waypoint
#include "src/misc/simple_waypoint.pnml"
// Buffer
#include "src/object/object.pnml"
// Disable default engines
disable_item(FEAT_TRAINS, 0, 53);