-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinfo.nut
executable file
·195 lines (171 loc) · 4.77 KB
/
info.nut
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/* -*- Mode: C++; tab-width: 6 -*- */
/**
* This file is part of DictatorAI
*
* It's free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* You should have received a copy of the GNU General Public License
* with it. If not, see <http://www.gnu.org/licenses/>.
*
**/
require("misc/version.nut");
class DictatorAI extends AIInfo
{
function GetAuthor() { return "Krinn"; }
function GetName() { return "DictatorAI"; }
function GetDescription() { return "a (should be) competitive AI."; }
function GetVersion() { return SELF_VERSION; }
function MinVersionToLoad() { return 1; }
function GetDate() { return "2010-12-26"; }
function CreateInstance() { return "DictatorAI"; }
function GetShortName() { return "DCTR"; }
function GetAPIVersion() { return "1.3"; }
function GetURL() { return "http://www.tt-forums.net/viewtopic.php?f=65&t=52982"; }
function GetSettings() {
AddSetting({name = "PresidentName",
description = "Use real names for the company president?",
easy_value = 0,
medium_value = 0,
hard_value = 0,
custom_value = 0,
flags = CONFIG_BOOLEAN
});
AddSetting({name = "fairlevel",
description = "Alter how the AI act with others",
min_value = 0,
max_value = 2,
easy_value = 0,
medium_value = 1,
hard_value = 2,
custom_value = 2,
flags = CONFIG_NONE
});
AddLabels("fairlevel", {_0 = "Lazy", _1 = "Opportunist", _2 = "Dictator"});
AddSetting({name = "allowedjob",
description = "What tasks the AI can handle",
min_value = 0,
max_value = 2,
easy_value = 1,
medium_value = 0,
hard_value = 0,
custom_value = 0,
flags = CONFIG_INGAME
});
AddLabels("allowedjob", {_0 = "Industry & Town", _1 = "Only Industry", _2 = "Only Town"});
AddSetting({
name = "use_road",
description = "Use buses & trucks",
easy_value = 1,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME
});
AddSetting({
name = "station_balance",
description = "Detect traffic jam: on - better fairplay and aesthetic / off - better for economy",
easy_value = 1,
medium_value = 1,
hard_value = 0,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME
});
AddSetting({
name = "keep_road",
description = "Remove roads: on - better economy and aesthetic / off - better for opponents (some AIs may bug)",
easy_value = 0,
medium_value = 0,
hard_value = 1,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME
});
AddSetting({
name = "use_train",
description = "Use trains",
easy_value = 0,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME
});
AddSetting({
name = "use_nicetrain",
description = "Respect newGRF flag: on - better for aesthetic / off - better for economy",
easy_value = 1,
medium_value = 1,
hard_value = 0,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME
});
AddSetting({
name = "use_air",
description = "Use aircrafts & choppers",
easy_value = 0,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME
});
AddSetting({
name = "use_boat",
description = "Use boats",
easy_value = 1,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = AICONFIG_BOOLEAN | AICONFIG_INGAME
});
AddSetting({
name = "use_terraform",
description = "Allow terraforming: always disable in Lazy mode",
easy_value = 0,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME
});
AddSetting({
name = "upgrade_townbridge",
description = "Upgrade towns bridges: on - better for aesthetics & opponents / off - better for economy",
easy_value = 1,
medium_value = 1,
hard_value = 0,
custom_value = 0,
flags = CONFIG_BOOLEAN | CONFIG_INGAME
});
AddSetting({
name = "allow_scp",
description = "Allow DictatorAI to play with GoalScript using SCP",
easy_value = 1,
medium_value = 1,
hard_value = 1,
custom_value = 1,
flags = CONFIG_BOOLEAN | CONFIG_INGAME
});
AddSetting({
name = "debug",
description = "Enable debug messages",
min_value = 0,
max_value = 4,
easy_value = 0,
medium_value = 0,
hard_value = 0,
custom_value = 0,
flags = CONFIG_INGAME | CONFIG_DEVELOPER
});
//AddLabels("debug", {_0 = "Disable debug", _1 = "Basic", _2 = "Medium", _3 = "Noisy"});
AddSetting({
name = "debug_sign",
description = "Enable debug signs",
easy_value = 0,
medium_value = 0,
hard_value = 0,
custom_value = 0,
flags = CONFIG_BOOLEAN | CONFIG_INGAME | CONFIG_DEVELOPER
});
}
}
RegisterAI(DictatorAI());