Freeciv-3.3: /fast/freeciv/nightly/main/common/scriptcore/tolua_game_gen.c Source File

Freeciv-3.3

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