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