1 | <?php |
||||||
2 | |||||||
3 | !defined('INSIDE') ? die('Hack attempt!') : false; |
||||||
4 | |||||||
5 | global $sn_data; |
||||||
6 | $sn_data += array( |
||||||
7 | STRUC_MINE_METAL => array( |
||||||
8 | 'name' => 'metal_mine', |
||||||
9 | 'type' => UNIT_STRUCTURES, |
||||||
10 | 'location' => LOC_PLANET, |
||||||
11 | 'cost' => array( |
||||||
12 | RES_METAL => 80, |
||||||
13 | RES_CRYSTAL => 20, |
||||||
14 | RES_DEUTERIUM => 0, |
||||||
15 | RES_ENERGY => 0, |
||||||
16 | 'factor' => 1.5, |
||||||
17 | ), |
||||||
18 | P_UNIT_PRODUCTION => array( |
||||||
19 | RES_METAL => function ($level, $production_factor, $user, $planet_row) { return 40 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
||||||
0 ignored issues
–
show
The parameter
$planet_row is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||
20 | RES_ENERGY => function ($level, $production_factor, $user, $planet_row) { return -13 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
||||||
0 ignored issues
–
show
The parameter
$user is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$planet_row is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||
21 | ), |
||||||
22 | P_MINING_IS_MANAGED => true, |
||||||
23 | ), |
||||||
24 | |||||||
25 | STRUC_MINE_CRYSTAL => array( |
||||||
26 | 'name' => 'crystal_mine', |
||||||
27 | 'type' => UNIT_STRUCTURES, |
||||||
28 | 'location' => LOC_PLANET, |
||||||
29 | 'cost' => array( |
||||||
30 | RES_METAL => 48, |
||||||
31 | RES_CRYSTAL => 24, |
||||||
32 | RES_DEUTERIUM => 0, |
||||||
33 | RES_ENERGY => 0, |
||||||
34 | 'factor' => 1.6, |
||||||
35 | ), |
||||||
36 | P_UNIT_PRODUCTION => array( |
||||||
37 | RES_CRYSTAL => function ($level, $production_factor, $user, $planet_row) { return 32 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
||||||
0 ignored issues
–
show
The parameter
$planet_row is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$user is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||
38 | RES_ENERGY => function ($level, $production_factor, $user, $planet_row) { return -16 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
||||||
0 ignored issues
–
show
The parameter
$user is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$planet_row is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||
39 | ), |
||||||
40 | P_MINING_IS_MANAGED => true, |
||||||
41 | ), |
||||||
42 | |||||||
43 | STRUC_MINE_DEUTERIUM => array( |
||||||
44 | 'name' => 'deuterium_sintetizer', |
||||||
45 | 'type' => UNIT_STRUCTURES, |
||||||
46 | 'location' => LOC_PLANET, |
||||||
47 | 'cost' => array( |
||||||
48 | RES_METAL => 225, |
||||||
49 | RES_CRYSTAL => 75, |
||||||
50 | RES_DEUTERIUM => 0, |
||||||
51 | RES_ENERGY => 0, |
||||||
52 | 'factor' => 1.5, |
||||||
53 | ), |
||||||
54 | P_UNIT_PRODUCTION => array( |
||||||
55 | RES_DEUTERIUM => function ($level, $production_factor, $user, $planet_row) { return 10 * $level * pow(1.1, $level) * (0.1 * $production_factor) * (-0.002 * $planet_row["temp_max"] + 1.28); }, |
||||||
56 | RES_ENERGY => function ($level, $production_factor, $user, $planet_row) { return -20 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
||||||
0 ignored issues
–
show
The parameter
$planet_row is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$user is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||
57 | ), |
||||||
58 | P_MINING_IS_MANAGED => true, |
||||||
59 | ), |
||||||
60 | |||||||
61 | STRUC_MINE_SOLAR => array( |
||||||
62 | 'name' => 'solar_plant', |
||||||
63 | 'type' => UNIT_STRUCTURES, |
||||||
64 | 'location' => LOC_PLANET, |
||||||
65 | 'cost' => array( |
||||||
66 | RES_METAL => 75, |
||||||
67 | RES_CRYSTAL => 30, |
||||||
68 | RES_DEUTERIUM => 0, |
||||||
69 | RES_ENERGY => 0, |
||||||
70 | 'factor' => 1.5, |
||||||
71 | ), |
||||||
72 | P_UNIT_PRODUCTION => array( |
||||||
73 | RES_ENERGY => function ($level, $production_factor, $user, $planet_row) { return ($planet_row["temp_max"] / 5 + 15) * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
||||||
74 | ), |
||||||
75 | P_MINING_IS_MANAGED => true, |
||||||
76 | ), |
||||||
77 | // −273,15 °C |
||||||
78 | STRUC_MINE_FUSION => array( |
||||||
79 | 'name' => 'fusion_plant', |
||||||
80 | 'type' => UNIT_STRUCTURES, |
||||||
81 | 'location' => LOC_PLANET, |
||||||
82 | P_REQUIRE => array(3 => 5, TECH_ENERGY => 3, UNIT_PLAN_STRUC_MINE_FUSION => 1), |
||||||
83 | 'cost' => array( |
||||||
84 | RES_METAL => 900, |
||||||
85 | RES_CRYSTAL => 360, |
||||||
86 | RES_DEUTERIUM => 180, |
||||||
87 | RES_ENERGY => 0, |
||||||
88 | 'factor' => 1.8, |
||||||
89 | ), |
||||||
90 | P_UNIT_PRODUCTION => array( |
||||||
91 | RES_DEUTERIUM => function ($level, $production_factor, $user, $planet_row) { return -10 * $level * pow(1.1, $level) * (0.1 * $production_factor); }, |
||||||
0 ignored issues
–
show
The parameter
$planet_row is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$user is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||
92 | RES_ENERGY => function ($level, $production_factor, $user, $planet_row) { return 30 * $level * pow(1.05 + 0.01 * mrc_get_level($user, "", TECH_ENERGY), $level) * (0.1 * $production_factor); }, |
||||||
0 ignored issues
–
show
The parameter
$planet_row is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() '' of type string is incompatible with the type array expected by parameter $planet of mrc_get_level() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
93 | ), |
||||||
94 | P_MINING_IS_MANAGED => true, |
||||||
95 | ), |
||||||
96 | |||||||
97 | STRUC_STORE_METAL => array( |
||||||
98 | 'name' => 'metal_store', |
||||||
99 | 'type' => UNIT_STRUCTURES, |
||||||
100 | 'location' => LOC_PLANET, |
||||||
101 | 'cost' => array( |
||||||
102 | RES_METAL => 2000, |
||||||
103 | RES_CRYSTAL => 0, |
||||||
104 | RES_DEUTERIUM => 0, |
||||||
105 | RES_ENERGY => 0, |
||||||
106 | 'factor' => 2, |
||||||
107 | ), |
||||||
108 | 'storage' => array( |
||||||
109 | RES_METAL => function ($level) { return BASE_STORAGE_SIZE * pow(1.5, $level); }, |
||||||
110 | ), |
||||||
111 | ), |
||||||
112 | |||||||
113 | STRUC_STORE_CRYSTAL => array( |
||||||
114 | 'name' => 'crystal_store', |
||||||
115 | 'type' => UNIT_STRUCTURES, |
||||||
116 | 'location' => LOC_PLANET, |
||||||
117 | 'cost' => array( |
||||||
118 | RES_METAL => 2000, |
||||||
119 | RES_CRYSTAL => 1000, |
||||||
120 | RES_DEUTERIUM => 0, |
||||||
121 | RES_ENERGY => 0, |
||||||
122 | 'factor' => 2, |
||||||
123 | ), |
||||||
124 | 'storage' => array( |
||||||
125 | RES_CRYSTAL => function ($level) { return BASE_STORAGE_SIZE * pow(1.5, $level); }, |
||||||
126 | ), |
||||||
127 | ), |
||||||
128 | |||||||
129 | STRUC_STORE_DEUTERIUM => array( |
||||||
130 | 'name' => 'deuterium_store', |
||||||
131 | 'type' => UNIT_STRUCTURES, |
||||||
132 | 'location' => LOC_PLANET, |
||||||
133 | 'cost' => array( |
||||||
134 | RES_METAL => 2000, |
||||||
135 | RES_CRYSTAL => 2000, |
||||||
136 | RES_DEUTERIUM => 0, |
||||||
137 | RES_ENERGY => 0, |
||||||
138 | 'factor' => 2, |
||||||
139 | ), |
||||||
140 | 'storage' => array( |
||||||
141 | RES_DEUTERIUM => function ($level) { return BASE_STORAGE_SIZE * pow(1.5, $level); }, |
||||||
142 | ), |
||||||
143 | ), |
||||||
144 | |||||||
145 | STRUC_FACTORY_ROBOT => array( |
||||||
146 | 'name' => 'robot_factory', |
||||||
147 | 'type' => UNIT_STRUCTURES, |
||||||
148 | 'location' => LOC_PLANET, |
||||||
149 | 'cost' => array( |
||||||
150 | RES_METAL => 400, |
||||||
151 | RES_CRYSTAL => 120, |
||||||
152 | RES_DEUTERIUM => 200, |
||||||
153 | RES_ENERGY => 0, |
||||||
154 | 'factor' => 2, |
||||||
155 | ), |
||||||
156 | ), |
||||||
157 | |||||||
158 | STRUC_FACTORY_NANO => array( |
||||||
159 | 'name' => 'nano_factory', |
||||||
160 | 'type' => UNIT_STRUCTURES, |
||||||
161 | 'location' => LOC_PLANET, |
||||||
162 | P_REQUIRE => array(STRUC_FACTORY_ROBOT => 10, TECH_COMPUTER => 10), |
||||||
163 | 'cost' => array( |
||||||
164 | RES_METAL => 1000000, |
||||||
165 | RES_CRYSTAL => 500000, |
||||||
166 | RES_DEUTERIUM => 100000, |
||||||
167 | RES_ENERGY => 0, |
||||||
168 | 'factor' => 2, |
||||||
169 | ), |
||||||
170 | ), |
||||||
171 | |||||||
172 | STRUC_FACTORY_HANGAR => array( |
||||||
173 | 'name' => 'hangar', |
||||||
174 | 'type' => UNIT_STRUCTURES, |
||||||
175 | 'location' => LOC_PLANET, |
||||||
176 | P_REQUIRE => array(STRUC_FACTORY_ROBOT => 2), |
||||||
177 | 'cost' => array( |
||||||
178 | RES_METAL => 400, |
||||||
179 | RES_CRYSTAL => 200, |
||||||
180 | RES_DEUTERIUM => 100, |
||||||
181 | RES_ENERGY => 0, |
||||||
182 | 'factor' => 2, |
||||||
183 | ), |
||||||
184 | ), |
||||||
185 | |||||||
186 | STRUC_LABORATORY => array( |
||||||
187 | 'name' => 'laboratory', |
||||||
188 | 'type' => UNIT_STRUCTURES, |
||||||
189 | 'location' => LOC_PLANET, |
||||||
190 | 'cost' => array( |
||||||
191 | RES_METAL => 200, |
||||||
192 | RES_CRYSTAL => 400, |
||||||
193 | RES_DEUTERIUM => 200, |
||||||
194 | RES_ENERGY => 0, |
||||||
195 | 'factor' => 2, |
||||||
196 | ), |
||||||
197 | ), |
||||||
198 | |||||||
199 | STRUC_TERRAFORMER => array( |
||||||
200 | 'name' => 'terraformer', |
||||||
201 | 'type' => UNIT_STRUCTURES, |
||||||
202 | 'location' => LOC_PLANET, |
||||||
203 | P_REQUIRE => array(STRUC_FACTORY_NANO => 1, TECH_ENERGY => 12), |
||||||
204 | 'cost' => array( |
||||||
205 | RES_METAL => 0, |
||||||
206 | RES_CRYSTAL => 50000, |
||||||
207 | RES_DEUTERIUM => 100000, |
||||||
208 | RES_ENERGY => 0, |
||||||
209 | 'factor' => 2, |
||||||
210 | ), |
||||||
211 | ), |
||||||
212 | |||||||
213 | STRUC_ALLY_DEPOSIT => array( |
||||||
214 | 'name' => 'ally_deposit', |
||||||
215 | 'type' => UNIT_STRUCTURES, |
||||||
216 | 'location' => LOC_PLANET, |
||||||
217 | 'cost' => array( |
||||||
218 | RES_METAL => 20000, |
||||||
219 | RES_CRYSTAL => 40000, |
||||||
220 | RES_DEUTERIUM => 0, |
||||||
221 | RES_ENERGY => 0, |
||||||
222 | 'factor' => 2, |
||||||
223 | ), |
||||||
224 | ), |
||||||
225 | |||||||
226 | STRUC_LABORATORY_NANO => array( |
||||||
227 | 'name' => 'nano', |
||||||
228 | 'type' => UNIT_STRUCTURES, |
||||||
229 | 'location' => LOC_PLANET, |
||||||
230 | P_REQUIRE => array(STRUC_LABORATORY => 10, TECH_ENERGY => 10), |
||||||
231 | 'cost' => array( |
||||||
232 | RES_METAL => 1500000, |
||||||
233 | RES_CRYSTAL => 750000, |
||||||
234 | RES_DEUTERIUM => 150000, |
||||||
235 | RES_ENERGY => 0, |
||||||
236 | 'factor' => 2, |
||||||
237 | ), |
||||||
238 | ), |
||||||
239 | |||||||
240 | STRUC_MOON_STATION => array( |
||||||
241 | 'name' => 'mondbasis', |
||||||
242 | 'type' => UNIT_STRUCTURES, |
||||||
243 | 'location' => LOC_PLANET, |
||||||
244 | 'cost' => array( |
||||||
245 | RES_METAL => 20000, |
||||||
246 | RES_CRYSTAL => 40000, |
||||||
247 | RES_DEUTERIUM => 20000, |
||||||
248 | RES_ENERGY => 0, |
||||||
249 | 'factor' => 2, |
||||||
250 | ), |
||||||
251 | ), |
||||||
252 | |||||||
253 | STRUC_MOON_PHALANX => array( |
||||||
254 | 'name' => 'phalanx', |
||||||
255 | 'type' => UNIT_STRUCTURES, |
||||||
256 | 'location' => LOC_PLANET, |
||||||
257 | P_REQUIRE => array(STRUC_MOON_STATION => 1), |
||||||
258 | 'cost' => array( |
||||||
259 | RES_METAL => 20000, |
||||||
260 | RES_CRYSTAL => 40000, |
||||||
261 | RES_DEUTERIUM => 20000, |
||||||
262 | RES_ENERGY => 0, |
||||||
263 | 'factor' => 2, |
||||||
264 | ), |
||||||
265 | ), |
||||||
266 | |||||||
267 | STRUC_MOON_GATE => array( |
||||||
268 | 'name' => 'sprungtor', |
||||||
269 | 'type' => UNIT_STRUCTURES, |
||||||
270 | 'location' => LOC_PLANET, |
||||||
271 | P_REQUIRE => array(STRUC_MOON_STATION => 1, TECH_HYPERSPACE => 7), |
||||||
272 | 'cost' => array( |
||||||
273 | RES_METAL => 2000000, |
||||||
274 | RES_CRYSTAL => 4000000, |
||||||
275 | RES_DEUTERIUM => 2000000, |
||||||
276 | RES_ENERGY => 0, |
||||||
277 | 'factor' => 2, |
||||||
278 | ), |
||||||
279 | ), |
||||||
280 | |||||||
281 | STRUC_SILO => array( |
||||||
282 | 'name' => 'silo', |
||||||
283 | 'type' => UNIT_STRUCTURES, |
||||||
284 | 'location' => LOC_PLANET, |
||||||
285 | P_REQUIRE => array(TECH_ENGINE_ION => 1), |
||||||
286 | 'cost' => array( |
||||||
287 | RES_METAL => 20000, |
||||||
288 | RES_CRYSTAL => 20000, |
||||||
289 | RES_DEUTERIUM => 1000, |
||||||
290 | RES_ENERGY => 0, |
||||||
291 | 'factor' => 2, |
||||||
292 | ), |
||||||
293 | 'capacity' => 12, |
||||||
294 | ), |
||||||
295 | ); |
||||||
296 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.