Freeciv-3.2: /fast/freeciv/nightly/S3_2/common/scriptcore/tolua_game_gen.c Source File

Freeciv-3.2

Loading...
Searching...
No Matches
tolua_game_gen.c
Go to the documentation of this file.
1/*
2** Lua binding: game
3*/
4
5#include "tolua.h"
6
7#ifndef __cplusplus
8#include <stdlib.h>
9#endif
10#ifdef __cplusplus
11 extern "C" int tolua_bnd_takeownership (lua_State* L); // from tolua_map.c
12#else
13 int tolua_bnd_takeownership (lua_State* L); /* from tolua_map.c */
14#endif
15#include <string.h>
16
17/* Exported function */
18 TOLUA_API int tolua_game_open (lua_State* tolua_S);
19 LUALIB_API int luaopen_game (lua_State* tolua_S);
20
21#ifdef HAVE_CONFIG_H
22#include <fc_config.h>
23#endif
24#include "api_common_utilities.h"
25#include "api_game_effects.h"
26#include "api_game_find.h"
27#include "api_game_methods.h"
28#include "luascript_types.h"
29#define game_info_substructure game.info
30
31/* function to register type */
32 static void tolua_reg_types (lua_State* tolua_S)
33{
34 tolua_usertype(tolua_S,"Government");
35 tolua_usertype(tolua_S,"Achievement");
36 tolua_usertype(tolua_S,"Nonexistent");
37 tolua_usertype(tolua_S,"City");
38 tolua_usertype(tolua_S,"Building_Type");
39 tolua_usertype(tolua_S,"Tech_Type");
40 tolua_usertype(tolua_S,"Unit_Type");
41 tolua_usertype(tolua_S,"Unit");
42 tolua_usertype(tolua_S,"Game_Info");
43 tolua_usertype(tolua_S,"Nation_Type");
44 tolua_usertype(tolua_S,"City_List_Link");
45 tolua_usertype(tolua_S,"Disaster");
46 tolua_usertype(tolua_S,"Unit_List_Link");
47 tolua_usertype(tolua_S,"Connection");
48 tolua_usertype(tolua_S,"Action");
49 tolua_usertype(tolua_S,"Player");
50 tolua_usertype(tolua_S,"Counter");
51 tolua_usertype(tolua_S,"Tile");
52 tolua_usertype(tolua_S,"Terrain");
53 tolua_usertype(tolua_S,"Direction");
54}
55
56/* get function: name of class Player */
57 static int tolua_get_Player_Player_name(lua_State* tolua_S)
58{
59 Player* self = (Player*) tolua_tousertype(tolua_S,1,0);
60#ifndef TOLUA_RELEASE
61 if (!self) {
62 tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL);
63 return 0;
64 }
65#endif
66 tolua_pushstring(tolua_S,(const char*)self->name);
67 return 1;
68}
69
70/* get function: nation of class Player */
71 static int tolua_get_Player_Player_nation_ptr(lua_State* tolua_S)
72{
73 Player* self = (Player*) tolua_tousertype(tolua_S,1,0);
74#ifndef TOLUA_RELEASE
75 if (!self) {
76 tolua_error(tolua_S,"invalid 'self' in accessing variable 'nation'",NULL);
77 return 0;
78 }
79#endif
80 tolua_pushusertype(tolua_S,(void*)self->nation,"Nation_Type");
81 return 1;
82}
83
84/* set function: nation of class Player */
85 static int tolua_set_Player_Player_nation_ptr(lua_State* tolua_S)
86{
87 Player* self = (Player*) tolua_tousertype(tolua_S,1,0);
88#ifndef TOLUA_RELEASE
89 tolua_Error tolua_err;
90 if (!self) {
91 tolua_error(tolua_S,"invalid 'self' in accessing variable 'nation'",NULL);
92 return 0;
93 }
94 if (!tolua_isusertype(tolua_S,2,"Nation_Type",0,&tolua_err))
95 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
96#endif
97 self->nation = ((Nation_Type*) tolua_tousertype(tolua_S,2,0));
98 return 0;
99}
100
101/* get function: government of class Player */
102 static int tolua_get_Player_Player_government_ptr(lua_State* tolua_S)
103{
104 Player* self = (Player*) tolua_tousertype(tolua_S,1,0);
105#ifndef TOLUA_RELEASE
106 if (!self) {
107 tolua_error(tolua_S,"invalid 'self' in accessing variable 'government'",NULL);
108 return 0;
109 }
110#endif
111 tolua_pushusertype(tolua_S,(void*)self->government,"Government");
112 return 1;
113}
114
115/* set function: government of class Player */
116 static int tolua_set_Player_Player_government_ptr(lua_State* tolua_S)
117{
118 Player* self = (Player*) tolua_tousertype(tolua_S,1,0);
119#ifndef TOLUA_RELEASE
120 tolua_Error tolua_err;
121 if (!self) {
122 tolua_error(tolua_S,"invalid 'self' in accessing variable 'government'",NULL);
123 return 0;
124 }
125 if (!tolua_isusertype(tolua_S,2,"Government",0,&tolua_err))
126 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
127#endif
128 self->government = ((Government*) tolua_tousertype(tolua_S,2,0));
129 return 0;
130}
131
132/* get function: is_alive of class Player */
133 static int tolua_get_Player_Player_is_alive(lua_State* tolua_S)
134{
135 Player* self = (Player*) tolua_tousertype(tolua_S,1,0);
136#ifndef TOLUA_RELEASE
137 if (!self) {
138 tolua_error(tolua_S,"invalid 'self' in accessing variable 'is_alive'",NULL);
139 return 0;
140 }
141#endif
142 tolua_pushboolean(tolua_S,(bool)self->is_alive);
143 return 1;
144}
145
146/* set function: is_alive of class Player */
147 static int tolua_set_Player_Player_is_alive(lua_State* tolua_S)
148{
149 Player* self = (Player*) tolua_tousertype(tolua_S,1,0);
150#ifndef TOLUA_RELEASE
151 tolua_Error tolua_err;
152 if (!self) {
153 tolua_error(tolua_S,"invalid 'self' in accessing variable 'is_alive'",NULL);
154 return 0;
155 }
156 if (!tolua_isboolean(tolua_S,2,0,&tolua_err))
157 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
158#endif
159 self->is_alive = ((bool) tolua_toboolean(tolua_S,2,0));
160 return 0;
161}
162
163/* get function: name of class City */
164 static int tolua_get_City_City_name(lua_State* tolua_S)
165{
166 City* self = (City*) tolua_tousertype(tolua_S,1,0);
167#ifndef TOLUA_RELEASE
168 if (!self) {
169 tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL);
170 return 0;
171 }
172#endif
173 tolua_pushstring(tolua_S,(const char*)self->name);
174 return 1;
175}
176
177/* get function: owner of class City */
178 static int tolua_get_City_City_owner_ptr(lua_State* tolua_S)
179{
180 City* self = (City*) tolua_tousertype(tolua_S,1,0);
181#ifndef TOLUA_RELEASE
182 if (!self) {
183 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
184 return 0;
185 }
186#endif
187 tolua_pushusertype(tolua_S,(void*)self->owner,"Player");
188 return 1;
189}
190
191/* set function: owner of class City */
192 static int tolua_set_City_City_owner_ptr(lua_State* tolua_S)
193{
194 City* self = (City*) tolua_tousertype(tolua_S,1,0);
195#ifndef TOLUA_RELEASE
196 tolua_Error tolua_err;
197 if (!self) {
198 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
199 return 0;
200 }
201 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
202 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
203#endif
204 self->owner = ((Player*) tolua_tousertype(tolua_S,2,0));
205 return 0;
206}
207
208/* get function: original of class City */
209 static int tolua_get_City_City_original_ptr(lua_State* tolua_S)
210{
211 City* self = (City*) tolua_tousertype(tolua_S,1,0);
212#ifndef TOLUA_RELEASE
213 if (!self) {
214 tolua_error(tolua_S,"invalid 'self' in accessing variable 'original'",NULL);
215 return 0;
216 }
217#endif
218 tolua_pushusertype(tolua_S,(void*)self->original,"Player");
219 return 1;
220}
221
222/* set function: original of class City */
223 static int tolua_set_City_City_original_ptr(lua_State* tolua_S)
224{
225 City* self = (City*) tolua_tousertype(tolua_S,1,0);
226#ifndef TOLUA_RELEASE
227 tolua_Error tolua_err;
228 if (!self) {
229 tolua_error(tolua_S,"invalid 'self' in accessing variable 'original'",NULL);
230 return 0;
231 }
232 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
233 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
234#endif
235 self->original = ((Player*) tolua_tousertype(tolua_S,2,0));
236 return 0;
237}
238
239/* get function: id of class City */
240 static int tolua_get_City_City_id(lua_State* tolua_S)
241{
242 City* self = (City*) tolua_tousertype(tolua_S,1,0);
243#ifndef TOLUA_RELEASE
244 if (!self) {
245 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
246 return 0;
247 }
248#endif
249 tolua_pushnumber(tolua_S,(lua_Number)self->id);
250 return 1;
251}
252
253/* get function: id of class Connection */
254 static int tolua_get_Connection_Connection_id(lua_State* tolua_S)
255{
256 Connection* self = (Connection*) tolua_tousertype(tolua_S,1,0);
257#ifndef TOLUA_RELEASE
258 if (!self) {
259 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
260 return 0;
261 }
262#endif
263 tolua_pushnumber(tolua_S,(lua_Number)self->id);
264 return 1;
265}
266
267/* get function: utype of class Unit */
268 static int tolua_get_Unit_Unit_utype_ptr(lua_State* tolua_S)
269{
270 Unit* self = (Unit*) tolua_tousertype(tolua_S,1,0);
271#ifndef TOLUA_RELEASE
272 if (!self) {
273 tolua_error(tolua_S,"invalid 'self' in accessing variable 'utype'",NULL);
274 return 0;
275 }
276#endif
277 tolua_pushusertype(tolua_S,(void*)self->utype,"Unit_Type");
278 return 1;
279}
280
281/* set function: utype of class Unit */
282 static int tolua_set_Unit_Unit_utype_ptr(lua_State* tolua_S)
283{
284 Unit* self = (Unit*) tolua_tousertype(tolua_S,1,0);
285#ifndef TOLUA_RELEASE
286 tolua_Error tolua_err;
287 if (!self) {
288 tolua_error(tolua_S,"invalid 'self' in accessing variable 'utype'",NULL);
289 return 0;
290 }
291 if (!tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err))
292 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
293#endif
294 self->utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
295 return 0;
296}
297
298/* get function: owner of class Unit */
299 static int tolua_get_Unit_Unit_owner_ptr(lua_State* tolua_S)
300{
301 Unit* self = (Unit*) tolua_tousertype(tolua_S,1,0);
302#ifndef TOLUA_RELEASE
303 if (!self) {
304 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
305 return 0;
306 }
307#endif
308 tolua_pushusertype(tolua_S,(void*)self->owner,"Player");
309 return 1;
310}
311
312/* set function: owner of class Unit */
313 static int tolua_set_Unit_Unit_owner_ptr(lua_State* tolua_S)
314{
315 Unit* self = (Unit*) tolua_tousertype(tolua_S,1,0);
316#ifndef TOLUA_RELEASE
317 tolua_Error tolua_err;
318 if (!self) {
319 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
320 return 0;
321 }
322 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
323 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
324#endif
325 self->owner = ((Player*) tolua_tousertype(tolua_S,2,0));
326 return 0;
327}
328
329/* get function: homecity of class Unit */
330 static int tolua_get_Unit_Unit_homecity(lua_State* tolua_S)
331{
332 Unit* self = (Unit*) tolua_tousertype(tolua_S,1,0);
333#ifndef TOLUA_RELEASE
334 if (!self) {
335 tolua_error(tolua_S,"invalid 'self' in accessing variable 'homecity'",NULL);
336 return 0;
337 }
338#endif
339 tolua_pushnumber(tolua_S,(lua_Number)self->homecity);
340 return 1;
341}
342
343/* set function: homecity of class Unit */
344 static int tolua_set_Unit_Unit_homecity(lua_State* tolua_S)
345{
346 Unit* self = (Unit*) tolua_tousertype(tolua_S,1,0);
347#ifndef TOLUA_RELEASE
348 tolua_Error tolua_err;
349 if (!self) {
350 tolua_error(tolua_S,"invalid 'self' in accessing variable 'homecity'",NULL);
351 return 0;
352 }
353 if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
354 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
355#endif
356 self->homecity = ((int) tolua_tonumber(tolua_S,2,0));
357 return 0;
358}
359
360/* get function: veteran of class Unit */
361 static int tolua_get_Unit_Unit_veteran(lua_State* tolua_S)
362{
363 Unit* self = (Unit*) tolua_tousertype(tolua_S,1,0);
364#ifndef TOLUA_RELEASE
365 if (!self) {
366 tolua_error(tolua_S,"invalid 'self' in accessing variable 'veteran'",NULL);
367 return 0;
368 }
369#endif
370 tolua_pushnumber(tolua_S,(lua_Number)self->veteran);
371 return 1;
372}
373
374/* set function: veteran of class Unit */
375 static int tolua_set_Unit_Unit_veteran(lua_State* tolua_S)
376{
377 Unit* self = (Unit*) tolua_tousertype(tolua_S,1,0);
378#ifndef TOLUA_RELEASE
379 tolua_Error tolua_err;
380 if (!self) {
381 tolua_error(tolua_S,"invalid 'self' in accessing variable 'veteran'",NULL);
382 return 0;
383 }
384 if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
385 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
386#endif
387 self->veteran = ((int) tolua_tonumber(tolua_S,2,0));
388 return 0;
389}
390
391/* get function: id of class Unit */
392 static int tolua_get_Unit_Unit_id(lua_State* tolua_S)
393{
394 Unit* self = (Unit*) tolua_tousertype(tolua_S,1,0);
395#ifndef TOLUA_RELEASE
396 if (!self) {
397 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
398 return 0;
399 }
400#endif
401 tolua_pushnumber(tolua_S,(lua_Number)self->id);
402 return 1;
403}
404
405/* get function: terrain of class Tile */
406 static int tolua_get_Tile_Tile_terrain_ptr(lua_State* tolua_S)
407{
408 Tile* self = (Tile*) tolua_tousertype(tolua_S,1,0);
409#ifndef TOLUA_RELEASE
410 if (!self) {
411 tolua_error(tolua_S,"invalid 'self' in accessing variable 'terrain'",NULL);
412 return 0;
413 }
414#endif
415 tolua_pushusertype(tolua_S,(void*)self->terrain,"Terrain");
416 return 1;
417}
418
419/* set function: terrain of class Tile */
420 static int tolua_set_Tile_Tile_terrain_ptr(lua_State* tolua_S)
421{
422 Tile* self = (Tile*) tolua_tousertype(tolua_S,1,0);
423#ifndef TOLUA_RELEASE
424 tolua_Error tolua_err;
425 if (!self) {
426 tolua_error(tolua_S,"invalid 'self' in accessing variable 'terrain'",NULL);
427 return 0;
428 }
429 if (!tolua_isusertype(tolua_S,2,"Terrain",0,&tolua_err))
430 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
431#endif
432 self->terrain = ((Terrain*) tolua_tousertype(tolua_S,2,0));
433 return 0;
434}
435
436/* get function: owner of class Tile */
437 static int tolua_get_Tile_Tile_owner_ptr(lua_State* tolua_S)
438{
439 Tile* self = (Tile*) tolua_tousertype(tolua_S,1,0);
440#ifndef TOLUA_RELEASE
441 if (!self) {
442 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
443 return 0;
444 }
445#endif
446 tolua_pushusertype(tolua_S,(void*)self->owner,"Player");
447 return 1;
448}
449
450/* set function: owner of class Tile */
451 static int tolua_set_Tile_Tile_owner_ptr(lua_State* tolua_S)
452{
453 Tile* self = (Tile*) tolua_tousertype(tolua_S,1,0);
454#ifndef TOLUA_RELEASE
455 tolua_Error tolua_err;
456 if (!self) {
457 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
458 return 0;
459 }
460 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
461 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
462#endif
463 self->owner = ((Player*) tolua_tousertype(tolua_S,2,0));
464 return 0;
465}
466
467/* get function: index of class Tile */
468 static int tolua_get_Tile_Tile_index(lua_State* tolua_S)
469{
470 Tile* self = (Tile*) tolua_tousertype(tolua_S,1,0);
471#ifndef TOLUA_RELEASE
472 if (!self) {
473 tolua_error(tolua_S,"invalid 'self' in accessing variable 'index'",NULL);
474 return 0;
475 }
476#endif
477 tolua_pushnumber(tolua_S,(lua_Number)self->index);
478 return 1;
479}
480
481/* get function: item_number of class Government */
482 static int tolua_get_Government_Government_item_number(lua_State* tolua_S)
483{
484 Government* self = (Government*) tolua_tousertype(tolua_S,1,0);
485#ifndef TOLUA_RELEASE
486 if (!self) {
487 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
488 return 0;
489 }
490#endif
491 tolua_pushnumber(tolua_S,(lua_Number)self->item_number);
492 return 1;
493}
494
495/* get function: item_number of class Nation_Type */
496 static int tolua_get_Nation_Type_Nation_Type_item_number(lua_State* tolua_S)
497{
498 Nation_Type* self = (Nation_Type*) tolua_tousertype(tolua_S,1,0);
499#ifndef TOLUA_RELEASE
500 if (!self) {
501 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
502 return 0;
503 }
504#endif
505 tolua_pushnumber(tolua_S,(lua_Number)self->item_number);
506 return 1;
507}
508
509/* get function: build_cost of class Building_Type */
510 static int tolua_get_Building_Type_Building_Type_build_cost(lua_State* tolua_S)
511{
512 Building_Type* self = (Building_Type*) tolua_tousertype(tolua_S,1,0);
513#ifndef TOLUA_RELEASE
514 if (!self) {
515 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
516 return 0;
517 }
518#endif
519 tolua_pushnumber(tolua_S,(lua_Number)self->build_cost);
520 return 1;
521}
522
523/* set function: build_cost of class Building_Type */
524 static int tolua_set_Building_Type_Building_Type_build_cost(lua_State* tolua_S)
525{
526 Building_Type* self = (Building_Type*) tolua_tousertype(tolua_S,1,0);
527#ifndef TOLUA_RELEASE
528 tolua_Error tolua_err;
529 if (!self) {
530 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
531 return 0;
532 }
533 if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
534 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
535#endif
536 self->build_cost = ((int) tolua_tonumber(tolua_S,2,0));
537 return 0;
538}
539
540/* get function: item_number of class Building_Type */
541 static int tolua_get_Building_Type_Building_Type_item_number(lua_State* tolua_S)
542{
543 Building_Type* self = (Building_Type*) tolua_tousertype(tolua_S,1,0);
544#ifndef TOLUA_RELEASE
545 if (!self) {
546 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
547 return 0;
548 }
549#endif
550 tolua_pushnumber(tolua_S,(lua_Number)self->item_number);
551 return 1;
552}
553
554/* get function: build_cost of class Unit_Type */
555 static int tolua_get_Unit_Type_Unit_Type_build_cost(lua_State* tolua_S)
556{
557 Unit_Type* self = (Unit_Type*) tolua_tousertype(tolua_S,1,0);
558#ifndef TOLUA_RELEASE
559 if (!self) {
560 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
561 return 0;
562 }
563#endif
564 tolua_pushnumber(tolua_S,(lua_Number)self->build_cost);
565 return 1;
566}
567
568/* set function: build_cost of class Unit_Type */
569 static int tolua_set_Unit_Type_Unit_Type_build_cost(lua_State* tolua_S)
570{
571 Unit_Type* self = (Unit_Type*) tolua_tousertype(tolua_S,1,0);
572#ifndef TOLUA_RELEASE
573 tolua_Error tolua_err;
574 if (!self) {
575 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
576 return 0;
577 }
578 if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
579 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
580#endif
581 self->build_cost = ((int) tolua_tonumber(tolua_S,2,0));
582 return 0;
583}
584
585/* get function: obsoleted_by of class Unit_Type */
586 static int tolua_get_Unit_Type_Unit_Type_obsoleted_by_ptr(lua_State* tolua_S)
587{
588 Unit_Type* self = (Unit_Type*) tolua_tousertype(tolua_S,1,0);
589#ifndef TOLUA_RELEASE
590 if (!self) {
591 tolua_error(tolua_S,"invalid 'self' in accessing variable 'obsoleted_by'",NULL);
592 return 0;
593 }
594#endif
595 tolua_pushusertype(tolua_S,(void*)self->obsoleted_by,"Unit_Type");
596 return 1;
597}
598
599/* set function: obsoleted_by of class Unit_Type */
600 static int tolua_set_Unit_Type_Unit_Type_obsoleted_by_ptr(lua_State* tolua_S)
601{
602 Unit_Type* self = (Unit_Type*) tolua_tousertype(tolua_S,1,0);
603#ifndef TOLUA_RELEASE
604 tolua_Error tolua_err;
605 if (!self) {
606 tolua_error(tolua_S,"invalid 'self' in accessing variable 'obsoleted_by'",NULL);
607 return 0;
608 }
609 if (!tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err))
610 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
611#endif
612 self->obsoleted_by = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
613 return 0;
614}
615
616/* get function: item_number of class Unit_Type */
617 static int tolua_get_Unit_Type_Unit_Type_item_number(lua_State* tolua_S)
618{
619 Unit_Type* self = (Unit_Type*) tolua_tousertype(tolua_S,1,0);
620#ifndef TOLUA_RELEASE
621 if (!self) {
622 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
623 return 0;
624 }
625#endif
626 tolua_pushnumber(tolua_S,(lua_Number)self->item_number);
627 return 1;
628}
629
630/* get function: item_number of class Tech_Type */
631 static int tolua_get_Tech_Type_Tech_Type_item_number(lua_State* tolua_S)
632{
633 Tech_Type* self = (Tech_Type*) tolua_tousertype(tolua_S,1,0);
634#ifndef TOLUA_RELEASE
635 if (!self) {
636 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
637 return 0;
638 }
639#endif
640 tolua_pushnumber(tolua_S,(lua_Number)self->item_number);
641 return 1;
642}
643
644/* get function: cost of class Tech_Type */
645 static int tolua_get_Tech_Type_Tech_Type_cost(lua_State* tolua_S)
646{
647 Tech_Type* self = (Tech_Type*) tolua_tousertype(tolua_S,1,0);
648#ifndef TOLUA_RELEASE
649 if (!self) {
650 tolua_error(tolua_S,"invalid 'self' in accessing variable 'cost'",NULL);
651 return 0;
652 }
653#endif
654 tolua_pushnumber(tolua_S,(lua_Number)self->cost);
655 return 1;
656}
657
658/* get function: item_number of class Terrain */
659 static int tolua_get_Terrain_Terrain_item_number(lua_State* tolua_S)
660{
661 Terrain* self = (Terrain*) tolua_tousertype(tolua_S,1,0);
662#ifndef TOLUA_RELEASE
663 if (!self) {
664 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
665 return 0;
666 }
667#endif
668 tolua_pushnumber(tolua_S,(lua_Number)self->item_number);
669 return 1;
670}
671
672/* get function: id of class Disaster */
673 static int tolua_get_Disaster_Disaster_id(lua_State* tolua_S)
674{
675 Disaster* self = (Disaster*) tolua_tousertype(tolua_S,1,0);
676#ifndef TOLUA_RELEASE
677 if (!self) {
678 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
679 return 0;
680 }
681#endif
682 tolua_pushnumber(tolua_S,(lua_Number)self->id);
683 return 1;
684}
685
686/* get function: id of class Achievement */
687 static int tolua_get_Achievement_Achievement_id(lua_State* tolua_S)
688{
689 Achievement* self = (Achievement*) tolua_tousertype(tolua_S,1,0);
690#ifndef TOLUA_RELEASE
691 if (!self) {
692 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
693 return 0;
694 }
695#endif
696 tolua_pushnumber(tolua_S,(lua_Number)self->id);
697 return 1;
698}
699
700/* get function: id of class Action */
701 static int tolua_get_Action_Action_id(lua_State* tolua_S)
702{
703 Action* self = (Action*) tolua_tousertype(tolua_S,1,0);
704#ifndef TOLUA_RELEASE
705 if (!self) {
706 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
707 return 0;
708 }
709#endif
710 tolua_pushnumber(tolua_S,(lua_Number)self->id);
711 return 1;
712}
713
714/* get function: base_tech_cost of class Game_Info */
715 static int tolua_get_Game_Info_Game_Info_base_tech_cost(lua_State* tolua_S)
716{
717 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
718#ifndef TOLUA_RELEASE
719 if (!self) {
720 tolua_error(tolua_S,"invalid 'self' in accessing variable 'base_tech_cost'",NULL);
721 return 0;
722 }
723#endif
724 tolua_pushnumber(tolua_S,(lua_Number)self->base_tech_cost);
725 return 1;
726}
727
728/* get function: min_tech_cost of class Game_Info */
729 static int tolua_get_Game_Info_Game_Info_min_tech_cost(lua_State* tolua_S)
730{
731 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
732#ifndef TOLUA_RELEASE
733 if (!self) {
734 tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_tech_cost'",NULL);
735 return 0;
736 }
737#endif
738 tolua_pushnumber(tolua_S,(lua_Number)self->min_tech_cost);
739 return 1;
740}
741
742/* get function: tech_leak_pct of class Game_Info */
743 static int tolua_get_Game_Info_Game_Info_tech_leak_pct(lua_State* tolua_S)
744{
745 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
746#ifndef TOLUA_RELEASE
747 if (!self) {
748 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_leak_pct'",NULL);
749 return 0;
750 }
751#endif
752 tolua_pushnumber(tolua_S,(lua_Number)self->tech_leak_pct);
753 return 1;
754}
755
756/* get function: tech_steal_allow_holes of class Game_Info */
757 static int tolua_get_Game_Info_Game_Info_tech_steal_allow_holes(lua_State* tolua_S)
758{
759 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
760#ifndef TOLUA_RELEASE
761 if (!self) {
762 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_steal_allow_holes'",NULL);
763 return 0;
764 }
765#endif
766 tolua_pushboolean(tolua_S,(bool)self->tech_steal_allow_holes);
767 return 1;
768}
769
770/* get function: tech_trade_allow_holes of class Game_Info */
771 static int tolua_get_Game_Info_Game_Info_tech_trade_allow_holes(lua_State* tolua_S)
772{
773 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
774#ifndef TOLUA_RELEASE
775 if (!self) {
776 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_trade_allow_holes'",NULL);
777 return 0;
778 }
779#endif
780 tolua_pushboolean(tolua_S,(bool)self->tech_trade_allow_holes);
781 return 1;
782}
783
784/* get function: tech_trade_loss_allow_holes of class Game_Info */
785 static int tolua_get_Game_Info_Game_Info_tech_trade_loss_allow_holes(lua_State* tolua_S)
786{
787 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
788#ifndef TOLUA_RELEASE
789 if (!self) {
790 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_trade_loss_allow_holes'",NULL);
791 return 0;
792 }
793#endif
794 tolua_pushboolean(tolua_S,(bool)self->tech_trade_loss_allow_holes);
795 return 1;
796}
797
798/* get function: tech_parasite_allow_holes of class Game_Info */
799 static int tolua_get_Game_Info_Game_Info_tech_parasite_allow_holes(lua_State* tolua_S)
800{
801 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
802#ifndef TOLUA_RELEASE
803 if (!self) {
804 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_parasite_allow_holes'",NULL);
805 return 0;
806 }
807#endif
808 tolua_pushboolean(tolua_S,(bool)self->tech_parasite_allow_holes);
809 return 1;
810}
811
812/* get function: tech_loss_allow_holes of class Game_Info */
813 static int tolua_get_Game_Info_Game_Info_tech_loss_allow_holes(lua_State* tolua_S)
814{
815 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
816#ifndef TOLUA_RELEASE
817 if (!self) {
818 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_loss_allow_holes'",NULL);
819 return 0;
820 }
821#endif
822 tolua_pushboolean(tolua_S,(bool)self->tech_loss_allow_holes);
823 return 1;
824}
825
826/* get function: sciencebox of class Game_Info */
827 static int tolua_get_Game_Info_Game_Info_sciencebox(lua_State* tolua_S)
828{
829 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
830#ifndef TOLUA_RELEASE
831 if (!self) {
832 tolua_error(tolua_S,"invalid 'self' in accessing variable 'sciencebox'",NULL);
833 return 0;
834 }
835#endif
836 tolua_pushnumber(tolua_S,(lua_Number)self->sciencebox);
837 return 1;
838}
839
840/* get function: tech_cost_style of class Game_Info */
841 static int tolua_get_Game_Info_Game_Info_tech_cost_style(lua_State* tolua_S)
842{
843 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
844#ifndef TOLUA_RELEASE
845 if (!self) {
846 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_cost_style'",NULL);
847 return 0;
848 }
849#endif
850 tolua_pushnumber(tolua_S,(lua_Number)self->tech_cost_style);
851 return 1;
852}
853
854/* get function: tech_leakage of class Game_Info */
855 static int tolua_get_Game_Info_Game_Info_tech_leakage(lua_State* tolua_S)
856{
857 Game_Info* self = (Game_Info*) tolua_tousertype(tolua_S,1,0);
858#ifndef TOLUA_RELEASE
859 if (!self) {
860 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_leakage'",NULL);
861 return 0;
862 }
863#endif
864 tolua_pushnumber(tolua_S,(lua_Number)self->tech_leakage);
865 return 1;
866}
867
868/* get function: game_info_substructure */
869 static int tolua_get_game_game_info_substructure(lua_State* tolua_S)
870{
871 tolua_pushusertype(tolua_S,(void*)&game_info_substructure,"Game_Info");
872 return 1;
873}
874
875/* set function: game_info_substructure */
876 static int tolua_set_game_game_info_substructure(lua_State* tolua_S)
877{
878#ifndef TOLUA_RELEASE
879 tolua_Error tolua_err;
880 if (!tolua_isusertype(tolua_S,2,"Game_Info",0,&tolua_err))
881 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
882#endif
883 game_info_substructure = *((Game_Info*) tolua_tousertype(tolua_S,2,0));
884 return 0;
885}
886
887/* function: api_methods_game_turn */
888 static int tolua_game_game_current_turn00(lua_State* tolua_S)
889{
890#ifndef TOLUA_RELEASE
891 tolua_Error tolua_err;
892 if (
893 !tolua_isnoobj(tolua_S,1,&tolua_err)
894 )
895 goto tolua_lerror;
896 else
897#endif
898 {
899 lua_State* L = tolua_S;
900 {
901 int tolua_ret = (int) api_methods_game_turn(L);
902 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
903 }
904 }
905 return 1;
906#ifndef TOLUA_RELEASE
907 tolua_lerror:
908 tolua_error(tolua_S,"#ferror in function 'current_turn'.",&tolua_err);
909 return 0;
910#endif
911}
912
913/* function: api_methods_game_turn_deprecated */
914 static int tolua_game_game_turn00(lua_State* tolua_S)
915{
916#ifndef TOLUA_RELEASE
917 tolua_Error tolua_err;
918 if (
919 !tolua_isnoobj(tolua_S,1,&tolua_err)
920 )
921 goto tolua_lerror;
922 else
923#endif
924 {
925 lua_State* L = tolua_S;
926 {
927 int tolua_ret = (int) api_methods_game_turn_deprecated(L);
928 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
929 }
930 }
931 return 1;
932#ifndef TOLUA_RELEASE
933 tolua_lerror:
934 tolua_error(tolua_S,"#ferror in function 'turn'.",&tolua_err);
935 return 0;
936#endif
937}
938
939/* function: api_methods_game_year */
940 static int tolua_game_game_current_year00(lua_State* tolua_S)
941{
942#ifndef TOLUA_RELEASE
943 tolua_Error tolua_err;
944 if (
945 !tolua_isnoobj(tolua_S,1,&tolua_err)
946 )
947 goto tolua_lerror;
948 else
949#endif
950 {
951 lua_State* L = tolua_S;
952 {
953 int tolua_ret = (int) api_methods_game_year(L);
954 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
955 }
956 }
957 return 1;
958#ifndef TOLUA_RELEASE
959 tolua_lerror:
960 tolua_error(tolua_S,"#ferror in function 'current_year'.",&tolua_err);
961 return 0;
962#endif
963}
964
965/* function: api_methods_game_year_fragment */
966 static int tolua_game_game_current_fragment00(lua_State* tolua_S)
967{
968#ifndef TOLUA_RELEASE
969 tolua_Error tolua_err;
970 if (
971 !tolua_isnoobj(tolua_S,1,&tolua_err)
972 )
973 goto tolua_lerror;
974 else
975#endif
976 {
977 lua_State* L = tolua_S;
978 {
979 int tolua_ret = (int) api_methods_game_year_fragment(L);
980 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
981 }
982 }
983 return 1;
984#ifndef TOLUA_RELEASE
985 tolua_lerror:
986 tolua_error(tolua_S,"#ferror in function 'current_fragment'.",&tolua_err);
987 return 0;
988#endif
989}
990
991/* function: api_methods_game_year_text */
992 static int tolua_game_game_current_year_text00(lua_State* tolua_S)
993{
994#ifndef TOLUA_RELEASE
995 tolua_Error tolua_err;
996 if (
997 !tolua_isnoobj(tolua_S,1,&tolua_err)
998 )
999 goto tolua_lerror;
1000 else
1001#endif
1002 {
1003 lua_State* L = tolua_S;
1004 {
1005 const char* tolua_ret = (const char*) api_methods_game_year_text(L);
1006 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1007 }
1008 }
1009 return 1;
1010#ifndef TOLUA_RELEASE
1011 tolua_lerror:
1012 tolua_error(tolua_S,"#ferror in function 'current_year_text'.",&tolua_err);
1013 return 0;
1014#endif
1015}
1016
1017/* function: api_methods_game_rulesetdir */
1018 static int tolua_game_game_rulesetdir00(lua_State* tolua_S)
1019{
1020#ifndef TOLUA_RELEASE
1021 tolua_Error tolua_err;
1022 if (
1023 !tolua_isnoobj(tolua_S,1,&tolua_err)
1024 )
1025 goto tolua_lerror;
1026 else
1027#endif
1028 {
1029 lua_State* L = tolua_S;
1030 {
1031 const char* tolua_ret = (const char*) api_methods_game_rulesetdir(L);
1032 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1033 }
1034 }
1035 return 1;
1036#ifndef TOLUA_RELEASE
1037 tolua_lerror:
1038 tolua_error(tolua_S,"#ferror in function 'rulesetdir'.",&tolua_err);
1039 return 0;
1040#endif
1041}
1042
1043/* function: api_methods_game_ruleset_name */
1044 static int tolua_game_game_ruleset_name00(lua_State* tolua_S)
1045{
1046#ifndef TOLUA_RELEASE
1047 tolua_Error tolua_err;
1048 if (
1049 !tolua_isnoobj(tolua_S,1,&tolua_err)
1050 )
1051 goto tolua_lerror;
1052 else
1053#endif
1054 {
1055 lua_State* L = tolua_S;
1056 {
1057 const char* tolua_ret = (const char*) api_methods_game_ruleset_name(L);
1058 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1059 }
1060 }
1061 return 1;
1062#ifndef TOLUA_RELEASE
1063 tolua_lerror:
1064 tolua_error(tolua_S,"#ferror in function 'ruleset_name'.",&tolua_err);
1065 return 0;
1066#endif
1067}
1068
1069/* function: api_methods_counter_rule_name */
1070 static int tolua_game_Counter_rule_name00(lua_State* tolua_S)
1071{
1072#ifndef TOLUA_RELEASE
1073 tolua_Error tolua_err;
1074 if (
1075 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1076 !tolua_isnoobj(tolua_S,2,&tolua_err)
1077 )
1078 goto tolua_lerror;
1079 else
1080#endif
1081 {
1082 lua_State* L = tolua_S;
1083 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1084 {
1085 const char* tolua_ret = (const char*) api_methods_counter_rule_name(L,c);
1086 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1087 }
1088 }
1089 return 1;
1090#ifndef TOLUA_RELEASE
1091 tolua_lerror:
1092 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
1093 return 0;
1094#endif
1095}
1096
1097/* function: api_methods_counter_name_translation */
1098 static int tolua_game_Counter_name_translation00(lua_State* tolua_S)
1099{
1100#ifndef TOLUA_RELEASE
1101 tolua_Error tolua_err;
1102 if (
1103 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1104 !tolua_isnoobj(tolua_S,2,&tolua_err)
1105 )
1106 goto tolua_lerror;
1107 else
1108#endif
1109 {
1110 lua_State* L = tolua_S;
1111 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1112 {
1113 const char* tolua_ret = (const char*) api_methods_counter_name_translation(L,c);
1114 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1115 }
1116 }
1117 return 1;
1118#ifndef TOLUA_RELEASE
1119 tolua_lerror:
1120 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
1121 return 0;
1122#endif
1123}
1124
1125/* function: api_methods_counter_city_get */
1126 static int tolua_game_Counter_get00(lua_State* tolua_S)
1127{
1128#ifndef TOLUA_RELEASE
1129 tolua_Error tolua_err;
1130 if (
1131 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1132 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
1133 !tolua_isnoobj(tolua_S,3,&tolua_err)
1134 )
1135 goto tolua_lerror;
1136 else
1137#endif
1138 {
1139 lua_State* L = tolua_S;
1140 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1141 City* city = ((City*) tolua_tousertype(tolua_S,2,0));
1142 {
1143 int tolua_ret = (int) api_methods_counter_city_get(L,c,city);
1144 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1145 }
1146 }
1147 return 1;
1148#ifndef TOLUA_RELEASE
1149 tolua_lerror:
1150 tolua_error(tolua_S,"#ferror in function 'get'.",&tolua_err);
1151 return 0;
1152#endif
1153}
1154
1155/* function: api_methods_player_number */
1156 static int tolua_game_Player_properties_id00(lua_State* tolua_S)
1157{
1158#ifndef TOLUA_RELEASE
1159 tolua_Error tolua_err;
1160 if (
1161 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1162 !tolua_isnoobj(tolua_S,2,&tolua_err)
1163 )
1164 goto tolua_lerror;
1165 else
1166#endif
1167 {
1168 lua_State* L = tolua_S;
1169 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1170 {
1171 int tolua_ret = (int) api_methods_player_number(L,self);
1172 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1173 }
1174 }
1175 return 1;
1176#ifndef TOLUA_RELEASE
1177 tolua_lerror:
1178 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
1179 return 0;
1180#endif
1181}
1182
1183/* function: api_methods_player_bulbs */
1184 static int tolua_game_Player_properties_bulbs00(lua_State* tolua_S)
1185{
1186#ifndef TOLUA_RELEASE
1187 tolua_Error tolua_err;
1188 if (
1189 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1190 !tolua_isnoobj(tolua_S,2,&tolua_err)
1191 )
1192 goto tolua_lerror;
1193 else
1194#endif
1195 {
1196 lua_State* L = tolua_S;
1197 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1198 {
1199 int tolua_ret = (int) api_methods_player_bulbs(L,pplayer);
1200 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1201 }
1202 }
1203 return 1;
1204#ifndef TOLUA_RELEASE
1205 tolua_lerror:
1206 tolua_error(tolua_S,"#ferror in function 'bulbs'.",&tolua_err);
1207 return 0;
1208#endif
1209}
1210
1211/* function: api_methods_player_controlling_gui */
1212 static int tolua_game_Player_controlling_gui00(lua_State* tolua_S)
1213{
1214#ifndef TOLUA_RELEASE
1215 tolua_Error tolua_err;
1216 if (
1217 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1218 !tolua_isnoobj(tolua_S,2,&tolua_err)
1219 )
1220 goto tolua_lerror;
1221 else
1222#endif
1223 {
1224 lua_State* L = tolua_S;
1225 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1226 {
1227 const char* tolua_ret = (const char*) api_methods_player_controlling_gui(L,self);
1228 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1229 }
1230 }
1231 return 1;
1232#ifndef TOLUA_RELEASE
1233 tolua_lerror:
1234 tolua_error(tolua_S,"#ferror in function 'controlling_gui'.",&tolua_err);
1235 return 0;
1236#endif
1237}
1238
1239/* function: api_methods_player_num_cities */
1240 static int tolua_game_Player_num_cities00(lua_State* tolua_S)
1241{
1242#ifndef TOLUA_RELEASE
1243 tolua_Error tolua_err;
1244 if (
1245 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1246 !tolua_isnoobj(tolua_S,2,&tolua_err)
1247 )
1248 goto tolua_lerror;
1249 else
1250#endif
1251 {
1252 lua_State* L = tolua_S;
1253 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1254 {
1255 int tolua_ret = (int) api_methods_player_num_cities(L,self);
1256 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1257 }
1258 }
1259 return 1;
1260#ifndef TOLUA_RELEASE
1261 tolua_lerror:
1262 tolua_error(tolua_S,"#ferror in function 'num_cities'.",&tolua_err);
1263 return 0;
1264#endif
1265}
1266
1267/* function: api_methods_player_num_units */
1268 static int tolua_game_Player_num_units00(lua_State* tolua_S)
1269{
1270#ifndef TOLUA_RELEASE
1271 tolua_Error tolua_err;
1272 if (
1273 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1274 !tolua_isnoobj(tolua_S,2,&tolua_err)
1275 )
1276 goto tolua_lerror;
1277 else
1278#endif
1279 {
1280 lua_State* L = tolua_S;
1281 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1282 {
1283 int tolua_ret = (int) api_methods_player_num_units(L,self);
1284 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1285 }
1286 }
1287 return 1;
1288#ifndef TOLUA_RELEASE
1289 tolua_lerror:
1290 tolua_error(tolua_S,"#ferror in function 'num_units'.",&tolua_err);
1291 return 0;
1292#endif
1293}
1294
1295/* function: api_methods_player_future */
1296 static int tolua_game_Player_num_future_techs00(lua_State* tolua_S)
1297{
1298#ifndef TOLUA_RELEASE
1299 tolua_Error tolua_err;
1300 if (
1301 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1302 !tolua_isnoobj(tolua_S,2,&tolua_err)
1303 )
1304 goto tolua_lerror;
1305 else
1306#endif
1307 {
1308 lua_State* L = tolua_S;
1309 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1310 {
1311 int tolua_ret = (int) api_methods_player_future(L,pplayer);
1312 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1313 }
1314 }
1315 return 1;
1316#ifndef TOLUA_RELEASE
1317 tolua_lerror:
1318 tolua_error(tolua_S,"#ferror in function 'num_future_techs'.",&tolua_err);
1319 return 0;
1320#endif
1321}
1322
1323/* function: api_methods_player_has_wonder */
1324 static int tolua_game_Player_has_wonder00(lua_State* tolua_S)
1325{
1326#ifndef TOLUA_RELEASE
1327 tolua_Error tolua_err;
1328 if (
1329 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1330 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1331 !tolua_isnoobj(tolua_S,3,&tolua_err)
1332 )
1333 goto tolua_lerror;
1334 else
1335#endif
1336 {
1337 lua_State* L = tolua_S;
1338 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1339 Building_Type* building = ((Building_Type*) tolua_tousertype(tolua_S,2,0));
1340 {
1341 bool tolua_ret = (bool) api_methods_player_has_wonder(L,self,building);
1342 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1343 }
1344 }
1345 return 1;
1346#ifndef TOLUA_RELEASE
1347 tolua_lerror:
1348 tolua_error(tolua_S,"#ferror in function 'has_wonder'.",&tolua_err);
1349 return 0;
1350#endif
1351}
1352
1353/* function: api_methods_player_gold */
1354 static int tolua_game_Player_gold00(lua_State* tolua_S)
1355{
1356#ifndef TOLUA_RELEASE
1357 tolua_Error tolua_err;
1358 if (
1359 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1360 !tolua_isnoobj(tolua_S,2,&tolua_err)
1361 )
1362 goto tolua_lerror;
1363 else
1364#endif
1365 {
1366 lua_State* L = tolua_S;
1367 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1368 {
1369 int tolua_ret = (int) api_methods_player_gold(L,self);
1370 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1371 }
1372 }
1373 return 1;
1374#ifndef TOLUA_RELEASE
1375 tolua_lerror:
1376 tolua_error(tolua_S,"#ferror in function 'gold'.",&tolua_err);
1377 return 0;
1378#endif
1379}
1380
1381/* function: api_methods_player_infrapoints */
1382 static int tolua_game_Player_infrapoints00(lua_State* tolua_S)
1383{
1384#ifndef TOLUA_RELEASE
1385 tolua_Error tolua_err;
1386 if (
1387 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1388 !tolua_isnoobj(tolua_S,2,&tolua_err)
1389 )
1390 goto tolua_lerror;
1391 else
1392#endif
1393 {
1394 lua_State* L = tolua_S;
1395 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1396 {
1397 int tolua_ret = (int) api_methods_player_infrapoints(L,self);
1398 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1399 }
1400 }
1401 return 1;
1402#ifndef TOLUA_RELEASE
1403 tolua_lerror:
1404 tolua_error(tolua_S,"#ferror in function 'infrapoints'.",&tolua_err);
1405 return 0;
1406#endif
1407}
1408
1409/* function: api_methods_player_knows_tech */
1410 static int tolua_game_Player_knows_tech00(lua_State* tolua_S)
1411{
1412#ifndef TOLUA_RELEASE
1413 tolua_Error tolua_err;
1414 if (
1415 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1416 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1417 !tolua_isnoobj(tolua_S,3,&tolua_err)
1418 )
1419 goto tolua_lerror;
1420 else
1421#endif
1422 {
1423 lua_State* L = tolua_S;
1424 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1425 Tech_Type* ptech = ((Tech_Type*) tolua_tousertype(tolua_S,2,0));
1426 {
1427 bool tolua_ret = (bool) api_methods_player_knows_tech(L,self,ptech);
1428 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1429 }
1430 }
1431 return 1;
1432#ifndef TOLUA_RELEASE
1433 tolua_lerror:
1434 tolua_error(tolua_S,"#ferror in function 'knows_tech'.",&tolua_err);
1435 return 0;
1436#endif
1437}
1438
1439/* function: api_method_player_can_research */
1440 static int tolua_game_Player_can_research00(lua_State* tolua_S)
1441{
1442#ifndef TOLUA_RELEASE
1443 tolua_Error tolua_err;
1444 if (
1445 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1446 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1447 !tolua_isnoobj(tolua_S,3,&tolua_err)
1448 )
1449 goto tolua_lerror;
1450 else
1451#endif
1452 {
1453 lua_State* L = tolua_S;
1454 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1455 Tech_Type* ptech = ((Tech_Type*) tolua_tousertype(tolua_S,2,0));
1456 {
1457 bool tolua_ret = (bool) api_method_player_can_research(L,pplayer,ptech);
1458 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1459 }
1460 }
1461 return 1;
1462#ifndef TOLUA_RELEASE
1463 tolua_lerror:
1464 tolua_error(tolua_S,"#ferror in function 'can_research'.",&tolua_err);
1465 return 0;
1466#endif
1467}
1468
1469/* function: api_methods_player_tech_cost */
1470 static int tolua_game_Player_tech_cost00(lua_State* tolua_S)
1471{
1472#ifndef TOLUA_RELEASE
1473 tolua_Error tolua_err;
1474 if (
1475 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1476 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1477 !tolua_isnoobj(tolua_S,3,&tolua_err)
1478 )
1479 goto tolua_lerror;
1480 else
1481#endif
1482 {
1483 lua_State* L = tolua_S;
1484 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1485 Tech_Type* ptech = ((Tech_Type*) tolua_tousertype(tolua_S,2,0));
1486 {
1487 int tolua_ret = (int) api_methods_player_tech_cost(L,pplayer,ptech);
1488 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1489 }
1490 }
1491 return 1;
1492#ifndef TOLUA_RELEASE
1493 tolua_lerror:
1494 tolua_error(tolua_S,"#ferror in function 'tech_cost'.",&tolua_err);
1495 return 0;
1496#endif
1497}
1498
1499/* function: api_methods_player_researching */
1500 static int tolua_game_Player_researching00(lua_State* tolua_S)
1501{
1502#ifndef TOLUA_RELEASE
1503 tolua_Error tolua_err;
1504 if (
1505 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1506 !tolua_isnoobj(tolua_S,2,&tolua_err)
1507 )
1508 goto tolua_lerror;
1509 else
1510#endif
1511 {
1512 lua_State* L = tolua_S;
1513 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1514 {
1515 lua_Object tolua_ret = (lua_Object) api_methods_player_researching(L,pplayer);
1516 tolua_pushvalue(tolua_S,(int)tolua_ret);
1517 }
1518 }
1519 return 1;
1520#ifndef TOLUA_RELEASE
1521 tolua_lerror:
1522 tolua_error(tolua_S,"#ferror in function 'researching'.",&tolua_err);
1523 return 0;
1524#endif
1525}
1526
1527/* function: api_methods_player_research_cost */
1528 static int tolua_game_Player_researching_cost00(lua_State* tolua_S)
1529{
1530#ifndef TOLUA_RELEASE
1531 tolua_Error tolua_err;
1532 if (
1533 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1534 !tolua_isnoobj(tolua_S,2,&tolua_err)
1535 )
1536 goto tolua_lerror;
1537 else
1538#endif
1539 {
1540 lua_State* L = tolua_S;
1541 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1542 {
1543 int tolua_ret = (int) api_methods_player_research_cost(L,pplayer);
1544 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1545 }
1546 }
1547 return 1;
1548#ifndef TOLUA_RELEASE
1549 tolua_lerror:
1550 tolua_error(tolua_S,"#ferror in function 'researching_cost'.",&tolua_err);
1551 return 0;
1552#endif
1553}
1554
1555/* function: api_methods_player_shares_research */
1556 static int tolua_game_Player_shares_research00(lua_State* tolua_S)
1557{
1558#ifndef TOLUA_RELEASE
1559 tolua_Error tolua_err;
1560 if (
1561 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1562 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
1563 !tolua_isnoobj(tolua_S,3,&tolua_err)
1564 )
1565 goto tolua_lerror;
1566 else
1567#endif
1568 {
1569 lua_State* L = tolua_S;
1570 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1571 Player* other = ((Player*) tolua_tousertype(tolua_S,2,0));
1572 {
1573 bool tolua_ret = (bool) api_methods_player_shares_research(L,self,other);
1574 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1575 }
1576 }
1577 return 1;
1578#ifndef TOLUA_RELEASE
1579 tolua_lerror:
1580 tolua_error(tolua_S,"#ferror in function 'shares_research'.",&tolua_err);
1581 return 0;
1582#endif
1583}
1584
1585/* function: api_methods_research_rule_name */
1586 static int tolua_game_Player_research_rule_name00(lua_State* tolua_S)
1587{
1588#ifndef TOLUA_RELEASE
1589 tolua_Error tolua_err;
1590 if (
1591 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1592 !tolua_isnoobj(tolua_S,2,&tolua_err)
1593 )
1594 goto tolua_lerror;
1595 else
1596#endif
1597 {
1598 lua_State* L = tolua_S;
1599 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1600 {
1601 const char* tolua_ret = (const char*) api_methods_research_rule_name(L,self);
1602 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1603 }
1604 }
1605 return 1;
1606#ifndef TOLUA_RELEASE
1607 tolua_lerror:
1608 tolua_error(tolua_S,"#ferror in function 'research_rule_name'.",&tolua_err);
1609 return 0;
1610#endif
1611}
1612
1613/* function: api_methods_research_name_translation */
1614 static int tolua_game_Player_research_name_translation00(lua_State* tolua_S)
1615{
1616#ifndef TOLUA_RELEASE
1617 tolua_Error tolua_err;
1618 if (
1619 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1620 !tolua_isnoobj(tolua_S,2,&tolua_err)
1621 )
1622 goto tolua_lerror;
1623 else
1624#endif
1625 {
1626 lua_State* L = tolua_S;
1627 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1628 {
1629 const char* tolua_ret = (const char*) api_methods_research_name_translation(L,self);
1630 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1631 }
1632 }
1633 return 1;
1634#ifndef TOLUA_RELEASE
1635 tolua_lerror:
1636 tolua_error(tolua_S,"#ferror in function 'research_name_translation'.",&tolua_err);
1637 return 0;
1638#endif
1639}
1640
1641/* function: api_methods_player_culture_get */
1642 static int tolua_game_Player_culture00(lua_State* tolua_S)
1643{
1644#ifndef TOLUA_RELEASE
1645 tolua_Error tolua_err;
1646 if (
1647 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1648 !tolua_isnoobj(tolua_S,2,&tolua_err)
1649 )
1650 goto tolua_lerror;
1651 else
1652#endif
1653 {
1654 lua_State* L = tolua_S;
1655 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1656 {
1657 int tolua_ret = (int) api_methods_player_culture_get(L,self);
1658 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1659 }
1660 }
1661 return 1;
1662#ifndef TOLUA_RELEASE
1663 tolua_lerror:
1664 tolua_error(tolua_S,"#ferror in function 'culture'.",&tolua_err);
1665 return 0;
1666#endif
1667}
1668
1669/* function: api_methods_player_has_flag */
1670 static int tolua_game_Player_has_flag00(lua_State* tolua_S)
1671{
1672#ifndef TOLUA_RELEASE
1673 tolua_Error tolua_err;
1674 if (
1675 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1676 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
1677 !tolua_isnoobj(tolua_S,3,&tolua_err)
1678 )
1679 goto tolua_lerror;
1680 else
1681#endif
1682 {
1683 lua_State* L = tolua_S;
1684 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1685 const char* flag = ((const char*) tolua_tostring(tolua_S,2,0));
1686 {
1687 bool tolua_ret = (bool) api_methods_player_has_flag(L,self,flag);
1688 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1689 }
1690 }
1691 return 1;
1692#ifndef TOLUA_RELEASE
1693 tolua_lerror:
1694 tolua_error(tolua_S,"#ferror in function 'has_flag'.",&tolua_err);
1695 return 0;
1696#endif
1697}
1698
1699/* function: api_methods_player_can_upgrade */
1700 static int tolua_game_Player_can_upgrade00(lua_State* tolua_S)
1701{
1702#ifndef TOLUA_RELEASE
1703 tolua_Error tolua_err;
1704 if (
1705 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1706 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
1707 !tolua_isnoobj(tolua_S,3,&tolua_err)
1708 )
1709 goto tolua_lerror;
1710 else
1711#endif
1712 {
1713 lua_State* L = tolua_S;
1714 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1715 Unit_Type* utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
1716 {
1717 Unit_Type* tolua_ret = (Unit_Type*) api_methods_player_can_upgrade(L,pplayer,utype);
1718 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
1719 }
1720 }
1721 return 1;
1722#ifndef TOLUA_RELEASE
1723 tolua_lerror:
1724 tolua_error(tolua_S,"#ferror in function 'can_upgrade'.",&tolua_err);
1725 return 0;
1726#endif
1727}
1728
1729/* function: api_methods_player_can_build_impr_direct */
1730 static int tolua_game_Player_can_build_direct00(lua_State* tolua_S)
1731{
1732#ifndef TOLUA_RELEASE
1733 tolua_Error tolua_err;
1734 if (
1735 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1736 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1737 !tolua_isnoobj(tolua_S,3,&tolua_err)
1738 )
1739 goto tolua_lerror;
1740 else
1741#endif
1742 {
1743 lua_State* L = tolua_S;
1744 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1745 Building_Type* itype = ((Building_Type*) tolua_tousertype(tolua_S,2,0));
1746 {
1747 bool tolua_ret = (bool) api_methods_player_can_build_impr_direct(L,pplayer,itype);
1748 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1749 }
1750 }
1751 return 1;
1752#ifndef TOLUA_RELEASE
1753 tolua_lerror:
1754 tolua_error(tolua_S,"#ferror in function 'can_build_direct'.",&tolua_err);
1755 return 0;
1756#endif
1757}
1758
1759/* function: api_methods_player_can_build_unit_direct */
1760 static int tolua_game_Player_can_build_direct01(lua_State* tolua_S)
1761{
1762 tolua_Error tolua_err;
1763 if (
1764 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1765 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
1766 !tolua_isnoobj(tolua_S,3,&tolua_err)
1767 )
1768 goto tolua_lerror;
1769 else
1770 {
1771 lua_State* L = tolua_S;
1772 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1773 Unit_Type* utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
1774 {
1775 bool tolua_ret = (bool) api_methods_player_can_build_unit_direct(L,pplayer,utype);
1776 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1777 }
1778 }
1779 return 1;
1780 tolua_lerror:
1781 return tolua_game_Player_can_build_direct00(tolua_S);
1782}
1783
1784/* function: api_methods_private_list_players */
1785 static int tolua_game_methods_private_list_players00(lua_State* tolua_S)
1786{
1787#ifndef TOLUA_RELEASE
1788 tolua_Error tolua_err;
1789 if (
1790 !tolua_isnoobj(tolua_S,1,&tolua_err)
1791 )
1792 goto tolua_lerror;
1793 else
1794#endif
1795 {
1796 lua_State* L = tolua_S;
1797 {
1798 lua_Object tolua_ret = (lua_Object) api_methods_private_list_players(L);
1799 tolua_pushvalue(tolua_S,(int)tolua_ret);
1800 }
1801 }
1802 return 1;
1803#ifndef TOLUA_RELEASE
1804 tolua_lerror:
1805 tolua_error(tolua_S,"#ferror in function 'list_players'.",&tolua_err);
1806 return 0;
1807#endif
1808}
1809
1810/* function: api_methods_private_player_unit_list_head */
1811 static int tolua_game_methods_private_Player_unit_list_head00(lua_State* tolua_S)
1812{
1813#ifndef TOLUA_RELEASE
1814 tolua_Error tolua_err;
1815 if (
1816 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1817 !tolua_isnoobj(tolua_S,2,&tolua_err)
1818 )
1819 goto tolua_lerror;
1820 else
1821#endif
1822 {
1823 lua_State* L = tolua_S;
1824 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1825 {
1826 Unit_List_Link* tolua_ret = (Unit_List_Link*) api_methods_private_player_unit_list_head(L,self);
1827 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
1828 }
1829 }
1830 return 1;
1831#ifndef TOLUA_RELEASE
1832 tolua_lerror:
1833 tolua_error(tolua_S,"#ferror in function 'unit_list_head'.",&tolua_err);
1834 return 0;
1835#endif
1836}
1837
1838/* function: api_methods_private_player_city_list_head */
1839 static int tolua_game_methods_private_Player_city_list_head00(lua_State* tolua_S)
1840{
1841#ifndef TOLUA_RELEASE
1842 tolua_Error tolua_err;
1843 if (
1844 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1845 !tolua_isnoobj(tolua_S,2,&tolua_err)
1846 )
1847 goto tolua_lerror;
1848 else
1849#endif
1850 {
1851 lua_State* L = tolua_S;
1852 Player* self = ((Player*) tolua_tousertype(tolua_S,1,0));
1853 {
1854 City_List_Link* tolua_ret = (City_List_Link*) api_methods_private_player_city_list_head(L,self);
1855 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City_List_Link");
1856 }
1857 }
1858 return 1;
1859#ifndef TOLUA_RELEASE
1860 tolua_lerror:
1861 tolua_error(tolua_S,"#ferror in function 'city_list_head'.",&tolua_err);
1862 return 0;
1863#endif
1864}
1865
1866/* function: api_methods_city_size_get */
1867 static int tolua_game_City_properties_size00(lua_State* tolua_S)
1868{
1869#ifndef TOLUA_RELEASE
1870 tolua_Error tolua_err;
1871 if (
1872 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1873 !tolua_isnoobj(tolua_S,2,&tolua_err)
1874 )
1875 goto tolua_lerror;
1876 else
1877#endif
1878 {
1879 lua_State* L = tolua_S;
1880 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1881 {
1882 int tolua_ret = (int) api_methods_city_size_get(L,self);
1883 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1884 }
1885 }
1886 return 1;
1887#ifndef TOLUA_RELEASE
1888 tolua_lerror:
1889 tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err);
1890 return 0;
1891#endif
1892}
1893
1894/* function: api_methods_city_tile_get */
1895 static int tolua_game_City_properties_tile00(lua_State* tolua_S)
1896{
1897#ifndef TOLUA_RELEASE
1898 tolua_Error tolua_err;
1899 if (
1900 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1901 !tolua_isnoobj(tolua_S,2,&tolua_err)
1902 )
1903 goto tolua_lerror;
1904 else
1905#endif
1906 {
1907 lua_State* L = tolua_S;
1908 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1909 {
1910 Tile* tolua_ret = (Tile*) api_methods_city_tile_get(L,self);
1911 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
1912 }
1913 }
1914 return 1;
1915#ifndef TOLUA_RELEASE
1916 tolua_lerror:
1917 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
1918 return 0;
1919#endif
1920}
1921
1922/* function: api_methods_city_has_building */
1923 static int tolua_game_City_has_building00(lua_State* tolua_S)
1924{
1925#ifndef TOLUA_RELEASE
1926 tolua_Error tolua_err;
1927 if (
1928 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1929 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1930 !tolua_isnoobj(tolua_S,3,&tolua_err)
1931 )
1932 goto tolua_lerror;
1933 else
1934#endif
1935 {
1936 lua_State* L = tolua_S;
1937 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1938 Building_Type* building = ((Building_Type*) tolua_tousertype(tolua_S,2,0));
1939 {
1940 bool tolua_ret = (bool) api_methods_city_has_building(L,self,building);
1941 tolua_pushboolean(tolua_S,(bool)tolua_ret);
1942 }
1943 }
1944 return 1;
1945#ifndef TOLUA_RELEASE
1946 tolua_lerror:
1947 tolua_error(tolua_S,"#ferror in function 'has_building'.",&tolua_err);
1948 return 0;
1949#endif
1950}
1951
1952/* function: api_methods_city_map_sq_radius */
1953 static int tolua_game_City_map_sq_radius00(lua_State* tolua_S)
1954{
1955#ifndef TOLUA_RELEASE
1956 tolua_Error tolua_err;
1957 if (
1958 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1959 !tolua_isnoobj(tolua_S,2,&tolua_err)
1960 )
1961 goto tolua_lerror;
1962 else
1963#endif
1964 {
1965 lua_State* L = tolua_S;
1966 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1967 {
1968 int tolua_ret = (int) api_methods_city_map_sq_radius(L,self);
1969 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1970 }
1971 }
1972 return 1;
1973#ifndef TOLUA_RELEASE
1974 tolua_lerror:
1975 tolua_error(tolua_S,"#ferror in function 'map_sq_radius'.",&tolua_err);
1976 return 0;
1977#endif
1978}
1979
1980/* function: api_methods_city_inspire_partisans */
1981 static int tolua_game_City_inspire_partisans00(lua_State* tolua_S)
1982{
1983#ifndef TOLUA_RELEASE
1984 tolua_Error tolua_err;
1985 if (
1986 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1987 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
1988 !tolua_isnoobj(tolua_S,3,&tolua_err)
1989 )
1990 goto tolua_lerror;
1991 else
1992#endif
1993 {
1994 lua_State* L = tolua_S;
1995 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1996 Player* inspirer = ((Player*) tolua_tousertype(tolua_S,2,0));
1997 {
1998 int tolua_ret = (int) api_methods_city_inspire_partisans(L,self,inspirer);
1999 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2000 }
2001 }
2002 return 1;
2003#ifndef TOLUA_RELEASE
2004 tolua_lerror:
2005 tolua_error(tolua_S,"#ferror in function 'inspire_partisans'.",&tolua_err);
2006 return 0;
2007#endif
2008}
2009
2010/* function: api_methods_city_culture_get */
2011 static int tolua_game_City_culture00(lua_State* tolua_S)
2012{
2013#ifndef TOLUA_RELEASE
2014 tolua_Error tolua_err;
2015 if (
2016 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2017 !tolua_isnoobj(tolua_S,2,&tolua_err)
2018 )
2019 goto tolua_lerror;
2020 else
2021#endif
2022 {
2023 lua_State* L = tolua_S;
2024 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2025 {
2026 int tolua_ret = (int) api_methods_city_culture_get(L,self);
2027 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2028 }
2029 }
2030 return 1;
2031#ifndef TOLUA_RELEASE
2032 tolua_lerror:
2033 tolua_error(tolua_S,"#ferror in function 'culture'.",&tolua_err);
2034 return 0;
2035#endif
2036}
2037
2038/* function: api_methods_is_city_happy */
2039 static int tolua_game_City_is_happy00(lua_State* tolua_S)
2040{
2041#ifndef TOLUA_RELEASE
2042 tolua_Error tolua_err;
2043 if (
2044 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2045 !tolua_isnoobj(tolua_S,2,&tolua_err)
2046 )
2047 goto tolua_lerror;
2048 else
2049#endif
2050 {
2051 lua_State* L = tolua_S;
2052 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2053 {
2054 bool tolua_ret = (bool) api_methods_is_city_happy(L,self);
2055 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2056 }
2057 }
2058 return 1;
2059#ifndef TOLUA_RELEASE
2060 tolua_lerror:
2061 tolua_error(tolua_S,"#ferror in function 'is_happy'.",&tolua_err);
2062 return 0;
2063#endif
2064}
2065
2066/* function: api_methods_is_city_unhappy */
2067 static int tolua_game_City_is_unhappy00(lua_State* tolua_S)
2068{
2069#ifndef TOLUA_RELEASE
2070 tolua_Error tolua_err;
2071 if (
2072 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2073 !tolua_isnoobj(tolua_S,2,&tolua_err)
2074 )
2075 goto tolua_lerror;
2076 else
2077#endif
2078 {
2079 lua_State* L = tolua_S;
2080 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2081 {
2082 bool tolua_ret = (bool) api_methods_is_city_unhappy(L,self);
2083 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2084 }
2085 }
2086 return 1;
2087#ifndef TOLUA_RELEASE
2088 tolua_lerror:
2089 tolua_error(tolua_S,"#ferror in function 'is_unhappy'.",&tolua_err);
2090 return 0;
2091#endif
2092}
2093
2094/* function: api_methods_is_city_celebrating */
2095 static int tolua_game_City_is_celebrating00(lua_State* tolua_S)
2096{
2097#ifndef TOLUA_RELEASE
2098 tolua_Error tolua_err;
2099 if (
2100 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2101 !tolua_isnoobj(tolua_S,2,&tolua_err)
2102 )
2103 goto tolua_lerror;
2104 else
2105#endif
2106 {
2107 lua_State* L = tolua_S;
2108 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2109 {
2110 bool tolua_ret = (bool) api_methods_is_city_celebrating(L,self);
2111 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2112 }
2113 }
2114 return 1;
2115#ifndef TOLUA_RELEASE
2116 tolua_lerror:
2117 tolua_error(tolua_S,"#ferror in function 'is_celebrating'.",&tolua_err);
2118 return 0;
2119#endif
2120}
2121
2122/* function: api_methods_is_gov_center */
2123 static int tolua_game_City_is_gov_center00(lua_State* tolua_S)
2124{
2125#ifndef TOLUA_RELEASE
2126 tolua_Error tolua_err;
2127 if (
2128 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2129 !tolua_isnoobj(tolua_S,2,&tolua_err)
2130 )
2131 goto tolua_lerror;
2132 else
2133#endif
2134 {
2135 lua_State* L = tolua_S;
2136 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2137 {
2138 bool tolua_ret = (bool) api_methods_is_gov_center(L,self);
2139 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2140 }
2141 }
2142 return 1;
2143#ifndef TOLUA_RELEASE
2144 tolua_lerror:
2145 tolua_error(tolua_S,"#ferror in function 'is_gov_center'.",&tolua_err);
2146 return 0;
2147#endif
2148}
2149
2150/* function: api_methods_is_capital */
2151 static int tolua_game_City_is_capital00(lua_State* tolua_S)
2152{
2153#ifndef TOLUA_RELEASE
2154 tolua_Error tolua_err;
2155 if (
2156 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2157 !tolua_isnoobj(tolua_S,2,&tolua_err)
2158 )
2159 goto tolua_lerror;
2160 else
2161#endif
2162 {
2163 lua_State* L = tolua_S;
2164 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2165 {
2166 bool tolua_ret = (bool) api_methods_is_capital(L,self);
2167 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2168 }
2169 }
2170 return 1;
2171#ifndef TOLUA_RELEASE
2172 tolua_lerror:
2173 tolua_error(tolua_S,"#ferror in function 'is_capital'.",&tolua_err);
2174 return 0;
2175#endif
2176}
2177
2178/* function: api_methods_is_primary_capital */
2179 static int tolua_game_City_is_primary_capital00(lua_State* tolua_S)
2180{
2181#ifndef TOLUA_RELEASE
2182 tolua_Error tolua_err;
2183 if (
2184 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2185 !tolua_isnoobj(tolua_S,2,&tolua_err)
2186 )
2187 goto tolua_lerror;
2188 else
2189#endif
2190 {
2191 lua_State* L = tolua_S;
2192 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2193 {
2194 bool tolua_ret = (bool) api_methods_is_primary_capital(L,self);
2195 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2196 }
2197 }
2198 return 1;
2199#ifndef TOLUA_RELEASE
2200 tolua_lerror:
2201 tolua_error(tolua_S,"#ferror in function 'is_primary_capital'.",&tolua_err);
2202 return 0;
2203#endif
2204}
2205
2206/* function: api_methods_city_link */
2207 static int tolua_game_City_link_text00(lua_State* tolua_S)
2208{
2209#ifndef TOLUA_RELEASE
2210 tolua_Error tolua_err;
2211 if (
2212 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2213 !tolua_isnoobj(tolua_S,2,&tolua_err)
2214 )
2215 goto tolua_lerror;
2216 else
2217#endif
2218 {
2219 lua_State* L = tolua_S;
2220 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2221 {
2222 const char* tolua_ret = (const char*) api_methods_city_link(L,self);
2223 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2224 }
2225 }
2226 return 1;
2227#ifndef TOLUA_RELEASE
2228 tolua_lerror:
2229 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2230 return 0;
2231#endif
2232}
2233
2234/* function: api_methods_city_tile_link */
2235 static int tolua_game_City_tile_link_text00(lua_State* tolua_S)
2236{
2237#ifndef TOLUA_RELEASE
2238 tolua_Error tolua_err;
2239 if (
2240 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2241 !tolua_isnoobj(tolua_S,2,&tolua_err)
2242 )
2243 goto tolua_lerror;
2244 else
2245#endif
2246 {
2247 lua_State* L = tolua_S;
2248 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2249 {
2250 const char* tolua_ret = (const char*) api_methods_city_tile_link(L,self);
2251 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2252 }
2253 }
2254 return 1;
2255#ifndef TOLUA_RELEASE
2256 tolua_lerror:
2257 tolua_error(tolua_S,"#ferror in function 'tile_link_text'.",&tolua_err);
2258 return 0;
2259#endif
2260}
2261
2262/* function: api_methods_unit_tile_get */
2263 static int tolua_game_Unit_properties_tile00(lua_State* tolua_S)
2264{
2265#ifndef TOLUA_RELEASE
2266 tolua_Error tolua_err;
2267 if (
2268 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2269 !tolua_isnoobj(tolua_S,2,&tolua_err)
2270 )
2271 goto tolua_lerror;
2272 else
2273#endif
2274 {
2275 lua_State* L = tolua_S;
2276 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2277 {
2278 Tile* tolua_ret = (Tile*) api_methods_unit_tile_get(L,self);
2279 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
2280 }
2281 }
2282 return 1;
2283#ifndef TOLUA_RELEASE
2284 tolua_lerror:
2285 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
2286 return 0;
2287#endif
2288}
2289
2290/* function: api_methods_unit_transporter */
2291 static int tolua_game_Unit_transporter00(lua_State* tolua_S)
2292{
2293#ifndef TOLUA_RELEASE
2294 tolua_Error tolua_err;
2295 if (
2296 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2297 !tolua_isnoobj(tolua_S,2,&tolua_err)
2298 )
2299 goto tolua_lerror;
2300 else
2301#endif
2302 {
2303 lua_State* L = tolua_S;
2304 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2305 {
2306 Unit* tolua_ret = (Unit*) api_methods_unit_transporter(L,self);
2307 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
2308 }
2309 }
2310 return 1;
2311#ifndef TOLUA_RELEASE
2312 tolua_lerror:
2313 tolua_error(tolua_S,"#ferror in function 'transporter'.",&tolua_err);
2314 return 0;
2315#endif
2316}
2317
2318/* function: api_methods_unit_city_can_be_built_here */
2319 static int tolua_game_Unit_is_on_possible_city_tile00(lua_State* tolua_S)
2320{
2321#ifndef TOLUA_RELEASE
2322 tolua_Error tolua_err;
2323 if (
2324 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2325 !tolua_isnoobj(tolua_S,2,&tolua_err)
2326 )
2327 goto tolua_lerror;
2328 else
2329#endif
2330 {
2331 lua_State* L = tolua_S;
2332 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2333 {
2334 bool tolua_ret = (bool) api_methods_unit_city_can_be_built_here(L,self);
2335 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2336 }
2337 }
2338 return 1;
2339#ifndef TOLUA_RELEASE
2340 tolua_lerror:
2341 tolua_error(tolua_S,"#ferror in function 'is_on_possible_city_tile'.",&tolua_err);
2342 return 0;
2343#endif
2344}
2345
2346/* function: api_methods_unit_can_upgrade */
2347 static int tolua_game_Unit_can_upgrade00(lua_State* tolua_S)
2348{
2349#ifndef TOLUA_RELEASE
2350 tolua_Error tolua_err;
2351 if (
2352 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2353 !tolua_isboolean(tolua_S,2,1,&tolua_err) ||
2354 !tolua_isnoobj(tolua_S,3,&tolua_err)
2355 )
2356 goto tolua_lerror;
2357 else
2358#endif
2359 {
2360 lua_State* L = tolua_S;
2361 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2362 bool is_free = ((bool) tolua_toboolean(tolua_S,2,TRUE));
2363 {
2364 bool tolua_ret = (bool) api_methods_unit_can_upgrade(L,punit,is_free);
2365 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2366 }
2367 }
2368 return 1;
2369#ifndef TOLUA_RELEASE
2370 tolua_lerror:
2371 tolua_error(tolua_S,"#ferror in function 'can_upgrade'.",&tolua_err);
2372 return 0;
2373#endif
2374}
2375
2376/* function: api_methods_unit_transform_problem */
2377 static int tolua_game_Unit_transform_problem00(lua_State* tolua_S)
2378{
2379#ifndef TOLUA_RELEASE
2380 tolua_Error tolua_err;
2381 if (
2382 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2383 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
2384 !tolua_isnoobj(tolua_S,3,&tolua_err)
2385 )
2386 goto tolua_lerror;
2387 else
2388#endif
2389 {
2390 lua_State* L = tolua_S;
2391 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2392 Unit_Type* ptype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
2393 {
2394 const char* tolua_ret = (const char*) api_methods_unit_transform_problem(L,punit,ptype);
2395 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2396 }
2397 }
2398 return 1;
2399#ifndef TOLUA_RELEASE
2400 tolua_lerror:
2401 tolua_error(tolua_S,"#ferror in function 'transform_problem'.",&tolua_err);
2402 return 0;
2403#endif
2404}
2405
2406/* function: api_methods_unit_orientation_get */
2407 static int tolua_game_Unit_facing00(lua_State* tolua_S)
2408{
2409#ifndef TOLUA_RELEASE
2410 tolua_Error tolua_err;
2411 if (
2412 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2413 !tolua_isnoobj(tolua_S,2,&tolua_err)
2414 )
2415 goto tolua_lerror;
2416 else
2417#endif
2418 {
2419 lua_State* L = tolua_S;
2420 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2421 {
2422 Direction* tolua_ret = (Direction*) api_methods_unit_orientation_get(L,self);
2423 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
2424 }
2425 }
2426 return 1;
2427#ifndef TOLUA_RELEASE
2428 tolua_lerror:
2429 tolua_error(tolua_S,"#ferror in function 'facing'.",&tolua_err);
2430 return 0;
2431#endif
2432}
2433
2434/* function: api_methods_unit_link */
2435 static int tolua_game_Unit_link_text00(lua_State* tolua_S)
2436{
2437#ifndef TOLUA_RELEASE
2438 tolua_Error tolua_err;
2439 if (
2440 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2441 !tolua_isnoobj(tolua_S,2,&tolua_err)
2442 )
2443 goto tolua_lerror;
2444 else
2445#endif
2446 {
2447 lua_State* L = tolua_S;
2448 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2449 {
2450 const char* tolua_ret = (const char*) api_methods_unit_link(L,self);
2451 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2452 }
2453 }
2454 return 1;
2455#ifndef TOLUA_RELEASE
2456 tolua_lerror:
2457 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2458 return 0;
2459#endif
2460}
2461
2462/* function: api_methods_unit_tile_link */
2463 static int tolua_game_Unit_tile_link_text00(lua_State* tolua_S)
2464{
2465#ifndef TOLUA_RELEASE
2466 tolua_Error tolua_err;
2467 if (
2468 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2469 !tolua_isnoobj(tolua_S,2,&tolua_err)
2470 )
2471 goto tolua_lerror;
2472 else
2473#endif
2474 {
2475 lua_State* L = tolua_S;
2476 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2477 {
2478 const char* tolua_ret = (const char*) api_methods_unit_tile_link(L,self);
2479 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2480 }
2481 }
2482 return 1;
2483#ifndef TOLUA_RELEASE
2484 tolua_lerror:
2485 tolua_error(tolua_S,"#ferror in function 'tile_link_text'.",&tolua_err);
2486 return 0;
2487#endif
2488}
2489
2490/* function: api_methods_private_unit_cargo_list_head */
2491 static int tolua_game_methods_private_Unit_cargo_list_head00(lua_State* tolua_S)
2492{
2493#ifndef TOLUA_RELEASE
2494 tolua_Error tolua_err;
2495 if (
2496 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2497 !tolua_isnoobj(tolua_S,2,&tolua_err)
2498 )
2499 goto tolua_lerror;
2500 else
2501#endif
2502 {
2503 lua_State* L = tolua_S;
2504 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2505 {
2506 Unit_List_Link* tolua_ret = (Unit_List_Link*) api_methods_private_unit_cargo_list_head(L,self);
2507 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
2508 }
2509 }
2510 return 1;
2511#ifndef TOLUA_RELEASE
2512 tolua_lerror:
2513 tolua_error(tolua_S,"#ferror in function 'cargo_list_head'.",&tolua_err);
2514 return 0;
2515#endif
2516}
2517
2518/* function: api_methods_tile_nat_x */
2519 static int tolua_game_Tile_properties_nat_x00(lua_State* tolua_S)
2520{
2521#ifndef TOLUA_RELEASE
2522 tolua_Error tolua_err;
2523 if (
2524 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2525 !tolua_isnoobj(tolua_S,2,&tolua_err)
2526 )
2527 goto tolua_lerror;
2528 else
2529#endif
2530 {
2531 lua_State* L = tolua_S;
2532 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2533 {
2534 int tolua_ret = (int) api_methods_tile_nat_x(L,self);
2535 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2536 }
2537 }
2538 return 1;
2539#ifndef TOLUA_RELEASE
2540 tolua_lerror:
2541 tolua_error(tolua_S,"#ferror in function 'nat_x'.",&tolua_err);
2542 return 0;
2543#endif
2544}
2545
2546/* function: api_methods_tile_nat_y */
2547 static int tolua_game_Tile_properties_nat_y00(lua_State* tolua_S)
2548{
2549#ifndef TOLUA_RELEASE
2550 tolua_Error tolua_err;
2551 if (
2552 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2553 !tolua_isnoobj(tolua_S,2,&tolua_err)
2554 )
2555 goto tolua_lerror;
2556 else
2557#endif
2558 {
2559 lua_State* L = tolua_S;
2560 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2561 {
2562 int tolua_ret = (int) api_methods_tile_nat_y(L,self);
2563 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2564 }
2565 }
2566 return 1;
2567#ifndef TOLUA_RELEASE
2568 tolua_lerror:
2569 tolua_error(tolua_S,"#ferror in function 'nat_y'.",&tolua_err);
2570 return 0;
2571#endif
2572}
2573
2574/* function: api_methods_tile_map_x */
2575 static int tolua_game_Tile_properties_x00(lua_State* tolua_S)
2576{
2577#ifndef TOLUA_RELEASE
2578 tolua_Error tolua_err;
2579 if (
2580 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2581 !tolua_isnoobj(tolua_S,2,&tolua_err)
2582 )
2583 goto tolua_lerror;
2584 else
2585#endif
2586 {
2587 lua_State* L = tolua_S;
2588 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2589 {
2590 int tolua_ret = (int) api_methods_tile_map_x(L,self);
2591 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2592 }
2593 }
2594 return 1;
2595#ifndef TOLUA_RELEASE
2596 tolua_lerror:
2597 tolua_error(tolua_S,"#ferror in function 'x'.",&tolua_err);
2598 return 0;
2599#endif
2600}
2601
2602/* function: api_methods_tile_map_y */
2603 static int tolua_game_Tile_properties_y00(lua_State* tolua_S)
2604{
2605#ifndef TOLUA_RELEASE
2606 tolua_Error tolua_err;
2607 if (
2608 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2609 !tolua_isnoobj(tolua_S,2,&tolua_err)
2610 )
2611 goto tolua_lerror;
2612 else
2613#endif
2614 {
2615 lua_State* L = tolua_S;
2616 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2617 {
2618 int tolua_ret = (int) api_methods_tile_map_y(L,self);
2619 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2620 }
2621 }
2622 return 1;
2623#ifndef TOLUA_RELEASE
2624 tolua_lerror:
2625 tolua_error(tolua_S,"#ferror in function 'y'.",&tolua_err);
2626 return 0;
2627#endif
2628}
2629
2630/* function: api_methods_tile_city */
2631 static int tolua_game_Tile_city00(lua_State* tolua_S)
2632{
2633#ifndef TOLUA_RELEASE
2634 tolua_Error tolua_err;
2635 if (
2636 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2637 !tolua_isnoobj(tolua_S,2,&tolua_err)
2638 )
2639 goto tolua_lerror;
2640 else
2641#endif
2642 {
2643 lua_State* L = tolua_S;
2644 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2645 {
2646 City* tolua_ret = (City*) api_methods_tile_city(L,self);
2647 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
2648 }
2649 }
2650 return 1;
2651#ifndef TOLUA_RELEASE
2652 tolua_lerror:
2653 tolua_error(tolua_S,"#ferror in function 'city'.",&tolua_err);
2654 return 0;
2655#endif
2656}
2657
2658/* function: api_methods_tile_city_exists_within_max_city_map */
2659 static int tolua_game_Tile_city_exists_within_max_city_map00(lua_State* tolua_S)
2660{
2661#ifndef TOLUA_RELEASE
2662 tolua_Error tolua_err;
2663 if (
2664 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2665 !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
2666 !tolua_isnoobj(tolua_S,3,&tolua_err)
2667 )
2668 goto tolua_lerror;
2669 else
2670#endif
2671 {
2672 lua_State* L = tolua_S;
2673 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2674 bool center = ((bool) tolua_toboolean(tolua_S,2,0));
2675 {
2676 bool tolua_ret = (bool) api_methods_tile_city_exists_within_max_city_map(L,self,center);
2677 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2678 }
2679 }
2680 return 1;
2681#ifndef TOLUA_RELEASE
2682 tolua_lerror:
2683 tolua_error(tolua_S,"#ferror in function 'city_exists_within_max_city_map'.",&tolua_err);
2684 return 0;
2685#endif
2686}
2687
2688/* function: api_methods_tile_has_extra */
2689 static int tolua_game_Tile_has_extra00(lua_State* tolua_S)
2690{
2691#ifndef TOLUA_RELEASE
2692 tolua_Error tolua_err;
2693 if (
2694 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2695 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
2696 !tolua_isnoobj(tolua_S,3,&tolua_err)
2697 )
2698 goto tolua_lerror;
2699 else
2700#endif
2701 {
2702 lua_State* L = tolua_S;
2703 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2704 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2705 {
2706 bool tolua_ret = (bool) api_methods_tile_has_extra(L,self,name);
2707 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2708 }
2709 }
2710 return 1;
2711#ifndef TOLUA_RELEASE
2712 tolua_lerror:
2713 tolua_error(tolua_S,"#ferror in function 'has_extra'.",&tolua_err);
2714 return 0;
2715#endif
2716}
2717
2718/* function: api_methods_tile_has_base */
2719 static int tolua_game_Tile_has_base00(lua_State* tolua_S)
2720{
2721#ifndef TOLUA_RELEASE
2722 tolua_Error tolua_err;
2723 if (
2724 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2725 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
2726 !tolua_isnoobj(tolua_S,3,&tolua_err)
2727 )
2728 goto tolua_lerror;
2729 else
2730#endif
2731 {
2732 lua_State* L = tolua_S;
2733 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2734 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2735 {
2736 bool tolua_ret = (bool) api_methods_tile_has_base(L,self,name);
2737 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2738 }
2739 }
2740 return 1;
2741#ifndef TOLUA_RELEASE
2742 tolua_lerror:
2743 tolua_error(tolua_S,"#ferror in function 'has_base'.",&tolua_err);
2744 return 0;
2745#endif
2746}
2747
2748/* function: api_methods_tile_has_road */
2749 static int tolua_game_Tile_has_road00(lua_State* tolua_S)
2750{
2751#ifndef TOLUA_RELEASE
2752 tolua_Error tolua_err;
2753 if (
2754 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2755 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
2756 !tolua_isnoobj(tolua_S,3,&tolua_err)
2757 )
2758 goto tolua_lerror;
2759 else
2760#endif
2761 {
2762 lua_State* L = tolua_S;
2763 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2764 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2765 {
2766 bool tolua_ret = (bool) api_methods_tile_has_road(L,self,name);
2767 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2768 }
2769 }
2770 return 1;
2771#ifndef TOLUA_RELEASE
2772 tolua_lerror:
2773 tolua_error(tolua_S,"#ferror in function 'has_road'.",&tolua_err);
2774 return 0;
2775#endif
2776}
2777
2778/* function: api_methods_tile_extra_owner */
2779 static int tolua_game_Tile_extra_owner00(lua_State* tolua_S)
2780{
2781#ifndef TOLUA_RELEASE
2782 tolua_Error tolua_err;
2783 if (
2784 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2785 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
2786 !tolua_isnoobj(tolua_S,3,&tolua_err)
2787 )
2788 goto tolua_lerror;
2789 else
2790#endif
2791 {
2792 lua_State* L = tolua_S;
2793 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2794 const char* extra_name = ((const char*) tolua_tostring(tolua_S,2,0));
2795 {
2796 Player* tolua_ret = (Player*) api_methods_tile_extra_owner(L,self,extra_name);
2797 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
2798 }
2799 }
2800 return 1;
2801#ifndef TOLUA_RELEASE
2802 tolua_lerror:
2803 tolua_error(tolua_S,"#ferror in function 'extra_owner'.",&tolua_err);
2804 return 0;
2805#endif
2806}
2807
2808/* function: api_methods_enemy_tile */
2809 static int tolua_game_Tile_is_enemy00(lua_State* tolua_S)
2810{
2811#ifndef TOLUA_RELEASE
2812 tolua_Error tolua_err;
2813 if (
2814 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2815 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
2816 !tolua_isnoobj(tolua_S,3,&tolua_err)
2817 )
2818 goto tolua_lerror;
2819 else
2820#endif
2821 {
2822 lua_State* L = tolua_S;
2823 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2824 Player* against = ((Player*) tolua_tousertype(tolua_S,2,0));
2825 {
2826 bool tolua_ret = (bool) api_methods_enemy_tile(L,self,against);
2827 tolua_pushboolean(tolua_S,(bool)tolua_ret);
2828 }
2829 }
2830 return 1;
2831#ifndef TOLUA_RELEASE
2832 tolua_lerror:
2833 tolua_error(tolua_S,"#ferror in function 'is_enemy'.",&tolua_err);
2834 return 0;
2835#endif
2836}
2837
2838/* function: api_methods_tile_num_units */
2839 static int tolua_game_Tile_num_units00(lua_State* tolua_S)
2840{
2841#ifndef TOLUA_RELEASE
2842 tolua_Error tolua_err;
2843 if (
2844 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2845 !tolua_isnoobj(tolua_S,2,&tolua_err)
2846 )
2847 goto tolua_lerror;
2848 else
2849#endif
2850 {
2851 lua_State* L = tolua_S;
2852 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2853 {
2854 int tolua_ret = (int) api_methods_tile_num_units(L,self);
2855 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2856 }
2857 }
2858 return 1;
2859#ifndef TOLUA_RELEASE
2860 tolua_lerror:
2861 tolua_error(tolua_S,"#ferror in function 'num_units'.",&tolua_err);
2862 return 0;
2863#endif
2864}
2865
2866/* function: api_methods_tile_sq_distance */
2867 static int tolua_game_Tile_sq_distance00(lua_State* tolua_S)
2868{
2869#ifndef TOLUA_RELEASE
2870 tolua_Error tolua_err;
2871 if (
2872 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2873 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
2874 !tolua_isnoobj(tolua_S,3,&tolua_err)
2875 )
2876 goto tolua_lerror;
2877 else
2878#endif
2879 {
2880 lua_State* L = tolua_S;
2881 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2882 Tile* other = ((Tile*) tolua_tousertype(tolua_S,2,0));
2883 {
2884 int tolua_ret = (int) api_methods_tile_sq_distance(L,self,other);
2885 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2886 }
2887 }
2888 return 1;
2889#ifndef TOLUA_RELEASE
2890 tolua_lerror:
2891 tolua_error(tolua_S,"#ferror in function 'sq_distance'.",&tolua_err);
2892 return 0;
2893#endif
2894}
2895
2896/* function: api_methods_tile_link */
2897 static int tolua_game_Tile_link_text00(lua_State* tolua_S)
2898{
2899#ifndef TOLUA_RELEASE
2900 tolua_Error tolua_err;
2901 if (
2902 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2903 !tolua_isnoobj(tolua_S,2,&tolua_err)
2904 )
2905 goto tolua_lerror;
2906 else
2907#endif
2908 {
2909 lua_State* L = tolua_S;
2910 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2911 {
2912 const char* tolua_ret = (const char*) api_methods_tile_link(L,self);
2913 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2914 }
2915 }
2916 return 1;
2917#ifndef TOLUA_RELEASE
2918 tolua_lerror:
2919 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2920 return 0;
2921#endif
2922}
2923
2924/* function: api_methods_private_tile_next_outward_index */
2925 static int tolua_game_methods_private_Tile_next_outward_index00(lua_State* tolua_S)
2926{
2927#ifndef TOLUA_RELEASE
2928 tolua_Error tolua_err;
2929 if (
2930 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2931 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2932 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2933 !tolua_isnoobj(tolua_S,4,&tolua_err)
2934 )
2935 goto tolua_lerror;
2936 else
2937#endif
2938 {
2939 lua_State* L = tolua_S;
2940 Tile* pcenter = ((Tile*) tolua_tousertype(tolua_S,1,0));
2941 int tindex = ((int) tolua_tonumber(tolua_S,2,0));
2942 int max_dist = ((int) tolua_tonumber(tolua_S,3,0));
2943 {
2944 int tolua_ret = (int) api_methods_private_tile_next_outward_index(L,pcenter,tindex,max_dist);
2945 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2946 }
2947 }
2948 return 1;
2949#ifndef TOLUA_RELEASE
2950 tolua_lerror:
2951 tolua_error(tolua_S,"#ferror in function 'next_outward_index'.",&tolua_err);
2952 return 0;
2953#endif
2954}
2955
2956/* function: api_methods_private_tile_for_outward_index */
2957 static int tolua_game_methods_private_Tile_tile_for_outward_index00(lua_State* tolua_S)
2958{
2959#ifndef TOLUA_RELEASE
2960 tolua_Error tolua_err;
2961 if (
2962 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2963 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2964 !tolua_isnoobj(tolua_S,3,&tolua_err)
2965 )
2966 goto tolua_lerror;
2967 else
2968#endif
2969 {
2970 lua_State* L = tolua_S;
2971 Tile* pcenter = ((Tile*) tolua_tousertype(tolua_S,1,0));
2972 int tindex = ((int) tolua_tonumber(tolua_S,2,0));
2973 {
2974 Tile* tolua_ret = (Tile*) api_methods_private_tile_for_outward_index(L,pcenter,tindex);
2975 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
2976 }
2977 }
2978 return 1;
2979#ifndef TOLUA_RELEASE
2980 tolua_lerror:
2981 tolua_error(tolua_S,"#ferror in function 'tile_for_outward_index'.",&tolua_err);
2982 return 0;
2983#endif
2984}
2985
2986/* function: api_methods_private_tile_unit_list_head */
2987 static int tolua_game_methods_private_Tile_unit_list_head00(lua_State* tolua_S)
2988{
2989#ifndef TOLUA_RELEASE
2990 tolua_Error tolua_err;
2991 if (
2992 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2993 !tolua_isnoobj(tolua_S,2,&tolua_err)
2994 )
2995 goto tolua_lerror;
2996 else
2997#endif
2998 {
2999 lua_State* L = tolua_S;
3000 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
3001 {
3002 Unit_List_Link* tolua_ret = (Unit_List_Link*) api_methods_private_tile_unit_list_head(L,self);
3003 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
3004 }
3005 }
3006 return 1;
3007#ifndef TOLUA_RELEASE
3008 tolua_lerror:
3009 tolua_error(tolua_S,"#ferror in function 'unit_list_head'.",&tolua_err);
3010 return 0;
3011#endif
3012}
3013
3014/* function: api_methods_government_rule_name */
3015 static int tolua_game_Government_rule_name00(lua_State* tolua_S)
3016{
3017#ifndef TOLUA_RELEASE
3018 tolua_Error tolua_err;
3019 if (
3020 !tolua_isusertype(tolua_S,1,"Government",0,&tolua_err) ||
3021 !tolua_isnoobj(tolua_S,2,&tolua_err)
3022 )
3023 goto tolua_lerror;
3024 else
3025#endif
3026 {
3027 lua_State* L = tolua_S;
3028 Government* self = ((Government*) tolua_tousertype(tolua_S,1,0));
3029 {
3030 const char* tolua_ret = (const char*) api_methods_government_rule_name(L,self);
3031 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3032 }
3033 }
3034 return 1;
3035#ifndef TOLUA_RELEASE
3036 tolua_lerror:
3037 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3038 return 0;
3039#endif
3040}
3041
3042/* function: api_methods_government_name_translation */
3043 static int tolua_game_Government_name_translation00(lua_State* tolua_S)
3044{
3045#ifndef TOLUA_RELEASE
3046 tolua_Error tolua_err;
3047 if (
3048 !tolua_isusertype(tolua_S,1,"Government",0,&tolua_err) ||
3049 !tolua_isnoobj(tolua_S,2,&tolua_err)
3050 )
3051 goto tolua_lerror;
3052 else
3053#endif
3054 {
3055 lua_State* L = tolua_S;
3056 Government* self = ((Government*) tolua_tousertype(tolua_S,1,0));
3057 {
3058 const char* tolua_ret = (const char*) api_methods_government_name_translation(L,self);
3059 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3060 }
3061 }
3062 return 1;
3063#ifndef TOLUA_RELEASE
3064 tolua_lerror:
3065 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3066 return 0;
3067#endif
3068}
3069
3070/* function: api_methods_nation_type_rule_name */
3071 static int tolua_game_Nation_Type_rule_name00(lua_State* tolua_S)
3072{
3073#ifndef TOLUA_RELEASE
3074 tolua_Error tolua_err;
3075 if (
3076 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3077 !tolua_isnoobj(tolua_S,2,&tolua_err)
3078 )
3079 goto tolua_lerror;
3080 else
3081#endif
3082 {
3083 lua_State* L = tolua_S;
3084 Nation_Type* self = ((Nation_Type*) tolua_tousertype(tolua_S,1,0));
3085 {
3086 const char* tolua_ret = (const char*) api_methods_nation_type_rule_name(L,self);
3087 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3088 }
3089 }
3090 return 1;
3091#ifndef TOLUA_RELEASE
3092 tolua_lerror:
3093 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3094 return 0;
3095#endif
3096}
3097
3098/* function: api_methods_nation_type_name_translation */
3099 static int tolua_game_Nation_Type_name_translation00(lua_State* tolua_S)
3100{
3101#ifndef TOLUA_RELEASE
3102 tolua_Error tolua_err;
3103 if (
3104 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3105 !tolua_isnoobj(tolua_S,2,&tolua_err)
3106 )
3107 goto tolua_lerror;
3108 else
3109#endif
3110 {
3111 lua_State* L = tolua_S;
3112 Nation_Type* self = ((Nation_Type*) tolua_tousertype(tolua_S,1,0));
3113 {
3114 const char* tolua_ret = (const char*) api_methods_nation_type_name_translation(L,self);
3115 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3116 }
3117 }
3118 return 1;
3119#ifndef TOLUA_RELEASE
3120 tolua_lerror:
3121 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3122 return 0;
3123#endif
3124}
3125
3126/* function: api_methods_nation_type_plural_translation */
3127 static int tolua_game_Nation_Type_plural_translation00(lua_State* tolua_S)
3128{
3129#ifndef TOLUA_RELEASE
3130 tolua_Error tolua_err;
3131 if (
3132 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3133 !tolua_isnoobj(tolua_S,2,&tolua_err)
3134 )
3135 goto tolua_lerror;
3136 else
3137#endif
3138 {
3139 lua_State* L = tolua_S;
3140 Nation_Type* self = ((Nation_Type*) tolua_tousertype(tolua_S,1,0));
3141 {
3142 const char* tolua_ret = (const char*) api_methods_nation_type_plural_translation(L,self);
3143 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3144 }
3145 }
3146 return 1;
3147#ifndef TOLUA_RELEASE
3148 tolua_lerror:
3149 tolua_error(tolua_S,"#ferror in function 'plural_translation'.",&tolua_err);
3150 return 0;
3151#endif
3152}
3153
3154/* function: api_methods_building_type_is_wonder */
3155 static int tolua_game_Building_Type_is_wonder00(lua_State* tolua_S)
3156{
3157#ifndef TOLUA_RELEASE
3158 tolua_Error tolua_err;
3159 if (
3160 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3161 !tolua_isnoobj(tolua_S,2,&tolua_err)
3162 )
3163 goto tolua_lerror;
3164 else
3165#endif
3166 {
3167 lua_State* L = tolua_S;
3168 Building_Type* self = ((Building_Type*) tolua_tousertype(tolua_S,1,0));
3169 {
3170 bool tolua_ret = (bool) api_methods_building_type_is_wonder(L,self);
3171 tolua_pushboolean(tolua_S,(bool)tolua_ret);
3172 }
3173 }
3174 return 1;
3175#ifndef TOLUA_RELEASE
3176 tolua_lerror:
3177 tolua_error(tolua_S,"#ferror in function 'is_wonder'.",&tolua_err);
3178 return 0;
3179#endif
3180}
3181
3182/* function: api_methods_building_type_is_great_wonder */
3183 static int tolua_game_Building_Type_is_great_wonder00(lua_State* tolua_S)
3184{
3185#ifndef TOLUA_RELEASE
3186 tolua_Error tolua_err;
3187 if (
3188 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3189 !tolua_isnoobj(tolua_S,2,&tolua_err)
3190 )
3191 goto tolua_lerror;
3192 else
3193#endif
3194 {
3195 lua_State* L = tolua_S;
3196 Building_Type* self = ((Building_Type*) tolua_tousertype(tolua_S,1,0));
3197 {
3198 bool tolua_ret = (bool) api_methods_building_type_is_great_wonder(L,self);
3199 tolua_pushboolean(tolua_S,(bool)tolua_ret);
3200 }
3201 }
3202 return 1;
3203#ifndef TOLUA_RELEASE
3204 tolua_lerror:
3205 tolua_error(tolua_S,"#ferror in function 'is_great_wonder'.",&tolua_err);
3206 return 0;
3207#endif
3208}
3209
3210/* function: api_methods_building_type_is_small_wonder */
3211 static int tolua_game_Building_Type_is_small_wonder00(lua_State* tolua_S)
3212{
3213#ifndef TOLUA_RELEASE
3214 tolua_Error tolua_err;
3215 if (
3216 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3217 !tolua_isnoobj(tolua_S,2,&tolua_err)
3218 )
3219 goto tolua_lerror;
3220 else
3221#endif
3222 {
3223 lua_State* L = tolua_S;
3224 Building_Type* self = ((Building_Type*) tolua_tousertype(tolua_S,1,0));
3225 {
3226 bool tolua_ret = (bool) api_methods_building_type_is_small_wonder(L,self);
3227 tolua_pushboolean(tolua_S,(bool)tolua_ret);
3228 }
3229 }
3230 return 1;
3231#ifndef TOLUA_RELEASE
3232 tolua_lerror:
3233 tolua_error(tolua_S,"#ferror in function 'is_small_wonder'.",&tolua_err);
3234 return 0;
3235#endif
3236}
3237
3238/* function: api_methods_building_type_is_improvement */
3239 static int tolua_game_Building_Type_is_improvement00(lua_State* tolua_S)
3240{
3241#ifndef TOLUA_RELEASE
3242 tolua_Error tolua_err;
3243 if (
3244 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3245 !tolua_isnoobj(tolua_S,2,&tolua_err)
3246 )
3247 goto tolua_lerror;
3248 else
3249#endif
3250 {
3251 lua_State* L = tolua_S;
3252 Building_Type* self = ((Building_Type*) tolua_tousertype(tolua_S,1,0));
3253 {
3254 bool tolua_ret = (bool) api_methods_building_type_is_improvement(L,self);
3255 tolua_pushboolean(tolua_S,(bool)tolua_ret);
3256 }
3257 }
3258 return 1;
3259#ifndef TOLUA_RELEASE
3260 tolua_lerror:
3261 tolua_error(tolua_S,"#ferror in function 'is_improvement'.",&tolua_err);
3262 return 0;
3263#endif
3264}
3265
3266/* function: api_methods_building_type_rule_name */
3267 static int tolua_game_Building_Type_rule_name00(lua_State* tolua_S)
3268{
3269#ifndef TOLUA_RELEASE
3270 tolua_Error tolua_err;
3271 if (
3272 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3273 !tolua_isnoobj(tolua_S,2,&tolua_err)
3274 )
3275 goto tolua_lerror;
3276 else
3277#endif
3278 {
3279 lua_State* L = tolua_S;
3280 Building_Type* self = ((Building_Type*) tolua_tousertype(tolua_S,1,0));
3281 {
3282 const char* tolua_ret = (const char*) api_methods_building_type_rule_name(L,self);
3283 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3284 }
3285 }
3286 return 1;
3287#ifndef TOLUA_RELEASE
3288 tolua_lerror:
3289 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3290 return 0;
3291#endif
3292}
3293
3294/* function: api_methods_building_type_name_translation */
3295 static int tolua_game_Building_Type_name_translation00(lua_State* tolua_S)
3296{
3297#ifndef TOLUA_RELEASE
3298 tolua_Error tolua_err;
3299 if (
3300 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3301 !tolua_isnoobj(tolua_S,2,&tolua_err)
3302 )
3303 goto tolua_lerror;
3304 else
3305#endif
3306 {
3307 lua_State* L = tolua_S;
3308 Building_Type* self = ((Building_Type*) tolua_tousertype(tolua_S,1,0));
3309 {
3310 const char* tolua_ret = (const char*) api_methods_building_type_name_translation(L,self);
3311 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3312 }
3313 }
3314 return 1;
3315#ifndef TOLUA_RELEASE
3316 tolua_lerror:
3317 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3318 return 0;
3319#endif
3320}
3321
3322/* function: api_methods_unit_type_has_flag */
3323 static int tolua_game_Unit_Type_has_flag00(lua_State* tolua_S)
3324{
3325#ifndef TOLUA_RELEASE
3326 tolua_Error tolua_err;
3327 if (
3328 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3329 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
3330 !tolua_isnoobj(tolua_S,3,&tolua_err)
3331 )
3332 goto tolua_lerror;
3333 else
3334#endif
3335 {
3336 lua_State* L = tolua_S;
3337 Unit_Type* self = ((Unit_Type*) tolua_tousertype(tolua_S,1,0));
3338 const char* flag = ((const char*) tolua_tostring(tolua_S,2,0));
3339 {
3340 bool tolua_ret = (bool) api_methods_unit_type_has_flag(L,self,flag);
3341 tolua_pushboolean(tolua_S,(bool)tolua_ret);
3342 }
3343 }
3344 return 1;
3345#ifndef TOLUA_RELEASE
3346 tolua_lerror:
3347 tolua_error(tolua_S,"#ferror in function 'has_flag'.",&tolua_err);
3348 return 0;
3349#endif
3350}
3351
3352/* function: api_methods_unit_type_has_role */
3353 static int tolua_game_Unit_Type_has_role00(lua_State* tolua_S)
3354{
3355#ifndef TOLUA_RELEASE
3356 tolua_Error tolua_err;
3357 if (
3358 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3359 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
3360 !tolua_isnoobj(tolua_S,3,&tolua_err)
3361 )
3362 goto tolua_lerror;
3363 else
3364#endif
3365 {
3366 lua_State* L = tolua_S;
3367 Unit_Type* self = ((Unit_Type*) tolua_tousertype(tolua_S,1,0));
3368 const char* role = ((const char*) tolua_tostring(tolua_S,2,0));
3369 {
3370 bool tolua_ret = (bool) api_methods_unit_type_has_role(L,self,role);
3371 tolua_pushboolean(tolua_S,(bool)tolua_ret);
3372 }
3373 }
3374 return 1;
3375#ifndef TOLUA_RELEASE
3376 tolua_lerror:
3377 tolua_error(tolua_S,"#ferror in function 'has_role'.",&tolua_err);
3378 return 0;
3379#endif
3380}
3381
3382/* function: api_methods_unit_type_rule_name */
3383 static int tolua_game_Unit_Type_rule_name00(lua_State* tolua_S)
3384{
3385#ifndef TOLUA_RELEASE
3386 tolua_Error tolua_err;
3387 if (
3388 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3389 !tolua_isnoobj(tolua_S,2,&tolua_err)
3390 )
3391 goto tolua_lerror;
3392 else
3393#endif
3394 {
3395 lua_State* L = tolua_S;
3396 Unit_Type* self = ((Unit_Type*) tolua_tousertype(tolua_S,1,0));
3397 {
3398 const char* tolua_ret = (const char*) api_methods_unit_type_rule_name(L,self);
3399 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3400 }
3401 }
3402 return 1;
3403#ifndef TOLUA_RELEASE
3404 tolua_lerror:
3405 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3406 return 0;
3407#endif
3408}
3409
3410/* function: api_methods_unit_type_name_translation */
3411 static int tolua_game_Unit_Type_name_translation00(lua_State* tolua_S)
3412{
3413#ifndef TOLUA_RELEASE
3414 tolua_Error tolua_err;
3415 if (
3416 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3417 !tolua_isnoobj(tolua_S,2,&tolua_err)
3418 )
3419 goto tolua_lerror;
3420 else
3421#endif
3422 {
3423 lua_State* L = tolua_S;
3424 Unit_Type* self = ((Unit_Type*) tolua_tousertype(tolua_S,1,0));
3425 {
3426 const char* tolua_ret = (const char*) api_methods_unit_type_name_translation(L,self);
3427 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3428 }
3429 }
3430 return 1;
3431#ifndef TOLUA_RELEASE
3432 tolua_lerror:
3433 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3434 return 0;
3435#endif
3436}
3437
3438/* function: api_methods_unit_type_can_exist_at_tile */
3439 static int tolua_game_Unit_Type_can_exist_at_tile00(lua_State* tolua_S)
3440{
3441#ifndef TOLUA_RELEASE
3442 tolua_Error tolua_err;
3443 if (
3444 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3445 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
3446 !tolua_isnoobj(tolua_S,3,&tolua_err)
3447 )
3448 goto tolua_lerror;
3449 else
3450#endif
3451 {
3452 lua_State* L = tolua_S;
3453 Unit_Type* self = ((Unit_Type*) tolua_tousertype(tolua_S,1,0));
3454 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
3455 {
3456 bool tolua_ret = (bool) api_methods_unit_type_can_exist_at_tile(L,self,ptile);
3457 tolua_pushboolean(tolua_S,(bool)tolua_ret);
3458 }
3459 }
3460 return 1;
3461#ifndef TOLUA_RELEASE
3462 tolua_lerror:
3463 tolua_error(tolua_S,"#ferror in function 'can_exist_at_tile'.",&tolua_err);
3464 return 0;
3465#endif
3466}
3467
3468/* function: api_methods_tech_type_rule_name */
3469 static int tolua_game_Tech_Type_rule_name00(lua_State* tolua_S)
3470{
3471#ifndef TOLUA_RELEASE
3472 tolua_Error tolua_err;
3473 if (
3474 !tolua_isusertype(tolua_S,1,"Tech_Type",0,&tolua_err) ||
3475 !tolua_isnoobj(tolua_S,2,&tolua_err)
3476 )
3477 goto tolua_lerror;
3478 else
3479#endif
3480 {
3481 lua_State* L = tolua_S;
3482 Tech_Type* self = ((Tech_Type*) tolua_tousertype(tolua_S,1,0));
3483 {
3484 const char* tolua_ret = (const char*) api_methods_tech_type_rule_name(L,self);
3485 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3486 }
3487 }
3488 return 1;
3489#ifndef TOLUA_RELEASE
3490 tolua_lerror:
3491 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3492 return 0;
3493#endif
3494}
3495
3496/* function: api_methods_tech_type_name_translation */
3497 static int tolua_game_Tech_Type_name_translation00(lua_State* tolua_S)
3498{
3499#ifndef TOLUA_RELEASE
3500 tolua_Error tolua_err;
3501 if (
3502 !tolua_isusertype(tolua_S,1,"Tech_Type",0,&tolua_err) ||
3503 !tolua_isnoobj(tolua_S,2,&tolua_err)
3504 )
3505 goto tolua_lerror;
3506 else
3507#endif
3508 {
3509 lua_State* L = tolua_S;
3510 Tech_Type* self = ((Tech_Type*) tolua_tousertype(tolua_S,1,0));
3511 {
3512 const char* tolua_ret = (const char*) api_methods_tech_type_name_translation(L,self);
3513 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3514 }
3515 }
3516 return 1;
3517#ifndef TOLUA_RELEASE
3518 tolua_lerror:
3519 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3520 return 0;
3521#endif
3522}
3523
3524/* function: api_methods_terrain_rule_name */
3525 static int tolua_game_Terrain_rule_name00(lua_State* tolua_S)
3526{
3527#ifndef TOLUA_RELEASE
3528 tolua_Error tolua_err;
3529 if (
3530 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3531 !tolua_isnoobj(tolua_S,2,&tolua_err)
3532 )
3533 goto tolua_lerror;
3534 else
3535#endif
3536 {
3537 lua_State* L = tolua_S;
3538 Terrain* self = ((Terrain*) tolua_tousertype(tolua_S,1,0));
3539 {
3540 const char* tolua_ret = (const char*) api_methods_terrain_rule_name(L,self);
3541 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3542 }
3543 }
3544 return 1;
3545#ifndef TOLUA_RELEASE
3546 tolua_lerror:
3547 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3548 return 0;
3549#endif
3550}
3551
3552/* function: api_methods_terrain_name_translation */
3553 static int tolua_game_Terrain_name_translation00(lua_State* tolua_S)
3554{
3555#ifndef TOLUA_RELEASE
3556 tolua_Error tolua_err;
3557 if (
3558 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3559 !tolua_isnoobj(tolua_S,2,&tolua_err)
3560 )
3561 goto tolua_lerror;
3562 else
3563#endif
3564 {
3565 lua_State* L = tolua_S;
3566 Terrain* self = ((Terrain*) tolua_tousertype(tolua_S,1,0));
3567 {
3568 const char* tolua_ret = (const char*) api_methods_terrain_name_translation(L,self);
3569 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3570 }
3571 }
3572 return 1;
3573#ifndef TOLUA_RELEASE
3574 tolua_lerror:
3575 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3576 return 0;
3577#endif
3578}
3579
3580/* function: api_methods_terrain_class_name */
3581 static int tolua_game_Terrain_class_name00(lua_State* tolua_S)
3582{
3583#ifndef TOLUA_RELEASE
3584 tolua_Error tolua_err;
3585 if (
3586 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3587 !tolua_isnoobj(tolua_S,2,&tolua_err)
3588 )
3589 goto tolua_lerror;
3590 else
3591#endif
3592 {
3593 lua_State* L = tolua_S;
3594 Terrain* self = ((Terrain*) tolua_tousertype(tolua_S,1,0));
3595 {
3596 const char* tolua_ret = (const char*) api_methods_terrain_class_name(L,self);
3597 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3598 }
3599 }
3600 return 1;
3601#ifndef TOLUA_RELEASE
3602 tolua_lerror:
3603 tolua_error(tolua_S,"#ferror in function 'class_name'.",&tolua_err);
3604 return 0;
3605#endif
3606}
3607
3608/* function: api_methods_disaster_rule_name */
3609 static int tolua_game_Disaster_rule_name00(lua_State* tolua_S)
3610{
3611#ifndef TOLUA_RELEASE
3612 tolua_Error tolua_err;
3613 if (
3614 !tolua_isusertype(tolua_S,1,"Disaster",0,&tolua_err) ||
3615 !tolua_isnoobj(tolua_S,2,&tolua_err)
3616 )
3617 goto tolua_lerror;
3618 else
3619#endif
3620 {
3621 lua_State* L = tolua_S;
3622 Disaster* self = ((Disaster*) tolua_tousertype(tolua_S,1,0));
3623 {
3624 const char* tolua_ret = (const char*) api_methods_disaster_rule_name(L,self);
3625 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3626 }
3627 }
3628 return 1;
3629#ifndef TOLUA_RELEASE
3630 tolua_lerror:
3631 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3632 return 0;
3633#endif
3634}
3635
3636/* function: api_methods_disaster_name_translation */
3637 static int tolua_game_Disaster_name_translation00(lua_State* tolua_S)
3638{
3639#ifndef TOLUA_RELEASE
3640 tolua_Error tolua_err;
3641 if (
3642 !tolua_isusertype(tolua_S,1,"Disaster",0,&tolua_err) ||
3643 !tolua_isnoobj(tolua_S,2,&tolua_err)
3644 )
3645 goto tolua_lerror;
3646 else
3647#endif
3648 {
3649 lua_State* L = tolua_S;
3650 Disaster* self = ((Disaster*) tolua_tousertype(tolua_S,1,0));
3651 {
3652 const char* tolua_ret = (const char*) api_methods_disaster_name_translation(L,self);
3653 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3654 }
3655 }
3656 return 1;
3657#ifndef TOLUA_RELEASE
3658 tolua_lerror:
3659 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3660 return 0;
3661#endif
3662}
3663
3664/* function: api_methods_achievement_rule_name */
3665 static int tolua_game_Achievement_rule_name00(lua_State* tolua_S)
3666{
3667#ifndef TOLUA_RELEASE
3668 tolua_Error tolua_err;
3669 if (
3670 !tolua_isusertype(tolua_S,1,"Achievement",0,&tolua_err) ||
3671 !tolua_isnoobj(tolua_S,2,&tolua_err)
3672 )
3673 goto tolua_lerror;
3674 else
3675#endif
3676 {
3677 lua_State* L = tolua_S;
3678 Achievement* self = ((Achievement*) tolua_tousertype(tolua_S,1,0));
3679 {
3680 const char* tolua_ret = (const char*) api_methods_achievement_rule_name(L,self);
3681 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3682 }
3683 }
3684 return 1;
3685#ifndef TOLUA_RELEASE
3686 tolua_lerror:
3687 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3688 return 0;
3689#endif
3690}
3691
3692/* function: api_methods_achievement_name_translation */
3693 static int tolua_game_Achievement_name_translation00(lua_State* tolua_S)
3694{
3695#ifndef TOLUA_RELEASE
3696 tolua_Error tolua_err;
3697 if (
3698 !tolua_isusertype(tolua_S,1,"Achievement",0,&tolua_err) ||
3699 !tolua_isnoobj(tolua_S,2,&tolua_err)
3700 )
3701 goto tolua_lerror;
3702 else
3703#endif
3704 {
3705 lua_State* L = tolua_S;
3706 Achievement* self = ((Achievement*) tolua_tousertype(tolua_S,1,0));
3707 {
3708 const char* tolua_ret = (const char*) api_methods_achievement_name_translation(L,self);
3709 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3710 }
3711 }
3712 return 1;
3713#ifndef TOLUA_RELEASE
3714 tolua_lerror:
3715 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3716 return 0;
3717#endif
3718}
3719
3720/* function: api_methods_action_rule_name */
3721 static int tolua_game_Action_rule_name00(lua_State* tolua_S)
3722{
3723#ifndef TOLUA_RELEASE
3724 tolua_Error tolua_err;
3725 if (
3726 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3727 !tolua_isnoobj(tolua_S,2,&tolua_err)
3728 )
3729 goto tolua_lerror;
3730 else
3731#endif
3732 {
3733 lua_State* L = tolua_S;
3734 Action* self = ((Action*) tolua_tousertype(tolua_S,1,0));
3735 {
3736 const char* tolua_ret = (const char*) api_methods_action_rule_name(L,self);
3737 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3738 }
3739 }
3740 return 1;
3741#ifndef TOLUA_RELEASE
3742 tolua_lerror:
3743 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3744 return 0;
3745#endif
3746}
3747
3748/* function: api_methods_action_name_translation */
3749 static int tolua_game_Action_name_translation00(lua_State* tolua_S)
3750{
3751#ifndef TOLUA_RELEASE
3752 tolua_Error tolua_err;
3753 if (
3754 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3755 !tolua_isnoobj(tolua_S,2,&tolua_err)
3756 )
3757 goto tolua_lerror;
3758 else
3759#endif
3760 {
3761 lua_State* L = tolua_S;
3762 Action* self = ((Action*) tolua_tousertype(tolua_S,1,0));
3763 {
3764 const char* tolua_ret = (const char*) api_methods_action_name_translation(L,self);
3765 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3766 }
3767 }
3768 return 1;
3769#ifndef TOLUA_RELEASE
3770 tolua_lerror:
3771 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3772 return 0;
3773#endif
3774}
3775
3776/* function: api_methods_action_target_kind */
3777 static int tolua_game_Action_target_kind00(lua_State* tolua_S)
3778{
3779#ifndef TOLUA_RELEASE
3780 tolua_Error tolua_err;
3781 if (
3782 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3783 !tolua_isnoobj(tolua_S,2,&tolua_err)
3784 )
3785 goto tolua_lerror;
3786 else
3787#endif
3788 {
3789 lua_State* L = tolua_S;
3790 Action* self = ((Action*) tolua_tousertype(tolua_S,1,0));
3791 {
3792 const char* tolua_ret = (const char*) api_methods_action_target_kind(L,self);
3793 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3794 }
3795 }
3796 return 1;
3797#ifndef TOLUA_RELEASE
3798 tolua_lerror:
3799 tolua_error(tolua_S,"#ferror in function 'target_kind'.",&tolua_err);
3800 return 0;
3801#endif
3802}
3803
3804/* function: api_methods_unit_list_link_data */
3805 static int tolua_game_Unit_List_Link_data00(lua_State* tolua_S)
3806{
3807#ifndef TOLUA_RELEASE
3808 tolua_Error tolua_err;
3809 if (
3810 !tolua_isusertype(tolua_S,1,"Unit_List_Link",0,&tolua_err) ||
3811 !tolua_isnoobj(tolua_S,2,&tolua_err)
3812 )
3813 goto tolua_lerror;
3814 else
3815#endif
3816 {
3817 lua_State* L = tolua_S;
3818 Unit_List_Link* self = ((Unit_List_Link*) tolua_tousertype(tolua_S,1,0));
3819 {
3820 Unit* tolua_ret = (Unit*) api_methods_unit_list_link_data(L,self);
3821 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
3822 }
3823 }
3824 return 1;
3825#ifndef TOLUA_RELEASE
3826 tolua_lerror:
3827 tolua_error(tolua_S,"#ferror in function 'data'.",&tolua_err);
3828 return 0;
3829#endif
3830}
3831
3832/* function: api_methods_unit_list_next_link */
3833 static int tolua_game_Unit_List_Link_next00(lua_State* tolua_S)
3834{
3835#ifndef TOLUA_RELEASE
3836 tolua_Error tolua_err;
3837 if (
3838 !tolua_isusertype(tolua_S,1,"Unit_List_Link",0,&tolua_err) ||
3839 !tolua_isnoobj(tolua_S,2,&tolua_err)
3840 )
3841 goto tolua_lerror;
3842 else
3843#endif
3844 {
3845 lua_State* L = tolua_S;
3846 Unit_List_Link* self = ((Unit_List_Link*) tolua_tousertype(tolua_S,1,0));
3847 {
3848 Unit_List_Link* tolua_ret = (Unit_List_Link*) api_methods_unit_list_next_link(L,self);
3849 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
3850 }
3851 }
3852 return 1;
3853#ifndef TOLUA_RELEASE
3854 tolua_lerror:
3855 tolua_error(tolua_S,"#ferror in function 'next'.",&tolua_err);
3856 return 0;
3857#endif
3858}
3859
3860/* function: api_methods_city_list_link_data */
3861 static int tolua_game_City_List_Link_data00(lua_State* tolua_S)
3862{
3863#ifndef TOLUA_RELEASE
3864 tolua_Error tolua_err;
3865 if (
3866 !tolua_isusertype(tolua_S,1,"City_List_Link",0,&tolua_err) ||
3867 !tolua_isnoobj(tolua_S,2,&tolua_err)
3868 )
3869 goto tolua_lerror;
3870 else
3871#endif
3872 {
3873 lua_State* L = tolua_S;
3874 City_List_Link* self = ((City_List_Link*) tolua_tousertype(tolua_S,1,0));
3875 {
3876 City* tolua_ret = (City*) api_methods_city_list_link_data(L,self);
3877 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
3878 }
3879 }
3880 return 1;
3881#ifndef TOLUA_RELEASE
3882 tolua_lerror:
3883 tolua_error(tolua_S,"#ferror in function 'data'.",&tolua_err);
3884 return 0;
3885#endif
3886}
3887
3888/* function: api_methods_city_list_next_link */
3889 static int tolua_game_City_List_Link_next00(lua_State* tolua_S)
3890{
3891#ifndef TOLUA_RELEASE
3892 tolua_Error tolua_err;
3893 if (
3894 !tolua_isusertype(tolua_S,1,"City_List_Link",0,&tolua_err) ||
3895 !tolua_isnoobj(tolua_S,2,&tolua_err)
3896 )
3897 goto tolua_lerror;
3898 else
3899#endif
3900 {
3901 lua_State* L = tolua_S;
3902 City_List_Link* self = ((City_List_Link*) tolua_tousertype(tolua_S,1,0));
3903 {
3904 City_List_Link* tolua_ret = (City_List_Link*) api_methods_city_list_next_link(L,self);
3905 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City_List_Link");
3906 }
3907 }
3908 return 1;
3909#ifndef TOLUA_RELEASE
3910 tolua_lerror:
3911 tolua_error(tolua_S,"#ferror in function 'next'.",&tolua_err);
3912 return 0;
3913#endif
3914}
3915
3916/* function: api_find_counter_by_name */
3917 static int tolua_game_find_counter00(lua_State* tolua_S)
3918{
3919#ifndef TOLUA_RELEASE
3920 tolua_Error tolua_err;
3921 if (
3922 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
3923 !tolua_isnoobj(tolua_S,2,&tolua_err)
3924 )
3925 goto tolua_lerror;
3926 else
3927#endif
3928 {
3929 lua_State* L = tolua_S;
3930 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
3931 {
3932 Counter* tolua_ret = (Counter*) api_find_counter_by_name(L,name);
3933 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Counter");
3934 }
3935 }
3936 return 1;
3937#ifndef TOLUA_RELEASE
3938 tolua_lerror:
3939 tolua_error(tolua_S,"#ferror in function 'counter'.",&tolua_err);
3940 return 0;
3941#endif
3942}
3943
3944/* function: api_find_counter */
3945 static int tolua_game_find_counter01(lua_State* tolua_S)
3946{
3947 tolua_Error tolua_err;
3948 if (
3949 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3950 !tolua_isnoobj(tolua_S,2,&tolua_err)
3951 )
3952 goto tolua_lerror;
3953 else
3954 {
3955 lua_State* L = tolua_S;
3956 int counter_id = ((int) tolua_tonumber(tolua_S,1,0));
3957 {
3958 Counter* tolua_ret = (Counter*) api_find_counter(L,counter_id);
3959 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Counter");
3960 }
3961 }
3962 return 1;
3963 tolua_lerror:
3964 return tolua_game_find_counter00(tolua_S);
3965}
3966
3967/* function: api_find_player_by_name */
3968 static int tolua_game_find_player00(lua_State* tolua_S)
3969{
3970#ifndef TOLUA_RELEASE
3971 tolua_Error tolua_err;
3972 if (
3973 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
3974 !tolua_isnoobj(tolua_S,2,&tolua_err)
3975 )
3976 goto tolua_lerror;
3977 else
3978#endif
3979 {
3980 lua_State* L = tolua_S;
3981 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
3982 {
3983 Player* tolua_ret = (Player*) api_find_player_by_name(L,name);
3984 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
3985 }
3986 }
3987 return 1;
3988#ifndef TOLUA_RELEASE
3989 tolua_lerror:
3990 tolua_error(tolua_S,"#ferror in function 'player'.",&tolua_err);
3991 return 0;
3992#endif
3993}
3994
3995/* function: api_find_player */
3996 static int tolua_game_find_player01(lua_State* tolua_S)
3997{
3998 tolua_Error tolua_err;
3999 if (
4000 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4001 !tolua_isnoobj(tolua_S,2,&tolua_err)
4002 )
4003 goto tolua_lerror;
4004 else
4005 {
4006 lua_State* L = tolua_S;
4007 int player_id = ((int) tolua_tonumber(tolua_S,1,0));
4008 {
4009 Player* tolua_ret = (Player*) api_find_player(L,player_id);
4010 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
4011 }
4012 }
4013 return 1;
4014 tolua_lerror:
4015 return tolua_game_find_player00(tolua_S);
4016}
4017
4018/* function: api_find_city */
4019 static int tolua_game_find_city00(lua_State* tolua_S)
4020{
4021#ifndef TOLUA_RELEASE
4022 tolua_Error tolua_err;
4023 if (
4024 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4025 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4026 !tolua_isnoobj(tolua_S,3,&tolua_err)
4027 )
4028 goto tolua_lerror;
4029 else
4030#endif
4031 {
4032 lua_State* L = tolua_S;
4033 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4034 int city_id = ((int) tolua_tonumber(tolua_S,2,0));
4035 {
4036 City* tolua_ret = (City*) api_find_city(L,pplayer,city_id);
4037 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
4038 }
4039 }
4040 return 1;
4041#ifndef TOLUA_RELEASE
4042 tolua_lerror:
4043 tolua_error(tolua_S,"#ferror in function 'city'.",&tolua_err);
4044 return 0;
4045#endif
4046}
4047
4048/* function: api_find_unit */
4049 static int tolua_game_find_unit00(lua_State* tolua_S)
4050{
4051#ifndef TOLUA_RELEASE
4052 tolua_Error tolua_err;
4053 if (
4054 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4055 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4056 !tolua_isnoobj(tolua_S,3,&tolua_err)
4057 )
4058 goto tolua_lerror;
4059 else
4060#endif
4061 {
4062 lua_State* L = tolua_S;
4063 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4064 int unit_id = ((int) tolua_tonumber(tolua_S,2,0));
4065 {
4066 Unit* tolua_ret = (Unit*) api_find_unit(L,pplayer,unit_id);
4067 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
4068 }
4069 }
4070 return 1;
4071#ifndef TOLUA_RELEASE
4072 tolua_lerror:
4073 tolua_error(tolua_S,"#ferror in function 'unit'.",&tolua_err);
4074 return 0;
4075#endif
4076}
4077
4078/* function: api_find_transport_unit */
4079 static int tolua_game_find_transport_unit00(lua_State* tolua_S)
4080{
4081#ifndef TOLUA_RELEASE
4082 tolua_Error tolua_err;
4083 if (
4084 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4085 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
4086 !tolua_isusertype(tolua_S,3,"Tile",0,&tolua_err) ||
4087 !tolua_isnoobj(tolua_S,4,&tolua_err)
4088 )
4089 goto tolua_lerror;
4090 else
4091#endif
4092 {
4093 lua_State* L = tolua_S;
4094 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4095 Unit_Type* ptype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
4096 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,3,0));
4097 {
4098 Unit* tolua_ret = (Unit*) api_find_transport_unit(L,pplayer,ptype,ptile);
4099 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
4100 }
4101 }
4102 return 1;
4103#ifndef TOLUA_RELEASE
4104 tolua_lerror:
4105 tolua_error(tolua_S,"#ferror in function 'transport_unit'.",&tolua_err);
4106 return 0;
4107#endif
4108}
4109
4110/* function: api_find_tile */
4111 static int tolua_game_find_tile00(lua_State* tolua_S)
4112{
4113#ifndef TOLUA_RELEASE
4114 tolua_Error tolua_err;
4115 if (
4116 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4117 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4118 !tolua_isnoobj(tolua_S,3,&tolua_err)
4119 )
4120 goto tolua_lerror;
4121 else
4122#endif
4123 {
4124 lua_State* L = tolua_S;
4125 int nat_x = ((int) tolua_tonumber(tolua_S,1,0));
4126 int nat_y = ((int) tolua_tonumber(tolua_S,2,0));
4127 {
4128 Tile* tolua_ret = (Tile*) api_find_tile(L,nat_x,nat_y);
4129 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
4130 }
4131 }
4132 return 1;
4133#ifndef TOLUA_RELEASE
4134 tolua_lerror:
4135 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
4136 return 0;
4137#endif
4138}
4139
4140/* function: api_find_tile_by_index */
4141 static int tolua_game_find_tile01(lua_State* tolua_S)
4142{
4143 tolua_Error tolua_err;
4144 if (
4145 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4146 !tolua_isnoobj(tolua_S,2,&tolua_err)
4147 )
4148 goto tolua_lerror;
4149 else
4150 {
4151 lua_State* L = tolua_S;
4152 int tindex = ((int) tolua_tonumber(tolua_S,1,0));
4153 {
4154 Tile* tolua_ret = (Tile*) api_find_tile_by_index(L,tindex);
4155 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
4156 }
4157 }
4158 return 1;
4159 tolua_lerror:
4160 return tolua_game_find_tile00(tolua_S);
4161}
4162
4163/* function: api_find_government_by_name */
4164 static int tolua_game_find_government00(lua_State* tolua_S)
4165{
4166#ifndef TOLUA_RELEASE
4167 tolua_Error tolua_err;
4168 if (
4169 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4170 !tolua_isnoobj(tolua_S,2,&tolua_err)
4171 )
4172 goto tolua_lerror;
4173 else
4174#endif
4175 {
4176 lua_State* L = tolua_S;
4177 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4178 {
4179 Government* tolua_ret = (Government*) api_find_government_by_name(L,name_orig);
4180 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Government");
4181 }
4182 }
4183 return 1;
4184#ifndef TOLUA_RELEASE
4185 tolua_lerror:
4186 tolua_error(tolua_S,"#ferror in function 'government'.",&tolua_err);
4187 return 0;
4188#endif
4189}
4190
4191/* function: api_find_government */
4192 static int tolua_game_find_government01(lua_State* tolua_S)
4193{
4194 tolua_Error tolua_err;
4195 if (
4196 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4197 !tolua_isnoobj(tolua_S,2,&tolua_err)
4198 )
4199 goto tolua_lerror;
4200 else
4201 {
4202 lua_State* L = tolua_S;
4203 int government_id = ((int) tolua_tonumber(tolua_S,1,0));
4204 {
4205 Government* tolua_ret = (Government*) api_find_government(L,government_id);
4206 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Government");
4207 }
4208 }
4209 return 1;
4210 tolua_lerror:
4211 return tolua_game_find_government00(tolua_S);
4212}
4213
4214/* function: api_find_nation_type_by_name */
4215 static int tolua_game_find_nation_type00(lua_State* tolua_S)
4216{
4217#ifndef TOLUA_RELEASE
4218 tolua_Error tolua_err;
4219 if (
4220 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4221 !tolua_isnoobj(tolua_S,2,&tolua_err)
4222 )
4223 goto tolua_lerror;
4224 else
4225#endif
4226 {
4227 lua_State* L = tolua_S;
4228 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4229 {
4230 Nation_Type* tolua_ret = (Nation_Type*) api_find_nation_type_by_name(L,name_orig);
4231 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nation_Type");
4232 }
4233 }
4234 return 1;
4235#ifndef TOLUA_RELEASE
4236 tolua_lerror:
4237 tolua_error(tolua_S,"#ferror in function 'nation_type'.",&tolua_err);
4238 return 0;
4239#endif
4240}
4241
4242/* function: api_find_nation_type */
4243 static int tolua_game_find_nation_type01(lua_State* tolua_S)
4244{
4245 tolua_Error tolua_err;
4246 if (
4247 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4248 !tolua_isnoobj(tolua_S,2,&tolua_err)
4249 )
4250 goto tolua_lerror;
4251 else
4252 {
4253 lua_State* L = tolua_S;
4254 int nation_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4255 {
4256 Nation_Type* tolua_ret = (Nation_Type*) api_find_nation_type(L,nation_type_id);
4257 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nation_Type");
4258 }
4259 }
4260 return 1;
4261 tolua_lerror:
4262 return tolua_game_find_nation_type00(tolua_S);
4263}
4264
4265/* function: api_find_action_by_name */
4266 static int tolua_game_find_action00(lua_State* tolua_S)
4267{
4268#ifndef TOLUA_RELEASE
4269 tolua_Error tolua_err;
4270 if (
4271 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4272 !tolua_isnoobj(tolua_S,2,&tolua_err)
4273 )
4274 goto tolua_lerror;
4275 else
4276#endif
4277 {
4278 lua_State* L = tolua_S;
4279 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4280 {
4281 Action* tolua_ret = (Action*) api_find_action_by_name(L,name_orig);
4282 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4283 }
4284 }
4285 return 1;
4286#ifndef TOLUA_RELEASE
4287 tolua_lerror:
4288 tolua_error(tolua_S,"#ferror in function 'action'.",&tolua_err);
4289 return 0;
4290#endif
4291}
4292
4293/* function: api_find_action */
4294 static int tolua_game_find_action01(lua_State* tolua_S)
4295{
4296 tolua_Error tolua_err;
4297 if (
4298 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4299 !tolua_isnoobj(tolua_S,2,&tolua_err)
4300 )
4301 goto tolua_lerror;
4302 else
4303 {
4304 lua_State* L = tolua_S;
4305 int action_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4306 {
4307 Action* tolua_ret = (Action*) api_find_action(L,action_type_id);
4308 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4309 }
4310 }
4311 return 1;
4312 tolua_lerror:
4313 return tolua_game_find_action00(tolua_S);
4314}
4315
4316/* function: api_find_building_type_by_name */
4317 static int tolua_game_find_building_type00(lua_State* tolua_S)
4318{
4319#ifndef TOLUA_RELEASE
4320 tolua_Error tolua_err;
4321 if (
4322 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4323 !tolua_isnoobj(tolua_S,2,&tolua_err)
4324 )
4325 goto tolua_lerror;
4326 else
4327#endif
4328 {
4329 lua_State* L = tolua_S;
4330 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4331 {
4332 Building_Type* tolua_ret = (Building_Type*) api_find_building_type_by_name(L,name_orig);
4333 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Building_Type");
4334 }
4335 }
4336 return 1;
4337#ifndef TOLUA_RELEASE
4338 tolua_lerror:
4339 tolua_error(tolua_S,"#ferror in function 'building_type'.",&tolua_err);
4340 return 0;
4341#endif
4342}
4343
4344/* function: api_find_building_type */
4345 static int tolua_game_find_building_type01(lua_State* tolua_S)
4346{
4347 tolua_Error tolua_err;
4348 if (
4349 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4350 !tolua_isnoobj(tolua_S,2,&tolua_err)
4351 )
4352 goto tolua_lerror;
4353 else
4354 {
4355 lua_State* L = tolua_S;
4356 int building_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4357 {
4358 Building_Type* tolua_ret = (Building_Type*) api_find_building_type(L,building_type_id);
4359 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Building_Type");
4360 }
4361 }
4362 return 1;
4363 tolua_lerror:
4364 return tolua_game_find_building_type00(tolua_S);
4365}
4366
4367/* function: api_find_unit_type_by_name */
4368 static int tolua_game_find_unit_type00(lua_State* tolua_S)
4369{
4370#ifndef TOLUA_RELEASE
4371 tolua_Error tolua_err;
4372 if (
4373 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4374 !tolua_isnoobj(tolua_S,2,&tolua_err)
4375 )
4376 goto tolua_lerror;
4377 else
4378#endif
4379 {
4380 lua_State* L = tolua_S;
4381 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4382 {
4383 Unit_Type* tolua_ret = (Unit_Type*) api_find_unit_type_by_name(L,name_orig);
4384 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4385 }
4386 }
4387 return 1;
4388#ifndef TOLUA_RELEASE
4389 tolua_lerror:
4390 tolua_error(tolua_S,"#ferror in function 'unit_type'.",&tolua_err);
4391 return 0;
4392#endif
4393}
4394
4395/* function: api_find_unit_type */
4396 static int tolua_game_find_unit_type01(lua_State* tolua_S)
4397{
4398 tolua_Error tolua_err;
4399 if (
4400 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4401 !tolua_isnoobj(tolua_S,2,&tolua_err)
4402 )
4403 goto tolua_lerror;
4404 else
4405 {
4406 lua_State* L = tolua_S;
4407 int unit_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4408 {
4409 Unit_Type* tolua_ret = (Unit_Type*) api_find_unit_type(L,unit_type_id);
4410 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4411 }
4412 }
4413 return 1;
4414 tolua_lerror:
4415 return tolua_game_find_unit_type00(tolua_S);
4416}
4417
4418/* function: api_find_role_unit_type */
4419 static int tolua_game_find_role_unit_type00(lua_State* tolua_S)
4420{
4421#ifndef TOLUA_RELEASE
4422 tolua_Error tolua_err;
4423 if (
4424 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4425 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
4426 !tolua_isnoobj(tolua_S,3,&tolua_err)
4427 )
4428 goto tolua_lerror;
4429 else
4430#endif
4431 {
4432 lua_State* L = tolua_S;
4433 const char* role_name = ((const char*) tolua_tostring(tolua_S,1,0));
4434 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
4435 {
4436 Unit_Type* tolua_ret = (Unit_Type*) api_find_role_unit_type(L,role_name,pplayer);
4437 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4438 }
4439 }
4440 return 1;
4441#ifndef TOLUA_RELEASE
4442 tolua_lerror:
4443 tolua_error(tolua_S,"#ferror in function 'role_unit_type'.",&tolua_err);
4444 return 0;
4445#endif
4446}
4447
4448/* function: api_find_tech_type_by_name */
4449 static int tolua_game_find_tech_type00(lua_State* tolua_S)
4450{
4451#ifndef TOLUA_RELEASE
4452 tolua_Error tolua_err;
4453 if (
4454 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4455 !tolua_isnoobj(tolua_S,2,&tolua_err)
4456 )
4457 goto tolua_lerror;
4458 else
4459#endif
4460 {
4461 lua_State* L = tolua_S;
4462 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4463 {
4464 Tech_Type* tolua_ret = (Tech_Type*) api_find_tech_type_by_name(L,name_orig);
4465 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
4466 }
4467 }
4468 return 1;
4469#ifndef TOLUA_RELEASE
4470 tolua_lerror:
4471 tolua_error(tolua_S,"#ferror in function 'tech_type'.",&tolua_err);
4472 return 0;
4473#endif
4474}
4475
4476/* function: api_find_tech_type */
4477 static int tolua_game_find_tech_type01(lua_State* tolua_S)
4478{
4479 tolua_Error tolua_err;
4480 if (
4481 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4482 !tolua_isnoobj(tolua_S,2,&tolua_err)
4483 )
4484 goto tolua_lerror;
4485 else
4486 {
4487 lua_State* L = tolua_S;
4488 int tech_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4489 {
4490 Tech_Type* tolua_ret = (Tech_Type*) api_find_tech_type(L,tech_type_id);
4491 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
4492 }
4493 }
4494 return 1;
4495 tolua_lerror:
4496 return tolua_game_find_tech_type00(tolua_S);
4497}
4498
4499/* function: api_find_terrain_by_name */
4500 static int tolua_game_find_terrain00(lua_State* tolua_S)
4501{
4502#ifndef TOLUA_RELEASE
4503 tolua_Error tolua_err;
4504 if (
4505 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4506 !tolua_isnoobj(tolua_S,2,&tolua_err)
4507 )
4508 goto tolua_lerror;
4509 else
4510#endif
4511 {
4512 lua_State* L = tolua_S;
4513 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4514 {
4515 Terrain* tolua_ret = (Terrain*) api_find_terrain_by_name(L,name_orig);
4516 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Terrain");
4517 }
4518 }
4519 return 1;
4520#ifndef TOLUA_RELEASE
4521 tolua_lerror:
4522 tolua_error(tolua_S,"#ferror in function 'terrain'.",&tolua_err);
4523 return 0;
4524#endif
4525}
4526
4527/* function: api_find_terrain */
4528 static int tolua_game_find_terrain01(lua_State* tolua_S)
4529{
4530 tolua_Error tolua_err;
4531 if (
4532 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4533 !tolua_isnoobj(tolua_S,2,&tolua_err)
4534 )
4535 goto tolua_lerror;
4536 else
4537 {
4538 lua_State* L = tolua_S;
4539 int terrain_id = ((int) tolua_tonumber(tolua_S,1,0));
4540 {
4541 Terrain* tolua_ret = (Terrain*) api_find_terrain(L,terrain_id);
4542 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Terrain");
4543 }
4544 }
4545 return 1;
4546 tolua_lerror:
4547 return tolua_game_find_terrain00(tolua_S);
4548}
4549
4550/* function: api_find_achievement_by_name */
4551 static int tolua_game_find_achievement00(lua_State* tolua_S)
4552{
4553#ifndef TOLUA_RELEASE
4554 tolua_Error tolua_err;
4555 if (
4556 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4557 !tolua_isnoobj(tolua_S,2,&tolua_err)
4558 )
4559 goto tolua_lerror;
4560 else
4561#endif
4562 {
4563 lua_State* L = tolua_S;
4564 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4565 {
4566 Achievement* tolua_ret = (Achievement*) api_find_achievement_by_name(L,name_orig);
4567 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Achievement");
4568 }
4569 }
4570 return 1;
4571#ifndef TOLUA_RELEASE
4572 tolua_lerror:
4573 tolua_error(tolua_S,"#ferror in function 'achievement'.",&tolua_err);
4574 return 0;
4575#endif
4576}
4577
4578/* function: api_find_achievement */
4579 static int tolua_game_find_achievement01(lua_State* tolua_S)
4580{
4581 tolua_Error tolua_err;
4582 if (
4583 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4584 !tolua_isnoobj(tolua_S,2,&tolua_err)
4585 )
4586 goto tolua_lerror;
4587 else
4588 {
4589 lua_State* L = tolua_S;
4590 int achievement_id = ((int) tolua_tonumber(tolua_S,1,0));
4591 {
4592 Achievement* tolua_ret = (Achievement*) api_find_achievement(L,achievement_id);
4593 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Achievement");
4594 }
4595 }
4596 return 1;
4597 tolua_lerror:
4598 return tolua_game_find_achievement00(tolua_S);
4599}
4600
4601/* function: api_find_disaster_by_name */
4602 static int tolua_game_find_achievement02(lua_State* tolua_S)
4603{
4604 tolua_Error tolua_err;
4605 if (
4606 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4607 !tolua_isnoobj(tolua_S,2,&tolua_err)
4608 )
4609 goto tolua_lerror;
4610 else
4611 {
4612 lua_State* L = tolua_S;
4613 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4614 {
4615 Disaster* tolua_ret = (Disaster*) api_find_disaster_by_name(L,name_orig);
4616 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Disaster");
4617 }
4618 }
4619 return 1;
4620 tolua_lerror:
4621 return tolua_game_find_achievement01(tolua_S);
4622}
4623
4624/* function: api_find_disaster */
4625 static int tolua_game_find_disaster00(lua_State* tolua_S)
4626{
4627#ifndef TOLUA_RELEASE
4628 tolua_Error tolua_err;
4629 if (
4630 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4631 !tolua_isnoobj(tolua_S,2,&tolua_err)
4632 )
4633 goto tolua_lerror;
4634 else
4635#endif
4636 {
4637 lua_State* L = tolua_S;
4638 int disaster_id = ((int) tolua_tonumber(tolua_S,1,0));
4639 {
4640 Disaster* tolua_ret = (Disaster*) api_find_disaster(L,disaster_id);
4641 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Disaster");
4642 }
4643 }
4644 return 1;
4645#ifndef TOLUA_RELEASE
4646 tolua_lerror:
4647 tolua_error(tolua_S,"#ferror in function 'disaster'.",&tolua_err);
4648 return 0;
4649#endif
4650}
4651
4652/* function: api_utilities_str2dir */
4653 static int tolua_game_find_direction00(lua_State* tolua_S)
4654{
4655#ifndef TOLUA_RELEASE
4656 tolua_Error tolua_err;
4657 if (
4658 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4659 !tolua_isnoobj(tolua_S,2,&tolua_err)
4660 )
4661 goto tolua_lerror;
4662 else
4663#endif
4664 {
4665 lua_State* L = tolua_S;
4666 const char* str = ((const char*) tolua_tostring(tolua_S,1,0));
4667 {
4668 Direction* tolua_ret = (Direction*) api_utilities_str2dir(L,str);
4669 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
4670 }
4671 }
4672 return 1;
4673#ifndef TOLUA_RELEASE
4674 tolua_lerror:
4675 tolua_error(tolua_S,"#ferror in function 'direction'.",&tolua_err);
4676 return 0;
4677#endif
4678}
4679
4680/* function: api_find_direction */
4681 static int tolua_game_find_direction01(lua_State* tolua_S)
4682{
4683 tolua_Error tolua_err;
4684 if (
4685 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4686 !tolua_isnoobj(tolua_S,2,&tolua_err)
4687 )
4688 goto tolua_lerror;
4689 else
4690 {
4691 lua_State* L = tolua_S;
4692 int id = ((int) tolua_tonumber(tolua_S,1,0));
4693 {
4694 Direction* tolua_ret = (Direction*) api_find_direction(L,id);
4695 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
4696 }
4697 }
4698 return 1;
4699 tolua_lerror:
4700 return tolua_game_find_direction00(tolua_S);
4701}
4702
4703/* function: api_find_action_type_by_name */
4704 static int tolua_game_find_action02(lua_State* tolua_S)
4705{
4706 tolua_Error tolua_err;
4707 if (
4708 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4709 !tolua_isnoobj(tolua_S,2,&tolua_err)
4710 )
4711 goto tolua_lerror;
4712 else
4713 {
4714 lua_State* L = tolua_S;
4715 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
4716 {
4717 Action* tolua_ret = (Action*) api_find_action_type_by_name(L,name);
4718 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4719 }
4720 }
4721 return 1;
4722 tolua_lerror:
4723 return tolua_game_find_action01(tolua_S);
4724}
4725
4726/* function: api_find_action_type_by_id */
4727 static int tolua_game_find_action03(lua_State* tolua_S)
4728{
4729 tolua_Error tolua_err;
4730 if (
4731 !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4732 !tolua_isnoobj(tolua_S,2,&tolua_err)
4733 )
4734 goto tolua_lerror;
4735 else
4736 {
4737 lua_State* L = tolua_S;
4738 int id = ((int) tolua_tonumber(tolua_S,1,0));
4739 {
4740 Action* tolua_ret = (Action*) api_find_action_type_by_id(L,id);
4741 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4742 }
4743 }
4744 return 1;
4745 tolua_lerror:
4746 return tolua_game_find_action02(tolua_S);
4747}
4748
4749/* function: api_find_nonexistent */
4750 static int tolua_game_find_nonexistent00(lua_State* tolua_S)
4751{
4752#ifndef TOLUA_RELEASE
4753 tolua_Error tolua_err;
4754 if (
4755 !tolua_isnoobj(tolua_S,1,&tolua_err)
4756 )
4757 goto tolua_lerror;
4758 else
4759#endif
4760 {
4761 lua_State* L = tolua_S;
4762 {
4763 Nonexistent* tolua_ret = (Nonexistent*) api_find_nonexistent(L);
4764 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nonexistent");
4765 }
4766 }
4767 return 1;
4768#ifndef TOLUA_RELEASE
4769 tolua_lerror:
4770 tolua_error(tolua_S,"#ferror in function 'nonexistent'.",&tolua_err);
4771 return 0;
4772#endif
4773}
4774
4775/* function: api_effects_world_bonus */
4776 static int tolua_game_effects_world_bonus00(lua_State* tolua_S)
4777{
4778#ifndef TOLUA_RELEASE
4779 tolua_Error tolua_err;
4780 if (
4781 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4782 !tolua_isnoobj(tolua_S,2,&tolua_err)
4783 )
4784 goto tolua_lerror;
4785 else
4786#endif
4787 {
4788 lua_State* L = tolua_S;
4789 const char* effect_type = ((const char*) tolua_tostring(tolua_S,1,0));
4790 {
4791 int tolua_ret = (int) api_effects_world_bonus(L,effect_type);
4792 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4793 }
4794 }
4795 return 1;
4796#ifndef TOLUA_RELEASE
4797 tolua_lerror:
4798 tolua_error(tolua_S,"#ferror in function 'world_bonus'.",&tolua_err);
4799 return 0;
4800#endif
4801}
4802
4803/* function: api_effects_player_bonus */
4804 static int tolua_game_effects_player_bonus00(lua_State* tolua_S)
4805{
4806#ifndef TOLUA_RELEASE
4807 tolua_Error tolua_err;
4808 if (
4809 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4810 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
4811 !tolua_isnoobj(tolua_S,3,&tolua_err)
4812 )
4813 goto tolua_lerror;
4814 else
4815#endif
4816 {
4817 lua_State* L = tolua_S;
4818 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4819 const char* effect_type = ((const char*) tolua_tostring(tolua_S,2,0));
4820 {
4821 int tolua_ret = (int) api_effects_player_bonus(L,pplayer,effect_type);
4822 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4823 }
4824 }
4825 return 1;
4826#ifndef TOLUA_RELEASE
4827 tolua_lerror:
4828 tolua_error(tolua_S,"#ferror in function 'player_bonus'.",&tolua_err);
4829 return 0;
4830#endif
4831}
4832
4833/* function: api_effects_city_bonus */
4834 static int tolua_game_effects_city_bonus00(lua_State* tolua_S)
4835{
4836#ifndef TOLUA_RELEASE
4837 tolua_Error tolua_err;
4838 if (
4839 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
4840 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
4841 !tolua_isnoobj(tolua_S,3,&tolua_err)
4842 )
4843 goto tolua_lerror;
4844 else
4845#endif
4846 {
4847 lua_State* L = tolua_S;
4848 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
4849 const char* effect_type = ((const char*) tolua_tostring(tolua_S,2,0));
4850 {
4851 int tolua_ret = (int) api_effects_city_bonus(L,pcity,effect_type);
4852 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4853 }
4854 }
4855 return 1;
4856#ifndef TOLUA_RELEASE
4857 tolua_lerror:
4858 tolua_error(tolua_S,"#ferror in function 'city_bonus'.",&tolua_err);
4859 return 0;
4860#endif
4861}
4862
4863/* function: api_effects_unit_bonus */
4864 static int tolua_game_effects_unit_bonus00(lua_State* tolua_S)
4865{
4866#ifndef TOLUA_RELEASE
4867 tolua_Error tolua_err;
4868 if (
4869 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
4870 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
4871 !tolua_isstring(tolua_S,3,0,&tolua_err) ||
4872 !tolua_isnoobj(tolua_S,4,&tolua_err)
4873 )
4874 goto tolua_lerror;
4875 else
4876#endif
4877 {
4878 lua_State* L = tolua_S;
4879 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
4880 Player* other_player = ((Player*) tolua_tousertype(tolua_S,2,0));
4881 const char* effect_type = ((const char*) tolua_tostring(tolua_S,3,0));
4882 {
4883 int tolua_ret = (int) api_effects_unit_bonus(L,punit,other_player,effect_type);
4884 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4885 }
4886 }
4887 return 1;
4888#ifndef TOLUA_RELEASE
4889 tolua_lerror:
4890 tolua_error(tolua_S,"#ferror in function 'unit_bonus'.",&tolua_err);
4891 return 0;
4892#endif
4893}
4894
4895/* function: api_effects_tile_bonus */
4896 static int tolua_game_effects_tile_bonus00(lua_State* tolua_S)
4897{
4898#ifndef TOLUA_RELEASE
4899 tolua_Error tolua_err;
4900 if (
4901 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
4902 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
4903 !tolua_isstring(tolua_S,3,0,&tolua_err) ||
4904 !tolua_isstring(tolua_S,4,0,&tolua_err) ||
4905 !tolua_isnoobj(tolua_S,5,&tolua_err)
4906 )
4907 goto tolua_lerror;
4908 else
4909#endif
4910 {
4911 lua_State* L = tolua_S;
4912 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
4913 City* pcity = ((City*) tolua_tousertype(tolua_S,2,0));
4914 const char* output_id = ((const char*) tolua_tostring(tolua_S,3,0));
4915 const char* effect_type = ((const char*) tolua_tostring(tolua_S,4,0));
4916 {
4917 int tolua_ret = (int) api_effects_tile_bonus(L,ptile,pcity,output_id,effect_type);
4918 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4919 }
4920 }
4921 return 1;
4922#ifndef TOLUA_RELEASE
4923 tolua_lerror:
4924 tolua_error(tolua_S,"#ferror in function 'tile_bonus'.",&tolua_err);
4925 return 0;
4926#endif
4927}
4928
4929/* function: api_effects_unit_vs_tile_bonus */
4930 static int tolua_game_effects_unit_vs_tile_bonus00(lua_State* tolua_S)
4931{
4932#ifndef TOLUA_RELEASE
4933 tolua_Error tolua_err;
4934 if (
4935 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
4936 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
4937 !tolua_isstring(tolua_S,3,0,&tolua_err) ||
4938 !tolua_isnoobj(tolua_S,4,&tolua_err)
4939 )
4940 goto tolua_lerror;
4941 else
4942#endif
4943 {
4944 lua_State* L = tolua_S;
4945 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
4946 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
4947 const char* effect_type = ((const char*) tolua_tostring(tolua_S,3,0));
4948 {
4949 int tolua_ret = (int) api_effects_unit_vs_tile_bonus(L,punit,ptile,effect_type);
4950 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4951 }
4952 }
4953 return 1;
4954#ifndef TOLUA_RELEASE
4955 tolua_lerror:
4956 tolua_error(tolua_S,"#ferror in function 'unit_vs_tile_bonus'.",&tolua_err);
4957 return 0;
4958#endif
4959}
4960
4961/* function: api_utilities_direction_id */
4962 static int tolua_game_Direction_properties_id00(lua_State* tolua_S)
4963{
4964#ifndef TOLUA_RELEASE
4965 tolua_Error tolua_err;
4966 if (
4967 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
4968 !tolua_isnoobj(tolua_S,2,&tolua_err)
4969 )
4970 goto tolua_lerror;
4971 else
4972#endif
4973 {
4974 lua_State* L = tolua_S;
4975 Direction dir = *((Direction*) tolua_tousertype(tolua_S,1,0));
4976 {
4977 int tolua_ret = (int) api_utilities_direction_id(L,dir);
4978 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4979 }
4980 }
4981 return 1;
4982#ifndef TOLUA_RELEASE
4983 tolua_lerror:
4984 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
4985 return 0;
4986#endif
4987}
4988
4989/* function: api_utilities_dir2str */
4990 static int tolua_game_Direction_properties_name00(lua_State* tolua_S)
4991{
4992#ifndef TOLUA_RELEASE
4993 tolua_Error tolua_err;
4994 if (
4995 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
4996 !tolua_isnoobj(tolua_S,2,&tolua_err)
4997 )
4998 goto tolua_lerror;
4999 else
5000#endif
5001 {
5002 lua_State* L = tolua_S;
5003 Direction dir = *((Direction*) tolua_tousertype(tolua_S,1,0));
5004 {
5005 const char* tolua_ret = (const char*) api_utilities_dir2str(L,dir);
5006 tolua_pushstring(tolua_S,(const char*)tolua_ret);
5007 }
5008 }
5009 return 1;
5010#ifndef TOLUA_RELEASE
5011 tolua_lerror:
5012 tolua_error(tolua_S,"#ferror in function 'name'.",&tolua_err);
5013 return 0;
5014#endif
5015}
5016
5017/* function: api_utilities_direction_is_cardinal */
5018 static int tolua_game_Direction_properties_cardinal00(lua_State* tolua_S)
5019{
5020#ifndef TOLUA_RELEASE
5021 tolua_Error tolua_err;
5022 if (
5023 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5024 !tolua_isnoobj(tolua_S,2,&tolua_err)
5025 )
5026 goto tolua_lerror;
5027 else
5028#endif
5029 {
5030 lua_State* L = tolua_S;
5031 Direction self = *((Direction*) tolua_tousertype(tolua_S,1,0));
5032 {
5033 bool tolua_ret = (bool) api_utilities_direction_is_cardinal(L,self);
5034 tolua_pushboolean(tolua_S,(bool)tolua_ret);
5035 }
5036 }
5037 return 1;
5038#ifndef TOLUA_RELEASE
5039 tolua_lerror:
5040 tolua_error(tolua_S,"#ferror in function 'cardinal'.",&tolua_err);
5041 return 0;
5042#endif
5043}
5044
5045/* function: api_utilities_str2dir */
5046 static int tolua_game_direction_str2dir00(lua_State* tolua_S)
5047{
5048#ifndef TOLUA_RELEASE
5049 tolua_Error tolua_err;
5050 if (
5051 !tolua_isstring(tolua_S,1,0,&tolua_err) ||
5052 !tolua_isnoobj(tolua_S,2,&tolua_err)
5053 )
5054 goto tolua_lerror;
5055 else
5056#endif
5057 {
5058 lua_State* L = tolua_S;
5059 const char* str = ((const char*) tolua_tostring(tolua_S,1,0));
5060 {
5061 Direction* tolua_ret = (Direction*) api_utilities_str2dir(L,str);
5062 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5063 }
5064 }
5065 return 1;
5066#ifndef TOLUA_RELEASE
5067 tolua_lerror:
5068 tolua_error(tolua_S,"#ferror in function 'str2dir'.",&tolua_err);
5069 return 0;
5070#endif
5071}
5072
5073/* function: api_utilities_dir_ccw */
5074 static int tolua_game_direction_next_ccw00(lua_State* tolua_S)
5075{
5076#ifndef TOLUA_RELEASE
5077 tolua_Error tolua_err;
5078 if (
5079 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5080 !tolua_isnoobj(tolua_S,2,&tolua_err)
5081 )
5082 goto tolua_lerror;
5083 else
5084#endif
5085 {
5086 lua_State* L = tolua_S;
5087 Direction self = *((Direction*) tolua_tousertype(tolua_S,1,0));
5088 {
5089 Direction* tolua_ret = (Direction*) api_utilities_dir_ccw(L,self);
5090 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5091 }
5092 }
5093 return 1;
5094#ifndef TOLUA_RELEASE
5095 tolua_lerror:
5096 tolua_error(tolua_S,"#ferror in function 'next_ccw'.",&tolua_err);
5097 return 0;
5098#endif
5099}
5100
5101/* function: api_utilities_dir_cw */
5102 static int tolua_game_direction_next_cw00(lua_State* tolua_S)
5103{
5104#ifndef TOLUA_RELEASE
5105 tolua_Error tolua_err;
5106 if (
5107 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5108 !tolua_isnoobj(tolua_S,2,&tolua_err)
5109 )
5110 goto tolua_lerror;
5111 else
5112#endif
5113 {
5114 lua_State* L = tolua_S;
5115 Direction self = *((Direction*) tolua_tousertype(tolua_S,1,0));
5116 {
5117 Direction* tolua_ret = (Direction*) api_utilities_dir_cw(L,self);
5118 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5119 }
5120 }
5121 return 1;
5122#ifndef TOLUA_RELEASE
5123 tolua_lerror:
5124 tolua_error(tolua_S,"#ferror in function 'next_cw'.",&tolua_err);
5125 return 0;
5126#endif
5127}
5128
5129/* function: api_utilities_opposite_dir */
5130 static int tolua_game_direction_opposite00(lua_State* tolua_S)
5131{
5132#ifndef TOLUA_RELEASE
5133 tolua_Error tolua_err;
5134 if (
5135 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5136 !tolua_isnoobj(tolua_S,2,&tolua_err)
5137 )
5138 goto tolua_lerror;
5139 else
5140#endif
5141 {
5142 lua_State* L = tolua_S;
5143 Direction self = *((Direction*) tolua_tousertype(tolua_S,1,0));
5144 {
5145 Direction* tolua_ret = (Direction*) api_utilities_opposite_dir(L,self);
5146 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5147 }
5148 }
5149 return 1;
5150#ifndef TOLUA_RELEASE
5151 tolua_lerror:
5152 tolua_error(tolua_S,"#ferror in function 'opposite'.",&tolua_err);
5153 return 0;
5154#endif
5155}
5156
5157/* Open lib function */
5158 LUALIB_API int luaopen_game (lua_State* tolua_S)
5159{
5160 tolua_open(tolua_S);
5161 tolua_reg_types(tolua_S);
5162 tolua_module(tolua_S,NULL,0);
5163 tolua_beginmodule(tolua_S,NULL);
5164 tolua_cclass(tolua_S,"Player","Player","",NULL);
5165 tolua_beginmodule(tolua_S,"Player");
5166 tolua_variable(tolua_S,"name",tolua_get_Player_Player_name,NULL);
5167 tolua_variable(tolua_S,"nation",tolua_get_Player_Player_nation_ptr,tolua_set_Player_Player_nation_ptr);
5168 tolua_variable(tolua_S,"government",tolua_get_Player_Player_government_ptr,tolua_set_Player_Player_government_ptr);
5169 tolua_variable(tolua_S,"is_alive",tolua_get_Player_Player_is_alive,tolua_set_Player_Player_is_alive);
5170 tolua_endmodule(tolua_S);
5171 tolua_cclass(tolua_S,"City","City","",NULL);
5172 tolua_beginmodule(tolua_S,"City");
5173 tolua_variable(tolua_S,"name",tolua_get_City_City_name,NULL);
5174 tolua_variable(tolua_S,"owner",tolua_get_City_City_owner_ptr,tolua_set_City_City_owner_ptr);
5175 tolua_variable(tolua_S,"original",tolua_get_City_City_original_ptr,tolua_set_City_City_original_ptr);
5176 tolua_variable(tolua_S,"id",tolua_get_City_City_id,NULL);
5177 tolua_endmodule(tolua_S);
5178 tolua_cclass(tolua_S,"Counter","Counter","",NULL);
5179 tolua_beginmodule(tolua_S,"Counter");
5180 tolua_endmodule(tolua_S);
5181 tolua_cclass(tolua_S,"Connection","Connection","",NULL);
5182 tolua_beginmodule(tolua_S,"Connection");
5183 tolua_variable(tolua_S,"id",tolua_get_Connection_Connection_id,NULL);
5184 tolua_endmodule(tolua_S);
5185 tolua_cclass(tolua_S,"Unit","Unit","",NULL);
5186 tolua_beginmodule(tolua_S,"Unit");
5187 tolua_variable(tolua_S,"utype",tolua_get_Unit_Unit_utype_ptr,tolua_set_Unit_Unit_utype_ptr);
5188 tolua_variable(tolua_S,"owner",tolua_get_Unit_Unit_owner_ptr,tolua_set_Unit_Unit_owner_ptr);
5189 tolua_variable(tolua_S,"homecity",tolua_get_Unit_Unit_homecity,tolua_set_Unit_Unit_homecity);
5190 tolua_variable(tolua_S,"veteran",tolua_get_Unit_Unit_veteran,tolua_set_Unit_Unit_veteran);
5191 tolua_variable(tolua_S,"id",tolua_get_Unit_Unit_id,NULL);
5192 tolua_endmodule(tolua_S);
5193 tolua_cclass(tolua_S,"Tile","Tile","",NULL);
5194 tolua_beginmodule(tolua_S,"Tile");
5195 tolua_variable(tolua_S,"terrain",tolua_get_Tile_Tile_terrain_ptr,tolua_set_Tile_Tile_terrain_ptr);
5196 tolua_variable(tolua_S,"owner",tolua_get_Tile_Tile_owner_ptr,tolua_set_Tile_Tile_owner_ptr);
5197 tolua_variable(tolua_S,"id",tolua_get_Tile_Tile_index,NULL);
5198 tolua_endmodule(tolua_S);
5199 tolua_cclass(tolua_S,"Government","Government","",NULL);
5200 tolua_beginmodule(tolua_S,"Government");
5201 tolua_variable(tolua_S,"id",tolua_get_Government_Government_item_number,NULL);
5202 tolua_endmodule(tolua_S);
5203 tolua_cclass(tolua_S,"Nation_Type","Nation_Type","",NULL);
5204 tolua_beginmodule(tolua_S,"Nation_Type");
5205 tolua_variable(tolua_S,"id",tolua_get_Nation_Type_Nation_Type_item_number,NULL);
5206 tolua_endmodule(tolua_S);
5207 tolua_cclass(tolua_S,"Building_Type","Building_Type","",NULL);
5208 tolua_beginmodule(tolua_S,"Building_Type");
5209 tolua_variable(tolua_S,"build_cost",tolua_get_Building_Type_Building_Type_build_cost,tolua_set_Building_Type_Building_Type_build_cost);
5210 tolua_variable(tolua_S,"id",tolua_get_Building_Type_Building_Type_item_number,NULL);
5211 tolua_endmodule(tolua_S);
5212 tolua_cclass(tolua_S,"Unit_Type","Unit_Type","",NULL);
5213 tolua_beginmodule(tolua_S,"Unit_Type");
5214 tolua_variable(tolua_S,"build_cost",tolua_get_Unit_Type_Unit_Type_build_cost,tolua_set_Unit_Type_Unit_Type_build_cost);
5215 tolua_variable(tolua_S,"obsoleted_by",tolua_get_Unit_Type_Unit_Type_obsoleted_by_ptr,tolua_set_Unit_Type_Unit_Type_obsoleted_by_ptr);
5216 tolua_variable(tolua_S,"id",tolua_get_Unit_Type_Unit_Type_item_number,NULL);
5217 tolua_endmodule(tolua_S);
5218 tolua_cclass(tolua_S,"Tech_Type","Tech_Type","",NULL);
5219 tolua_beginmodule(tolua_S,"Tech_Type");
5220 tolua_variable(tolua_S,"id",tolua_get_Tech_Type_Tech_Type_item_number,NULL);
5221 tolua_variable(tolua_S,"cost_base",tolua_get_Tech_Type_Tech_Type_cost,NULL);
5222 tolua_endmodule(tolua_S);
5223 tolua_cclass(tolua_S,"Terrain","Terrain","",NULL);
5224 tolua_beginmodule(tolua_S,"Terrain");
5225 tolua_variable(tolua_S,"id",tolua_get_Terrain_Terrain_item_number,NULL);
5226 tolua_endmodule(tolua_S);
5227 tolua_cclass(tolua_S,"Disaster","Disaster","",NULL);
5228 tolua_beginmodule(tolua_S,"Disaster");
5229 tolua_variable(tolua_S,"id",tolua_get_Disaster_Disaster_id,NULL);
5230 tolua_endmodule(tolua_S);
5231 tolua_cclass(tolua_S,"Achievement","Achievement","",NULL);
5232 tolua_beginmodule(tolua_S,"Achievement");
5233 tolua_variable(tolua_S,"id",tolua_get_Achievement_Achievement_id,NULL);
5234 tolua_endmodule(tolua_S);
5235 tolua_cclass(tolua_S,"Action","Action","",NULL);
5236 tolua_beginmodule(tolua_S,"Action");
5237 tolua_variable(tolua_S,"id",tolua_get_Action_Action_id,NULL);
5238 tolua_endmodule(tolua_S);
5239 tolua_cclass(tolua_S,"Direction","Direction","",NULL);
5240 tolua_beginmodule(tolua_S,"Direction");
5241 tolua_endmodule(tolua_S);
5242 tolua_cclass(tolua_S,"Unit_List_Link","Unit_List_Link","",NULL);
5243 tolua_beginmodule(tolua_S,"Unit_List_Link");
5244 tolua_endmodule(tolua_S);
5245 tolua_cclass(tolua_S,"City_List_Link","City_List_Link","",NULL);
5246 tolua_beginmodule(tolua_S,"City_List_Link");
5247 tolua_endmodule(tolua_S);
5248 tolua_cclass(tolua_S,"Game_Info","Game_Info","",NULL);
5249 tolua_beginmodule(tolua_S,"Game_Info");
5250 tolua_variable(tolua_S,"base_tech_cost",tolua_get_Game_Info_Game_Info_base_tech_cost,NULL);
5251 tolua_variable(tolua_S,"min_tech_cost",tolua_get_Game_Info_Game_Info_min_tech_cost,NULL);
5252 tolua_variable(tolua_S,"tech_leak_pct",tolua_get_Game_Info_Game_Info_tech_leak_pct,NULL);
5253 tolua_variable(tolua_S,"tech_steal_allow_holes",tolua_get_Game_Info_Game_Info_tech_steal_allow_holes,NULL);
5254 tolua_variable(tolua_S,"tech_trade_allow_holes",tolua_get_Game_Info_Game_Info_tech_trade_allow_holes,NULL);
5255 tolua_variable(tolua_S,"tech_trade_loss_allow_holes",tolua_get_Game_Info_Game_Info_tech_trade_loss_allow_holes,NULL);
5256 tolua_variable(tolua_S,"tech_parasite_allow_holes",tolua_get_Game_Info_Game_Info_tech_parasite_allow_holes,NULL);
5257 tolua_variable(tolua_S,"tech_loss_allow_holes",tolua_get_Game_Info_Game_Info_tech_loss_allow_holes,NULL);
5258 tolua_variable(tolua_S,"sciencebox",tolua_get_Game_Info_Game_Info_sciencebox,NULL);
5259 tolua_variable(tolua_S,"tech_cost_style_id",tolua_get_Game_Info_Game_Info_tech_cost_style,NULL);
5260 tolua_variable(tolua_S,"tech_leakage_style_id",tolua_get_Game_Info_Game_Info_tech_leakage,NULL);
5261 tolua_endmodule(tolua_S);
5262 tolua_module(tolua_S,"game",1);
5263 tolua_beginmodule(tolua_S,"game");
5264 tolua_variable(tolua_S,"info",tolua_get_game_game_info_substructure,tolua_set_game_game_info_substructure);
5265 tolua_function(tolua_S,"current_turn",tolua_game_game_current_turn00);
5266 tolua_function(tolua_S,"turn",tolua_game_game_turn00);
5267 tolua_function(tolua_S,"current_year",tolua_game_game_current_year00);
5268 tolua_function(tolua_S,"current_fragment",tolua_game_game_current_fragment00);
5269 tolua_function(tolua_S,"current_year_text",tolua_game_game_current_year_text00);
5270 tolua_function(tolua_S,"rulesetdir",tolua_game_game_rulesetdir00);
5271 tolua_function(tolua_S,"ruleset_name",tolua_game_game_ruleset_name00);
5272 tolua_endmodule(tolua_S);
5273 tolua_module(tolua_S,"Counter",0);
5274 tolua_beginmodule(tolua_S,"Counter");
5275 tolua_function(tolua_S,"rule_name",tolua_game_Counter_rule_name00);
5276 tolua_function(tolua_S,"name_translation",tolua_game_Counter_name_translation00);
5277 tolua_function(tolua_S,"get",tolua_game_Counter_get00);
5278 tolua_endmodule(tolua_S);
5279 tolua_module(tolua_S,"Player",0);
5280 tolua_beginmodule(tolua_S,"Player");
5281 tolua_module(tolua_S,"properties",0);
5282 tolua_beginmodule(tolua_S,"properties");
5283 tolua_function(tolua_S,"id",tolua_game_Player_properties_id00);
5284 tolua_function(tolua_S,"bulbs",tolua_game_Player_properties_bulbs00);
5285 tolua_endmodule(tolua_S);
5286 tolua_function(tolua_S,"controlling_gui",tolua_game_Player_controlling_gui00);
5287 tolua_function(tolua_S,"num_cities",tolua_game_Player_num_cities00);
5288 tolua_function(tolua_S,"num_units",tolua_game_Player_num_units00);
5289 tolua_function(tolua_S,"num_future_techs",tolua_game_Player_num_future_techs00);
5290 tolua_function(tolua_S,"has_wonder",tolua_game_Player_has_wonder00);
5291 tolua_function(tolua_S,"gold",tolua_game_Player_gold00);
5292 tolua_function(tolua_S,"infrapoints",tolua_game_Player_infrapoints00);
5293 tolua_function(tolua_S,"knows_tech",tolua_game_Player_knows_tech00);
5294 tolua_function(tolua_S,"can_research",tolua_game_Player_can_research00);
5295 tolua_function(tolua_S,"tech_cost",tolua_game_Player_tech_cost00);
5296 tolua_function(tolua_S,"researching",tolua_game_Player_researching00);
5297 tolua_function(tolua_S,"researching_cost",tolua_game_Player_researching_cost00);
5298 tolua_function(tolua_S,"shares_research",tolua_game_Player_shares_research00);
5299 tolua_function(tolua_S,"research_rule_name",tolua_game_Player_research_rule_name00);
5300 tolua_function(tolua_S,"research_name_translation",tolua_game_Player_research_name_translation00);
5301 tolua_function(tolua_S,"culture",tolua_game_Player_culture00);
5302 tolua_function(tolua_S,"has_flag",tolua_game_Player_has_flag00);
5303 tolua_function(tolua_S,"can_upgrade",tolua_game_Player_can_upgrade00);
5304 tolua_function(tolua_S,"can_build_direct",tolua_game_Player_can_build_direct00);
5305 tolua_function(tolua_S,"can_build_direct",tolua_game_Player_can_build_direct01);
5306 tolua_endmodule(tolua_S);
5307 tolua_module(tolua_S,"methods_private",0);
5308 tolua_beginmodule(tolua_S,"methods_private");
5309 tolua_function(tolua_S,"list_players",tolua_game_methods_private_list_players00);
5310 tolua_module(tolua_S,"Player",0);
5311 tolua_beginmodule(tolua_S,"Player");
5312 tolua_function(tolua_S,"unit_list_head",tolua_game_methods_private_Player_unit_list_head00);
5313 tolua_function(tolua_S,"city_list_head",tolua_game_methods_private_Player_city_list_head00);
5314 tolua_endmodule(tolua_S);
5315 tolua_endmodule(tolua_S);
5316
5317 { /* begin embedded lua code */
5318 static unsigned char B[] = {
5319 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,101,
5320 114, 58,105,115, 95,104,117,109, 97,110, 40, 41, 10,114,101,
5321 116,117,114,110, 32,110,111,116, 32,115,101,108,102, 46,104,
5322 97,115, 95,102,108, 97,103, 40,115,101,108,102, 44, 32, 34,
5323 65, 73, 34, 41, 59, 10,101,110,100, 10,102,117,110, 99,116,
5324 105,111,110, 32, 80,108, 97,121,101,114, 58,101,120,105,115,
5325 116,115, 40, 41, 10,114,101,116,117,114,110, 32,116,114,117,
5326 101, 10,101,110,100,32
5327 };
5328 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5329 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5330 } /* end of embedded lua code */
5331
5332 tolua_module(tolua_S,"City",0);
5333 tolua_beginmodule(tolua_S,"City");
5334 tolua_module(tolua_S,"properties",0);
5335 tolua_beginmodule(tolua_S,"properties");
5336 tolua_function(tolua_S,"size",tolua_game_City_properties_size00);
5337 tolua_function(tolua_S,"tile",tolua_game_City_properties_tile00);
5338 tolua_endmodule(tolua_S);
5339 tolua_function(tolua_S,"has_building",tolua_game_City_has_building00);
5340 tolua_function(tolua_S,"map_sq_radius",tolua_game_City_map_sq_radius00);
5341 tolua_function(tolua_S,"inspire_partisans",tolua_game_City_inspire_partisans00);
5342 tolua_function(tolua_S,"culture",tolua_game_City_culture00);
5343 tolua_function(tolua_S,"is_happy",tolua_game_City_is_happy00);
5344 tolua_function(tolua_S,"is_unhappy",tolua_game_City_is_unhappy00);
5345 tolua_function(tolua_S,"is_celebrating",tolua_game_City_is_celebrating00);
5346 tolua_function(tolua_S,"is_gov_center",tolua_game_City_is_gov_center00);
5347 tolua_function(tolua_S,"is_capital",tolua_game_City_is_capital00);
5348 tolua_function(tolua_S,"is_primary_capital",tolua_game_City_is_primary_capital00);
5349 tolua_function(tolua_S,"link_text",tolua_game_City_link_text00);
5350 tolua_function(tolua_S,"tile_link_text",tolua_game_City_tile_link_text00);
5351 tolua_endmodule(tolua_S);
5352
5353 { /* begin embedded lua code */
5354 static unsigned char B[] = {
5355 10,102,117,110, 99,116,105,111,110, 32, 67,105,116,121, 58,
5356 101,120,105,115,116,115, 40, 41, 10,114,101,116,117,114,110,
5357 32,116,114,117,101, 10,101,110,100,32
5358 };
5359 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5360 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5361 } /* end of embedded lua code */
5362
5363 tolua_module(tolua_S,"Unit",0);
5364 tolua_beginmodule(tolua_S,"Unit");
5365 tolua_module(tolua_S,"properties",0);
5366 tolua_beginmodule(tolua_S,"properties");
5367 tolua_function(tolua_S,"tile",tolua_game_Unit_properties_tile00);
5368 tolua_endmodule(tolua_S);
5369 tolua_function(tolua_S,"transporter",tolua_game_Unit_transporter00);
5370 tolua_function(tolua_S,"is_on_possible_city_tile",tolua_game_Unit_is_on_possible_city_tile00);
5371 tolua_function(tolua_S,"can_upgrade",tolua_game_Unit_can_upgrade00);
5372 tolua_function(tolua_S,"transform_problem",tolua_game_Unit_transform_problem00);
5373 tolua_function(tolua_S,"facing",tolua_game_Unit_facing00);
5374 tolua_function(tolua_S,"link_text",tolua_game_Unit_link_text00);
5375 tolua_function(tolua_S,"tile_link_text",tolua_game_Unit_tile_link_text00);
5376 tolua_endmodule(tolua_S);
5377 tolua_module(tolua_S,"methods_private",0);
5378 tolua_beginmodule(tolua_S,"methods_private");
5379 tolua_module(tolua_S,"Unit",0);
5380 tolua_beginmodule(tolua_S,"Unit");
5381 tolua_function(tolua_S,"cargo_list_head",tolua_game_methods_private_Unit_cargo_list_head00);
5382 tolua_endmodule(tolua_S);
5383 tolua_endmodule(tolua_S);
5384
5385 { /* begin embedded lua code */
5386 static unsigned char B[] = {
5387 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 58,
5388 101,120,105,115,116,115, 40, 41, 10,114,101,116,117,114,110,
5389 32,116,114,117,101, 10,101,110,100, 10,102,117,110, 99,116,
5390 105,111,110, 32, 85,110,105,116, 58,103,101,116, 95,104,111,
5391 109,101, 99,105,116,121, 40, 41, 10,114,101,116,117,114,110,
5392 32,102,105,110,100, 46, 99,105,116,121, 40,115,101,108,102,
5393 46,111,119,110,101,114, 44, 32,115,101,108,102, 46,104,111,
5394 109,101, 99,105,116,121, 41, 10,101,110,100,32
5395 };
5396 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5397 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5398 } /* end of embedded lua code */
5399
5400 tolua_module(tolua_S,"Tile",0);
5401 tolua_beginmodule(tolua_S,"Tile");
5402 tolua_module(tolua_S,"properties",0);
5403 tolua_beginmodule(tolua_S,"properties");
5404 tolua_function(tolua_S,"nat_x",tolua_game_Tile_properties_nat_x00);
5405 tolua_function(tolua_S,"nat_y",tolua_game_Tile_properties_nat_y00);
5406 tolua_function(tolua_S,"x",tolua_game_Tile_properties_x00);
5407 tolua_function(tolua_S,"y",tolua_game_Tile_properties_y00);
5408 tolua_endmodule(tolua_S);
5409 tolua_function(tolua_S,"city",tolua_game_Tile_city00);
5410 tolua_function(tolua_S,"city_exists_within_max_city_map",tolua_game_Tile_city_exists_within_max_city_map00);
5411 tolua_function(tolua_S,"has_extra",tolua_game_Tile_has_extra00);
5412 tolua_function(tolua_S,"has_base",tolua_game_Tile_has_base00);
5413 tolua_function(tolua_S,"has_road",tolua_game_Tile_has_road00);
5414 tolua_function(tolua_S,"extra_owner",tolua_game_Tile_extra_owner00);
5415 tolua_function(tolua_S,"is_enemy",tolua_game_Tile_is_enemy00);
5416 tolua_function(tolua_S,"num_units",tolua_game_Tile_num_units00);
5417 tolua_function(tolua_S,"sq_distance",tolua_game_Tile_sq_distance00);
5418 tolua_function(tolua_S,"link_text",tolua_game_Tile_link_text00);
5419 tolua_endmodule(tolua_S);
5420
5421 { /* begin embedded lua code */
5422 static unsigned char B[] = {
5423 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,101, 58,
5424 99,105,116,121, 95,101,120,105,115,116,115, 95,119,105,116,
5425 104,105,110, 95, 99,105,116,121, 95,114, 97,100,105,117,115,
5426 40, 99,101,110,116,101,114, 41, 10,108,111,103, 46,100,101,
5427 112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,
5428 110,103, 40, 34, 99,105,116,121, 95,101,120,105,115,116,115,
5429 95,119,105,116,104,105,110, 95, 99,105,116,121, 95,114, 97,
5430 100,105,117,115, 40, 41, 34, 44, 32, 34, 99,105,116,121, 95,
5431 101,120,105,115,116,115, 95,119,105,116,104,105,110, 95,109,
5432 97,120, 95, 99,105,116,121, 95,109, 97,112, 40, 41, 34, 44,
5433 10, 34, 50, 46, 51, 34, 41, 59, 10,114,101,116,117,114,110,
5434 32,115,101,108,102, 58, 99,105,116,121, 95,101,120,105,115,
5435 116,115, 95,119,105,116,104,105,110, 95,109, 97,120, 95, 99,
5436 105,116,121, 95,109, 97,112, 40, 99,101,110,116,101,114, 41,
5437 10,101,110,100,32
5438 };
5439 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5440 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5441 } /* end of embedded lua code */
5442
5443 tolua_module(tolua_S,"methods_private",0);
5444 tolua_beginmodule(tolua_S,"methods_private");
5445 tolua_module(tolua_S,"Tile",0);
5446 tolua_beginmodule(tolua_S,"Tile");
5447 tolua_function(tolua_S,"next_outward_index",tolua_game_methods_private_Tile_next_outward_index00);
5448 tolua_function(tolua_S,"tile_for_outward_index",tolua_game_methods_private_Tile_tile_for_outward_index00);
5449 tolua_function(tolua_S,"unit_list_head",tolua_game_methods_private_Tile_unit_list_head00);
5450 tolua_endmodule(tolua_S);
5451 tolua_endmodule(tolua_S);
5452 tolua_module(tolua_S,"Government",0);
5453 tolua_beginmodule(tolua_S,"Government");
5454 tolua_function(tolua_S,"rule_name",tolua_game_Government_rule_name00);
5455 tolua_function(tolua_S,"name_translation",tolua_game_Government_name_translation00);
5456 tolua_endmodule(tolua_S);
5457 tolua_module(tolua_S,"Nation_Type",0);
5458 tolua_beginmodule(tolua_S,"Nation_Type");
5459 tolua_function(tolua_S,"rule_name",tolua_game_Nation_Type_rule_name00);
5460 tolua_function(tolua_S,"name_translation",tolua_game_Nation_Type_name_translation00);
5461 tolua_function(tolua_S,"plural_translation",tolua_game_Nation_Type_plural_translation00);
5462 tolua_endmodule(tolua_S);
5463 tolua_module(tolua_S,"Building_Type",0);
5464 tolua_beginmodule(tolua_S,"Building_Type");
5465 tolua_function(tolua_S,"is_wonder",tolua_game_Building_Type_is_wonder00);
5466 tolua_function(tolua_S,"is_great_wonder",tolua_game_Building_Type_is_great_wonder00);
5467 tolua_function(tolua_S,"is_small_wonder",tolua_game_Building_Type_is_small_wonder00);
5468 tolua_function(tolua_S,"is_improvement",tolua_game_Building_Type_is_improvement00);
5469 tolua_function(tolua_S,"rule_name",tolua_game_Building_Type_rule_name00);
5470 tolua_function(tolua_S,"name_translation",tolua_game_Building_Type_name_translation00);
5471 tolua_endmodule(tolua_S);
5472
5473 { /* begin embedded lua code */
5474 static unsigned char B[] = {
5475 10,102,117,110, 99,116,105,111,110, 32, 66,117,105,108,100,
5476 105,110,103, 95, 84,121,112,101, 58, 98,117,105,108,100, 95,
5477 115,104,105,101,108,100, 95, 99,111,115,116, 40, 41, 10,114,
5478 101,116,117,114,110, 32,115,101,108,102, 46, 98,117,105,108,
5479 100, 95, 99,111,115,116, 10,101,110,100,32
5480 };
5481 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5482 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5483 } /* end of embedded lua code */
5484
5485 tolua_module(tolua_S,"Unit_Type",0);
5486 tolua_beginmodule(tolua_S,"Unit_Type");
5487 tolua_function(tolua_S,"has_flag",tolua_game_Unit_Type_has_flag00);
5488 tolua_function(tolua_S,"has_role",tolua_game_Unit_Type_has_role00);
5489 tolua_function(tolua_S,"rule_name",tolua_game_Unit_Type_rule_name00);
5490 tolua_function(tolua_S,"name_translation",tolua_game_Unit_Type_name_translation00);
5491 tolua_function(tolua_S,"can_exist_at_tile",tolua_game_Unit_Type_can_exist_at_tile00);
5492 tolua_endmodule(tolua_S);
5493
5494 { /* begin embedded lua code */
5495 static unsigned char B[] = {
5496 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 95,
5497 84,121,112,101, 58, 98,117,105,108,100, 95,115,104,105,101,
5498 108,100, 95, 99,111,115,116, 40, 41, 10,114,101,116,117,114,
5499 110, 32,115,101,108,102, 46, 98,117,105,108,100, 95, 99,111,
5500 115,116, 10,101,110,100,32
5501 };
5502 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5503 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5504 } /* end of embedded lua code */
5505
5506 tolua_module(tolua_S,"Tech_Type",0);
5507 tolua_beginmodule(tolua_S,"Tech_Type");
5508 tolua_function(tolua_S,"rule_name",tolua_game_Tech_Type_rule_name00);
5509 tolua_function(tolua_S,"name_translation",tolua_game_Tech_Type_name_translation00);
5510 tolua_endmodule(tolua_S);
5511
5512 { /* begin embedded lua code */
5513 static unsigned char B[] = {
5514 10,108,111, 99, 97,108, 32,112,116, 99,111,115,116, 32, 61,
5515 32, 80,108, 97,121,101,114, 46,116,101, 99,104, 95, 99,111,
5516 115,116, 10,102,117,110, 99,116,105,111,110, 32, 84,101, 99,
5517 104, 95, 84,121,112,101, 58, 99,111,115,116, 40, 41, 10,114,
5518 101,116,117,114,110, 32,112,116, 99,111,115,116, 40,110,105,
5519 108, 44, 32,115,101,108,102, 41, 10,101,110,100,32
5520 };
5521 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5522 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5523 } /* end of embedded lua code */
5524
5525 tolua_module(tolua_S,"Terrain",0);
5526 tolua_beginmodule(tolua_S,"Terrain");
5527 tolua_function(tolua_S,"rule_name",tolua_game_Terrain_rule_name00);
5528 tolua_function(tolua_S,"name_translation",tolua_game_Terrain_name_translation00);
5529 tolua_function(tolua_S,"class_name",tolua_game_Terrain_class_name00);
5530 tolua_endmodule(tolua_S);
5531 tolua_module(tolua_S,"Disaster",0);
5532 tolua_beginmodule(tolua_S,"Disaster");
5533 tolua_function(tolua_S,"rule_name",tolua_game_Disaster_rule_name00);
5534 tolua_function(tolua_S,"name_translation",tolua_game_Disaster_name_translation00);
5535 tolua_endmodule(tolua_S);
5536 tolua_module(tolua_S,"Achievement",0);
5537 tolua_beginmodule(tolua_S,"Achievement");
5538 tolua_function(tolua_S,"rule_name",tolua_game_Achievement_rule_name00);
5539 tolua_function(tolua_S,"name_translation",tolua_game_Achievement_name_translation00);
5540 tolua_endmodule(tolua_S);
5541 tolua_module(tolua_S,"Action",0);
5542 tolua_beginmodule(tolua_S,"Action");
5543 tolua_function(tolua_S,"rule_name",tolua_game_Action_rule_name00);
5544 tolua_function(tolua_S,"name_translation",tolua_game_Action_name_translation00);
5545 tolua_function(tolua_S,"target_kind",tolua_game_Action_target_kind00);
5546 tolua_endmodule(tolua_S);
5547 tolua_module(tolua_S,"Unit_List_Link",0);
5548 tolua_beginmodule(tolua_S,"Unit_List_Link");
5549 tolua_function(tolua_S,"data",tolua_game_Unit_List_Link_data00);
5550 tolua_function(tolua_S,"next",tolua_game_Unit_List_Link_next00);
5551 tolua_endmodule(tolua_S);
5552 tolua_module(tolua_S,"City_List_Link",0);
5553 tolua_beginmodule(tolua_S,"City_List_Link");
5554 tolua_function(tolua_S,"data",tolua_game_City_List_Link_data00);
5555 tolua_function(tolua_S,"next",tolua_game_City_List_Link_next00);
5556 tolua_endmodule(tolua_S);
5557 tolua_module(tolua_S,"find",0);
5558 tolua_beginmodule(tolua_S,"find");
5559 tolua_function(tolua_S,"counter",tolua_game_find_counter00);
5560 tolua_function(tolua_S,"counter",tolua_game_find_counter01);
5561 tolua_function(tolua_S,"player",tolua_game_find_player00);
5562 tolua_function(tolua_S,"player",tolua_game_find_player01);
5563 tolua_function(tolua_S,"city",tolua_game_find_city00);
5564 tolua_function(tolua_S,"unit",tolua_game_find_unit00);
5565 tolua_function(tolua_S,"transport_unit",tolua_game_find_transport_unit00);
5566 tolua_function(tolua_S,"tile",tolua_game_find_tile00);
5567 tolua_function(tolua_S,"tile",tolua_game_find_tile01);
5568 tolua_function(tolua_S,"government",tolua_game_find_government00);
5569 tolua_function(tolua_S,"government",tolua_game_find_government01);
5570 tolua_function(tolua_S,"nation_type",tolua_game_find_nation_type00);
5571 tolua_function(tolua_S,"nation_type",tolua_game_find_nation_type01);
5572 tolua_function(tolua_S,"action",tolua_game_find_action00);
5573 tolua_function(tolua_S,"action",tolua_game_find_action01);
5574 tolua_function(tolua_S,"building_type",tolua_game_find_building_type00);
5575 tolua_function(tolua_S,"building_type",tolua_game_find_building_type01);
5576 tolua_function(tolua_S,"unit_type",tolua_game_find_unit_type00);
5577 tolua_function(tolua_S,"unit_type",tolua_game_find_unit_type01);
5578 tolua_function(tolua_S,"role_unit_type",tolua_game_find_role_unit_type00);
5579 tolua_function(tolua_S,"tech_type",tolua_game_find_tech_type00);
5580 tolua_function(tolua_S,"tech_type",tolua_game_find_tech_type01);
5581 tolua_function(tolua_S,"terrain",tolua_game_find_terrain00);
5582 tolua_function(tolua_S,"terrain",tolua_game_find_terrain01);
5583 tolua_function(tolua_S,"achievement",tolua_game_find_achievement00);
5584 tolua_function(tolua_S,"achievement",tolua_game_find_achievement01);
5585 tolua_function(tolua_S,"achievement",tolua_game_find_achievement02);
5586 tolua_function(tolua_S,"disaster",tolua_game_find_disaster00);
5587 tolua_function(tolua_S,"direction",tolua_game_find_direction00);
5588 tolua_function(tolua_S,"direction",tolua_game_find_direction01);
5589 tolua_function(tolua_S,"action",tolua_game_find_action02);
5590 tolua_function(tolua_S,"action",tolua_game_find_action03);
5591 tolua_function(tolua_S,"nonexistent",tolua_game_find_nonexistent00);
5592 tolua_endmodule(tolua_S);
5593
5594 { /* begin embedded lua code */
5595 static unsigned char B[] = {
5596 10,108,111, 99, 97,108, 32,103, 97,109,101, 95,105,110,102,
5597 111, 32, 61, 32,103, 97,109,101, 46,105,110,102,111, 10,102,
5598 117,110, 99,116,105,111,110, 32,102,105,110,100, 46,103, 97,
5599 109,101, 95,105,110,102,111, 40, 41, 10,114,101,116,117,114,
5600 110, 32,103, 97,109,101, 95,105,110,102,111, 10,101,110,100,
5601 32
5602 };
5603 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5604 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5605 } /* end of embedded lua code */
5606
5607 tolua_module(tolua_S,"E",0);
5608 tolua_beginmodule(tolua_S,"E");
5609 tolua_endmodule(tolua_S);
5610 tolua_module(tolua_S,"effects",0);
5611 tolua_beginmodule(tolua_S,"effects");
5612 tolua_function(tolua_S,"world_bonus",tolua_game_effects_world_bonus00);
5613 tolua_function(tolua_S,"player_bonus",tolua_game_effects_player_bonus00);
5614 tolua_function(tolua_S,"city_bonus",tolua_game_effects_city_bonus00);
5615 tolua_function(tolua_S,"unit_bonus",tolua_game_effects_unit_bonus00);
5616 tolua_function(tolua_S,"tile_bonus",tolua_game_effects_tile_bonus00);
5617 tolua_function(tolua_S,"unit_vs_tile_bonus",tolua_game_effects_unit_vs_tile_bonus00);
5618 tolua_endmodule(tolua_S);
5619 tolua_module(tolua_S,"Direction",0);
5620 tolua_beginmodule(tolua_S,"Direction");
5621 tolua_module(tolua_S,"properties",0);
5622 tolua_beginmodule(tolua_S,"properties");
5623 tolua_function(tolua_S,"id",tolua_game_Direction_properties_id00);
5624 tolua_function(tolua_S,"name",tolua_game_Direction_properties_name00);
5625 tolua_function(tolua_S,"cardinal",tolua_game_Direction_properties_cardinal00);
5626 tolua_endmodule(tolua_S);
5627 tolua_endmodule(tolua_S);
5628 tolua_module(tolua_S,"direction",0);
5629 tolua_beginmodule(tolua_S,"direction");
5630 tolua_function(tolua_S,"str2dir",tolua_game_direction_str2dir00);
5631 tolua_function(tolua_S,"next_ccw",tolua_game_direction_next_ccw00);
5632 tolua_function(tolua_S,"next_cw",tolua_game_direction_next_cw00);
5633 tolua_function(tolua_S,"opposite",tolua_game_direction_opposite00);
5634 tolua_endmodule(tolua_S);
5635
5636 { /* begin embedded lua code */
5637 static unsigned char B[] = {
5638 10,102,117,110, 99,116,105,111,110, 32,115,116,114, 50,100,
5639 105,114,101, 99,116,105,111,110, 40,115,116,114, 41, 10,114,
5640 101,116,117,114,110, 32,100,105,114,101, 99,116,105,111,110,
5641 46,115,116,114, 50,100,105,114, 40,115,116,114, 41, 10,101,
5642 110,100, 10, 68,105,114,101, 99,116,105,111,110, 46,112,114,
5643 111,112,101,114,116,105,101,115, 46,110,101,120,116, 95, 99,
5644 99,119, 32, 61, 32,100,105,114,101, 99,116,105,111,110, 46,
5645 110,101,120,116, 95, 99, 99,119, 10, 68,105,114,101, 99,116,
5646 105,111,110, 46,112,114,111,112,101,114,116,105,101,115, 46,
5647 110,101,120,116, 95, 99,119, 32, 61, 32,100,105,114,101, 99,
5648 116,105,111,110, 46,110,101,120,116, 95, 99,119, 10, 68,105,
5649 114,101, 99,116,105,111,110, 46,112,114,111,112,101,114,116,
5650 105,101,115, 46,111,112,112,111,115,105,116,101, 32, 61, 32,
5651 100,105,114,101, 99,116,105,111,110, 46,111,112,112,111,115,
5652 105,116,101,32
5653 };
5654 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5655 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5656 } /* end of embedded lua code */
5657
5658 tolua_module(tolua_S,"Game_Info",0);
5659 tolua_beginmodule(tolua_S,"Game_Info");
5660 tolua_endmodule(tolua_S);
5661
5662 { /* begin embedded lua code */
5663 static unsigned char B[] = {
5664 10,108,111, 99, 97,108, 32,116, 99,115, 44, 32,116,108,115,
5665 32, 61, 32, 84, 69, 67, 72, 95, 67, 79, 83, 84, 44, 32, 84,
5666 69, 67, 72, 95, 76, 69, 65, 75, 65, 71, 69, 10, 84, 69, 67,
5667 72, 95, 67, 79, 83, 84, 44, 32, 84, 69, 67, 72, 95, 76, 69,
5668 65, 75, 65, 71, 69, 32, 61, 32,110,105,108, 44, 32,110,105,
5669 108, 10, 71, 97,109,101, 95, 73,110,102,111, 46,112,114,111,
5670 112,101,114,116,105,101,115, 32, 61, 32,123, 10,116,101, 99,
5671 104, 95, 99,111,115,116, 95,115,116,121,108,101, 32, 61, 32,
5672 102,117,110, 99,116,105,111,110, 40,115,101,108,102, 41, 10,
5673 114,101,116,117,114,110, 32,116, 99,115, 91,115,101,108,102,
5674 46,116,101, 99,104, 95, 99,111,115,116, 95,115,116,121,108,
5675 101, 95,105,100, 93, 59, 10,101,110,100, 44, 10,116,101, 99,
5676 104, 95,108,101, 97,107, 97,103,101, 95,115,116,121,108,101,
5677 32, 61, 32,102,117,110, 99,116,105,111,110, 40,115,101,108,
5678 102, 41, 10,114,101,116,117,114,110, 32,116,108,115, 91,115,
5679 101,108,102, 46,116,101, 99,104, 95,108,101, 97,107, 97,103,
5680 101, 95,115,116,121,108,101, 95,105,100, 93, 59, 10,101,110,
5681 100, 10,125, 10,100,111, 10,108,111, 99, 97,108, 32,112,114,
5682 105,118, 97,116,101, 32, 61, 32,109,101,116,104,111,100,115,
5683 95,112,114,105,118, 97,116,101, 10,108,111, 99, 97,108, 32,
5684 102,117,110, 99,116,105,111,110, 32,118, 97,108,117,101, 95,
5685 105,116,101,114, 97,116,111,114, 40, 97,114,114, 97,121, 41,
5686 10,108,111, 99, 97,108, 32,105, 32, 61, 32, 48, 10,108,111,
5687 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,105,116,
5688 101,114, 97,116,111,114, 40, 41, 10,105, 32, 61, 32,105, 32,
5689 43, 32, 49, 10,114,101,116,117,114,110, 32, 97,114,114, 97,
5690 121, 91,105, 93, 10,101,110,100, 10,114,101,116,117,114,110,
5691 32,105,116,101,114, 97,116,111,114, 10,101,110,100, 10,108,
5692 111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,115,
5693 97,102,101, 95,105,116,101,114, 97,116,101, 95,108,105,115,
5694 116, 40,108,105,110,107, 41, 10,108,111, 99, 97,108, 32,111,
5695 98,106,115, 32, 61, 32,123,125, 10,119,104,105,108,101, 32,
5696 108,105,110,107, 32,100,111, 10,111, 98,106,115, 91, 35,111,
5697 98,106,115, 32, 43, 32, 49, 93, 32, 61, 32,108,105,110,107,
5698 58,100, 97,116, 97, 40, 41, 10,108,105,110,107, 32, 61, 32,
5699 108,105,110,107, 58,110,101,120,116, 40, 41, 10,101,110,100,
5700 10,114,101,116,117,114,110, 32,118, 97,108,117,101, 95,105,
5701 116,101,114, 97,116,111,114, 40,111, 98,106,115, 41, 10,101,
5702 110,100, 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,
5703 121,101,114, 58,117,110,105,116,115, 95,105,116,101,114, 97,
5704 116,101, 40, 41, 10,114,101,116,117,114,110, 32,115, 97,102,
5705 101, 95,105,116,101,114, 97,116,101, 95,108,105,115,116, 40,
5706 112,114,105,118, 97,116,101, 46, 80,108, 97,121,101,114, 46,
5707 117,110,105,116, 95,108,105,115,116, 95,104,101, 97,100, 40,
5708 115,101,108,102, 41, 41, 10,101,110,100, 10,102,117,110, 99,
5709 116,105,111,110, 32, 80,108, 97,121,101,114, 58, 99,105,116,
5710 105,101,115, 95,105,116,101,114, 97,116,101, 40, 41, 10,114,
5711 101,116,117,114,110, 32,115, 97,102,101, 95,105,116,101,114,
5712 97,116,101, 95,108,105,115,116, 40,112,114,105,118, 97,116,
5713 101, 46, 80,108, 97,121,101,114, 46, 99,105,116,121, 95,108,
5714 105,115,116, 95,104,101, 97,100, 40,115,101,108,102, 41, 41,
5715 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 84,
5716 105,108,101, 58,117,110,105,116,115, 95,105,116,101,114, 97,
5717 116,101, 40, 41, 10,114,101,116,117,114,110, 32,115, 97,102,
5718 101, 95,105,116,101,114, 97,116,101, 95,108,105,115,116, 40,
5719 112,114,105,118, 97,116,101, 46, 84,105,108,101, 46,117,110,
5720 105,116, 95,108,105,115,116, 95,104,101, 97,100, 40,115,101,
5721 108,102, 41, 41, 10,101,110,100, 10,102,117,110, 99,116,105,
5722 111,110, 32, 85,110,105,116, 58, 99, 97,114,103,111, 95,105,
5723 116,101,114, 97,116,101, 40, 41, 10,114,101,116,117,114,110,
5724 32,115, 97,102,101, 95,105,116,101,114, 97,116,101, 95,108,
5725 105,115,116, 40,112,114,105,118, 97,116,101, 46, 85,110,105,
5726 116, 46, 99, 97,114,103,111, 95,108,105,115,116, 95,104,101,
5727 97,100, 40,115,101,108,102, 41, 41, 10,101,110,100, 10,101,
5728 110,100, 10,100,111, 10,108,111, 99, 97,108, 32,110,101,120,
5729 116, 95,111,117,116,119, 97,114,100, 95,105,110,100,101,120,
5730 32, 61, 32,109,101,116,104,111,100,115, 95,112,114,105,118,
5731 97,116,101, 46, 84,105,108,101, 46,110,101,120,116, 95,111,
5732 117,116,119, 97,114,100, 95,105,110,100,101,120, 10,108,111,
5733 99, 97,108, 32,116,105,108,101, 95,102,111,114, 95,111,117,
5734 116,119, 97,114,100, 95,105,110,100,101,120, 32, 61, 32,109,
5735 101,116,104,111,100,115, 95,112,114,105,118, 97,116,101, 46,
5736 84,105,108,101, 46,116,105,108,101, 95,102,111,114, 95,111,
5737 117,116,119, 97,114,100, 95,105,110,100,101,120, 10,102,117,
5738 110, 99,116,105,111,110, 32, 84,105,108,101, 58,115,113,117,
5739 97,114,101, 95,105,116,101,114, 97,116,101, 40,114, 97,100,
5740 105,117,115, 41, 10,108,111, 99, 97,108, 32,105,110,100,101,
5741 120, 32, 61, 32, 45, 49, 10,108,111, 99, 97,108, 32,102,117,
5742 110, 99,116,105,111,110, 32,105,116,101,114, 97,116,111,114,
5743 40, 41, 10,105,110,100,101,120, 32, 61, 32,110,101,120,116,
5744 95,111,117,116,119, 97,114,100, 95,105,110,100,101,120, 40,
5745 115,101,108,102, 44, 32,105,110,100,101,120, 44, 32,114, 97,
5746 100,105,117,115, 41, 10,105,102, 32,105,110,100,101,120, 32,
5747 60, 32, 48, 32,116,104,101,110, 10,114,101,116,117,114,110,
5748 32,110,105,108, 10,101,108,115,101, 10,114,101,116,117,114,
5749 110, 32,116,105,108,101, 95,102,111,114, 95,111,117,116,119,
5750 97,114,100, 95,105,110,100,101,120, 40,115,101,108,102, 44,
5751 32,105,110,100,101,120, 41, 10,101,110,100, 10,101,110,100,
5752 10,114,101,116,117,114,110, 32,105,116,101,114, 97,116,111,
5753 114, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
5754 84,105,108,101, 58, 99,105,114, 99,108,101, 95,105,116,101,
5755 114, 97,116,101, 40,115,113, 95,114, 97,100,105,117,115, 41,
5756 10,108,111, 99, 97,108, 32, 99,114, 95,114, 97,100,105,117,
5757 115, 32, 61, 32,109, 97,116,104, 46,102,108,111,111,114, 40,
5758 109, 97,116,104, 46,115,113,114,116, 40,115,113, 95,114, 97,
5759 100,105,117,115, 41, 41, 10,108,111, 99, 97,108, 32,115,113,
5760 95,105,116,101,114, 32, 61, 32,115,101,108,102, 58,115,113,
5761 117, 97,114,101, 95,105,116,101,114, 97,116,101, 40, 99,114,
5762 95,114, 97,100,105,117,115, 41, 10,108,111, 99, 97,108, 32,
5763 102,117,110, 99,116,105,111,110, 32,105,116,101,114, 97,116,
5764 111,114, 40, 41, 10,108,111, 99, 97,108, 32,116,105,108,101,
5765 32, 61, 32,110,105,108, 10,114,101,112,101, 97,116, 10,116,
5766 105,108,101, 32, 61, 32,115,113, 95,105,116,101,114, 40, 41,
5767 10,117,110,116,105,108, 32,110,111,116, 32,116,105,108,101,
5768 32,111,114, 32,115,101,108,102, 58,115,113, 95,100,105,115,
5769 116, 97,110, 99,101, 40,116,105,108,101, 41, 32, 60, 61, 32,
5770 115,113, 95,114, 97,100,105,117,115, 10,114,101,116,117,114,
5771 110, 32,116,105,108,101, 10,101,110,100, 10,114,101,116,117,
5772 114,110, 32,105,116,101,114, 97,116,111,114, 10,101,110,100,
5773 10,101,110,100,32
5774 };
5775 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5776 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5777 } /* end of embedded lua code */
5778
5779
5780 { /* begin embedded lua code */
5781 static unsigned char B[] = {
5782 10,100,111, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,
5783 105,111,110, 32,105,110,100,101,120, 95,105,116,101,114, 97,
5784 116,101, 40,108,111,111,107,117,112, 41, 10,108,111, 99, 97,
5785 108, 32,105,110,100,101,120, 32, 61, 32, 45, 49, 10,108,111,
5786 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,105,116,
5787 101,114, 97,116,111,114, 40, 41, 10,105,110,100,101,120, 32,
5788 61, 32,105,110,100,101,120, 32, 43, 32, 49, 10,114,101,116,
5789 117,114,110, 32,108,111,111,107,117,112, 40,105,110,100,101,
5790 120, 41, 10,101,110,100, 10,114,101,116,117,114,110, 32,105,
5791 116,101,114, 97,116,111,114, 10,101,110,100, 10,108,111, 99,
5792 97,108, 32,108,105,115,116,112, 32, 61, 32,109,101,116,104,
5793 111,100,115, 95,112,114,105,118, 97,116,101, 46,108,105,115,
5794 116, 95,112,108, 97,121,101,114,115, 10,102,117,110, 99,116,
5795 105,111,110, 32,112,108, 97,121,101,114,115, 95,105,116,101,
5796 114, 97,116,101, 40, 41, 10,108,111, 99, 97,108, 32,112,108,
5797 105,115,116, 32, 61, 32,108,105,115,116,112, 40, 41, 10,108,
5798 111, 99, 97,108, 32,105,110,100,101,120, 32, 61, 32, 48, 10,
5799 114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110,
5800 40, 41, 10,105,110,100,101,120, 32, 61, 32,105,110,100,101,
5801 120, 32, 43, 32, 49, 10,114,101,116,117,114,110, 32,112,108,
5802 105,115,116, 91,105,110,100,101,120, 93, 10,101,110,100, 10,
5803 101,110,100, 10,102,117,110, 99,116,105,111,110, 32,119,104,
5804 111,108,101, 95,109, 97,112, 95,105,116,101,114, 97,116,101,
5805 40, 41, 10,114,101,116,117,114,110, 32,105,110,100,101,120,
5806 95,105,116,101,114, 97,116,101, 40,102,105,110,100, 46,116,
5807 105,108,101, 41, 10,101,110,100, 10,101,110,100,32
5808 };
5809 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5810 lua_pcall(tolua_S,0,LUA_MULTRET,0);
5811 } /* end of embedded lua code */
5812
5813 tolua_endmodule(tolua_S);
5814 return 1;
5815}
5816/* Open tolua function */
5817 TOLUA_API int tolua_game_open (lua_State* tolua_S)
5818{
5819 lua_pushcfunction(tolua_S, luaopen_game);
5820 lua_pushstring(tolua_S, "game");
5821 lua_call(tolua_S, 1, 0);
5822 return 1;
5823}
api_utilities_dir_cw
const Direction * api_utilities_dir_cw(lua_State *L, Direction dir)
Definition api_common_utilities.c:194
api_utilities_dir2str
const char * api_utilities_dir2str(lua_State *L, Direction dir)
Definition api_common_utilities.c:156
api_utilities_opposite_dir
const Direction * api_utilities_opposite_dir(lua_State *L, Direction dir)
Definition api_common_utilities.c:211
api_utilities_direction_is_cardinal
bool api_utilities_direction_is_cardinal(lua_State *L, Direction dir)
Definition api_common_utilities.c:221
api_utilities_str2dir
const Direction * api_utilities_str2dir(lua_State *L, const char *dir)
Definition api_common_utilities.c:167
api_utilities_direction_id
int api_utilities_direction_id(lua_State *L, Direction dir)
Definition api_common_utilities.c:146
api_utilities_dir_ccw
const Direction * api_utilities_dir_ccw(lua_State *L, Direction dir)
Definition api_common_utilities.c:178
api_common_utilities.h
api_effects_tile_bonus
int api_effects_tile_bonus(lua_State *L, Tile *ptile, City *pcity, const char *output_id, const char *effect_type)
Definition api_game_effects.c:124
api_effects_unit_vs_tile_bonus
int api_effects_unit_vs_tile_bonus(lua_State *L, Unit *punit, Tile *ptile, const char *effect_type)
Definition api_game_effects.c:168
api_effects_player_bonus
int api_effects_player_bonus(lua_State *L, Player *pplayer, const char *effect_type)
Definition api_game_effects.c:46
api_effects_city_bonus
int api_effects_city_bonus(lua_State *L, City *pcity, const char *effect_type)
Definition api_game_effects.c:65
api_effects_unit_bonus
int api_effects_unit_bonus(lua_State *L, Unit *punit, Player *other_player, const char *effect_type)
Definition api_game_effects.c:85
api_effects_world_bonus
int api_effects_world_bonus(lua_State *L, const char *effect_type)
Definition api_game_effects.c:29
api_game_effects.h
api_find_nation_type
Nation_Type * api_find_nation_type(lua_State *L, int nation_type_id)
Definition api_game_find.c:174
api_find_tile
Tile * api_find_tile(lua_State *L, int nat_x, int nat_y)
Definition api_game_find.c:132
api_find_unit_type
Unit_Type * api_find_unit_type(lua_State *L, int unit_type_id)
Definition api_game_find.c:240
api_find_government_by_name
Government * api_find_government_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:162
api_find_player
Player * api_find_player(lua_State *L, int player_id)
Definition api_game_find.c:42
api_find_achievement_by_name
Achievement * api_find_achievement_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:313
api_find_achievement
Achievement * api_find_achievement(lua_State *L, int achievement_id)
Definition api_game_find.c:303
api_find_role_unit_type
Unit_Type * api_find_role_unit_type(lua_State *L, const char *role_name, Player *pplayer)
Definition api_game_find.c:103
api_find_direction
const Direction * api_find_direction(lua_State *L, int id)
Definition api_game_find.c:345
api_find_action_type_by_name
Action * api_find_action_type_by_name(lua_State *L, const char *name)
Definition api_game_find.c:365
api_find_tile_by_index
Tile * api_find_tile_by_index(lua_State *L, int tindex)
Definition api_game_find.c:142
api_find_building_type_by_name
Building_Type * api_find_building_type_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:228
api_find_nation_type_by_name
Nation_Type * api_find_nation_type_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:184
api_find_disaster
Disaster * api_find_disaster(lua_State *L, int disaster_id)
Definition api_game_find.c:324
api_find_tech_type_by_name
Tech_Type * api_find_tech_type_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:271
api_find_government
Government * api_find_government(lua_State *L, int government_id)
Definition api_game_find.c:152
api_find_disaster_by_name
Disaster * api_find_disaster_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:334
api_find_counter
Counter * api_find_counter(lua_State *L, int counter_id)
Definition api_game_find.c:376
api_find_building_type
Building_Type * api_find_building_type(lua_State *L, int building_type_id)
Definition api_game_find.c:218
api_find_action_type_by_id
Action * api_find_action_type_by_id(lua_State *L, int id)
Definition api_game_find.c:355
api_find_action_by_name
Action * api_find_action_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:206
api_find_nonexistent
Nonexistent * api_find_nonexistent(lua_State *L)
Definition api_game_find.c:397
api_find_player_by_name
Player * api_find_player_by_name(lua_State *L, const char *name)
Definition api_game_find.c:32
api_find_transport_unit
Unit * api_find_transport_unit(lua_State *L, Player *pplayer, Unit_Type *ptype, Tile *ptile)
Definition api_game_find.c:80
api_find_tech_type
Tech_Type * api_find_tech_type(lua_State *L, int tech_type_id)
Definition api_game_find.c:261
api_find_city
City * api_find_city(lua_State *L, Player *pplayer, int city_id)
Definition api_game_find.c:52
api_find_unit
Unit * api_find_unit(lua_State *L, Player *pplayer, int unit_id)
Definition api_game_find.c:66
api_find_action
Action * api_find_action(lua_State *L, action_id act_id)
Definition api_game_find.c:196
api_find_terrain
Terrain * api_find_terrain(lua_State *L, int terrain_id)
Definition api_game_find.c:282
api_find_terrain_by_name
Terrain * api_find_terrain_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:292
api_find_counter_by_name
Counter * api_find_counter_by_name(lua_State *L, const char *name)
Definition api_game_find.c:386
api_find_unit_type_by_name
Unit_Type * api_find_unit_type_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:250
api_game_find.h
api_methods_tile_nat_x
int api_methods_tile_nat_x(lua_State *L, Tile *ptile)
Definition api_game_methods.c:1039
api_methods_tile_num_units
int api_methods_tile_num_units(lua_State *L, Tile *ptile)
Definition api_game_methods.c:1246
api_methods_is_city_unhappy
bool api_methods_is_city_unhappy(lua_State *L, City *pcity)
Definition api_game_methods.c:338
api_methods_is_gov_center
bool api_methods_is_gov_center(lua_State *L, City *pcity)
Definition api_game_methods.c:361
api_methods_game_rulesetdir
const char * api_methods_game_rulesetdir(lua_State *L)
Definition api_game_methods.c:107
api_methods_player_future
int api_methods_player_future(lua_State *L, Player *pplayer)
Definition api_game_methods.c:680
api_methods_unit_type_can_exist_at_tile
bool api_methods_unit_type_can_exist_at_tile(lua_State *L, Unit_Type *punit_type, Tile *ptile)
Definition api_game_methods.c:1448
api_methods_player_num_cities
int api_methods_player_num_cities(lua_State *L, Player *pplayer)
Definition api_game_methods.c:503
api_methods_unit_can_upgrade
bool api_methods_unit_can_upgrade(lua_State *L, Unit *punit, bool is_free)
Definition api_game_methods.c:769
api_methods_player_has_wonder
bool api_methods_player_has_wonder(lua_State *L, Player *pplayer, Building_Type *building)
Definition api_game_methods.c:479
api_methods_unit_list_next_link
Unit_List_Link * api_methods_unit_list_next_link(lua_State *L, Unit_List_Link *ul_link)
Definition api_game_methods.c:1498
api_methods_nation_type_plural_translation
const char * api_methods_nation_type_plural_translation(lua_State *L, Nation_Type *pnation)
Definition api_game_methods.c:442
api_methods_disaster_name_translation
const char * api_methods_disaster_name_translation(lua_State *L, Disaster *pdis)
Definition api_game_methods.c:965
api_methods_unit_list_link_data
Unit * api_methods_unit_list_link_data(lua_State *L, Unit_List_Link *ul_link)
Definition api_game_methods.c:1487
api_methods_tile_nat_y
int api_methods_tile_nat_y(lua_State *L, Tile *ptile)
Definition api_game_methods.c:1050
api_methods_private_tile_unit_list_head
Unit_List_Link * api_methods_private_tile_unit_list_head(lua_State *L, Tile *ptile)
Definition api_game_methods.c:1257
api_methods_player_tech_cost
int api_methods_player_tech_cost(lua_State *L, Player *pplayer, Tech_Type *ptech)
Definition api_game_methods.c:586
api_methods_player_researching
lua_Object api_methods_player_researching(lua_State *L, Player *pplayer)
Definition api_game_methods.c:610
api_methods_game_year_fragment
int api_methods_game_year_fragment(lua_State *L)
Definition api_game_methods.c:70
api_methods_counter_name_translation
const char * api_methods_counter_name_translation(lua_State *L, Counter *c)
Definition api_game_methods.c:306
api_methods_city_culture_get
int api_methods_city_culture_get(lua_State *L, City *pcity)
Definition api_game_methods.c:285
api_methods_unit_type_name_translation
const char * api_methods_unit_type_name_translation(lua_State *L, Unit_Type *punit_type)
Definition api_game_methods.c:1474
api_methods_game_ruleset_name
const char * api_methods_game_ruleset_name(lua_State *L)
Definition api_game_methods.c:115
api_methods_building_type_rule_name
const char * api_methods_building_type_rule_name(lua_State *L, Building_Type *pbuilding)
Definition api_game_methods.c:171
api_methods_city_list_link_data
City * api_methods_city_list_link_data(lua_State *L, City_List_Link *cl_link)
Definition api_game_methods.c:1509
api_methods_unit_tile_link
const char * api_methods_unit_tile_link(lua_State *L, Unit *punit)
Definition api_game_methods.c:1542
api_methods_counter_rule_name
const char * api_methods_counter_rule_name(lua_State *L, Counter *c)
Definition api_game_methods.c:296
api_methods_player_can_build_impr_direct
bool api_methods_player_can_build_impr_direct(lua_State *L, Player *pplayer, Building_Type *itype)
Definition api_game_methods.c:754
api_methods_player_num_units
int api_methods_player_num_units(lua_State *L, Player *pplayer)
Definition api_game_methods.c:514
api_methods_tech_type_rule_name
const char * api_methods_tech_type_rule_name(lua_State *L, Tech_Type *ptech)
Definition api_game_methods.c:897
api_methods_tile_map_x
int api_methods_tile_map_x(lua_State *L, Tile *ptile)
Definition api_game_methods.c:1061
api_methods_is_city_happy
bool api_methods_is_city_happy(lua_State *L, City *pcity)
Definition api_game_methods.c:326
api_methods_achievement_rule_name
const char * api_methods_achievement_rule_name(lua_State *L, Achievement *pach)
Definition api_game_methods.c:977
api_methods_player_can_upgrade
Unit_Type * api_methods_player_can_upgrade(lua_State *L, Player *pplayer, Unit_Type *utype)
Definition api_game_methods.c:727
api_methods_city_link
const char * api_methods_city_link(lua_State *L, City *pcity)
Definition api_game_methods.c:1575
api_methods_nation_type_name_translation
const char * api_methods_nation_type_name_translation(lua_State *L, Nation_Type *pnation)
Definition api_game_methods.c:430
api_methods_government_rule_name
const char * api_methods_government_rule_name(lua_State *L, Government *pgovernment)
Definition api_game_methods.c:394
api_methods_terrain_rule_name
const char * api_methods_terrain_rule_name(lua_State *L, Terrain *pterrain)
Definition api_game_methods.c:920
api_methods_player_number
int api_methods_player_number(lua_State *L, Player *pplayer)
Definition api_game_methods.c:492
api_methods_player_infrapoints
int api_methods_player_infrapoints(lua_State *L, Player *pplayer)
Definition api_game_methods.c:536
api_methods_private_unit_cargo_list_head
Unit_List_Link * api_methods_private_unit_cargo_list_head(lua_State *L, Unit *punit)
Definition api_game_methods.c:1395
api_methods_player_controlling_gui
const char * api_methods_player_controlling_gui(lua_State *L, Player *pplayer)
Definition api_game_methods.c:454
api_methods_action_name_translation
const char * api_methods_action_name_translation(lua_State *L, Action *pact)
Definition api_game_methods.c:1012
api_methods_terrain_class_name
const char * api_methods_terrain_class_name(lua_State *L, Terrain *pterrain)
Definition api_game_methods.c:943
api_methods_player_shares_research
bool api_methods_player_shares_research(lua_State *L, Player *pplayer, Player *aplayer)
Definition api_game_methods.c:816
api_methods_tech_type_name_translation
const char * api_methods_tech_type_name_translation(lua_State *L, Tech_Type *ptech)
Definition api_game_methods.c:908
api_methods_tile_extra_owner
Player * api_methods_tile_extra_owner(lua_State *L, Tile *ptile, const char *extra_name)
Definition api_game_methods.c:1191
api_methods_city_size_get
int api_methods_city_size_get(lua_State *L, City *pcity)
Definition api_game_methods.c:220
api_methods_tile_city
City * api_methods_tile_city(lua_State *L, Tile *ptile)
Definition api_game_methods.c:1083
api_methods_government_name_translation
const char * api_methods_government_name_translation(lua_State *L, Government *pgovernment)
Definition api_game_methods.c:406
api_method_player_can_research
bool api_method_player_can_research(lua_State *L, Player *pplayer, Tech_Type *ptech)
Definition api_game_methods.c:562
api_methods_tile_has_extra
bool api_methods_tile_has_extra(lua_State *L, Tile *ptile, const char *name)
Definition api_game_methods.c:1108
api_methods_tile_sq_distance
int api_methods_tile_sq_distance(lua_State *L, Tile *ptile1, Tile *ptile2)
Definition api_game_methods.c:1334
api_methods_unit_type_has_role
bool api_methods_unit_type_has_role(lua_State *L, Unit_Type *punit_type, const char *role)
Definition api_game_methods.c:1427
api_methods_tile_link
const char * api_methods_tile_link(lua_State *L, Tile *ptile)
Definition api_game_methods.c:1531
api_methods_player_culture_get
int api_methods_player_culture_get(lua_State *L, Player *pplayer)
Definition api_game_methods.c:695
api_methods_game_turn_deprecated
int api_methods_game_turn_deprecated(lua_State *L)
Definition api_game_methods.c:90
api_methods_player_bulbs
int api_methods_player_bulbs(lua_State *L, Player *pplayer)
Definition api_game_methods.c:644
api_methods_achievement_name_translation
const char * api_methods_achievement_name_translation(lua_State *L, Achievement *pach)
Definition api_game_methods.c:989
api_methods_building_type_is_great_wonder
bool api_methods_building_type_is_great_wonder(lua_State *L, Building_Type *pbuilding)
Definition api_game_methods.c:135
api_methods_city_tile_link
const char * api_methods_city_tile_link(lua_State *L, City *pcity)
Definition api_game_methods.c:1553
api_methods_private_tile_next_outward_index
int api_methods_private_tile_next_outward_index(lua_State *L, Tile *pstart, int tindex, int max_dist)
Definition api_game_methods.c:1270
api_methods_unit_tile_get
Tile * api_methods_unit_tile_get(lua_State *L, Unit *punit)
Definition api_game_methods.c:1361
api_methods_tile_has_road
bool api_methods_tile_has_road(lua_State *L, Tile *ptile, const char *name)
Definition api_game_methods.c:1162
api_methods_nation_type_rule_name
const char * api_methods_nation_type_rule_name(lua_State *L, Nation_Type *pnation)
Definition api_game_methods.c:418
api_methods_unit_orientation_get
const Direction * api_methods_unit_orientation_get(lua_State *L, Unit *punit)
Definition api_game_methods.c:1372
api_methods_game_turn
int api_methods_game_turn(lua_State *L)
Definition api_game_methods.c:50
api_methods_player_knows_tech
bool api_methods_player_knows_tech(lua_State *L, Player *pplayer, Tech_Type *ptech)
Definition api_game_methods.c:547
api_methods_enemy_tile
bool api_methods_enemy_tile(lua_State *L, Tile *ptile, Player *against)
Definition api_game_methods.c:1224
api_methods_building_type_is_small_wonder
bool api_methods_building_type_is_small_wonder(lua_State *L, Building_Type *pbuilding)
Definition api_game_methods.c:147
api_methods_game_year
int api_methods_game_year(lua_State *L)
Definition api_game_methods.c:60
api_methods_private_tile_for_outward_index
Tile * api_methods_private_tile_for_outward_index(lua_State *L, Tile *pstart, int tindex)
Definition api_game_methods.c:1309
api_methods_game_year_text
const char * api_methods_game_year_text(lua_State *L)
Definition api_game_methods.c:80
api_methods_action_rule_name
const char * api_methods_action_rule_name(lua_State *L, Action *pact)
Definition api_game_methods.c:1001
api_methods_disaster_rule_name
const char * api_methods_disaster_rule_name(lua_State *L, Disaster *pdis)
Definition api_game_methods.c:954
api_methods_building_type_name_translation
const char * api_methods_building_type_name_translation(lua_State *L, Building_Type *pbuilding)
Definition api_game_methods.c:184
api_methods_building_type_is_wonder
bool api_methods_building_type_is_wonder(lua_State *L, Building_Type *pbuilding)
Definition api_game_methods.c:123
api_methods_research_name_translation
const char * api_methods_research_name_translation(lua_State *L, Player *pplayer)
Definition api_game_methods.c:840
api_methods_city_inspire_partisans
int api_methods_city_inspire_partisans(lua_State *L, City *self, Player *inspirer)
Definition api_game_methods.c:242
api_methods_city_map_sq_radius
int api_methods_city_map_sq_radius(lua_State *L, City *pcity)
Definition api_game_methods.c:209
api_methods_city_has_building
bool api_methods_city_has_building(lua_State *L, City *pcity, Building_Type *building)
Definition api_game_methods.c:196
api_methods_unit_transform_problem
const char * api_methods_unit_transform_problem(lua_State *L, Unit *punit, Unit_Type *ptype)
Definition api_game_methods.c:779
api_methods_city_list_next_link
City_List_Link * api_methods_city_list_next_link(lua_State *L, City_List_Link *cl_link)
Definition api_game_methods.c:1520
api_methods_unit_type_has_flag
bool api_methods_unit_type_has_flag(lua_State *L, Unit_Type *punit_type, const char *flag)
Definition api_game_methods.c:1406
api_methods_unit_type_rule_name
const char * api_methods_unit_type_rule_name(lua_State *L, Unit_Type *punit_type)
Definition api_game_methods.c:1462
api_methods_building_type_is_improvement
bool api_methods_building_type_is_improvement(lua_State *L, Building_Type *pbuilding)
Definition api_game_methods.c:159
api_methods_tile_city_exists_within_max_city_map
bool api_methods_tile_city_exists_within_max_city_map(lua_State *L, Tile *ptile, bool may_be_on_center)
Definition api_game_methods.c:1094
api_methods_player_has_flag
bool api_methods_player_has_flag(lua_State *L, Player *pplayer, const char *flag)
Definition api_game_methods.c:706
api_methods_private_list_players
lua_Object api_methods_private_list_players(lua_State *L)
Definition api_game_methods.c:857
api_methods_unit_city_can_be_built_here
bool api_methods_unit_city_can_be_built_here(lua_State *L, Unit *punit)
Definition api_game_methods.c:1350
api_methods_tile_has_base
bool api_methods_tile_has_base(lua_State *L, Tile *ptile, const char *name)
Definition api_game_methods.c:1135
api_methods_player_gold
int api_methods_player_gold(lua_State *L, Player *pplayer)
Definition api_game_methods.c:525
api_methods_research_rule_name
const char * api_methods_research_rule_name(lua_State *L, Player *pplayer)
Definition api_game_methods.c:829
api_methods_is_primary_capital
bool api_methods_is_primary_capital(lua_State *L, City *pcity)
Definition api_game_methods.c:383
api_methods_player_research_cost
int api_methods_player_research_cost(lua_State *L, Player *pplayer)
Definition api_game_methods.c:661
api_methods_tile_map_y
int api_methods_tile_map_y(lua_State *L, Tile *ptile)
Definition api_game_methods.c:1072
api_methods_private_player_unit_list_head
Unit_List_Link * api_methods_private_player_unit_list_head(lua_State *L, Player *pplayer)
Definition api_game_methods.c:874
api_methods_action_target_kind
const char * api_methods_action_target_kind(lua_State *L, Action *pact)
Definition api_game_methods.c:1023
api_methods_private_player_city_list_head
City_List_Link * api_methods_private_player_city_list_head(lua_State *L, Player *pplayer)
Definition api_game_methods.c:885
api_methods_terrain_name_translation
const char * api_methods_terrain_name_translation(lua_State *L, Terrain *pterrain)
Definition api_game_methods.c:931
api_methods_city_tile_get
Tile * api_methods_city_tile_get(lua_State *L, City *pcity)
Definition api_game_methods.c:231
api_methods_unit_link
const char * api_methods_unit_link(lua_State *L, Unit *punit)
Definition api_game_methods.c:1564
api_methods_is_city_celebrating
bool api_methods_is_city_celebrating(lua_State *L, City *pcity)
Definition api_game_methods.c:350
api_methods_counter_city_get
int api_methods_counter_city_get(lua_State *L, Counter *c, City *city)
Definition api_game_methods.c:316
api_methods_is_capital
bool api_methods_is_capital(lua_State *L, City *pcity)
Definition api_game_methods.c:372
api_methods_player_can_build_unit_direct
bool api_methods_player_can_build_unit_direct(lua_State *L, Player *pplayer, Unit_Type *utype)
Definition api_game_methods.c:741
api_methods_unit_transporter
Unit * api_methods_unit_transporter(lua_State *L, Unit *punit)
Definition api_game_methods.c:1384
api_game_methods.h
str
#define str
Definition astring.c:76
self
static struct ai_type * self
Definition classicai.c:45
incite_cost
char * incite_cost
Definition comments.c:74
counter_id
int counter_id(struct counter *pcount)
Definition counters.c:105
punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:74
name
const char * name
Definition inputfile.c:127
luascript_types.h
City_List_Link
const struct city_list_link City_List_Link
Definition luascript_types.h:72
Direction
enum direction8 Direction
Definition luascript_types.h:59
Nonexistent
void Nonexistent
Definition luascript_types.h:65
Unit_List_Link
const struct unit_list_link Unit_List_Link
Definition luascript_types.h:71
nat_x
#define nat_x
nat_y
#define nat_y
achievement
Definition achievements.h:26
action
Definition actions.h:360
advance
Definition tech.h:124
ai_type::name
char name[MAX_LEN_NAME]
Definition ai.h:51
city
Definition city.h:320
connection
Definition connection.h:136
counter
Definition counters.h:27
disaster_type
Definition disaster.h:46
government
Definition government.h:52
impr_type
Definition improvement.h:50
nation_type
Definition nation.h:98
packet_game_info
Definition packets_gen.h:115
player
Definition player.h:247
terrain
Definition terrain.h:182
tile
Definition tile.h:50
unit_type
Definition unittype.h:500
unit
Definition unit.h:138
TRUE
#define TRUE
Definition support.h:46
bool
#define bool
Definition support.h:71
tolua_set_Unit_Unit_owner_ptr
static int tolua_set_Unit_Unit_owner_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:313
tolua_get_Connection_Connection_id
static int tolua_get_Connection_Connection_id(lua_State *tolua_S)
Definition tolua_game_gen.c:254
tolua_game_Player_gold00
static int tolua_game_Player_gold00(lua_State *tolua_S)
Definition tolua_game_gen.c:1354
tolua_game_Player_researching00
static int tolua_game_Player_researching00(lua_State *tolua_S)
Definition tolua_game_gen.c:1500
tolua_game_find_tile00
static int tolua_game_find_tile00(lua_State *tolua_S)
Definition tolua_game_gen.c:4111
tolua_game_direction_next_ccw00
static int tolua_game_direction_next_ccw00(lua_State *tolua_S)
Definition tolua_game_gen.c:5074
tolua_game_game_current_year00
static int tolua_game_game_current_year00(lua_State *tolua_S)
Definition tolua_game_gen.c:940
tolua_game_Terrain_name_translation00
static int tolua_game_Terrain_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3553
tolua_game_Building_Type_is_wonder00
static int tolua_game_Building_Type_is_wonder00(lua_State *tolua_S)
Definition tolua_game_gen.c:3155
tolua_game_find_unit_type01
static int tolua_game_find_unit_type01(lua_State *tolua_S)
Definition tolua_game_gen.c:4396
tolua_get_Tile_Tile_terrain_ptr
static int tolua_get_Tile_Tile_terrain_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:406
tolua_game_Unit_properties_tile00
static int tolua_game_Unit_properties_tile00(lua_State *tolua_S)
Definition tolua_game_gen.c:2263
tolua_game_Tile_is_enemy00
static int tolua_game_Tile_is_enemy00(lua_State *tolua_S)
Definition tolua_game_gen.c:2809
tolua_game_find_action01
static int tolua_game_find_action01(lua_State *tolua_S)
Definition tolua_game_gen.c:4294
tolua_game_game_current_fragment00
static int tolua_game_game_current_fragment00(lua_State *tolua_S)
Definition tolua_game_gen.c:966
tolua_set_Unit_Type_Unit_Type_obsoleted_by_ptr
static int tolua_set_Unit_Type_Unit_Type_obsoleted_by_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:600
tolua_get_Game_Info_Game_Info_tech_cost_style
static int tolua_get_Game_Info_Game_Info_tech_cost_style(lua_State *tolua_S)
Definition tolua_game_gen.c:841
tolua_get_Game_Info_Game_Info_sciencebox
static int tolua_get_Game_Info_Game_Info_sciencebox(lua_State *tolua_S)
Definition tolua_game_gen.c:827
tolua_game_find_player01
static int tolua_game_find_player01(lua_State *tolua_S)
Definition tolua_game_gen.c:3996
tolua_game_City_is_primary_capital00
static int tolua_game_City_is_primary_capital00(lua_State *tolua_S)
Definition tolua_game_gen.c:2179
tolua_get_Terrain_Terrain_item_number
static int tolua_get_Terrain_Terrain_item_number(lua_State *tolua_S)
Definition tolua_game_gen.c:659
tolua_game_Tile_link_text00
static int tolua_game_Tile_link_text00(lua_State *tolua_S)
Definition tolua_game_gen.c:2897
tolua_game_find_nation_type00
static int tolua_game_find_nation_type00(lua_State *tolua_S)
Definition tolua_game_gen.c:4215
tolua_game_City_culture00
static int tolua_game_City_culture00(lua_State *tolua_S)
Definition tolua_game_gen.c:2011
tolua_game_Direction_properties_cardinal00
static int tolua_game_Direction_properties_cardinal00(lua_State *tolua_S)
Definition tolua_game_gen.c:5018
tolua_game_Unit_tile_link_text00
static int tolua_game_Unit_tile_link_text00(lua_State *tolua_S)
Definition tolua_game_gen.c:2463
tolua_get_Game_Info_Game_Info_tech_steal_allow_holes
static int tolua_get_Game_Info_Game_Info_tech_steal_allow_holes(lua_State *tolua_S)
Definition tolua_game_gen.c:757
tolua_game_find_building_type01
static int tolua_game_find_building_type01(lua_State *tolua_S)
Definition tolua_game_gen.c:4345
tolua_game_Achievement_rule_name00
static int tolua_game_Achievement_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3665
tolua_game_find_disaster00
static int tolua_game_find_disaster00(lua_State *tolua_S)
Definition tolua_game_gen.c:4625
tolua_get_Game_Info_Game_Info_tech_leak_pct
static int tolua_get_Game_Info_Game_Info_tech_leak_pct(lua_State *tolua_S)
Definition tolua_game_gen.c:743
tolua_game_Unit_Type_has_role00
static int tolua_game_Unit_Type_has_role00(lua_State *tolua_S)
Definition tolua_game_gen.c:3353
tolua_game_effects_unit_vs_tile_bonus00
static int tolua_game_effects_unit_vs_tile_bonus00(lua_State *tolua_S)
Definition tolua_game_gen.c:4930
tolua_game_Unit_List_Link_data00
static int tolua_game_Unit_List_Link_data00(lua_State *tolua_S)
Definition tolua_game_gen.c:3805
tolua_game_Building_Type_is_small_wonder00
static int tolua_game_Building_Type_is_small_wonder00(lua_State *tolua_S)
Definition tolua_game_gen.c:3211
tolua_set_Unit_Unit_utype_ptr
static int tolua_set_Unit_Unit_utype_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:282
tolua_game_City_link_text00
static int tolua_game_City_link_text00(lua_State *tolua_S)
Definition tolua_game_gen.c:2207
tolua_game_effects_tile_bonus00
static int tolua_game_effects_tile_bonus00(lua_State *tolua_S)
Definition tolua_game_gen.c:4896
tolua_game_City_properties_size00
static int tolua_game_City_properties_size00(lua_State *tolua_S)
Definition tolua_game_gen.c:1867
tolua_set_Building_Type_Building_Type_build_cost
static int tolua_set_Building_Type_Building_Type_build_cost(lua_State *tolua_S)
Definition tolua_game_gen.c:524
tolua_game_City_has_building00
static int tolua_game_City_has_building00(lua_State *tolua_S)
Definition tolua_game_gen.c:1923
tolua_game_Player_shares_research00
static int tolua_game_Player_shares_research00(lua_State *tolua_S)
Definition tolua_game_gen.c:1556
tolua_game_find_direction00
static int tolua_game_find_direction00(lua_State *tolua_S)
Definition tolua_game_gen.c:4653
tolua_game_find_achievement01
static int tolua_game_find_achievement01(lua_State *tolua_S)
Definition tolua_game_gen.c:4579
tolua_game_Tile_city00
static int tolua_game_Tile_city00(lua_State *tolua_S)
Definition tolua_game_gen.c:2631
tolua_get_Player_Player_name
static int tolua_get_Player_Player_name(lua_State *tolua_S)
Definition tolua_game_gen.c:57
tolua_set_game_game_info_substructure
static int tolua_set_game_game_info_substructure(lua_State *tolua_S)
Definition tolua_game_gen.c:876
tolua_game_Counter_rule_name00
static int tolua_game_Counter_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:1070
tolua_game_Terrain_class_name00
static int tolua_game_Terrain_class_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3581
tolua_game_find_action02
static int tolua_game_find_action02(lua_State *tolua_S)
Definition tolua_game_gen.c:4704
tolua_game_Government_rule_name00
static int tolua_game_Government_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3015
tolua_game_Building_Type_is_great_wonder00
static int tolua_game_Building_Type_is_great_wonder00(lua_State *tolua_S)
Definition tolua_game_gen.c:3183
tolua_set_Player_Player_is_alive
static int tolua_set_Player_Player_is_alive(lua_State *tolua_S)
Definition tolua_game_gen.c:147
tolua_get_City_City_original_ptr
static int tolua_get_City_City_original_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:209
tolua_game_methods_private_Player_unit_list_head00
static int tolua_game_methods_private_Player_unit_list_head00(lua_State *tolua_S)
Definition tolua_game_gen.c:1811
tolua_game_find_city00
static int tolua_game_find_city00(lua_State *tolua_S)
Definition tolua_game_gen.c:4019
tolua_game_Counter_get00
static int tolua_game_Counter_get00(lua_State *tolua_S)
Definition tolua_game_gen.c:1126
tolua_game_Tile_properties_nat_y00
static int tolua_game_Tile_properties_nat_y00(lua_State *tolua_S)
Definition tolua_game_gen.c:2547
tolua_game_City_List_Link_next00
static int tolua_game_City_List_Link_next00(lua_State *tolua_S)
Definition tolua_game_gen.c:3889
tolua_game_Tile_extra_owner00
static int tolua_game_Tile_extra_owner00(lua_State *tolua_S)
Definition tolua_game_gen.c:2779
tolua_game_effects_world_bonus00
static int tolua_game_effects_world_bonus00(lua_State *tolua_S)
Definition tolua_game_gen.c:4776
tolua_game_Government_name_translation00
static int tolua_game_Government_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3043
tolua_game_Tile_properties_y00
static int tolua_game_Tile_properties_y00(lua_State *tolua_S)
Definition tolua_game_gen.c:2603
tolua_game_find_nonexistent00
static int tolua_game_find_nonexistent00(lua_State *tolua_S)
Definition tolua_game_gen.c:4750
tolua_game_Building_Type_is_improvement00
static int tolua_game_Building_Type_is_improvement00(lua_State *tolua_S)
Definition tolua_game_gen.c:3239
tolua_get_Tile_Tile_index
static int tolua_get_Tile_Tile_index(lua_State *tolua_S)
Definition tolua_game_gen.c:468
tolua_game_Player_tech_cost00
static int tolua_game_Player_tech_cost00(lua_State *tolua_S)
Definition tolua_game_gen.c:1470
tolua_game_City_is_gov_center00
static int tolua_game_City_is_gov_center00(lua_State *tolua_S)
Definition tolua_game_gen.c:2123
tolua_game_Unit_Type_can_exist_at_tile00
static int tolua_game_Unit_Type_can_exist_at_tile00(lua_State *tolua_S)
Definition tolua_game_gen.c:3439
tolua_game_Tile_properties_nat_x00
static int tolua_game_Tile_properties_nat_x00(lua_State *tolua_S)
Definition tolua_game_gen.c:2519
tolua_game_find_terrain00
static int tolua_game_find_terrain00(lua_State *tolua_S)
Definition tolua_game_gen.c:4500
tolua_game_find_player00
static int tolua_game_find_player00(lua_State *tolua_S)
Definition tolua_game_gen.c:3968
tolua_get_game_game_info_substructure
static int tolua_get_game_game_info_substructure(lua_State *tolua_S)
Definition tolua_game_gen.c:869
tolua_game_Player_num_units00
static int tolua_game_Player_num_units00(lua_State *tolua_S)
Definition tolua_game_gen.c:1268
tolua_game_Unit_link_text00
static int tolua_game_Unit_link_text00(lua_State *tolua_S)
Definition tolua_game_gen.c:2435
tolua_get_Nation_Type_Nation_Type_item_number
static int tolua_get_Nation_Type_Nation_Type_item_number(lua_State *tolua_S)
Definition tolua_game_gen.c:496
tolua_game_Unit_transform_problem00
static int tolua_game_Unit_transform_problem00(lua_State *tolua_S)
Definition tolua_game_gen.c:2377
tolua_game_find_government00
static int tolua_game_find_government00(lua_State *tolua_S)
Definition tolua_game_gen.c:4164
tolua_set_Unit_Unit_veteran
static int tolua_set_Unit_Unit_veteran(lua_State *tolua_S)
Definition tolua_game_gen.c:375
tolua_reg_types
static void tolua_reg_types(lua_State *tolua_S)
Definition tolua_game_gen.c:32
tolua_game_methods_private_Unit_cargo_list_head00
static int tolua_game_methods_private_Unit_cargo_list_head00(lua_State *tolua_S)
Definition tolua_game_gen.c:2491
tolua_game_Tile_has_extra00
static int tolua_game_Tile_has_extra00(lua_State *tolua_S)
Definition tolua_game_gen.c:2689
tolua_game_City_properties_tile00
static int tolua_game_City_properties_tile00(lua_State *tolua_S)
Definition tolua_game_gen.c:1895
tolua_game_Unit_Type_name_translation00
static int tolua_game_Unit_Type_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3411
tolua_game_Player_num_future_techs00
static int tolua_game_Player_num_future_techs00(lua_State *tolua_S)
Definition tolua_game_gen.c:1296
tolua_get_Tech_Type_Tech_Type_item_number
static int tolua_get_Tech_Type_Tech_Type_item_number(lua_State *tolua_S)
Definition tolua_game_gen.c:631
tolua_get_Tech_Type_Tech_Type_cost
static int tolua_get_Tech_Type_Tech_Type_cost(lua_State *tolua_S)
Definition tolua_game_gen.c:645
tolua_get_Government_Government_item_number
static int tolua_get_Government_Government_item_number(lua_State *tolua_S)
Definition tolua_game_gen.c:482
tolua_game_Direction_properties_name00
static int tolua_game_Direction_properties_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:4990
tolua_game_Tile_city_exists_within_max_city_map00
static int tolua_game_Tile_city_exists_within_max_city_map00(lua_State *tolua_S)
Definition tolua_game_gen.c:2659
tolua_game_open
TOLUA_API int tolua_game_open(lua_State *tolua_S)
Definition tolua_game_gen.c:5817
tolua_game_Player_research_name_translation00
static int tolua_game_Player_research_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:1614
tolua_get_Disaster_Disaster_id
static int tolua_get_Disaster_Disaster_id(lua_State *tolua_S)
Definition tolua_game_gen.c:673
tolua_game_find_unit00
static int tolua_game_find_unit00(lua_State *tolua_S)
Definition tolua_game_gen.c:4049
tolua_game_Action_rule_name00
static int tolua_game_Action_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3721
tolua_game_find_achievement02
static int tolua_game_find_achievement02(lua_State *tolua_S)
Definition tolua_game_gen.c:4602
tolua_game_find_achievement00
static int tolua_game_find_achievement00(lua_State *tolua_S)
Definition tolua_game_gen.c:4551
tolua_get_Unit_Unit_id
static int tolua_get_Unit_Unit_id(lua_State *tolua_S)
Definition tolua_game_gen.c:392
tolua_game_effects_city_bonus00
static int tolua_game_effects_city_bonus00(lua_State *tolua_S)
Definition tolua_game_gen.c:4834
tolua_bnd_takeownership
int tolua_bnd_takeownership(lua_State *L)
tolua_game_Disaster_name_translation00
static int tolua_game_Disaster_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3637
tolua_game_Building_Type_name_translation00
static int tolua_game_Building_Type_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3295
tolua_get_Unit_Unit_utype_ptr
static int tolua_get_Unit_Unit_utype_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:268
tolua_game_City_map_sq_radius00
static int tolua_game_City_map_sq_radius00(lua_State *tolua_S)
Definition tolua_game_gen.c:1953
tolua_set_Tile_Tile_terrain_ptr
static int tolua_set_Tile_Tile_terrain_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:420
tolua_game_Tile_num_units00
static int tolua_game_Tile_num_units00(lua_State *tolua_S)
Definition tolua_game_gen.c:2839
tolua_game_Direction_properties_id00
static int tolua_game_Direction_properties_id00(lua_State *tolua_S)
Definition tolua_game_gen.c:4962
tolua_game_Unit_Type_has_flag00
static int tolua_game_Unit_Type_has_flag00(lua_State *tolua_S)
Definition tolua_game_gen.c:3323
tolua_game_Achievement_name_translation00
static int tolua_game_Achievement_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3693
tolua_get_Player_Player_government_ptr
static int tolua_get_Player_Player_government_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:102
tolua_game_Tile_sq_distance00
static int tolua_game_Tile_sq_distance00(lua_State *tolua_S)
Definition tolua_game_gen.c:2867
tolua_game_City_tile_link_text00
static int tolua_game_City_tile_link_text00(lua_State *tolua_S)
Definition tolua_game_gen.c:2235
tolua_game_Player_infrapoints00
static int tolua_game_Player_infrapoints00(lua_State *tolua_S)
Definition tolua_game_gen.c:1382
tolua_get_Game_Info_Game_Info_tech_parasite_allow_holes
static int tolua_get_Game_Info_Game_Info_tech_parasite_allow_holes(lua_State *tolua_S)
Definition tolua_game_gen.c:799
tolua_game_find_unit_type00
static int tolua_game_find_unit_type00(lua_State *tolua_S)
Definition tolua_game_gen.c:4368
tolua_game_game_ruleset_name00
static int tolua_game_game_ruleset_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:1044
tolua_game_find_building_type00
static int tolua_game_find_building_type00(lua_State *tolua_S)
Definition tolua_game_gen.c:4317
tolua_get_Game_Info_Game_Info_tech_trade_loss_allow_holes
static int tolua_get_Game_Info_Game_Info_tech_trade_loss_allow_holes(lua_State *tolua_S)
Definition tolua_game_gen.c:785
tolua_get_Unit_Unit_homecity
static int tolua_get_Unit_Unit_homecity(lua_State *tolua_S)
Definition tolua_game_gen.c:330
tolua_game_Unit_is_on_possible_city_tile00
static int tolua_game_Unit_is_on_possible_city_tile00(lua_State *tolua_S)
Definition tolua_game_gen.c:2319
tolua_game_direction_opposite00
static int tolua_game_direction_opposite00(lua_State *tolua_S)
Definition tolua_game_gen.c:5130
tolua_get_City_City_name
static int tolua_get_City_City_name(lua_State *tolua_S)
Definition tolua_game_gen.c:164
tolua_game_Unit_List_Link_next00
static int tolua_game_Unit_List_Link_next00(lua_State *tolua_S)
Definition tolua_game_gen.c:3833
tolua_set_Tile_Tile_owner_ptr
static int tolua_set_Tile_Tile_owner_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:451
tolua_game_Player_can_build_direct00
static int tolua_game_Player_can_build_direct00(lua_State *tolua_S)
Definition tolua_game_gen.c:1730
tolua_set_City_City_owner_ptr
static int tolua_set_City_City_owner_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:192
tolua_game_Player_properties_id00
static int tolua_game_Player_properties_id00(lua_State *tolua_S)
Definition tolua_game_gen.c:1156
tolua_game_Player_culture00
static int tolua_game_Player_culture00(lua_State *tolua_S)
Definition tolua_game_gen.c:1642
tolua_game_City_inspire_partisans00
static int tolua_game_City_inspire_partisans00(lua_State *tolua_S)
Definition tolua_game_gen.c:1981
tolua_game_methods_private_Player_city_list_head00
static int tolua_game_methods_private_Player_city_list_head00(lua_State *tolua_S)
Definition tolua_game_gen.c:1839
tolua_set_Player_Player_nation_ptr
static int tolua_set_Player_Player_nation_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:85
tolua_get_Game_Info_Game_Info_tech_loss_allow_holes
static int tolua_get_Game_Info_Game_Info_tech_loss_allow_holes(lua_State *tolua_S)
Definition tolua_game_gen.c:813
tolua_game_Terrain_rule_name00
static int tolua_game_Terrain_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3525
tolua_set_Unit_Type_Unit_Type_build_cost
static int tolua_set_Unit_Type_Unit_Type_build_cost(lua_State *tolua_S)
Definition tolua_game_gen.c:569
tolua_get_City_City_owner_ptr
static int tolua_get_City_City_owner_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:178
tolua_game_find_nation_type01
static int tolua_game_find_nation_type01(lua_State *tolua_S)
Definition tolua_game_gen.c:4243
tolua_game_Tile_has_road00
static int tolua_game_Tile_has_road00(lua_State *tolua_S)
Definition tolua_game_gen.c:2749
tolua_game_Player_num_cities00
static int tolua_game_Player_num_cities00(lua_State *tolua_S)
Definition tolua_game_gen.c:1240
tolua_set_City_City_original_ptr
static int tolua_set_City_City_original_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:223
tolua_get_Unit_Unit_veteran
static int tolua_get_Unit_Unit_veteran(lua_State *tolua_S)
Definition tolua_game_gen.c:361
tolua_game_Player_controlling_gui00
static int tolua_game_Player_controlling_gui00(lua_State *tolua_S)
Definition tolua_game_gen.c:1212
tolua_game_methods_private_Tile_tile_for_outward_index00
static int tolua_game_methods_private_Tile_tile_for_outward_index00(lua_State *tolua_S)
Definition tolua_game_gen.c:2957
tolua_get_Unit_Type_Unit_Type_obsoleted_by_ptr
static int tolua_get_Unit_Type_Unit_Type_obsoleted_by_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:586
tolua_game_find_tech_type00
static int tolua_game_find_tech_type00(lua_State *tolua_S)
Definition tolua_game_gen.c:4449
tolua_game_Player_has_flag00
static int tolua_game_Player_has_flag00(lua_State *tolua_S)
Definition tolua_game_gen.c:1670
tolua_get_Player_Player_nation_ptr
static int tolua_get_Player_Player_nation_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:71
tolua_game_game_current_turn00
static int tolua_game_game_current_turn00(lua_State *tolua_S)
Definition tolua_game_gen.c:888
tolua_game_find_role_unit_type00
static int tolua_game_find_role_unit_type00(lua_State *tolua_S)
Definition tolua_game_gen.c:4419
tolua_game_Tile_properties_x00
static int tolua_game_Tile_properties_x00(lua_State *tolua_S)
Definition tolua_game_gen.c:2575
tolua_game_Action_name_translation00
static int tolua_game_Action_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3749
tolua_game_methods_private_list_players00
static int tolua_game_methods_private_list_players00(lua_State *tolua_S)
Definition tolua_game_gen.c:1785
tolua_game_Unit_Type_rule_name00
static int tolua_game_Unit_Type_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3383
luaopen_game
LUALIB_API int luaopen_game(lua_State *tolua_S)
Definition tolua_game_gen.c:5158
tolua_set_Unit_Unit_homecity
static int tolua_set_Unit_Unit_homecity(lua_State *tolua_S)
Definition tolua_game_gen.c:344
tolua_get_Building_Type_Building_Type_item_number
static int tolua_get_Building_Type_Building_Type_item_number(lua_State *tolua_S)
Definition tolua_game_gen.c:541
tolua_game_methods_private_Tile_unit_list_head00
static int tolua_game_methods_private_Tile_unit_list_head00(lua_State *tolua_S)
Definition tolua_game_gen.c:2987
tolua_get_Action_Action_id
static int tolua_get_Action_Action_id(lua_State *tolua_S)
Definition tolua_game_gen.c:701
tolua_game_Building_Type_rule_name00
static int tolua_game_Building_Type_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3267
tolua_game_Unit_transporter00
static int tolua_game_Unit_transporter00(lua_State *tolua_S)
Definition tolua_game_gen.c:2291
tolua_game_Tech_Type_rule_name00
static int tolua_game_Tech_Type_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3469
tolua_game_find_government01
static int tolua_game_find_government01(lua_State *tolua_S)
Definition tolua_game_gen.c:4192
tolua_game_find_action03
static int tolua_game_find_action03(lua_State *tolua_S)
Definition tolua_game_gen.c:4727
tolua_game_Player_has_wonder00
static int tolua_game_Player_has_wonder00(lua_State *tolua_S)
Definition tolua_game_gen.c:1324
tolua_game_Disaster_rule_name00
static int tolua_game_Disaster_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3609
tolua_game_Player_can_research00
static int tolua_game_Player_can_research00(lua_State *tolua_S)
Definition tolua_game_gen.c:1440
tolua_get_Game_Info_Game_Info_tech_trade_allow_holes
static int tolua_get_Game_Info_Game_Info_tech_trade_allow_holes(lua_State *tolua_S)
Definition tolua_game_gen.c:771
tolua_get_Achievement_Achievement_id
static int tolua_get_Achievement_Achievement_id(lua_State *tolua_S)
Definition tolua_game_gen.c:687
tolua_game_City_is_happy00
static int tolua_game_City_is_happy00(lua_State *tolua_S)
Definition tolua_game_gen.c:2039
tolua_game_direction_next_cw00
static int tolua_game_direction_next_cw00(lua_State *tolua_S)
Definition tolua_game_gen.c:5102
tolua_get_Tile_Tile_owner_ptr
static int tolua_get_Tile_Tile_owner_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:437
tolua_get_Unit_Unit_owner_ptr
static int tolua_get_Unit_Unit_owner_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:299
tolua_game_find_tile01
static int tolua_game_find_tile01(lua_State *tolua_S)
Definition tolua_game_gen.c:4141
tolua_game_Player_can_upgrade00
static int tolua_game_Player_can_upgrade00(lua_State *tolua_S)
Definition tolua_game_gen.c:1700
tolua_game_game_turn00
static int tolua_game_game_turn00(lua_State *tolua_S)
Definition tolua_game_gen.c:914
tolua_get_Unit_Type_Unit_Type_build_cost
static int tolua_get_Unit_Type_Unit_Type_build_cost(lua_State *tolua_S)
Definition tolua_game_gen.c:555
tolua_game_Player_knows_tech00
static int tolua_game_Player_knows_tech00(lua_State *tolua_S)
Definition tolua_game_gen.c:1410
tolua_game_City_is_unhappy00
static int tolua_game_City_is_unhappy00(lua_State *tolua_S)
Definition tolua_game_gen.c:2067
tolua_game_City_is_celebrating00
static int tolua_game_City_is_celebrating00(lua_State *tolua_S)
Definition tolua_game_gen.c:2095
tolua_get_Game_Info_Game_Info_min_tech_cost
static int tolua_get_Game_Info_Game_Info_min_tech_cost(lua_State *tolua_S)
Definition tolua_game_gen.c:729
tolua_game_Player_researching_cost00
static int tolua_game_Player_researching_cost00(lua_State *tolua_S)
Definition tolua_game_gen.c:1528
tolua_game_Tile_has_base00
static int tolua_game_Tile_has_base00(lua_State *tolua_S)
Definition tolua_game_gen.c:2719
tolua_game_Nation_Type_plural_translation00
static int tolua_game_Nation_Type_plural_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3127
tolua_get_Game_Info_Game_Info_base_tech_cost
static int tolua_get_Game_Info_Game_Info_base_tech_cost(lua_State *tolua_S)
Definition tolua_game_gen.c:715
tolua_game_methods_private_Tile_next_outward_index00
static int tolua_game_methods_private_Tile_next_outward_index00(lua_State *tolua_S)
Definition tolua_game_gen.c:2925
tolua_game_Player_properties_bulbs00
static int tolua_game_Player_properties_bulbs00(lua_State *tolua_S)
Definition tolua_game_gen.c:1184
tolua_game_effects_unit_bonus00
static int tolua_game_effects_unit_bonus00(lua_State *tolua_S)
Definition tolua_game_gen.c:4864
tolua_game_Nation_Type_rule_name00
static int tolua_game_Nation_Type_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:3071
tolua_game_game_current_year_text00
static int tolua_game_game_current_year_text00(lua_State *tolua_S)
Definition tolua_game_gen.c:992
tolua_get_Unit_Type_Unit_Type_item_number
static int tolua_get_Unit_Type_Unit_Type_item_number(lua_State *tolua_S)
Definition tolua_game_gen.c:617
tolua_game_find_tech_type01
static int tolua_game_find_tech_type01(lua_State *tolua_S)
Definition tolua_game_gen.c:4477
tolua_game_Player_research_rule_name00
static int tolua_game_Player_research_rule_name00(lua_State *tolua_S)
Definition tolua_game_gen.c:1586
tolua_get_Building_Type_Building_Type_build_cost
static int tolua_get_Building_Type_Building_Type_build_cost(lua_State *tolua_S)
Definition tolua_game_gen.c:510
tolua_get_Game_Info_Game_Info_tech_leakage
static int tolua_get_Game_Info_Game_Info_tech_leakage(lua_State *tolua_S)
Definition tolua_game_gen.c:855
tolua_game_City_List_Link_data00
static int tolua_game_City_List_Link_data00(lua_State *tolua_S)
Definition tolua_game_gen.c:3861
tolua_game_Unit_can_upgrade00
static int tolua_game_Unit_can_upgrade00(lua_State *tolua_S)
Definition tolua_game_gen.c:2347
tolua_game_direction_str2dir00
static int tolua_game_direction_str2dir00(lua_State *tolua_S)
Definition tolua_game_gen.c:5046
tolua_game_find_direction01
static int tolua_game_find_direction01(lua_State *tolua_S)
Definition tolua_game_gen.c:4681
tolua_game_Action_target_kind00
static int tolua_game_Action_target_kind00(lua_State *tolua_S)
Definition tolua_game_gen.c:3777
game_info_substructure
#define game_info_substructure
Definition tolua_game_gen.c:29
tolua_game_City_is_capital00
static int tolua_game_City_is_capital00(lua_State *tolua_S)
Definition tolua_game_gen.c:2151
tolua_get_City_City_id
static int tolua_get_City_City_id(lua_State *tolua_S)
Definition tolua_game_gen.c:240
tolua_game_find_counter01
static int tolua_game_find_counter01(lua_State *tolua_S)
Definition tolua_game_gen.c:3945
tolua_game_find_counter00
static int tolua_game_find_counter00(lua_State *tolua_S)
Definition tolua_game_gen.c:3917
tolua_game_find_terrain01
static int tolua_game_find_terrain01(lua_State *tolua_S)
Definition tolua_game_gen.c:4528
tolua_game_find_transport_unit00
static int tolua_game_find_transport_unit00(lua_State *tolua_S)
Definition tolua_game_gen.c:4079
tolua_game_Counter_name_translation00
static int tolua_game_Counter_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:1098
tolua_get_Player_Player_is_alive
static int tolua_get_Player_Player_is_alive(lua_State *tolua_S)
Definition tolua_game_gen.c:133
tolua_game_game_rulesetdir00
static int tolua_game_game_rulesetdir00(lua_State *tolua_S)
Definition tolua_game_gen.c:1018
tolua_set_Player_Player_government_ptr
static int tolua_set_Player_Player_government_ptr(lua_State *tolua_S)
Definition tolua_game_gen.c:116
tolua_game_find_action00
static int tolua_game_find_action00(lua_State *tolua_S)
Definition tolua_game_gen.c:4266
tolua_game_effects_player_bonus00
static int tolua_game_effects_player_bonus00(lua_State *tolua_S)
Definition tolua_game_gen.c:4804
tolua_game_Tech_Type_name_translation00
static int tolua_game_Tech_Type_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3497
tolua_game_Unit_facing00
static int tolua_game_Unit_facing00(lua_State *tolua_S)
Definition tolua_game_gen.c:2407
tolua_game_Player_can_build_direct01
static int tolua_game_Player_can_build_direct01(lua_State *tolua_S)
Definition tolua_game_gen.c:1760
tolua_game_Nation_Type_name_translation00
static int tolua_game_Nation_Type_name_translation00(lua_State *tolua_S)
Definition tolua_game_gen.c:3099