Freeciv-3.3
Loading...
Searching...
No Matches
tolua_game_gen.c
Go to the documentation of this file.
1/*
2** Lua binding: game
3*/
4
5#include "tolua.h"
6
7#ifndef __cplusplus
8#include <stdlib.h>
9#endif
10#ifdef __cplusplus
11 extern "C" int tolua_bnd_takeownership (lua_State* L); // from tolua_map.c
12#else
13 int tolua_bnd_takeownership (lua_State* L); /* from tolua_map.c */
14#endif
15#include <string.h>
16
17/* Exported function */
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#define game_info_substructure game.info
30
31/* function to register type */
33{
34 tolua_usertype(tolua_S,"Connection");
35 tolua_usertype(tolua_S,"Unit_Type");
36 tolua_usertype(tolua_S,"Disaster");
37 tolua_usertype(tolua_S,"Terrain");
38 tolua_usertype(tolua_S,"Direction");
39 tolua_usertype(tolua_S,"Building_Type");
40 tolua_usertype(tolua_S,"Unit_List_Link");
41 tolua_usertype(tolua_S,"Counter");
42 tolua_usertype(tolua_S,"Player");
43 tolua_usertype(tolua_S,"City");
44 tolua_usertype(tolua_S,"Unit");
45 tolua_usertype(tolua_S,"Government");
46 tolua_usertype(tolua_S,"Nonexistent");
47 tolua_usertype(tolua_S,"Achievement");
48 tolua_usertype(tolua_S,"Game_Info");
49 tolua_usertype(tolua_S,"Action");
50 tolua_usertype(tolua_S,"City_List_Link");
51 tolua_usertype(tolua_S,"Tile");
52 tolua_usertype(tolua_S,"Nation_Type");
53 tolua_usertype(tolua_S,"Tech_Type");
54}
55
56/* get function: name of class Player */
58{
60#ifndef TOLUA_RELEASE
61 if (!self) {
62 tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL);
63 return 0;
64 }
65#endif
66 tolua_pushstring(tolua_S,(const char*)self->name);
67 return 1;
68}
69
70/* get function: nation of class Player */
72{
74#ifndef TOLUA_RELEASE
75 if (!self) {
76 tolua_error(tolua_S,"invalid 'self' in accessing variable 'nation'",NULL);
77 return 0;
78 }
79#endif
80 tolua_pushusertype(tolua_S,(void*)self->nation,"Nation_Type");
81 return 1;
82}
83
84/* set function: nation of class Player */
86{
88#ifndef TOLUA_RELEASE
90 if (!self) {
91 tolua_error(tolua_S,"invalid 'self' in accessing variable 'nation'",NULL);
92 return 0;
93 }
94 if (!tolua_isusertype(tolua_S,2,"Nation_Type",0,&tolua_err))
95 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
96#endif
97 self->nation = ((Nation_Type*) tolua_tousertype(tolua_S,2,0));
98 return 0;
99}
100
101/* get function: government of class Player */
103{
105#ifndef TOLUA_RELEASE
106 if (!self) {
107 tolua_error(tolua_S,"invalid 'self' in accessing variable 'government'",NULL);
108 return 0;
109 }
110#endif
111 tolua_pushusertype(tolua_S,(void*)self->government,"Government");
112 return 1;
113}
114
115/* set function: government of class Player */
117{
119#ifndef TOLUA_RELEASE
121 if (!self) {
122 tolua_error(tolua_S,"invalid 'self' in accessing variable 'government'",NULL);
123 return 0;
124 }
125 if (!tolua_isusertype(tolua_S,2,"Government",0,&tolua_err))
126 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
127#endif
128 self->government = ((Government*) tolua_tousertype(tolua_S,2,0));
129 return 0;
130}
131
132/* get function: is_alive of class Player */
134{
136#ifndef TOLUA_RELEASE
137 if (!self) {
138 tolua_error(tolua_S,"invalid 'self' in accessing variable 'is_alive'",NULL);
139 return 0;
140 }
141#endif
142 tolua_pushboolean(tolua_S,(bool)self->is_alive);
143 return 1;
144}
145
146/* set function: is_alive of class Player */
148{
150#ifndef TOLUA_RELEASE
152 if (!self) {
153 tolua_error(tolua_S,"invalid 'self' in accessing variable 'is_alive'",NULL);
154 return 0;
155 }
157 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
158#endif
159 self->is_alive = ((bool) tolua_toboolean(tolua_S,2,0));
160 return 0;
161}
162
163/* get function: name of class City */
165{
167#ifndef TOLUA_RELEASE
168 if (!self) {
169 tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL);
170 return 0;
171 }
172#endif
173 tolua_pushstring(tolua_S,(const char*)self->name);
174 return 1;
175}
176
177/* get function: owner of class City */
179{
181#ifndef TOLUA_RELEASE
182 if (!self) {
183 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
184 return 0;
185 }
186#endif
187 tolua_pushusertype(tolua_S,(void*)self->owner,"Player");
188 return 1;
189}
190
191/* set function: owner of class City */
193{
195#ifndef TOLUA_RELEASE
197 if (!self) {
198 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
199 return 0;
200 }
201 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
202 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
203#endif
204 self->owner = ((Player*) tolua_tousertype(tolua_S,2,0));
205 return 0;
206}
207
208/* get function: original of class City */
210{
212#ifndef TOLUA_RELEASE
213 if (!self) {
214 tolua_error(tolua_S,"invalid 'self' in accessing variable 'original'",NULL);
215 return 0;
216 }
217#endif
218 tolua_pushusertype(tolua_S,(void*)self->original,"Player");
219 return 1;
220}
221
222/* set function: original of class City */
224{
226#ifndef TOLUA_RELEASE
228 if (!self) {
229 tolua_error(tolua_S,"invalid 'self' in accessing variable 'original'",NULL);
230 return 0;
231 }
232 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
233 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
234#endif
235 self->original = ((Player*) tolua_tousertype(tolua_S,2,0));
236 return 0;
237}
238
239/* get function: id of class City */
241{
243#ifndef TOLUA_RELEASE
244 if (!self) {
245 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
246 return 0;
247 }
248#endif
250 return 1;
251}
252
253/* get function: id of class Connection */
255{
257#ifndef TOLUA_RELEASE
258 if (!self) {
259 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
260 return 0;
261 }
262#endif
264 return 1;
265}
266
267/* get function: utype of class Unit */
269{
271#ifndef TOLUA_RELEASE
272 if (!self) {
273 tolua_error(tolua_S,"invalid 'self' in accessing variable 'utype'",NULL);
274 return 0;
275 }
276#endif
277 tolua_pushusertype(tolua_S,(void*)self->utype,"Unit_Type");
278 return 1;
279}
280
281/* set function: utype of class Unit */
283{
285#ifndef TOLUA_RELEASE
287 if (!self) {
288 tolua_error(tolua_S,"invalid 'self' in accessing variable 'utype'",NULL);
289 return 0;
290 }
291 if (!tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err))
292 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
293#endif
294 self->utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
295 return 0;
296}
297
298/* get function: owner of class Unit */
300{
302#ifndef TOLUA_RELEASE
303 if (!self) {
304 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
305 return 0;
306 }
307#endif
308 tolua_pushusertype(tolua_S,(void*)self->owner,"Player");
309 return 1;
310}
311
312/* set function: owner of class Unit */
314{
316#ifndef TOLUA_RELEASE
318 if (!self) {
319 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
320 return 0;
321 }
322 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
323 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
324#endif
325 self->owner = ((Player*) tolua_tousertype(tolua_S,2,0));
326 return 0;
327}
328
329/* get function: homecity of class Unit */
331{
333#ifndef TOLUA_RELEASE
334 if (!self) {
335 tolua_error(tolua_S,"invalid 'self' in accessing variable 'homecity'",NULL);
336 return 0;
337 }
338#endif
340 return 1;
341}
342
343/* set function: homecity of class Unit */
345{
347#ifndef TOLUA_RELEASE
349 if (!self) {
350 tolua_error(tolua_S,"invalid 'self' in accessing variable 'homecity'",NULL);
351 return 0;
352 }
354 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
355#endif
356 self->homecity = ((int) tolua_tonumber(tolua_S,2,0));
357 return 0;
358}
359
360/* get function: veteran of class Unit */
362{
364#ifndef TOLUA_RELEASE
365 if (!self) {
366 tolua_error(tolua_S,"invalid 'self' in accessing variable 'veteran'",NULL);
367 return 0;
368 }
369#endif
371 return 1;
372}
373
374/* set function: veteran of class Unit */
376{
378#ifndef TOLUA_RELEASE
380 if (!self) {
381 tolua_error(tolua_S,"invalid 'self' in accessing variable 'veteran'",NULL);
382 return 0;
383 }
385 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
386#endif
387 self->veteran = ((int) tolua_tonumber(tolua_S,2,0));
388 return 0;
389}
390
391/* get function: id of class Unit */
393{
395#ifndef TOLUA_RELEASE
396 if (!self) {
397 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
398 return 0;
399 }
400#endif
402 return 1;
403}
404
405/* get function: terrain of class Tile */
407{
409#ifndef TOLUA_RELEASE
410 if (!self) {
411 tolua_error(tolua_S,"invalid 'self' in accessing variable 'terrain'",NULL);
412 return 0;
413 }
414#endif
415 tolua_pushusertype(tolua_S,(void*)self->terrain,"Terrain");
416 return 1;
417}
418
419/* set function: terrain of class Tile */
421{
423#ifndef TOLUA_RELEASE
425 if (!self) {
426 tolua_error(tolua_S,"invalid 'self' in accessing variable 'terrain'",NULL);
427 return 0;
428 }
429 if (!tolua_isusertype(tolua_S,2,"Terrain",0,&tolua_err))
430 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
431#endif
432 self->terrain = ((Terrain*) tolua_tousertype(tolua_S,2,0));
433 return 0;
434}
435
436/* get function: owner of class Tile */
438{
440#ifndef TOLUA_RELEASE
441 if (!self) {
442 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
443 return 0;
444 }
445#endif
446 tolua_pushusertype(tolua_S,(void*)self->owner,"Player");
447 return 1;
448}
449
450/* set function: owner of class Tile */
452{
454#ifndef TOLUA_RELEASE
456 if (!self) {
457 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
458 return 0;
459 }
460 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
461 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
462#endif
463 self->owner = ((Player*) tolua_tousertype(tolua_S,2,0));
464 return 0;
465}
466
467/* get function: index of class Tile */
469{
471#ifndef TOLUA_RELEASE
472 if (!self) {
473 tolua_error(tolua_S,"invalid 'self' in accessing variable 'index'",NULL);
474 return 0;
475 }
476#endif
478 return 1;
479}
480
481/* get function: item_number of class Government */
483{
485#ifndef TOLUA_RELEASE
486 if (!self) {
487 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
488 return 0;
489 }
490#endif
492 return 1;
493}
494
495/* get function: item_number of class Nation_Type */
497{
499#ifndef TOLUA_RELEASE
500 if (!self) {
501 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
502 return 0;
503 }
504#endif
506 return 1;
507}
508
509/* get function: build_cost of class Building_Type */
511{
513#ifndef TOLUA_RELEASE
514 if (!self) {
515 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
516 return 0;
517 }
518#endif
520 return 1;
521}
522
523/* set function: build_cost of class Building_Type */
525{
527#ifndef TOLUA_RELEASE
529 if (!self) {
530 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
531 return 0;
532 }
534 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
535#endif
536 self->build_cost = ((int) tolua_tonumber(tolua_S,2,0));
537 return 0;
538}
539
540/* get function: item_number of class Building_Type */
542{
544#ifndef TOLUA_RELEASE
545 if (!self) {
546 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
547 return 0;
548 }
549#endif
551 return 1;
552}
553
554/* get function: build_cost of class Unit_Type */
556{
558#ifndef TOLUA_RELEASE
559 if (!self) {
560 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
561 return 0;
562 }
563#endif
565 return 1;
566}
567
568/* set function: build_cost of class Unit_Type */
570{
572#ifndef TOLUA_RELEASE
574 if (!self) {
575 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
576 return 0;
577 }
579 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
580#endif
581 self->build_cost = ((int) tolua_tonumber(tolua_S,2,0));
582 return 0;
583}
584
585/* get function: obsoleted_by of class Unit_Type */
587{
589#ifndef TOLUA_RELEASE
590 if (!self) {
591 tolua_error(tolua_S,"invalid 'self' in accessing variable 'obsoleted_by'",NULL);
592 return 0;
593 }
594#endif
595 tolua_pushusertype(tolua_S,(void*)self->obsoleted_by,"Unit_Type");
596 return 1;
597}
598
599/* set function: obsoleted_by of class Unit_Type */
601{
603#ifndef TOLUA_RELEASE
605 if (!self) {
606 tolua_error(tolua_S,"invalid 'self' in accessing variable 'obsoleted_by'",NULL);
607 return 0;
608 }
609 if (!tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err))
610 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
611#endif
612 self->obsoleted_by = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
613 return 0;
614}
615
616/* get function: item_number of class Unit_Type */
618{
620#ifndef TOLUA_RELEASE
621 if (!self) {
622 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
623 return 0;
624 }
625#endif
627 return 1;
628}
629
630/* get function: item_number of class Tech_Type */
632{
634#ifndef TOLUA_RELEASE
635 if (!self) {
636 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
637 return 0;
638 }
639#endif
641 return 1;
642}
643
644/* get function: cost of class Tech_Type */
646{
648#ifndef TOLUA_RELEASE
649 if (!self) {
650 tolua_error(tolua_S,"invalid 'self' in accessing variable 'cost'",NULL);
651 return 0;
652 }
653#endif
655 return 1;
656}
657
658/* get function: item_number of class Terrain */
660{
662#ifndef TOLUA_RELEASE
663 if (!self) {
664 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
665 return 0;
666 }
667#endif
669 return 1;
670}
671
672/* get function: id of class Disaster */
674{
676#ifndef TOLUA_RELEASE
677 if (!self) {
678 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
679 return 0;
680 }
681#endif
683 return 1;
684}
685
686/* get function: id of class Achievement */
688{
690#ifndef TOLUA_RELEASE
691 if (!self) {
692 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
693 return 0;
694 }
695#endif
697 return 1;
698}
699
700/* get function: id of class Action */
702{
704#ifndef TOLUA_RELEASE
705 if (!self) {
706 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
707 return 0;
708 }
709#endif
711 return 1;
712}
713
714/* get function: base_tech_cost of class Game_Info */
716{
718#ifndef TOLUA_RELEASE
719 if (!self) {
720 tolua_error(tolua_S,"invalid 'self' in accessing variable 'base_tech_cost'",NULL);
721 return 0;
722 }
723#endif
724 tolua_pushnumber(tolua_S,(lua_Number)self->base_tech_cost);
725 return 1;
726}
727
728/* get function: min_tech_cost of class Game_Info */
730{
732#ifndef TOLUA_RELEASE
733 if (!self) {
734 tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_tech_cost'",NULL);
735 return 0;
736 }
737#endif
738 tolua_pushnumber(tolua_S,(lua_Number)self->min_tech_cost);
739 return 1;
740}
741
742/* get function: tech_leak_pct of class Game_Info */
744{
746#ifndef TOLUA_RELEASE
747 if (!self) {
748 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_leak_pct'",NULL);
749 return 0;
750 }
751#endif
752 tolua_pushnumber(tolua_S,(lua_Number)self->tech_leak_pct);
753 return 1;
754}
755
756/* get function: tech_steal_allow_holes of class Game_Info */
758{
760#ifndef TOLUA_RELEASE
761 if (!self) {
762 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_steal_allow_holes'",NULL);
763 return 0;
764 }
765#endif
766 tolua_pushboolean(tolua_S,(bool)self->tech_steal_allow_holes);
767 return 1;
768}
769
770/* get function: tech_trade_allow_holes of class Game_Info */
772{
774#ifndef TOLUA_RELEASE
775 if (!self) {
776 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_trade_allow_holes'",NULL);
777 return 0;
778 }
779#endif
780 tolua_pushboolean(tolua_S,(bool)self->tech_trade_allow_holes);
781 return 1;
782}
783
784/* get function: tech_trade_loss_allow_holes of class Game_Info */
786{
788#ifndef TOLUA_RELEASE
789 if (!self) {
790 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_trade_loss_allow_holes'",NULL);
791 return 0;
792 }
793#endif
794 tolua_pushboolean(tolua_S,(bool)self->tech_trade_loss_allow_holes);
795 return 1;
796}
797
798/* get function: tech_parasite_allow_holes of class Game_Info */
800{
802#ifndef TOLUA_RELEASE
803 if (!self) {
804 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_parasite_allow_holes'",NULL);
805 return 0;
806 }
807#endif
808 tolua_pushboolean(tolua_S,(bool)self->tech_parasite_allow_holes);
809 return 1;
810}
811
812/* get function: tech_loss_allow_holes of class Game_Info */
814{
816#ifndef TOLUA_RELEASE
817 if (!self) {
818 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_loss_allow_holes'",NULL);
819 return 0;
820 }
821#endif
822 tolua_pushboolean(tolua_S,(bool)self->tech_loss_allow_holes);
823 return 1;
824}
825
826/* get function: sciencebox of class Game_Info */
828{
830#ifndef TOLUA_RELEASE
831 if (!self) {
832 tolua_error(tolua_S,"invalid 'self' in accessing variable 'sciencebox'",NULL);
833 return 0;
834 }
835#endif
837 return 1;
838}
839
840/* get function: game_info_substructure */
846
847/* set function: game_info_substructure */
849{
850#ifndef TOLUA_RELEASE
852 if (!tolua_isusertype(tolua_S,2,"Game_Info",0,&tolua_err))
853 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
854#endif
856 return 0;
857}
858
859/* function: api_methods_game_turn */
861{
862#ifndef TOLUA_RELEASE
864 if (
866 )
867 goto tolua_lerror;
868 else
869#endif
870 {
872 {
875 }
876 }
877 return 1;
878#ifndef TOLUA_RELEASE
880 tolua_error(tolua_S,"#ferror in function 'current_turn'.",&tolua_err);
881 return 0;
882#endif
883}
884
885/* function: api_methods_game_turn_deprecated */
887{
888#ifndef TOLUA_RELEASE
890 if (
892 )
893 goto tolua_lerror;
894 else
895#endif
896 {
898 {
901 }
902 }
903 return 1;
904#ifndef TOLUA_RELEASE
906 tolua_error(tolua_S,"#ferror in function 'turn'.",&tolua_err);
907 return 0;
908#endif
909}
910
911/* function: api_methods_game_year */
913{
914#ifndef TOLUA_RELEASE
916 if (
918 )
919 goto tolua_lerror;
920 else
921#endif
922 {
924 {
927 }
928 }
929 return 1;
930#ifndef TOLUA_RELEASE
932 tolua_error(tolua_S,"#ferror in function 'current_year'.",&tolua_err);
933 return 0;
934#endif
935}
936
937/* function: api_methods_game_year_fragment */
939{
940#ifndef TOLUA_RELEASE
942 if (
944 )
945 goto tolua_lerror;
946 else
947#endif
948 {
950 {
953 }
954 }
955 return 1;
956#ifndef TOLUA_RELEASE
958 tolua_error(tolua_S,"#ferror in function 'current_fragment'.",&tolua_err);
959 return 0;
960#endif
961}
962
963/* function: api_methods_game_year_text */
965{
966#ifndef TOLUA_RELEASE
968 if (
970 )
971 goto tolua_lerror;
972 else
973#endif
974 {
976 {
977 const char* tolua_ret = (const char*) api_methods_game_year_text(L);
978 tolua_pushstring(tolua_S,(const char*)tolua_ret);
979 }
980 }
981 return 1;
982#ifndef TOLUA_RELEASE
984 tolua_error(tolua_S,"#ferror in function 'current_year_text'.",&tolua_err);
985 return 0;
986#endif
987}
988
989/* function: api_methods_game_rulesetdir */
991{
992#ifndef TOLUA_RELEASE
994 if (
996 )
997 goto tolua_lerror;
998 else
999#endif
1000 {
1001 lua_State* L = tolua_S;
1002 {
1003 const char* tolua_ret = (const char*) api_methods_game_rulesetdir(L);
1004 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1005 }
1006 }
1007 return 1;
1008#ifndef TOLUA_RELEASE
1010 tolua_error(tolua_S,"#ferror in function 'rulesetdir'.",&tolua_err);
1011 return 0;
1012#endif
1013}
1014
1015/* function: api_methods_game_ruleset_name */
1017{
1018#ifndef TOLUA_RELEASE
1020 if (
1022 )
1023 goto tolua_lerror;
1024 else
1025#endif
1026 {
1027 lua_State* L = tolua_S;
1028 {
1029 const char* tolua_ret = (const char*) api_methods_game_ruleset_name(L);
1030 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1031 }
1032 }
1033 return 1;
1034#ifndef TOLUA_RELEASE
1036 tolua_error(tolua_S,"#ferror in function 'ruleset_name'.",&tolua_err);
1037 return 0;
1038#endif
1039}
1040
1041/* function: api_methods_tech_cost_style */
1043{
1044#ifndef TOLUA_RELEASE
1046 if (
1048 )
1049 goto tolua_lerror;
1050 else
1051#endif
1052 {
1053 lua_State* L = tolua_S;
1054 {
1055 const char* tolua_ret = (const char*) api_methods_tech_cost_style(L);
1056 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1057 }
1058 }
1059 return 1;
1060#ifndef TOLUA_RELEASE
1062 tolua_error(tolua_S,"#ferror in function 'tech_cost_style'.",&tolua_err);
1063 return 0;
1064#endif
1065}
1066
1067/* function: api_methods_tech_leakage_style */
1069{
1070#ifndef TOLUA_RELEASE
1072 if (
1074 )
1075 goto tolua_lerror;
1076 else
1077#endif
1078 {
1079 lua_State* L = tolua_S;
1080 {
1081 const char* tolua_ret = (const char*) api_methods_tech_leakage_style(L);
1082 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1083 }
1084 }
1085 return 1;
1086#ifndef TOLUA_RELEASE
1088 tolua_error(tolua_S,"#ferror in function 'tech_leakage_style'.",&tolua_err);
1089 return 0;
1090#endif
1091}
1092
1093/* function: api_methods_counter_rule_name */
1095{
1096#ifndef TOLUA_RELEASE
1098 if (
1099 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1101 )
1102 goto tolua_lerror;
1103 else
1104#endif
1105 {
1106 lua_State* L = tolua_S;
1107 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1108 {
1109 const char* tolua_ret = (const char*) api_methods_counter_rule_name(L,c);
1110 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1111 }
1112 }
1113 return 1;
1114#ifndef TOLUA_RELEASE
1116 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
1117 return 0;
1118#endif
1119}
1120
1121/* function: api_methods_counter_name_translation */
1123{
1124#ifndef TOLUA_RELEASE
1126 if (
1127 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1129 )
1130 goto tolua_lerror;
1131 else
1132#endif
1133 {
1134 lua_State* L = tolua_S;
1135 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1136 {
1137 const char* tolua_ret = (const char*) api_methods_counter_name_translation(L,c);
1138 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1139 }
1140 }
1141 return 1;
1142#ifndef TOLUA_RELEASE
1144 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
1145 return 0;
1146#endif
1147}
1148
1149/* function: api_methods_counter_city_get */
1151{
1152#ifndef TOLUA_RELEASE
1154 if (
1155 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1156 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
1158 )
1159 goto tolua_lerror;
1160 else
1161#endif
1162 {
1163 lua_State* L = tolua_S;
1164 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1165 City* city = ((City*) tolua_tousertype(tolua_S,2,0));
1166 {
1169 }
1170 }
1171 return 1;
1172#ifndef TOLUA_RELEASE
1174 tolua_error(tolua_S,"#ferror in function 'get'.",&tolua_err);
1175 return 0;
1176#endif
1177}
1178
1179/* function: api_methods_player_number */
1181{
1182#ifndef TOLUA_RELEASE
1184 if (
1185 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1187 )
1188 goto tolua_lerror;
1189 else
1190#endif
1191 {
1192 lua_State* L = tolua_S;
1194 {
1197 }
1198 }
1199 return 1;
1200#ifndef TOLUA_RELEASE
1202 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
1203 return 0;
1204#endif
1205}
1206
1207/* function: api_methods_player_bulbs */
1209{
1210#ifndef TOLUA_RELEASE
1212 if (
1213 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1215 )
1216 goto tolua_lerror;
1217 else
1218#endif
1219 {
1220 lua_State* L = tolua_S;
1221 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1222 {
1223 int tolua_ret = (int) api_methods_player_bulbs(L,pplayer);
1225 }
1226 }
1227 return 1;
1228#ifndef TOLUA_RELEASE
1230 tolua_error(tolua_S,"#ferror in function 'bulbs'.",&tolua_err);
1231 return 0;
1232#endif
1233}
1234
1235/* function: api_methods_player_controlling_gui */
1237{
1238#ifndef TOLUA_RELEASE
1240 if (
1241 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1243 )
1244 goto tolua_lerror;
1245 else
1246#endif
1247 {
1248 lua_State* L = tolua_S;
1250 {
1251 const char* tolua_ret = (const char*) api_methods_player_controlling_gui(L,self);
1252 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1253 }
1254 }
1255 return 1;
1256#ifndef TOLUA_RELEASE
1258 tolua_error(tolua_S,"#ferror in function 'controlling_gui'.",&tolua_err);
1259 return 0;
1260#endif
1261}
1262
1263/* function: api_methods_player_num_cities */
1265{
1266#ifndef TOLUA_RELEASE
1268 if (
1269 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1271 )
1272 goto tolua_lerror;
1273 else
1274#endif
1275 {
1276 lua_State* L = tolua_S;
1278 {
1281 }
1282 }
1283 return 1;
1284#ifndef TOLUA_RELEASE
1286 tolua_error(tolua_S,"#ferror in function 'num_cities'.",&tolua_err);
1287 return 0;
1288#endif
1289}
1290
1291/* function: api_methods_player_num_units */
1293{
1294#ifndef TOLUA_RELEASE
1296 if (
1297 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1299 )
1300 goto tolua_lerror;
1301 else
1302#endif
1303 {
1304 lua_State* L = tolua_S;
1306 {
1309 }
1310 }
1311 return 1;
1312#ifndef TOLUA_RELEASE
1314 tolua_error(tolua_S,"#ferror in function 'num_units'.",&tolua_err);
1315 return 0;
1316#endif
1317}
1318
1319/* function: api_methods_player_future */
1321{
1322#ifndef TOLUA_RELEASE
1324 if (
1325 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1327 )
1328 goto tolua_lerror;
1329 else
1330#endif
1331 {
1332 lua_State* L = tolua_S;
1333 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1334 {
1335 int tolua_ret = (int) api_methods_player_future(L,pplayer);
1337 }
1338 }
1339 return 1;
1340#ifndef TOLUA_RELEASE
1342 tolua_error(tolua_S,"#ferror in function 'num_future_techs'.",&tolua_err);
1343 return 0;
1344#endif
1345}
1346
1347/* function: api_methods_player_has_wonder */
1349{
1350#ifndef TOLUA_RELEASE
1352 if (
1353 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1354 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1356 )
1357 goto tolua_lerror;
1358 else
1359#endif
1360 {
1361 lua_State* L = tolua_S;
1364 {
1367 }
1368 }
1369 return 1;
1370#ifndef TOLUA_RELEASE
1372 tolua_error(tolua_S,"#ferror in function 'has_wonder'.",&tolua_err);
1373 return 0;
1374#endif
1375}
1376
1377/* function: api_methods_player_gold */
1379{
1380#ifndef TOLUA_RELEASE
1382 if (
1383 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1385 )
1386 goto tolua_lerror;
1387 else
1388#endif
1389 {
1390 lua_State* L = tolua_S;
1392 {
1395 }
1396 }
1397 return 1;
1398#ifndef TOLUA_RELEASE
1400 tolua_error(tolua_S,"#ferror in function 'gold'.",&tolua_err);
1401 return 0;
1402#endif
1403}
1404
1405/* function: api_methods_player_infrapoints */
1407{
1408#ifndef TOLUA_RELEASE
1410 if (
1411 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1413 )
1414 goto tolua_lerror;
1415 else
1416#endif
1417 {
1418 lua_State* L = tolua_S;
1420 {
1423 }
1424 }
1425 return 1;
1426#ifndef TOLUA_RELEASE
1428 tolua_error(tolua_S,"#ferror in function 'infrapoints'.",&tolua_err);
1429 return 0;
1430#endif
1431}
1432
1433/* function: api_methods_player_knows_tech */
1435{
1436#ifndef TOLUA_RELEASE
1438 if (
1439 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1440 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1442 )
1443 goto tolua_lerror;
1444 else
1445#endif
1446 {
1447 lua_State* L = tolua_S;
1450 {
1453 }
1454 }
1455 return 1;
1456#ifndef TOLUA_RELEASE
1458 tolua_error(tolua_S,"#ferror in function 'knows_tech'.",&tolua_err);
1459 return 0;
1460#endif
1461}
1462
1463/* function: api_method_player_can_research */
1465{
1466#ifndef TOLUA_RELEASE
1468 if (
1469 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1470 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1472 )
1473 goto tolua_lerror;
1474 else
1475#endif
1476 {
1477 lua_State* L = tolua_S;
1478 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1480 {
1483 }
1484 }
1485 return 1;
1486#ifndef TOLUA_RELEASE
1488 tolua_error(tolua_S,"#ferror in function 'can_research'.",&tolua_err);
1489 return 0;
1490#endif
1491}
1492
1493/* function: api_methods_player_tech_cost */
1495{
1496#ifndef TOLUA_RELEASE
1498 if (
1499 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1500 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1502 )
1503 goto tolua_lerror;
1504 else
1505#endif
1506 {
1507 lua_State* L = tolua_S;
1508 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1510 {
1513 }
1514 }
1515 return 1;
1516#ifndef TOLUA_RELEASE
1518 tolua_error(tolua_S,"#ferror in function 'tech_cost'.",&tolua_err);
1519 return 0;
1520#endif
1521}
1522
1523/* function: api_methods_player_researching */
1525{
1526#ifndef TOLUA_RELEASE
1528 if (
1529 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1531 )
1532 goto tolua_lerror;
1533 else
1534#endif
1535 {
1536 lua_State* L = tolua_S;
1537 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1538 {
1541 }
1542 }
1543 return 1;
1544#ifndef TOLUA_RELEASE
1546 tolua_error(tolua_S,"#ferror in function 'researching'.",&tolua_err);
1547 return 0;
1548#endif
1549}
1550
1551/* function: api_methods_player_research_cost */
1553{
1554#ifndef TOLUA_RELEASE
1556 if (
1557 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1559 )
1560 goto tolua_lerror;
1561 else
1562#endif
1563 {
1564 lua_State* L = tolua_S;
1565 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1566 {
1569 }
1570 }
1571 return 1;
1572#ifndef TOLUA_RELEASE
1574 tolua_error(tolua_S,"#ferror in function 'researching_cost'.",&tolua_err);
1575 return 0;
1576#endif
1577}
1578
1579/* function: api_methods_player_shares_research */
1581{
1582#ifndef TOLUA_RELEASE
1584 if (
1585 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1586 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
1588 )
1589 goto tolua_lerror;
1590 else
1591#endif
1592 {
1593 lua_State* L = tolua_S;
1596 {
1599 }
1600 }
1601 return 1;
1602#ifndef TOLUA_RELEASE
1604 tolua_error(tolua_S,"#ferror in function 'shares_research'.",&tolua_err);
1605 return 0;
1606#endif
1607}
1608
1609/* function: api_methods_research_rule_name */
1611{
1612#ifndef TOLUA_RELEASE
1614 if (
1615 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1617 )
1618 goto tolua_lerror;
1619 else
1620#endif
1621 {
1622 lua_State* L = tolua_S;
1624 {
1625 const char* tolua_ret = (const char*) api_methods_research_rule_name(L,self);
1626 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1627 }
1628 }
1629 return 1;
1630#ifndef TOLUA_RELEASE
1632 tolua_error(tolua_S,"#ferror in function 'research_rule_name'.",&tolua_err);
1633 return 0;
1634#endif
1635}
1636
1637/* function: api_methods_research_name_translation */
1639{
1640#ifndef TOLUA_RELEASE
1642 if (
1643 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1645 )
1646 goto tolua_lerror;
1647 else
1648#endif
1649 {
1650 lua_State* L = tolua_S;
1652 {
1653 const char* tolua_ret = (const char*) api_methods_research_name_translation(L,self);
1654 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1655 }
1656 }
1657 return 1;
1658#ifndef TOLUA_RELEASE
1660 tolua_error(tolua_S,"#ferror in function 'research_name_translation'.",&tolua_err);
1661 return 0;
1662#endif
1663}
1664
1665/* function: api_methods_player_culture_get */
1667{
1668#ifndef TOLUA_RELEASE
1670 if (
1671 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1673 )
1674 goto tolua_lerror;
1675 else
1676#endif
1677 {
1678 lua_State* L = tolua_S;
1680 {
1683 }
1684 }
1685 return 1;
1686#ifndef TOLUA_RELEASE
1688 tolua_error(tolua_S,"#ferror in function 'culture'.",&tolua_err);
1689 return 0;
1690#endif
1691}
1692
1693/* function: api_methods_player_has_flag */
1695{
1696#ifndef TOLUA_RELEASE
1698 if (
1699 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1702 )
1703 goto tolua_lerror;
1704 else
1705#endif
1706 {
1707 lua_State* L = tolua_S;
1709 const char* flag = ((const char*) tolua_tostring(tolua_S,2,0));
1710 {
1713 }
1714 }
1715 return 1;
1716#ifndef TOLUA_RELEASE
1718 tolua_error(tolua_S,"#ferror in function 'has_flag'.",&tolua_err);
1719 return 0;
1720#endif
1721}
1722
1723/* function: api_methods_player_can_upgrade */
1725{
1726#ifndef TOLUA_RELEASE
1728 if (
1729 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1730 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
1732 )
1733 goto tolua_lerror;
1734 else
1735#endif
1736 {
1737 lua_State* L = tolua_S;
1738 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1739 Unit_Type* utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
1740 {
1742 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
1743 }
1744 }
1745 return 1;
1746#ifndef TOLUA_RELEASE
1748 tolua_error(tolua_S,"#ferror in function 'can_upgrade'.",&tolua_err);
1749 return 0;
1750#endif
1751}
1752
1753/* function: api_methods_player_can_build_impr_direct */
1755{
1756#ifndef TOLUA_RELEASE
1758 if (
1759 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1760 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1762 )
1763 goto tolua_lerror;
1764 else
1765#endif
1766 {
1767 lua_State* L = tolua_S;
1768 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1770 {
1773 }
1774 }
1775 return 1;
1776#ifndef TOLUA_RELEASE
1778 tolua_error(tolua_S,"#ferror in function 'can_build_direct'.",&tolua_err);
1779 return 0;
1780#endif
1781}
1782
1783/* function: api_methods_player_can_build_unit_direct */
1785{
1787 if (
1788 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1789 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
1791 )
1792 goto tolua_lerror;
1793 else
1794 {
1795 lua_State* L = tolua_S;
1796 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1797 Unit_Type* utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
1798 {
1801 }
1802 }
1803 return 1;
1806}
1807
1808/* function: api_methods_private_list_players */
1810{
1811#ifndef TOLUA_RELEASE
1813 if (
1815 )
1816 goto tolua_lerror;
1817 else
1818#endif
1819 {
1820 lua_State* L = tolua_S;
1821 {
1824 }
1825 }
1826 return 1;
1827#ifndef TOLUA_RELEASE
1829 tolua_error(tolua_S,"#ferror in function 'list_players'.",&tolua_err);
1830 return 0;
1831#endif
1832}
1833
1834/* function: api_methods_private_player_unit_list_head */
1836{
1837#ifndef TOLUA_RELEASE
1839 if (
1840 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1842 )
1843 goto tolua_lerror;
1844 else
1845#endif
1846 {
1847 lua_State* L = tolua_S;
1849 {
1851 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
1852 }
1853 }
1854 return 1;
1855#ifndef TOLUA_RELEASE
1857 tolua_error(tolua_S,"#ferror in function 'unit_list_head'.",&tolua_err);
1858 return 0;
1859#endif
1860}
1861
1862/* function: api_methods_private_player_city_list_head */
1864{
1865#ifndef TOLUA_RELEASE
1867 if (
1868 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1870 )
1871 goto tolua_lerror;
1872 else
1873#endif
1874 {
1875 lua_State* L = tolua_S;
1877 {
1879 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City_List_Link");
1880 }
1881 }
1882 return 1;
1883#ifndef TOLUA_RELEASE
1885 tolua_error(tolua_S,"#ferror in function 'city_list_head'.",&tolua_err);
1886 return 0;
1887#endif
1888}
1889
1890/* function: api_methods_city_size_get */
1892{
1893#ifndef TOLUA_RELEASE
1895 if (
1896 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1898 )
1899 goto tolua_lerror;
1900 else
1901#endif
1902 {
1903 lua_State* L = tolua_S;
1904 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1905 {
1908 }
1909 }
1910 return 1;
1911#ifndef TOLUA_RELEASE
1913 tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err);
1914 return 0;
1915#endif
1916}
1917
1918/* function: api_methods_city_tile_get */
1920{
1921#ifndef TOLUA_RELEASE
1923 if (
1924 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1926 )
1927 goto tolua_lerror;
1928 else
1929#endif
1930 {
1931 lua_State* L = tolua_S;
1932 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1933 {
1935 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
1936 }
1937 }
1938 return 1;
1939#ifndef TOLUA_RELEASE
1941 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
1942 return 0;
1943#endif
1944}
1945
1946/* function: api_methods_city_has_building */
1948{
1949#ifndef TOLUA_RELEASE
1951 if (
1952 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1953 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1955 )
1956 goto tolua_lerror;
1957 else
1958#endif
1959 {
1960 lua_State* L = tolua_S;
1961 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1963 {
1966 }
1967 }
1968 return 1;
1969#ifndef TOLUA_RELEASE
1971 tolua_error(tolua_S,"#ferror in function 'has_building'.",&tolua_err);
1972 return 0;
1973#endif
1974}
1975
1976/* function: api_methods_city_map_sq_radius */
1978{
1979#ifndef TOLUA_RELEASE
1981 if (
1982 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1984 )
1985 goto tolua_lerror;
1986 else
1987#endif
1988 {
1989 lua_State* L = tolua_S;
1990 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1991 {
1994 }
1995 }
1996 return 1;
1997#ifndef TOLUA_RELEASE
1999 tolua_error(tolua_S,"#ferror in function 'map_sq_radius'.",&tolua_err);
2000 return 0;
2001#endif
2002}
2003
2004/* function: api_methods_city_inspire_partisans */
2006{
2007#ifndef TOLUA_RELEASE
2009 if (
2010 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2011 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
2013 )
2014 goto tolua_lerror;
2015 else
2016#endif
2017 {
2018 lua_State* L = tolua_S;
2019 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2021 {
2024 }
2025 }
2026 return 1;
2027#ifndef TOLUA_RELEASE
2029 tolua_error(tolua_S,"#ferror in function 'inspire_partisans'.",&tolua_err);
2030 return 0;
2031#endif
2032}
2033
2034/* function: api_methods_city_culture_get */
2036{
2037#ifndef TOLUA_RELEASE
2039 if (
2040 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2042 )
2043 goto tolua_lerror;
2044 else
2045#endif
2046 {
2047 lua_State* L = tolua_S;
2048 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2049 {
2052 }
2053 }
2054 return 1;
2055#ifndef TOLUA_RELEASE
2057 tolua_error(tolua_S,"#ferror in function 'culture'.",&tolua_err);
2058 return 0;
2059#endif
2060}
2061
2062/* function: api_methods_is_city_happy */
2064{
2065#ifndef TOLUA_RELEASE
2067 if (
2068 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2070 )
2071 goto tolua_lerror;
2072 else
2073#endif
2074 {
2075 lua_State* L = tolua_S;
2076 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2077 {
2080 }
2081 }
2082 return 1;
2083#ifndef TOLUA_RELEASE
2085 tolua_error(tolua_S,"#ferror in function 'is_happy'.",&tolua_err);
2086 return 0;
2087#endif
2088}
2089
2090/* function: api_methods_is_city_unhappy */
2092{
2093#ifndef TOLUA_RELEASE
2095 if (
2096 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2098 )
2099 goto tolua_lerror;
2100 else
2101#endif
2102 {
2103 lua_State* L = tolua_S;
2104 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2105 {
2108 }
2109 }
2110 return 1;
2111#ifndef TOLUA_RELEASE
2113 tolua_error(tolua_S,"#ferror in function 'is_unhappy'.",&tolua_err);
2114 return 0;
2115#endif
2116}
2117
2118/* function: api_methods_is_city_celebrating */
2120{
2121#ifndef TOLUA_RELEASE
2123 if (
2124 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2126 )
2127 goto tolua_lerror;
2128 else
2129#endif
2130 {
2131 lua_State* L = tolua_S;
2132 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2133 {
2136 }
2137 }
2138 return 1;
2139#ifndef TOLUA_RELEASE
2141 tolua_error(tolua_S,"#ferror in function 'is_celebrating'.",&tolua_err);
2142 return 0;
2143#endif
2144}
2145
2146/* function: api_methods_is_gov_center */
2148{
2149#ifndef TOLUA_RELEASE
2151 if (
2152 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2154 )
2155 goto tolua_lerror;
2156 else
2157#endif
2158 {
2159 lua_State* L = tolua_S;
2160 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2161 {
2164 }
2165 }
2166 return 1;
2167#ifndef TOLUA_RELEASE
2169 tolua_error(tolua_S,"#ferror in function 'is_gov_center'.",&tolua_err);
2170 return 0;
2171#endif
2172}
2173
2174/* function: api_methods_is_capital */
2176{
2177#ifndef TOLUA_RELEASE
2179 if (
2180 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2182 )
2183 goto tolua_lerror;
2184 else
2185#endif
2186 {
2187 lua_State* L = tolua_S;
2188 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2189 {
2192 }
2193 }
2194 return 1;
2195#ifndef TOLUA_RELEASE
2197 tolua_error(tolua_S,"#ferror in function 'is_capital'.",&tolua_err);
2198 return 0;
2199#endif
2200}
2201
2202/* function: api_methods_is_primary_capital */
2204{
2205#ifndef TOLUA_RELEASE
2207 if (
2208 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2210 )
2211 goto tolua_lerror;
2212 else
2213#endif
2214 {
2215 lua_State* L = tolua_S;
2216 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2217 {
2220 }
2221 }
2222 return 1;
2223#ifndef TOLUA_RELEASE
2225 tolua_error(tolua_S,"#ferror in function 'is_primary_capital'.",&tolua_err);
2226 return 0;
2227#endif
2228}
2229
2230/* function: api_methods_city_link */
2232{
2233#ifndef TOLUA_RELEASE
2235 if (
2236 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2238 )
2239 goto tolua_lerror;
2240 else
2241#endif
2242 {
2243 lua_State* L = tolua_S;
2244 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2245 {
2246 const char* tolua_ret = (const char*) api_methods_city_link(L,self);
2247 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2248 }
2249 }
2250 return 1;
2251#ifndef TOLUA_RELEASE
2253 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2254 return 0;
2255#endif
2256}
2257
2258/* function: api_methods_city_tile_link */
2260{
2261#ifndef TOLUA_RELEASE
2263 if (
2264 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2266 )
2267 goto tolua_lerror;
2268 else
2269#endif
2270 {
2271 lua_State* L = tolua_S;
2272 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2273 {
2274 const char* tolua_ret = (const char*) api_methods_city_tile_link(L,self);
2275 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2276 }
2277 }
2278 return 1;
2279#ifndef TOLUA_RELEASE
2281 tolua_error(tolua_S,"#ferror in function 'tile_link_text'.",&tolua_err);
2282 return 0;
2283#endif
2284}
2285
2286/* function: api_methods_unit_tile_get */
2288{
2289#ifndef TOLUA_RELEASE
2291 if (
2292 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2294 )
2295 goto tolua_lerror;
2296 else
2297#endif
2298 {
2299 lua_State* L = tolua_S;
2300 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2301 {
2303 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
2304 }
2305 }
2306 return 1;
2307#ifndef TOLUA_RELEASE
2309 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
2310 return 0;
2311#endif
2312}
2313
2314/* function: api_methods_unit_transporter */
2316{
2317#ifndef TOLUA_RELEASE
2319 if (
2320 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2322 )
2323 goto tolua_lerror;
2324 else
2325#endif
2326 {
2327 lua_State* L = tolua_S;
2328 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2329 {
2331 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
2332 }
2333 }
2334 return 1;
2335#ifndef TOLUA_RELEASE
2337 tolua_error(tolua_S,"#ferror in function 'transporter'.",&tolua_err);
2338 return 0;
2339#endif
2340}
2341
2342/* function: api_methods_unit_city_can_be_built_here */
2344{
2345#ifndef TOLUA_RELEASE
2347 if (
2348 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2350 )
2351 goto tolua_lerror;
2352 else
2353#endif
2354 {
2355 lua_State* L = tolua_S;
2356 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2357 {
2360 }
2361 }
2362 return 1;
2363#ifndef TOLUA_RELEASE
2365 tolua_error(tolua_S,"#ferror in function 'is_on_possible_city_tile'.",&tolua_err);
2366 return 0;
2367#endif
2368}
2369
2370/* function: api_methods_unit_can_upgrade */
2372{
2373#ifndef TOLUA_RELEASE
2375 if (
2376 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2379 )
2380 goto tolua_lerror;
2381 else
2382#endif
2383 {
2384 lua_State* L = tolua_S;
2385 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2386 bool is_free = ((bool) tolua_toboolean(tolua_S,2,TRUE));
2387 {
2390 }
2391 }
2392 return 1;
2393#ifndef TOLUA_RELEASE
2395 tolua_error(tolua_S,"#ferror in function 'can_upgrade'.",&tolua_err);
2396 return 0;
2397#endif
2398}
2399
2400/* function: api_methods_unit_transform_problem */
2402{
2403#ifndef TOLUA_RELEASE
2405 if (
2406 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2407 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
2409 )
2410 goto tolua_lerror;
2411 else
2412#endif
2413 {
2414 lua_State* L = tolua_S;
2415 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2417 {
2418 const char* tolua_ret = (const char*) api_methods_unit_transform_problem(L,punit,ptype);
2419 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2420 }
2421 }
2422 return 1;
2423#ifndef TOLUA_RELEASE
2425 tolua_error(tolua_S,"#ferror in function 'transform_problem'.",&tolua_err);
2426 return 0;
2427#endif
2428}
2429
2430/* function: api_methods_unit_orientation_get */
2432{
2433#ifndef TOLUA_RELEASE
2435 if (
2436 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2438 )
2439 goto tolua_lerror;
2440 else
2441#endif
2442 {
2443 lua_State* L = tolua_S;
2444 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2445 {
2447 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
2448 }
2449 }
2450 return 1;
2451#ifndef TOLUA_RELEASE
2453 tolua_error(tolua_S,"#ferror in function 'facing'.",&tolua_err);
2454 return 0;
2455#endif
2456}
2457
2458/* function: api_methods_unit_link */
2460{
2461#ifndef TOLUA_RELEASE
2463 if (
2464 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2466 )
2467 goto tolua_lerror;
2468 else
2469#endif
2470 {
2471 lua_State* L = tolua_S;
2472 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2473 {
2474 const char* tolua_ret = (const char*) api_methods_unit_link(L,self);
2475 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2476 }
2477 }
2478 return 1;
2479#ifndef TOLUA_RELEASE
2481 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2482 return 0;
2483#endif
2484}
2485
2486/* function: api_methods_unit_tile_link */
2488{
2489#ifndef TOLUA_RELEASE
2491 if (
2492 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2494 )
2495 goto tolua_lerror;
2496 else
2497#endif
2498 {
2499 lua_State* L = tolua_S;
2500 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2501 {
2502 const char* tolua_ret = (const char*) api_methods_unit_tile_link(L,self);
2503 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2504 }
2505 }
2506 return 1;
2507#ifndef TOLUA_RELEASE
2509 tolua_error(tolua_S,"#ferror in function 'tile_link_text'.",&tolua_err);
2510 return 0;
2511#endif
2512}
2513
2514/* function: api_methods_private_unit_cargo_list_head */
2516{
2517#ifndef TOLUA_RELEASE
2519 if (
2520 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2522 )
2523 goto tolua_lerror;
2524 else
2525#endif
2526 {
2527 lua_State* L = tolua_S;
2528 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2529 {
2531 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
2532 }
2533 }
2534 return 1;
2535#ifndef TOLUA_RELEASE
2537 tolua_error(tolua_S,"#ferror in function 'cargo_list_head'.",&tolua_err);
2538 return 0;
2539#endif
2540}
2541
2542/* function: api_methods_tile_nat_x */
2544{
2545#ifndef TOLUA_RELEASE
2547 if (
2548 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2550 )
2551 goto tolua_lerror;
2552 else
2553#endif
2554 {
2555 lua_State* L = tolua_S;
2556 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2557 {
2560 }
2561 }
2562 return 1;
2563#ifndef TOLUA_RELEASE
2565 tolua_error(tolua_S,"#ferror in function 'nat_x'.",&tolua_err);
2566 return 0;
2567#endif
2568}
2569
2570/* function: api_methods_tile_nat_y */
2572{
2573#ifndef TOLUA_RELEASE
2575 if (
2576 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2578 )
2579 goto tolua_lerror;
2580 else
2581#endif
2582 {
2583 lua_State* L = tolua_S;
2584 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2585 {
2588 }
2589 }
2590 return 1;
2591#ifndef TOLUA_RELEASE
2593 tolua_error(tolua_S,"#ferror in function 'nat_y'.",&tolua_err);
2594 return 0;
2595#endif
2596}
2597
2598/* function: api_methods_tile_map_x */
2600{
2601#ifndef TOLUA_RELEASE
2603 if (
2604 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2606 )
2607 goto tolua_lerror;
2608 else
2609#endif
2610 {
2611 lua_State* L = tolua_S;
2612 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2613 {
2616 }
2617 }
2618 return 1;
2619#ifndef TOLUA_RELEASE
2621 tolua_error(tolua_S,"#ferror in function 'x'.",&tolua_err);
2622 return 0;
2623#endif
2624}
2625
2626/* function: api_methods_tile_map_y */
2628{
2629#ifndef TOLUA_RELEASE
2631 if (
2632 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2634 )
2635 goto tolua_lerror;
2636 else
2637#endif
2638 {
2639 lua_State* L = tolua_S;
2640 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2641 {
2644 }
2645 }
2646 return 1;
2647#ifndef TOLUA_RELEASE
2649 tolua_error(tolua_S,"#ferror in function 'y'.",&tolua_err);
2650 return 0;
2651#endif
2652}
2653
2654/* function: api_methods_tile_city */
2656{
2657#ifndef TOLUA_RELEASE
2659 if (
2660 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2662 )
2663 goto tolua_lerror;
2664 else
2665#endif
2666 {
2667 lua_State* L = tolua_S;
2668 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2669 {
2671 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
2672 }
2673 }
2674 return 1;
2675#ifndef TOLUA_RELEASE
2677 tolua_error(tolua_S,"#ferror in function 'city'.",&tolua_err);
2678 return 0;
2679#endif
2680}
2681
2682/* function: api_methods_tile_city_exists_within_max_city_map */
2684{
2685#ifndef TOLUA_RELEASE
2687 if (
2688 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2691 )
2692 goto tolua_lerror;
2693 else
2694#endif
2695 {
2696 lua_State* L = tolua_S;
2697 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2698 bool center = ((bool) tolua_toboolean(tolua_S,2,0));
2699 {
2702 }
2703 }
2704 return 1;
2705#ifndef TOLUA_RELEASE
2707 tolua_error(tolua_S,"#ferror in function 'city_exists_within_max_city_map'.",&tolua_err);
2708 return 0;
2709#endif
2710}
2711
2712/* function: api_methods_tile_has_extra */
2714{
2715#ifndef TOLUA_RELEASE
2717 if (
2718 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2721 )
2722 goto tolua_lerror;
2723 else
2724#endif
2725 {
2726 lua_State* L = tolua_S;
2727 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2728 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2729 {
2732 }
2733 }
2734 return 1;
2735#ifndef TOLUA_RELEASE
2737 tolua_error(tolua_S,"#ferror in function 'has_extra'.",&tolua_err);
2738 return 0;
2739#endif
2740}
2741
2742/* function: api_methods_tile_has_base */
2744{
2745#ifndef TOLUA_RELEASE
2747 if (
2748 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2751 )
2752 goto tolua_lerror;
2753 else
2754#endif
2755 {
2756 lua_State* L = tolua_S;
2757 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2758 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2759 {
2762 }
2763 }
2764 return 1;
2765#ifndef TOLUA_RELEASE
2767 tolua_error(tolua_S,"#ferror in function 'has_base'.",&tolua_err);
2768 return 0;
2769#endif
2770}
2771
2772/* function: api_methods_tile_has_road */
2774{
2775#ifndef TOLUA_RELEASE
2777 if (
2778 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2781 )
2782 goto tolua_lerror;
2783 else
2784#endif
2785 {
2786 lua_State* L = tolua_S;
2787 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2788 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2789 {
2792 }
2793 }
2794 return 1;
2795#ifndef TOLUA_RELEASE
2797 tolua_error(tolua_S,"#ferror in function 'has_road'.",&tolua_err);
2798 return 0;
2799#endif
2800}
2801
2802/* function: api_methods_tile_extra_owner */
2804{
2805#ifndef TOLUA_RELEASE
2807 if (
2808 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2811 )
2812 goto tolua_lerror;
2813 else
2814#endif
2815 {
2816 lua_State* L = tolua_S;
2817 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2818 const char* extra_name = ((const char*) tolua_tostring(tolua_S,2,0));
2819 {
2821 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
2822 }
2823 }
2824 return 1;
2825#ifndef TOLUA_RELEASE
2827 tolua_error(tolua_S,"#ferror in function 'extra_owner'.",&tolua_err);
2828 return 0;
2829#endif
2830}
2831
2832/* function: api_methods_enemy_tile */
2834{
2835#ifndef TOLUA_RELEASE
2837 if (
2838 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2839 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
2841 )
2842 goto tolua_lerror;
2843 else
2844#endif
2845 {
2846 lua_State* L = tolua_S;
2847 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2849 {
2852 }
2853 }
2854 return 1;
2855#ifndef TOLUA_RELEASE
2857 tolua_error(tolua_S,"#ferror in function 'is_enemy'.",&tolua_err);
2858 return 0;
2859#endif
2860}
2861
2862/* function: api_methods_tile_num_units */
2864{
2865#ifndef TOLUA_RELEASE
2867 if (
2868 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2870 )
2871 goto tolua_lerror;
2872 else
2873#endif
2874 {
2875 lua_State* L = tolua_S;
2876 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2877 {
2880 }
2881 }
2882 return 1;
2883#ifndef TOLUA_RELEASE
2885 tolua_error(tolua_S,"#ferror in function 'num_units'.",&tolua_err);
2886 return 0;
2887#endif
2888}
2889
2890/* function: api_methods_tile_sq_distance */
2892{
2893#ifndef TOLUA_RELEASE
2895 if (
2896 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2897 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
2899 )
2900 goto tolua_lerror;
2901 else
2902#endif
2903 {
2904 lua_State* L = tolua_S;
2905 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2906 Tile* other = ((Tile*) tolua_tousertype(tolua_S,2,0));
2907 {
2910 }
2911 }
2912 return 1;
2913#ifndef TOLUA_RELEASE
2915 tolua_error(tolua_S,"#ferror in function 'sq_distance'.",&tolua_err);
2916 return 0;
2917#endif
2918}
2919
2920/* function: api_methods_tile_link */
2922{
2923#ifndef TOLUA_RELEASE
2925 if (
2926 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2928 )
2929 goto tolua_lerror;
2930 else
2931#endif
2932 {
2933 lua_State* L = tolua_S;
2934 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2935 {
2936 const char* tolua_ret = (const char*) api_methods_tile_link(L,self);
2937 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2938 }
2939 }
2940 return 1;
2941#ifndef TOLUA_RELEASE
2943 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2944 return 0;
2945#endif
2946}
2947
2948/* function: api_methods_private_tile_next_outward_index */
2950{
2951#ifndef TOLUA_RELEASE
2953 if (
2954 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2958 )
2959 goto tolua_lerror;
2960 else
2961#endif
2962 {
2963 lua_State* L = tolua_S;
2965 int tindex = ((int) tolua_tonumber(tolua_S,2,0));
2966 int max_dist = ((int) tolua_tonumber(tolua_S,3,0));
2967 {
2970 }
2971 }
2972 return 1;
2973#ifndef TOLUA_RELEASE
2975 tolua_error(tolua_S,"#ferror in function 'next_outward_index'.",&tolua_err);
2976 return 0;
2977#endif
2978}
2979
2980/* function: api_methods_private_tile_for_outward_index */
2982{
2983#ifndef TOLUA_RELEASE
2985 if (
2986 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2989 )
2990 goto tolua_lerror;
2991 else
2992#endif
2993 {
2994 lua_State* L = tolua_S;
2996 int tindex = ((int) tolua_tonumber(tolua_S,2,0));
2997 {
2999 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
3000 }
3001 }
3002 return 1;
3003#ifndef TOLUA_RELEASE
3005 tolua_error(tolua_S,"#ferror in function 'tile_for_outward_index'.",&tolua_err);
3006 return 0;
3007#endif
3008}
3009
3010/* function: api_methods_private_tile_unit_list_head */
3012{
3013#ifndef TOLUA_RELEASE
3015 if (
3016 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
3018 )
3019 goto tolua_lerror;
3020 else
3021#endif
3022 {
3023 lua_State* L = tolua_S;
3024 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
3025 {
3027 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
3028 }
3029 }
3030 return 1;
3031#ifndef TOLUA_RELEASE
3033 tolua_error(tolua_S,"#ferror in function 'unit_list_head'.",&tolua_err);
3034 return 0;
3035#endif
3036}
3037
3038/* function: api_methods_government_rule_name */
3040{
3041#ifndef TOLUA_RELEASE
3043 if (
3044 !tolua_isusertype(tolua_S,1,"Government",0,&tolua_err) ||
3046 )
3047 goto tolua_lerror;
3048 else
3049#endif
3050 {
3051 lua_State* L = tolua_S;
3053 {
3054 const char* tolua_ret = (const char*) api_methods_government_rule_name(L,self);
3055 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3056 }
3057 }
3058 return 1;
3059#ifndef TOLUA_RELEASE
3061 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3062 return 0;
3063#endif
3064}
3065
3066/* function: api_methods_government_name_translation */
3068{
3069#ifndef TOLUA_RELEASE
3071 if (
3072 !tolua_isusertype(tolua_S,1,"Government",0,&tolua_err) ||
3074 )
3075 goto tolua_lerror;
3076 else
3077#endif
3078 {
3079 lua_State* L = tolua_S;
3081 {
3082 const char* tolua_ret = (const char*) api_methods_government_name_translation(L,self);
3083 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3084 }
3085 }
3086 return 1;
3087#ifndef TOLUA_RELEASE
3089 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3090 return 0;
3091#endif
3092}
3093
3094/* function: api_methods_nation_type_rule_name */
3096{
3097#ifndef TOLUA_RELEASE
3099 if (
3100 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3102 )
3103 goto tolua_lerror;
3104 else
3105#endif
3106 {
3107 lua_State* L = tolua_S;
3109 {
3110 const char* tolua_ret = (const char*) api_methods_nation_type_rule_name(L,self);
3111 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3112 }
3113 }
3114 return 1;
3115#ifndef TOLUA_RELEASE
3117 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3118 return 0;
3119#endif
3120}
3121
3122/* function: api_methods_nation_type_name_translation */
3124{
3125#ifndef TOLUA_RELEASE
3127 if (
3128 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3130 )
3131 goto tolua_lerror;
3132 else
3133#endif
3134 {
3135 lua_State* L = tolua_S;
3137 {
3138 const char* tolua_ret = (const char*) api_methods_nation_type_name_translation(L,self);
3139 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3140 }
3141 }
3142 return 1;
3143#ifndef TOLUA_RELEASE
3145 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3146 return 0;
3147#endif
3148}
3149
3150/* function: api_methods_nation_type_plural_translation */
3152{
3153#ifndef TOLUA_RELEASE
3155 if (
3156 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3158 )
3159 goto tolua_lerror;
3160 else
3161#endif
3162 {
3163 lua_State* L = tolua_S;
3165 {
3166 const char* tolua_ret = (const char*) api_methods_nation_type_plural_translation(L,self);
3167 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3168 }
3169 }
3170 return 1;
3171#ifndef TOLUA_RELEASE
3173 tolua_error(tolua_S,"#ferror in function 'plural_translation'.",&tolua_err);
3174 return 0;
3175#endif
3176}
3177
3178/* function: api_methods_building_type_is_wonder */
3180{
3181#ifndef TOLUA_RELEASE
3183 if (
3184 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3186 )
3187 goto tolua_lerror;
3188 else
3189#endif
3190 {
3191 lua_State* L = tolua_S;
3193 {
3196 }
3197 }
3198 return 1;
3199#ifndef TOLUA_RELEASE
3201 tolua_error(tolua_S,"#ferror in function 'is_wonder'.",&tolua_err);
3202 return 0;
3203#endif
3204}
3205
3206/* function: api_methods_building_type_is_great_wonder */
3208{
3209#ifndef TOLUA_RELEASE
3211 if (
3212 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3214 )
3215 goto tolua_lerror;
3216 else
3217#endif
3218 {
3219 lua_State* L = tolua_S;
3221 {
3224 }
3225 }
3226 return 1;
3227#ifndef TOLUA_RELEASE
3229 tolua_error(tolua_S,"#ferror in function 'is_great_wonder'.",&tolua_err);
3230 return 0;
3231#endif
3232}
3233
3234/* function: api_methods_building_type_is_small_wonder */
3236{
3237#ifndef TOLUA_RELEASE
3239 if (
3240 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3242 )
3243 goto tolua_lerror;
3244 else
3245#endif
3246 {
3247 lua_State* L = tolua_S;
3249 {
3252 }
3253 }
3254 return 1;
3255#ifndef TOLUA_RELEASE
3257 tolua_error(tolua_S,"#ferror in function 'is_small_wonder'.",&tolua_err);
3258 return 0;
3259#endif
3260}
3261
3262/* function: api_methods_building_type_is_improvement */
3264{
3265#ifndef TOLUA_RELEASE
3267 if (
3268 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3270 )
3271 goto tolua_lerror;
3272 else
3273#endif
3274 {
3275 lua_State* L = tolua_S;
3277 {
3280 }
3281 }
3282 return 1;
3283#ifndef TOLUA_RELEASE
3285 tolua_error(tolua_S,"#ferror in function 'is_improvement'.",&tolua_err);
3286 return 0;
3287#endif
3288}
3289
3290/* function: api_methods_building_type_rule_name */
3292{
3293#ifndef TOLUA_RELEASE
3295 if (
3296 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3298 )
3299 goto tolua_lerror;
3300 else
3301#endif
3302 {
3303 lua_State* L = tolua_S;
3305 {
3306 const char* tolua_ret = (const char*) api_methods_building_type_rule_name(L,self);
3307 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3308 }
3309 }
3310 return 1;
3311#ifndef TOLUA_RELEASE
3313 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3314 return 0;
3315#endif
3316}
3317
3318/* function: api_methods_building_type_name_translation */
3320{
3321#ifndef TOLUA_RELEASE
3323 if (
3324 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3326 )
3327 goto tolua_lerror;
3328 else
3329#endif
3330 {
3331 lua_State* L = tolua_S;
3333 {
3334 const char* tolua_ret = (const char*) api_methods_building_type_name_translation(L,self);
3335 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3336 }
3337 }
3338 return 1;
3339#ifndef TOLUA_RELEASE
3341 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3342 return 0;
3343#endif
3344}
3345
3346/* function: api_methods_unit_type_has_flag */
3348{
3349#ifndef TOLUA_RELEASE
3351 if (
3352 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3355 )
3356 goto tolua_lerror;
3357 else
3358#endif
3359 {
3360 lua_State* L = tolua_S;
3362 const char* flag = ((const char*) tolua_tostring(tolua_S,2,0));
3363 {
3366 }
3367 }
3368 return 1;
3369#ifndef TOLUA_RELEASE
3371 tolua_error(tolua_S,"#ferror in function 'has_flag'.",&tolua_err);
3372 return 0;
3373#endif
3374}
3375
3376/* function: api_methods_unit_type_has_role */
3378{
3379#ifndef TOLUA_RELEASE
3381 if (
3382 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3385 )
3386 goto tolua_lerror;
3387 else
3388#endif
3389 {
3390 lua_State* L = tolua_S;
3392 const char* role = ((const char*) tolua_tostring(tolua_S,2,0));
3393 {
3396 }
3397 }
3398 return 1;
3399#ifndef TOLUA_RELEASE
3401 tolua_error(tolua_S,"#ferror in function 'has_role'.",&tolua_err);
3402 return 0;
3403#endif
3404}
3405
3406/* function: api_methods_unit_type_rule_name */
3408{
3409#ifndef TOLUA_RELEASE
3411 if (
3412 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3414 )
3415 goto tolua_lerror;
3416 else
3417#endif
3418 {
3419 lua_State* L = tolua_S;
3421 {
3422 const char* tolua_ret = (const char*) api_methods_unit_type_rule_name(L,self);
3423 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3424 }
3425 }
3426 return 1;
3427#ifndef TOLUA_RELEASE
3429 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3430 return 0;
3431#endif
3432}
3433
3434/* function: api_methods_unit_type_name_translation */
3436{
3437#ifndef TOLUA_RELEASE
3439 if (
3440 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3442 )
3443 goto tolua_lerror;
3444 else
3445#endif
3446 {
3447 lua_State* L = tolua_S;
3449 {
3450 const char* tolua_ret = (const char*) api_methods_unit_type_name_translation(L,self);
3451 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3452 }
3453 }
3454 return 1;
3455#ifndef TOLUA_RELEASE
3457 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3458 return 0;
3459#endif
3460}
3461
3462/* function: api_methods_unit_type_can_exist_at_tile */
3464{
3465#ifndef TOLUA_RELEASE
3467 if (
3468 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3469 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
3471 )
3472 goto tolua_lerror;
3473 else
3474#endif
3475 {
3476 lua_State* L = tolua_S;
3478 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
3479 {
3482 }
3483 }
3484 return 1;
3485#ifndef TOLUA_RELEASE
3487 tolua_error(tolua_S,"#ferror in function 'can_exist_at_tile'.",&tolua_err);
3488 return 0;
3489#endif
3490}
3491
3492/* function: api_methods_tech_type_rule_name */
3494{
3495#ifndef TOLUA_RELEASE
3497 if (
3498 !tolua_isusertype(tolua_S,1,"Tech_Type",0,&tolua_err) ||
3500 )
3501 goto tolua_lerror;
3502 else
3503#endif
3504 {
3505 lua_State* L = tolua_S;
3507 {
3508 const char* tolua_ret = (const char*) api_methods_tech_type_rule_name(L,self);
3509 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3510 }
3511 }
3512 return 1;
3513#ifndef TOLUA_RELEASE
3515 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3516 return 0;
3517#endif
3518}
3519
3520/* function: api_methods_tech_type_name_translation */
3522{
3523#ifndef TOLUA_RELEASE
3525 if (
3526 !tolua_isusertype(tolua_S,1,"Tech_Type",0,&tolua_err) ||
3528 )
3529 goto tolua_lerror;
3530 else
3531#endif
3532 {
3533 lua_State* L = tolua_S;
3535 {
3536 const char* tolua_ret = (const char*) api_methods_tech_type_name_translation(L,self);
3537 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3538 }
3539 }
3540 return 1;
3541#ifndef TOLUA_RELEASE
3543 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3544 return 0;
3545#endif
3546}
3547
3548/* function: api_methods_terrain_rule_name */
3550{
3551#ifndef TOLUA_RELEASE
3553 if (
3554 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3556 )
3557 goto tolua_lerror;
3558 else
3559#endif
3560 {
3561 lua_State* L = tolua_S;
3563 {
3564 const char* tolua_ret = (const char*) api_methods_terrain_rule_name(L,self);
3565 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3566 }
3567 }
3568 return 1;
3569#ifndef TOLUA_RELEASE
3571 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3572 return 0;
3573#endif
3574}
3575
3576/* function: api_methods_terrain_name_translation */
3578{
3579#ifndef TOLUA_RELEASE
3581 if (
3582 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3584 )
3585 goto tolua_lerror;
3586 else
3587#endif
3588 {
3589 lua_State* L = tolua_S;
3591 {
3592 const char* tolua_ret = (const char*) api_methods_terrain_name_translation(L,self);
3593 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3594 }
3595 }
3596 return 1;
3597#ifndef TOLUA_RELEASE
3599 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3600 return 0;
3601#endif
3602}
3603
3604/* function: api_methods_terrain_class_name */
3606{
3607#ifndef TOLUA_RELEASE
3609 if (
3610 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3612 )
3613 goto tolua_lerror;
3614 else
3615#endif
3616 {
3617 lua_State* L = tolua_S;
3619 {
3620 const char* tolua_ret = (const char*) api_methods_terrain_class_name(L,self);
3621 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3622 }
3623 }
3624 return 1;
3625#ifndef TOLUA_RELEASE
3627 tolua_error(tolua_S,"#ferror in function 'class_name'.",&tolua_err);
3628 return 0;
3629#endif
3630}
3631
3632/* function: api_methods_disaster_rule_name */
3634{
3635#ifndef TOLUA_RELEASE
3637 if (
3638 !tolua_isusertype(tolua_S,1,"Disaster",0,&tolua_err) ||
3640 )
3641 goto tolua_lerror;
3642 else
3643#endif
3644 {
3645 lua_State* L = tolua_S;
3647 {
3648 const char* tolua_ret = (const char*) api_methods_disaster_rule_name(L,self);
3649 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3650 }
3651 }
3652 return 1;
3653#ifndef TOLUA_RELEASE
3655 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3656 return 0;
3657#endif
3658}
3659
3660/* function: api_methods_disaster_name_translation */
3662{
3663#ifndef TOLUA_RELEASE
3665 if (
3666 !tolua_isusertype(tolua_S,1,"Disaster",0,&tolua_err) ||
3668 )
3669 goto tolua_lerror;
3670 else
3671#endif
3672 {
3673 lua_State* L = tolua_S;
3675 {
3676 const char* tolua_ret = (const char*) api_methods_disaster_name_translation(L,self);
3677 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3678 }
3679 }
3680 return 1;
3681#ifndef TOLUA_RELEASE
3683 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3684 return 0;
3685#endif
3686}
3687
3688/* function: api_methods_achievement_rule_name */
3690{
3691#ifndef TOLUA_RELEASE
3693 if (
3694 !tolua_isusertype(tolua_S,1,"Achievement",0,&tolua_err) ||
3696 )
3697 goto tolua_lerror;
3698 else
3699#endif
3700 {
3701 lua_State* L = tolua_S;
3703 {
3704 const char* tolua_ret = (const char*) api_methods_achievement_rule_name(L,self);
3705 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3706 }
3707 }
3708 return 1;
3709#ifndef TOLUA_RELEASE
3711 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3712 return 0;
3713#endif
3714}
3715
3716/* function: api_methods_achievement_name_translation */
3718{
3719#ifndef TOLUA_RELEASE
3721 if (
3722 !tolua_isusertype(tolua_S,1,"Achievement",0,&tolua_err) ||
3724 )
3725 goto tolua_lerror;
3726 else
3727#endif
3728 {
3729 lua_State* L = tolua_S;
3731 {
3732 const char* tolua_ret = (const char*) api_methods_achievement_name_translation(L,self);
3733 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3734 }
3735 }
3736 return 1;
3737#ifndef TOLUA_RELEASE
3739 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3740 return 0;
3741#endif
3742}
3743
3744/* function: api_methods_action_rule_name */
3746{
3747#ifndef TOLUA_RELEASE
3749 if (
3750 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3752 )
3753 goto tolua_lerror;
3754 else
3755#endif
3756 {
3757 lua_State* L = tolua_S;
3759 {
3760 const char* tolua_ret = (const char*) api_methods_action_rule_name(L,self);
3761 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3762 }
3763 }
3764 return 1;
3765#ifndef TOLUA_RELEASE
3767 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3768 return 0;
3769#endif
3770}
3771
3772/* function: api_methods_action_name_translation */
3774{
3775#ifndef TOLUA_RELEASE
3777 if (
3778 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3780 )
3781 goto tolua_lerror;
3782 else
3783#endif
3784 {
3785 lua_State* L = tolua_S;
3787 {
3788 const char* tolua_ret = (const char*) api_methods_action_name_translation(L,self);
3789 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3790 }
3791 }
3792 return 1;
3793#ifndef TOLUA_RELEASE
3795 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3796 return 0;
3797#endif
3798}
3799
3800/* function: api_methods_action_target_kind */
3802{
3803#ifndef TOLUA_RELEASE
3805 if (
3806 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3808 )
3809 goto tolua_lerror;
3810 else
3811#endif
3812 {
3813 lua_State* L = tolua_S;
3815 {
3816 const char* tolua_ret = (const char*) api_methods_action_target_kind(L,self);
3817 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3818 }
3819 }
3820 return 1;
3821#ifndef TOLUA_RELEASE
3823 tolua_error(tolua_S,"#ferror in function 'target_kind'.",&tolua_err);
3824 return 0;
3825#endif
3826}
3827
3828/* function: api_methods_unit_list_link_data */
3830{
3831#ifndef TOLUA_RELEASE
3833 if (
3834 !tolua_isusertype(tolua_S,1,"Unit_List_Link",0,&tolua_err) ||
3836 )
3837 goto tolua_lerror;
3838 else
3839#endif
3840 {
3841 lua_State* L = tolua_S;
3843 {
3845 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
3846 }
3847 }
3848 return 1;
3849#ifndef TOLUA_RELEASE
3851 tolua_error(tolua_S,"#ferror in function 'data'.",&tolua_err);
3852 return 0;
3853#endif
3854}
3855
3856/* function: api_methods_unit_list_next_link */
3858{
3859#ifndef TOLUA_RELEASE
3861 if (
3862 !tolua_isusertype(tolua_S,1,"Unit_List_Link",0,&tolua_err) ||
3864 )
3865 goto tolua_lerror;
3866 else
3867#endif
3868 {
3869 lua_State* L = tolua_S;
3871 {
3873 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
3874 }
3875 }
3876 return 1;
3877#ifndef TOLUA_RELEASE
3879 tolua_error(tolua_S,"#ferror in function 'next'.",&tolua_err);
3880 return 0;
3881#endif
3882}
3883
3884/* function: api_methods_city_list_link_data */
3886{
3887#ifndef TOLUA_RELEASE
3889 if (
3890 !tolua_isusertype(tolua_S,1,"City_List_Link",0,&tolua_err) ||
3892 )
3893 goto tolua_lerror;
3894 else
3895#endif
3896 {
3897 lua_State* L = tolua_S;
3899 {
3901 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
3902 }
3903 }
3904 return 1;
3905#ifndef TOLUA_RELEASE
3907 tolua_error(tolua_S,"#ferror in function 'data'.",&tolua_err);
3908 return 0;
3909#endif
3910}
3911
3912/* function: api_methods_city_list_next_link */
3914{
3915#ifndef TOLUA_RELEASE
3917 if (
3918 !tolua_isusertype(tolua_S,1,"City_List_Link",0,&tolua_err) ||
3920 )
3921 goto tolua_lerror;
3922 else
3923#endif
3924 {
3925 lua_State* L = tolua_S;
3927 {
3929 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City_List_Link");
3930 }
3931 }
3932 return 1;
3933#ifndef TOLUA_RELEASE
3935 tolua_error(tolua_S,"#ferror in function 'next'.",&tolua_err);
3936 return 0;
3937#endif
3938}
3939
3940/* function: api_find_counter_by_name */
3942{
3943#ifndef TOLUA_RELEASE
3945 if (
3948 )
3949 goto tolua_lerror;
3950 else
3951#endif
3952 {
3953 lua_State* L = tolua_S;
3954 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
3955 {
3957 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Counter");
3958 }
3959 }
3960 return 1;
3961#ifndef TOLUA_RELEASE
3963 tolua_error(tolua_S,"#ferror in function 'counter'.",&tolua_err);
3964 return 0;
3965#endif
3966}
3967
3968/* function: api_find_counter */
3970{
3972 if (
3975 )
3976 goto tolua_lerror;
3977 else
3978 {
3979 lua_State* L = tolua_S;
3980 int counter_id = ((int) tolua_tonumber(tolua_S,1,0));
3981 {
3983 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Counter");
3984 }
3985 }
3986 return 1;
3989}
3990
3991/* function: api_find_player_by_name */
3993{
3994#ifndef TOLUA_RELEASE
3996 if (
3999 )
4000 goto tolua_lerror;
4001 else
4002#endif
4003 {
4004 lua_State* L = tolua_S;
4005 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
4006 {
4008 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
4009 }
4010 }
4011 return 1;
4012#ifndef TOLUA_RELEASE
4014 tolua_error(tolua_S,"#ferror in function 'player'.",&tolua_err);
4015 return 0;
4016#endif
4017}
4018
4019/* function: api_find_player */
4021{
4023 if (
4026 )
4027 goto tolua_lerror;
4028 else
4029 {
4030 lua_State* L = tolua_S;
4031 int player_id = ((int) tolua_tonumber(tolua_S,1,0));
4032 {
4033 Player* tolua_ret = (Player*) api_find_player(L,player_id);
4034 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
4035 }
4036 }
4037 return 1;
4040}
4041
4042/* function: api_find_city */
4044{
4045#ifndef TOLUA_RELEASE
4047 if (
4048 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4051 )
4052 goto tolua_lerror;
4053 else
4054#endif
4055 {
4056 lua_State* L = tolua_S;
4057 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4058 int city_id = ((int) tolua_tonumber(tolua_S,2,0));
4059 {
4060 City* tolua_ret = (City*) api_find_city(L,pplayer,city_id);
4061 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
4062 }
4063 }
4064 return 1;
4065#ifndef TOLUA_RELEASE
4067 tolua_error(tolua_S,"#ferror in function 'city'.",&tolua_err);
4068 return 0;
4069#endif
4070}
4071
4072/* function: api_find_unit */
4074{
4075#ifndef TOLUA_RELEASE
4077 if (
4078 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4081 )
4082 goto tolua_lerror;
4083 else
4084#endif
4085 {
4086 lua_State* L = tolua_S;
4087 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4088 int unit_id = ((int) tolua_tonumber(tolua_S,2,0));
4089 {
4090 Unit* tolua_ret = (Unit*) api_find_unit(L,pplayer,unit_id);
4091 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
4092 }
4093 }
4094 return 1;
4095#ifndef TOLUA_RELEASE
4097 tolua_error(tolua_S,"#ferror in function 'unit'.",&tolua_err);
4098 return 0;
4099#endif
4100}
4101
4102/* function: api_find_transport_unit */
4104{
4105#ifndef TOLUA_RELEASE
4107 if (
4108 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4109 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
4110 !tolua_isusertype(tolua_S,3,"Tile",0,&tolua_err) ||
4112 )
4113 goto tolua_lerror;
4114 else
4115#endif
4116 {
4117 lua_State* L = tolua_S;
4118 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4120 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,3,0));
4121 {
4122 Unit* tolua_ret = (Unit*) api_find_transport_unit(L,pplayer,ptype,ptile);
4123 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
4124 }
4125 }
4126 return 1;
4127#ifndef TOLUA_RELEASE
4129 tolua_error(tolua_S,"#ferror in function 'transport_unit'.",&tolua_err);
4130 return 0;
4131#endif
4132}
4133
4134/* function: api_find_tile */
4136{
4137#ifndef TOLUA_RELEASE
4139 if (
4143 )
4144 goto tolua_lerror;
4145 else
4146#endif
4147 {
4148 lua_State* L = tolua_S;
4149 int nat_x = ((int) tolua_tonumber(tolua_S,1,0));
4150 int nat_y = ((int) tolua_tonumber(tolua_S,2,0));
4151 {
4153 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
4154 }
4155 }
4156 return 1;
4157#ifndef TOLUA_RELEASE
4159 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
4160 return 0;
4161#endif
4162}
4163
4164/* function: api_find_tile_by_index */
4166{
4168 if (
4171 )
4172 goto tolua_lerror;
4173 else
4174 {
4175 lua_State* L = tolua_S;
4176 int tindex = ((int) tolua_tonumber(tolua_S,1,0));
4177 {
4179 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
4180 }
4181 }
4182 return 1;
4185}
4186
4187/* function: api_find_government_by_name */
4189{
4190#ifndef TOLUA_RELEASE
4192 if (
4195 )
4196 goto tolua_lerror;
4197 else
4198#endif
4199 {
4200 lua_State* L = tolua_S;
4201 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4202 {
4204 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Government");
4205 }
4206 }
4207 return 1;
4208#ifndef TOLUA_RELEASE
4210 tolua_error(tolua_S,"#ferror in function 'government'.",&tolua_err);
4211 return 0;
4212#endif
4213}
4214
4215/* function: api_find_government */
4217{
4219 if (
4222 )
4223 goto tolua_lerror;
4224 else
4225 {
4226 lua_State* L = tolua_S;
4227 int government_id = ((int) tolua_tonumber(tolua_S,1,0));
4228 {
4230 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Government");
4231 }
4232 }
4233 return 1;
4236}
4237
4238/* function: api_find_nation_type_by_name */
4240{
4241#ifndef TOLUA_RELEASE
4243 if (
4246 )
4247 goto tolua_lerror;
4248 else
4249#endif
4250 {
4251 lua_State* L = tolua_S;
4252 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4253 {
4255 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nation_Type");
4256 }
4257 }
4258 return 1;
4259#ifndef TOLUA_RELEASE
4261 tolua_error(tolua_S,"#ferror in function 'nation_type'.",&tolua_err);
4262 return 0;
4263#endif
4264}
4265
4266/* function: api_find_nation_type */
4268{
4270 if (
4273 )
4274 goto tolua_lerror;
4275 else
4276 {
4277 lua_State* L = tolua_S;
4279 {
4281 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nation_Type");
4282 }
4283 }
4284 return 1;
4287}
4288
4289/* function: api_find_action_by_name */
4291{
4292#ifndef TOLUA_RELEASE
4294 if (
4297 )
4298 goto tolua_lerror;
4299 else
4300#endif
4301 {
4302 lua_State* L = tolua_S;
4303 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4304 {
4306 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4307 }
4308 }
4309 return 1;
4310#ifndef TOLUA_RELEASE
4312 tolua_error(tolua_S,"#ferror in function 'action'.",&tolua_err);
4313 return 0;
4314#endif
4315}
4316
4317/* function: api_find_action */
4319{
4321 if (
4324 )
4325 goto tolua_lerror;
4326 else
4327 {
4328 lua_State* L = tolua_S;
4330 {
4332 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4333 }
4334 }
4335 return 1;
4338}
4339
4340/* function: api_find_building_type_by_name */
4342{
4343#ifndef TOLUA_RELEASE
4345 if (
4348 )
4349 goto tolua_lerror;
4350 else
4351#endif
4352 {
4353 lua_State* L = tolua_S;
4354 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4355 {
4357 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Building_Type");
4358 }
4359 }
4360 return 1;
4361#ifndef TOLUA_RELEASE
4363 tolua_error(tolua_S,"#ferror in function 'building_type'.",&tolua_err);
4364 return 0;
4365#endif
4366}
4367
4368/* function: api_find_building_type */
4370{
4372 if (
4375 )
4376 goto tolua_lerror;
4377 else
4378 {
4379 lua_State* L = tolua_S;
4381 {
4383 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Building_Type");
4384 }
4385 }
4386 return 1;
4389}
4390
4391/* function: api_find_unit_type_by_name */
4393{
4394#ifndef TOLUA_RELEASE
4396 if (
4399 )
4400 goto tolua_lerror;
4401 else
4402#endif
4403 {
4404 lua_State* L = tolua_S;
4405 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4406 {
4408 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4409 }
4410 }
4411 return 1;
4412#ifndef TOLUA_RELEASE
4414 tolua_error(tolua_S,"#ferror in function 'unit_type'.",&tolua_err);
4415 return 0;
4416#endif
4417}
4418
4419/* function: api_find_unit_type */
4421{
4423 if (
4426 )
4427 goto tolua_lerror;
4428 else
4429 {
4430 lua_State* L = tolua_S;
4431 int unit_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4432 {
4434 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4435 }
4436 }
4437 return 1;
4440}
4441
4442/* function: api_find_role_unit_type */
4444{
4445#ifndef TOLUA_RELEASE
4447 if (
4449 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
4451 )
4452 goto tolua_lerror;
4453 else
4454#endif
4455 {
4456 lua_State* L = tolua_S;
4457 const char* role_name = ((const char*) tolua_tostring(tolua_S,1,0));
4458 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
4459 {
4461 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4462 }
4463 }
4464 return 1;
4465#ifndef TOLUA_RELEASE
4467 tolua_error(tolua_S,"#ferror in function 'role_unit_type'.",&tolua_err);
4468 return 0;
4469#endif
4470}
4471
4472/* function: api_find_tech_type_by_name */
4474{
4475#ifndef TOLUA_RELEASE
4477 if (
4480 )
4481 goto tolua_lerror;
4482 else
4483#endif
4484 {
4485 lua_State* L = tolua_S;
4486 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4487 {
4489 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
4490 }
4491 }
4492 return 1;
4493#ifndef TOLUA_RELEASE
4495 tolua_error(tolua_S,"#ferror in function 'tech_type'.",&tolua_err);
4496 return 0;
4497#endif
4498}
4499
4500/* function: api_find_tech_type */
4502{
4504 if (
4507 )
4508 goto tolua_lerror;
4509 else
4510 {
4511 lua_State* L = tolua_S;
4512 int tech_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4513 {
4515 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
4516 }
4517 }
4518 return 1;
4521}
4522
4523/* function: api_find_terrain_by_name */
4525{
4526#ifndef TOLUA_RELEASE
4528 if (
4531 )
4532 goto tolua_lerror;
4533 else
4534#endif
4535 {
4536 lua_State* L = tolua_S;
4537 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4538 {
4540 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Terrain");
4541 }
4542 }
4543 return 1;
4544#ifndef TOLUA_RELEASE
4546 tolua_error(tolua_S,"#ferror in function 'terrain'.",&tolua_err);
4547 return 0;
4548#endif
4549}
4550
4551/* function: api_find_terrain */
4553{
4555 if (
4558 )
4559 goto tolua_lerror;
4560 else
4561 {
4562 lua_State* L = tolua_S;
4563 int terrain_id = ((int) tolua_tonumber(tolua_S,1,0));
4564 {
4566 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Terrain");
4567 }
4568 }
4569 return 1;
4572}
4573
4574/* function: api_find_achievement_by_name */
4576{
4577#ifndef TOLUA_RELEASE
4579 if (
4582 )
4583 goto tolua_lerror;
4584 else
4585#endif
4586 {
4587 lua_State* L = tolua_S;
4588 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4589 {
4591 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Achievement");
4592 }
4593 }
4594 return 1;
4595#ifndef TOLUA_RELEASE
4597 tolua_error(tolua_S,"#ferror in function 'achievement'.",&tolua_err);
4598 return 0;
4599#endif
4600}
4601
4602/* function: api_find_achievement */
4604{
4606 if (
4609 )
4610 goto tolua_lerror;
4611 else
4612 {
4613 lua_State* L = tolua_S;
4615 {
4617 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Achievement");
4618 }
4619 }
4620 return 1;
4623}
4624
4625/* function: api_find_disaster_by_name */
4627{
4629 if (
4632 )
4633 goto tolua_lerror;
4634 else
4635 {
4636 lua_State* L = tolua_S;
4637 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4638 {
4640 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Disaster");
4641 }
4642 }
4643 return 1;
4646}
4647
4648/* function: api_find_disaster */
4650{
4651#ifndef TOLUA_RELEASE
4653 if (
4656 )
4657 goto tolua_lerror;
4658 else
4659#endif
4660 {
4661 lua_State* L = tolua_S;
4662 int disaster_id = ((int) tolua_tonumber(tolua_S,1,0));
4663 {
4665 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Disaster");
4666 }
4667 }
4668 return 1;
4669#ifndef TOLUA_RELEASE
4671 tolua_error(tolua_S,"#ferror in function 'disaster'.",&tolua_err);
4672 return 0;
4673#endif
4674}
4675
4676/* function: api_utilities_str2dir */
4678{
4679#ifndef TOLUA_RELEASE
4681 if (
4684 )
4685 goto tolua_lerror;
4686 else
4687#endif
4688 {
4689 lua_State* L = tolua_S;
4690 const char* str = ((const char*) tolua_tostring(tolua_S,1,0));
4691 {
4693 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
4694 }
4695 }
4696 return 1;
4697#ifndef TOLUA_RELEASE
4699 tolua_error(tolua_S,"#ferror in function 'direction'.",&tolua_err);
4700 return 0;
4701#endif
4702}
4703
4704/* function: api_find_direction */
4706{
4708 if (
4711 )
4712 goto tolua_lerror;
4713 else
4714 {
4715 lua_State* L = tolua_S;
4716 int id = ((int) tolua_tonumber(tolua_S,1,0));
4717 {
4719 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
4720 }
4721 }
4722 return 1;
4725}
4726
4727/* function: api_find_action_type_by_name */
4729{
4731 if (
4734 )
4735 goto tolua_lerror;
4736 else
4737 {
4738 lua_State* L = tolua_S;
4739 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
4740 {
4742 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4743 }
4744 }
4745 return 1;
4748}
4749
4750/* function: api_find_action_type_by_id */
4752{
4754 if (
4757 )
4758 goto tolua_lerror;
4759 else
4760 {
4761 lua_State* L = tolua_S;
4762 int id = ((int) tolua_tonumber(tolua_S,1,0));
4763 {
4765 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4766 }
4767 }
4768 return 1;
4771}
4772
4773/* function: api_find_nonexistent */
4775{
4776#ifndef TOLUA_RELEASE
4778 if (
4780 )
4781 goto tolua_lerror;
4782 else
4783#endif
4784 {
4785 lua_State* L = tolua_S;
4786 {
4788 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nonexistent");
4789 }
4790 }
4791 return 1;
4792#ifndef TOLUA_RELEASE
4794 tolua_error(tolua_S,"#ferror in function 'nonexistent'.",&tolua_err);
4795 return 0;
4796#endif
4797}
4798
4799/* function: api_effects_world_bonus */
4801{
4802#ifndef TOLUA_RELEASE
4804 if (
4807 )
4808 goto tolua_lerror;
4809 else
4810#endif
4811 {
4812 lua_State* L = tolua_S;
4813 const char* effect_type = ((const char*) tolua_tostring(tolua_S,1,0));
4814 {
4815 int tolua_ret = (int) api_effects_world_bonus(L,effect_type);
4817 }
4818 }
4819 return 1;
4820#ifndef TOLUA_RELEASE
4822 tolua_error(tolua_S,"#ferror in function 'world_bonus'.",&tolua_err);
4823 return 0;
4824#endif
4825}
4826
4827/* function: api_effects_player_bonus */
4829{
4830#ifndef TOLUA_RELEASE
4832 if (
4833 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4836 )
4837 goto tolua_lerror;
4838 else
4839#endif
4840 {
4841 lua_State* L = tolua_S;
4842 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4843 const char* effect_type = ((const char*) tolua_tostring(tolua_S,2,0));
4844 {
4845 int tolua_ret = (int) api_effects_player_bonus(L,pplayer,effect_type);
4847 }
4848 }
4849 return 1;
4850#ifndef TOLUA_RELEASE
4852 tolua_error(tolua_S,"#ferror in function 'player_bonus'.",&tolua_err);
4853 return 0;
4854#endif
4855}
4856
4857/* function: api_effects_city_bonus */
4859{
4860#ifndef TOLUA_RELEASE
4862 if (
4863 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
4866 )
4867 goto tolua_lerror;
4868 else
4869#endif
4870 {
4871 lua_State* L = tolua_S;
4872 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
4873 const char* effect_type = ((const char*) tolua_tostring(tolua_S,2,0));
4874 {
4875 int tolua_ret = (int) api_effects_city_bonus(L,pcity,effect_type);
4877 }
4878 }
4879 return 1;
4880#ifndef TOLUA_RELEASE
4882 tolua_error(tolua_S,"#ferror in function 'city_bonus'.",&tolua_err);
4883 return 0;
4884#endif
4885}
4886
4887/* function: api_effects_unit_bonus */
4889{
4890#ifndef TOLUA_RELEASE
4892 if (
4893 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
4894 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
4897 )
4898 goto tolua_lerror;
4899 else
4900#endif
4901 {
4902 lua_State* L = tolua_S;
4903 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
4904 Player* other_player = ((Player*) tolua_tousertype(tolua_S,2,0));
4905 const char* effect_type = ((const char*) tolua_tostring(tolua_S,3,0));
4906 {
4907 int tolua_ret = (int) api_effects_unit_bonus(L,punit,other_player,effect_type);
4909 }
4910 }
4911 return 1;
4912#ifndef TOLUA_RELEASE
4914 tolua_error(tolua_S,"#ferror in function 'unit_bonus'.",&tolua_err);
4915 return 0;
4916#endif
4917}
4918
4919/* function: api_effects_tile_bonus */
4921{
4922#ifndef TOLUA_RELEASE
4924 if (
4925 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
4926 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
4930 )
4931 goto tolua_lerror;
4932 else
4933#endif
4934 {
4935 lua_State* L = tolua_S;
4936 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
4937 City* pcity = ((City*) tolua_tousertype(tolua_S,2,0));
4938 const char* output_id = ((const char*) tolua_tostring(tolua_S,3,0));
4939 const char* effect_type = ((const char*) tolua_tostring(tolua_S,4,0));
4940 {
4941 int tolua_ret = (int) api_effects_tile_bonus(L,ptile,pcity,output_id,effect_type);
4943 }
4944 }
4945 return 1;
4946#ifndef TOLUA_RELEASE
4948 tolua_error(tolua_S,"#ferror in function 'tile_bonus'.",&tolua_err);
4949 return 0;
4950#endif
4951}
4952
4953/* function: api_effects_unit_vs_tile_bonus */
4955{
4956#ifndef TOLUA_RELEASE
4958 if (
4959 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
4960 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
4963 )
4964 goto tolua_lerror;
4965 else
4966#endif
4967 {
4968 lua_State* L = tolua_S;
4969 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
4970 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
4971 const char* effect_type = ((const char*) tolua_tostring(tolua_S,3,0));
4972 {
4973 int tolua_ret = (int) api_effects_unit_vs_tile_bonus(L,punit,ptile,effect_type);
4975 }
4976 }
4977 return 1;
4978#ifndef TOLUA_RELEASE
4980 tolua_error(tolua_S,"#ferror in function 'unit_vs_tile_bonus'.",&tolua_err);
4981 return 0;
4982#endif
4983}
4984
4985/* function: api_utilities_direction_id */
4987{
4988#ifndef TOLUA_RELEASE
4990 if (
4991 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
4993 )
4994 goto tolua_lerror;
4995 else
4996#endif
4997 {
4998 lua_State* L = tolua_S;
5000 {
5003 }
5004 }
5005 return 1;
5006#ifndef TOLUA_RELEASE
5008 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
5009 return 0;
5010#endif
5011}
5012
5013/* function: api_utilities_dir2str */
5015{
5016#ifndef TOLUA_RELEASE
5018 if (
5019 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5021 )
5022 goto tolua_lerror;
5023 else
5024#endif
5025 {
5026 lua_State* L = tolua_S;
5028 {
5029 const char* tolua_ret = (const char*) api_utilities_dir2str(L,dir);
5030 tolua_pushstring(tolua_S,(const char*)tolua_ret);
5031 }
5032 }
5033 return 1;
5034#ifndef TOLUA_RELEASE
5036 tolua_error(tolua_S,"#ferror in function 'name'.",&tolua_err);
5037 return 0;
5038#endif
5039}
5040
5041/* function: api_utilities_direction_is_cardinal */
5043{
5044#ifndef TOLUA_RELEASE
5046 if (
5047 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5049 )
5050 goto tolua_lerror;
5051 else
5052#endif
5053 {
5054 lua_State* L = tolua_S;
5056 {
5059 }
5060 }
5061 return 1;
5062#ifndef TOLUA_RELEASE
5064 tolua_error(tolua_S,"#ferror in function 'cardinal'.",&tolua_err);
5065 return 0;
5066#endif
5067}
5068
5069/* function: api_utilities_str2dir */
5071{
5072#ifndef TOLUA_RELEASE
5074 if (
5077 )
5078 goto tolua_lerror;
5079 else
5080#endif
5081 {
5082 lua_State* L = tolua_S;
5083 const char* str = ((const char*) tolua_tostring(tolua_S,1,0));
5084 {
5086 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5087 }
5088 }
5089 return 1;
5090#ifndef TOLUA_RELEASE
5092 tolua_error(tolua_S,"#ferror in function 'str2dir'.",&tolua_err);
5093 return 0;
5094#endif
5095}
5096
5097/* function: api_utilities_dir_ccw */
5099{
5100#ifndef TOLUA_RELEASE
5102 if (
5103 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5105 )
5106 goto tolua_lerror;
5107 else
5108#endif
5109 {
5110 lua_State* L = tolua_S;
5112 {
5114 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5115 }
5116 }
5117 return 1;
5118#ifndef TOLUA_RELEASE
5120 tolua_error(tolua_S,"#ferror in function 'next_ccw'.",&tolua_err);
5121 return 0;
5122#endif
5123}
5124
5125/* function: api_utilities_dir_cw */
5127{
5128#ifndef TOLUA_RELEASE
5130 if (
5131 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5133 )
5134 goto tolua_lerror;
5135 else
5136#endif
5137 {
5138 lua_State* L = tolua_S;
5140 {
5142 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5143 }
5144 }
5145 return 1;
5146#ifndef TOLUA_RELEASE
5148 tolua_error(tolua_S,"#ferror in function 'next_cw'.",&tolua_err);
5149 return 0;
5150#endif
5151}
5152
5153/* function: api_utilities_opposite_dir */
5155{
5156#ifndef TOLUA_RELEASE
5158 if (
5159 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5161 )
5162 goto tolua_lerror;
5163 else
5164#endif
5165 {
5166 lua_State* L = tolua_S;
5168 {
5170 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5171 }
5172 }
5173 return 1;
5174#ifndef TOLUA_RELEASE
5176 tolua_error(tolua_S,"#ferror in function 'opposite'.",&tolua_err);
5177 return 0;
5178#endif
5179}
5180
5181/* Open lib function */
5183{
5188 tolua_cclass(tolua_S,"Player","Player","",NULL);
5189 tolua_beginmodule(tolua_S,"Player");
5195 tolua_cclass(tolua_S,"City","City","",NULL);
5196 tolua_beginmodule(tolua_S,"City");
5202 tolua_cclass(tolua_S,"Counter","Counter","",NULL);
5203 tolua_beginmodule(tolua_S,"Counter");
5205 tolua_cclass(tolua_S,"Connection","Connection","",NULL);
5206 tolua_beginmodule(tolua_S,"Connection");
5209 tolua_cclass(tolua_S,"Unit","Unit","",NULL);
5210 tolua_beginmodule(tolua_S,"Unit");
5217 tolua_cclass(tolua_S,"Tile","Tile","",NULL);
5218 tolua_beginmodule(tolua_S,"Tile");
5223 tolua_cclass(tolua_S,"Government","Government","",NULL);
5224 tolua_beginmodule(tolua_S,"Government");
5227 tolua_cclass(tolua_S,"Nation_Type","Nation_Type","",NULL);
5228 tolua_beginmodule(tolua_S,"Nation_Type");
5231 tolua_cclass(tolua_S,"Building_Type","Building_Type","",NULL);
5232 tolua_beginmodule(tolua_S,"Building_Type");
5236 tolua_cclass(tolua_S,"Unit_Type","Unit_Type","",NULL);
5237 tolua_beginmodule(tolua_S,"Unit_Type");
5242 tolua_cclass(tolua_S,"Tech_Type","Tech_Type","",NULL);
5243 tolua_beginmodule(tolua_S,"Tech_Type");
5247 tolua_cclass(tolua_S,"Terrain","Terrain","",NULL);
5248 tolua_beginmodule(tolua_S,"Terrain");
5251 tolua_cclass(tolua_S,"Disaster","Disaster","",NULL);
5252 tolua_beginmodule(tolua_S,"Disaster");
5255 tolua_cclass(tolua_S,"Achievement","Achievement","",NULL);
5256 tolua_beginmodule(tolua_S,"Achievement");
5259 tolua_cclass(tolua_S,"Action","Action","",NULL);
5260 tolua_beginmodule(tolua_S,"Action");
5263 tolua_cclass(tolua_S,"Direction","Direction","",NULL);
5264 tolua_beginmodule(tolua_S,"Direction");
5266 tolua_cclass(tolua_S,"Unit_List_Link","Unit_List_Link","",NULL);
5267 tolua_beginmodule(tolua_S,"Unit_List_Link");
5269 tolua_cclass(tolua_S,"City_List_Link","City_List_Link","",NULL);
5270 tolua_beginmodule(tolua_S,"City_List_Link");
5272 tolua_cclass(tolua_S,"Game_Info","Game_Info","",NULL);
5273 tolua_beginmodule(tolua_S,"Game_Info");
5284 tolua_module(tolua_S,"game",1);
5285 tolua_beginmodule(tolua_S,"game");
5297 tolua_module(tolua_S,"Counter",0);
5298 tolua_beginmodule(tolua_S,"Counter");
5303 tolua_module(tolua_S,"Player",0);
5304 tolua_beginmodule(tolua_S,"Player");
5305 tolua_module(tolua_S,"properties",0);
5306 tolua_beginmodule(tolua_S,"properties");
5331 tolua_module(tolua_S,"methods_private",0);
5332 tolua_beginmodule(tolua_S,"methods_private");
5334 tolua_module(tolua_S,"Player",0);
5335 tolua_beginmodule(tolua_S,"Player");
5340
5341 { /* begin embedded lua code */
5342 static unsigned char B[] = {
5343 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,101,
5344 114, 58,105,115, 95,104,117,109, 97,110, 40, 41, 10,114,101,
5345 116,117,114,110, 32,110,111,116, 32,115,101,108,102, 46,104,
5346 97,115, 95,102,108, 97,103, 40,115,101,108,102, 44, 32, 34,
5347 65, 73, 34, 41, 59, 10,101,110,100, 10,102,117,110, 99,116,
5348 105,111,110, 32, 80,108, 97,121,101,114, 58,101,120,105,115,
5349 116,115, 40, 41, 10,114,101,116,117,114,110, 32,116,114,117,
5350 101, 10,101,110,100,32
5351 };
5352 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5354 } /* end of embedded lua code */
5355
5356 tolua_module(tolua_S,"City",0);
5357 tolua_beginmodule(tolua_S,"City");
5358 tolua_module(tolua_S,"properties",0);
5359 tolua_beginmodule(tolua_S,"properties");
5376
5377 { /* begin embedded lua code */
5378 static unsigned char B[] = {
5379 10,102,117,110, 99,116,105,111,110, 32, 67,105,116,121, 58,
5380 101,120,105,115,116,115, 40, 41, 10,114,101,116,117,114,110,
5381 32,116,114,117,101, 10,101,110,100,32
5382 };
5383 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5385 } /* end of embedded lua code */
5386
5387 tolua_module(tolua_S,"Unit",0);
5388 tolua_beginmodule(tolua_S,"Unit");
5389 tolua_module(tolua_S,"properties",0);
5390 tolua_beginmodule(tolua_S,"properties");
5401 tolua_module(tolua_S,"methods_private",0);
5402 tolua_beginmodule(tolua_S,"methods_private");
5403 tolua_module(tolua_S,"Unit",0);
5404 tolua_beginmodule(tolua_S,"Unit");
5408
5409 { /* begin embedded lua code */
5410 static unsigned char B[] = {
5411 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 58,
5412 101,120,105,115,116,115, 40, 41, 10,114,101,116,117,114,110,
5413 32,116,114,117,101, 10,101,110,100, 10,102,117,110, 99,116,
5414 105,111,110, 32, 85,110,105,116, 58,103,101,116, 95,104,111,
5415 109,101, 99,105,116,121, 40, 41, 10,114,101,116,117,114,110,
5416 32,102,105,110,100, 46, 99,105,116,121, 40,115,101,108,102,
5417 46,111,119,110,101,114, 44, 32,115,101,108,102, 46,104,111,
5418 109,101, 99,105,116,121, 41, 10,101,110,100,32
5419 };
5420 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5422 } /* end of embedded lua code */
5423
5424 tolua_module(tolua_S,"Tile",0);
5425 tolua_beginmodule(tolua_S,"Tile");
5426 tolua_module(tolua_S,"properties",0);
5427 tolua_beginmodule(tolua_S,"properties");
5444
5445 { /* begin embedded lua code */
5446 static unsigned char B[] = {
5447 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,101, 58,
5448 99,105,116,121, 95,101,120,105,115,116,115, 95,119,105,116,
5449 104,105,110, 95, 99,105,116,121, 95,114, 97,100,105,117,115,
5450 40, 99,101,110,116,101,114, 41, 10,108,111,103, 46,100,101,
5451 112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,
5452 110,103, 40, 34, 99,105,116,121, 95,101,120,105,115,116,115,
5453 95,119,105,116,104,105,110, 95, 99,105,116,121, 95,114, 97,
5454 100,105,117,115, 40, 41, 34, 44, 32, 34, 99,105,116,121, 95,
5455 101,120,105,115,116,115, 95,119,105,116,104,105,110, 95,109,
5456 97,120, 95, 99,105,116,121, 95,109, 97,112, 40, 41, 34, 44,
5457 10, 34, 50, 46, 51, 34, 41, 59, 10,114,101,116,117,114,110,
5458 32,115,101,108,102, 58, 99,105,116,121, 95,101,120,105,115,
5459 116,115, 95,119,105,116,104,105,110, 95,109, 97,120, 95, 99,
5460 105,116,121, 95,109, 97,112, 40, 99,101,110,116,101,114, 41,
5461 10,101,110,100,32
5462 };
5463 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5465 } /* end of embedded lua code */
5466
5467 tolua_module(tolua_S,"methods_private",0);
5468 tolua_beginmodule(tolua_S,"methods_private");
5469 tolua_module(tolua_S,"Tile",0);
5470 tolua_beginmodule(tolua_S,"Tile");
5476 tolua_module(tolua_S,"Government",0);
5477 tolua_beginmodule(tolua_S,"Government");
5481 tolua_module(tolua_S,"Nation_Type",0);
5482 tolua_beginmodule(tolua_S,"Nation_Type");
5487 tolua_module(tolua_S,"Building_Type",0);
5488 tolua_beginmodule(tolua_S,"Building_Type");
5496
5497 { /* begin embedded lua code */
5498 static unsigned char B[] = {
5499 10,102,117,110, 99,116,105,111,110, 32, 66,117,105,108,100,
5500 105,110,103, 95, 84,121,112,101, 58, 98,117,105,108,100, 95,
5501 115,104,105,101,108,100, 95, 99,111,115,116, 40, 41, 10,114,
5502 101,116,117,114,110, 32,115,101,108,102, 46, 98,117,105,108,
5503 100, 95, 99,111,115,116, 10,101,110,100,32
5504 };
5505 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5507 } /* end of embedded lua code */
5508
5509 tolua_module(tolua_S,"Unit_Type",0);
5510 tolua_beginmodule(tolua_S,"Unit_Type");
5517
5518 { /* begin embedded lua code */
5519 static unsigned char B[] = {
5520 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 95,
5521 84,121,112,101, 58, 98,117,105,108,100, 95,115,104,105,101,
5522 108,100, 95, 99,111,115,116, 40, 41, 10,114,101,116,117,114,
5523 110, 32,115,101,108,102, 46, 98,117,105,108,100, 95, 99,111,
5524 115,116, 10,101,110,100,32
5525 };
5526 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5528 } /* end of embedded lua code */
5529
5530 tolua_module(tolua_S,"Tech_Type",0);
5531 tolua_beginmodule(tolua_S,"Tech_Type");
5535
5536 { /* begin embedded lua code */
5537 static unsigned char B[] = {
5538 10,108,111, 99, 97,108, 32,112,116, 99,111,115,116, 32, 61,
5539 32, 80,108, 97,121,101,114, 46,116,101, 99,104, 95, 99,111,
5540 115,116, 10,102,117,110, 99,116,105,111,110, 32, 84,101, 99,
5541 104, 95, 84,121,112,101, 58, 99,111,115,116, 40, 41, 10,114,
5542 101,116,117,114,110, 32,112,116, 99,111,115,116, 40,110,105,
5543 108, 44, 32,115,101,108,102, 41, 10,101,110,100,32
5544 };
5545 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5547 } /* end of embedded lua code */
5548
5549 tolua_module(tolua_S,"Terrain",0);
5550 tolua_beginmodule(tolua_S,"Terrain");
5555 tolua_module(tolua_S,"Disaster",0);
5556 tolua_beginmodule(tolua_S,"Disaster");
5560 tolua_module(tolua_S,"Achievement",0);
5561 tolua_beginmodule(tolua_S,"Achievement");
5565 tolua_module(tolua_S,"Action",0);
5566 tolua_beginmodule(tolua_S,"Action");
5571 tolua_module(tolua_S,"Unit_List_Link",0);
5572 tolua_beginmodule(tolua_S,"Unit_List_Link");
5576 tolua_module(tolua_S,"City_List_Link",0);
5577 tolua_beginmodule(tolua_S,"City_List_Link");
5581 tolua_module(tolua_S,"find",0);
5582 tolua_beginmodule(tolua_S,"find");
5617
5618 { /* begin embedded lua code */
5619 static unsigned char B[] = {
5620 10,108,111, 99, 97,108, 32,103, 97,109,101, 95,105,110,102,
5621 111, 32, 61, 32,103, 97,109,101, 46,105,110,102,111, 10,102,
5622 117,110, 99,116,105,111,110, 32,102,105,110,100, 46,103, 97,
5623 109,101, 95,105,110,102,111, 40, 41, 10,114,101,116,117,114,
5624 110, 32,103, 97,109,101, 95,105,110,102,111, 10,101,110,100,
5625 32
5626 };
5627 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5629 } /* end of embedded lua code */
5630
5631 tolua_module(tolua_S,"E",0);
5634 tolua_module(tolua_S,"effects",0);
5635 tolua_beginmodule(tolua_S,"effects");
5643 tolua_module(tolua_S,"Direction",0);
5644 tolua_beginmodule(tolua_S,"Direction");
5645 tolua_module(tolua_S,"properties",0);
5646 tolua_beginmodule(tolua_S,"properties");
5652 tolua_module(tolua_S,"direction",0);
5653 tolua_beginmodule(tolua_S,"direction");
5659
5660 { /* begin embedded lua code */
5661 static unsigned char B[] = {
5662 10,102,117,110, 99,116,105,111,110, 32,115,116,114, 50,100,
5663 105,114,101, 99,116,105,111,110, 40,115,116,114, 41, 10,114,
5664 101,116,117,114,110, 32,100,105,114,101, 99,116,105,111,110,
5665 46,115,116,114, 50,100,105,114, 40,115,116,114, 41, 10,101,
5666 110,100, 10, 68,105,114,101, 99,116,105,111,110, 46,112,114,
5667 111,112,101,114,116,105,101,115, 46,110,101,120,116, 95, 99,
5668 99,119, 32, 61, 32,100,105,114,101, 99,116,105,111,110, 46,
5669 110,101,120,116, 95, 99, 99,119, 10, 68,105,114,101, 99,116,
5670 105,111,110, 46,112,114,111,112,101,114,116,105,101,115, 46,
5671 110,101,120,116, 95, 99,119, 32, 61, 32,100,105,114,101, 99,
5672 116,105,111,110, 46,110,101,120,116, 95, 99,119, 10, 68,105,
5673 114,101, 99,116,105,111,110, 46,112,114,111,112,101,114,116,
5674 105,101,115, 46,111,112,112,111,115,105,116,101, 32, 61, 32,
5675 100,105,114,101, 99,116,105,111,110, 46,111,112,112,111,115,
5676 105,116,101,32
5677 };
5678 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5680 } /* end of embedded lua code */
5681
5682 tolua_module(tolua_S,"Game_Info",0);
5683 tolua_beginmodule(tolua_S,"Game_Info");
5685
5686 { /* begin embedded lua code */
5687 static unsigned char B[] = {
5688 10,100,111, 10,108,111, 99, 97,108, 32,112,114,105,118, 97,
5689 116,101, 32, 61, 32,109,101,116,104,111,100,115, 95,112,114,
5690 105,118, 97,116,101, 10,108,111, 99, 97,108, 32,102,117,110,
5691 99,116,105,111,110, 32,118, 97,108,117,101, 95,105,116,101,
5692 114, 97,116,111,114, 40, 97,114,114, 97,121, 41, 10,108,111,
5693 99, 97,108, 32,105, 32, 61, 32, 48, 10,108,111, 99, 97,108,
5694 32,102,117,110, 99,116,105,111,110, 32,105,116,101,114, 97,
5695 116,111,114, 40, 41, 10,105, 32, 61, 32,105, 32, 43, 32, 49,
5696 10,114,101,116,117,114,110, 32, 97,114,114, 97,121, 91,105,
5697 93, 10,101,110,100, 10,114,101,116,117,114,110, 32,105,116,
5698 101,114, 97,116,111,114, 10,101,110,100, 10,108,111, 99, 97,
5699 108, 32,102,117,110, 99,116,105,111,110, 32,115, 97,102,101,
5700 95,105,116,101,114, 97,116,101, 95,108,105,115,116, 40,108,
5701 105,110,107, 41, 10,108,111, 99, 97,108, 32,111, 98,106,115,
5702 32, 61, 32,123,125, 10,119,104,105,108,101, 32,108,105,110,
5703 107, 32,100,111, 10,111, 98,106,115, 91, 35,111, 98,106,115,
5704 32, 43, 32, 49, 93, 32, 61, 32,108,105,110,107, 58,100, 97,
5705 116, 97, 40, 41, 10,108,105,110,107, 32, 61, 32,108,105,110,
5706 107, 58,110,101,120,116, 40, 41, 10,101,110,100, 10,114,101,
5707 116,117,114,110, 32,118, 97,108,117,101, 95,105,116,101,114,
5708 97,116,111,114, 40,111, 98,106,115, 41, 10,101,110,100, 10,
5709 102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,101,114,
5710 58,117,110,105,116,115, 95,105,116,101,114, 97,116,101, 40,
5711 41, 10,114,101,116,117,114,110, 32,115, 97,102,101, 95,105,
5712 116,101,114, 97,116,101, 95,108,105,115,116, 40,112,114,105,
5713 118, 97,116,101, 46, 80,108, 97,121,101,114, 46,117,110,105,
5714 116, 95,108,105,115,116, 95,104,101, 97,100, 40,115,101,108,
5715 102, 41, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
5716 110, 32, 80,108, 97,121,101,114, 58, 99,105,116,105,101,115,
5717 95,105,116,101,114, 97,116,101, 40, 41, 10,114,101,116,117,
5718 114,110, 32,115, 97,102,101, 95,105,116,101,114, 97,116,101,
5719 95,108,105,115,116, 40,112,114,105,118, 97,116,101, 46, 80,
5720 108, 97,121,101,114, 46, 99,105,116,121, 95,108,105,115,116,
5721 95,104,101, 97,100, 40,115,101,108,102, 41, 41, 10,101,110,
5722 100, 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,101,
5723 58,117,110,105,116,115, 95,105,116,101,114, 97,116,101, 40,
5724 41, 10,114,101,116,117,114,110, 32,115, 97,102,101, 95,105,
5725 116,101,114, 97,116,101, 95,108,105,115,116, 40,112,114,105,
5726 118, 97,116,101, 46, 84,105,108,101, 46,117,110,105,116, 95,
5727 108,105,115,116, 95,104,101, 97,100, 40,115,101,108,102, 41,
5728 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
5729 85,110,105,116, 58, 99, 97,114,103,111, 95,105,116,101,114,
5730 97,116,101, 40, 41, 10,114,101,116,117,114,110, 32,115, 97,
5731 102,101, 95,105,116,101,114, 97,116,101, 95,108,105,115,116,
5732 40,112,114,105,118, 97,116,101, 46, 85,110,105,116, 46, 99,
5733 97,114,103,111, 95,108,105,115,116, 95,104,101, 97,100, 40,
5734 115,101,108,102, 41, 41, 10,101,110,100, 10,101,110,100, 10,
5735 100,111, 10,108,111, 99, 97,108, 32,110,101,120,116, 95,111,
5736 117,116,119, 97,114,100, 95,105,110,100,101,120, 32, 61, 32,
5737 109,101,116,104,111,100,115, 95,112,114,105,118, 97,116,101,
5738 46, 84,105,108,101, 46,110,101,120,116, 95,111,117,116,119,
5739 97,114,100, 95,105,110,100,101,120, 10,108,111, 99, 97,108,
5740 32,116,105,108,101, 95,102,111,114, 95,111,117,116,119, 97,
5741 114,100, 95,105,110,100,101,120, 32, 61, 32,109,101,116,104,
5742 111,100,115, 95,112,114,105,118, 97,116,101, 46, 84,105,108,
5743 101, 46,116,105,108,101, 95,102,111,114, 95,111,117,116,119,
5744 97,114,100, 95,105,110,100,101,120, 10,102,117,110, 99,116,
5745 105,111,110, 32, 84,105,108,101, 58,115,113,117, 97,114,101,
5746 95,105,116,101,114, 97,116,101, 40,114, 97,100,105,117,115,
5747 41, 10,108,111, 99, 97,108, 32,105,110,100,101,120, 32, 61,
5748 32, 45, 49, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,
5749 105,111,110, 32,105,116,101,114, 97,116,111,114, 40, 41, 10,
5750 105,110,100,101,120, 32, 61, 32,110,101,120,116, 95,111,117,
5751 116,119, 97,114,100, 95,105,110,100,101,120, 40,115,101,108,
5752 102, 44, 32,105,110,100,101,120, 44, 32,114, 97,100,105,117,
5753 115, 41, 10,105,102, 32,105,110,100,101,120, 32, 60, 32, 48,
5754 32,116,104,101,110, 10,114,101,116,117,114,110, 32,110,105,
5755 108, 10,101,108,115,101, 10,114,101,116,117,114,110, 32,116,
5756 105,108,101, 95,102,111,114, 95,111,117,116,119, 97,114,100,
5757 95,105,110,100,101,120, 40,115,101,108,102, 44, 32,105,110,
5758 100,101,120, 41, 10,101,110,100, 10,101,110,100, 10,114,101,
5759 116,117,114,110, 32,105,116,101,114, 97,116,111,114, 10,101,
5760 110,100, 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,
5761 101, 58, 99,105,114, 99,108,101, 95,105,116,101,114, 97,116,
5762 101, 40,115,113, 95,114, 97,100,105,117,115, 41, 10,108,111,
5763 99, 97,108, 32, 99,114, 95,114, 97,100,105,117,115, 32, 61,
5764 32,109, 97,116,104, 46,102,108,111,111,114, 40,109, 97,116,
5765 104, 46,115,113,114,116, 40,115,113, 95,114, 97,100,105,117,
5766 115, 41, 41, 10,108,111, 99, 97,108, 32,115,113, 95,105,116,
5767 101,114, 32, 61, 32,115,101,108,102, 58,115,113,117, 97,114,
5768 101, 95,105,116,101,114, 97,116,101, 40, 99,114, 95,114, 97,
5769 100,105,117,115, 41, 10,108,111, 99, 97,108, 32,102,117,110,
5770 99,116,105,111,110, 32,105,116,101,114, 97,116,111,114, 40,
5771 41, 10,108,111, 99, 97,108, 32,116,105,108,101, 32, 61, 32,
5772 110,105,108, 10,114,101,112,101, 97,116, 10,116,105,108,101,
5773 32, 61, 32,115,113, 95,105,116,101,114, 40, 41, 10,117,110,
5774 116,105,108, 32,110,111,116, 32,116,105,108,101, 32,111,114,
5775 32,115,101,108,102, 58,115,113, 95,100,105,115,116, 97,110,
5776 99,101, 40,116,105,108,101, 41, 32, 60, 61, 32,115,113, 95,
5777 114, 97,100,105,117,115, 10,114,101,116,117,114,110, 32,116,
5778 105,108,101, 10,101,110,100, 10,114,101,116,117,114,110, 32,
5779 105,116,101,114, 97,116,111,114, 10,101,110,100, 10,101,110,
5780 100,32
5781 };
5782 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5784 } /* end of embedded lua code */
5785
5786
5787 { /* begin embedded lua code */
5788 static unsigned char B[] = {
5789 10,100,111, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,
5790 105,111,110, 32,105,110,100,101,120, 95,105,116,101,114, 97,
5791 116,101, 40,108,111,111,107,117,112, 41, 10,108,111, 99, 97,
5792 108, 32,105,110,100,101,120, 32, 61, 32, 45, 49, 10,108,111,
5793 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,105,116,
5794 101,114, 97,116,111,114, 40, 41, 10,105,110,100,101,120, 32,
5795 61, 32,105,110,100,101,120, 32, 43, 32, 49, 10,114,101,116,
5796 117,114,110, 32,108,111,111,107,117,112, 40,105,110,100,101,
5797 120, 41, 10,101,110,100, 10,114,101,116,117,114,110, 32,105,
5798 116,101,114, 97,116,111,114, 10,101,110,100, 10,108,111, 99,
5799 97,108, 32,108,105,115,116,112, 32, 61, 32,109,101,116,104,
5800 111,100,115, 95,112,114,105,118, 97,116,101, 46,108,105,115,
5801 116, 95,112,108, 97,121,101,114,115, 10,102,117,110, 99,116,
5802 105,111,110, 32,112,108, 97,121,101,114,115, 95,105,116,101,
5803 114, 97,116,101, 40, 41, 10,108,111, 99, 97,108, 32,112,108,
5804 105,115,116, 32, 61, 32,108,105,115,116,112, 40, 41, 10,108,
5805 111, 99, 97,108, 32,105,110,100,101,120, 32, 61, 32, 48, 10,
5806 114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110,
5807 40, 41, 10,105,110,100,101,120, 32, 61, 32,105,110,100,101,
5808 120, 32, 43, 32, 49, 10,114,101,116,117,114,110, 32,112,108,
5809 105,115,116, 91,105,110,100,101,120, 93, 10,101,110,100, 10,
5810 101,110,100, 10,102,117,110, 99,116,105,111,110, 32,119,104,
5811 111,108,101, 95,109, 97,112, 95,105,116,101,114, 97,116,101,
5812 40, 41, 10,114,101,116,117,114,110, 32,105,110,100,101,120,
5813 95,105,116,101,114, 97,116,101, 40,102,105,110,100, 46,116,
5814 105,108,101, 41, 10,101,110,100, 10,101,110,100,32
5815 };
5816 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5818 } /* end of embedded lua code */
5819
5821 return 1;
5822}
5823/* Open tolua function */
5825{
5827 lua_pushstring(tolua_S, "game");
5828 lua_call(tolua_S, 1, 0);
5829 return 1;
5830}
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)
bool api_utilities_direction_is_cardinal(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_tile_bonus(lua_State *L, Tile *ptile, City *pcity, const char *output_id, const char *effect_type)
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)
Counter * api_find_counter(lua_State *L, int counter_id)
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)
Counter * api_find_counter_by_name(lua_State *L, const char *name)
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)
int api_methods_player_future(lua_State *L, Player *pplayer)
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_player_tech_cost(lua_State *L, Player *pplayer, Tech_Type *ptech)
lua_Object api_methods_player_researching(lua_State *L, Player *pplayer)
int api_methods_game_year_fragment(lua_State *L)
const char * api_methods_counter_name_translation(lua_State *L, Counter *c)
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)
const char * api_methods_counter_rule_name(lua_State *L, Counter *c)
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)
int api_methods_player_infrapoints(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)
const char * api_methods_tech_cost_style(lua_State *L)
City * api_methods_tile_city(lua_State *L, Tile *ptile)
const char * api_methods_tech_leakage_style(lua_State *L)
const char * api_methods_government_name_translation(lua_State *L, Government *pgovernment)
bool api_method_player_can_research(lua_State *L, Player *pplayer, Tech_Type *ptech)
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)
int api_methods_player_bulbs(lua_State *L, Player *pplayer)
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_player_research_cost(lua_State *L, Player *pplayer)
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)
int api_methods_counter_city_get(lua_State *L, Counter *c, City *city)
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
char * incite_cost
Definition comments.c:74
int counter_id(struct counter *pcount)
Definition counters.c:105
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:74
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:320
Definition tile.h:50
Definition unit.h:140
#define TRUE
Definition support.h:46
#define bool
Definition support.h:71
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_Player_researching00(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_get_Game_Info_Game_Info_sciencebox(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_Direction_properties_cardinal00(lua_State *tolua_S)
static int tolua_game_Unit_tile_link_text00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_tech_steal_allow_holes(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_get_Game_Info_Game_Info_tech_leak_pct(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_effects_tile_bonus00(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_set_game_game_info_substructure(lua_State *tolua_S)
static int tolua_game_Counter_rule_name00(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_Counter_get00(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_Player_tech_cost00(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_get_game_game_info_substructure(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_game_game_tech_cost_style00(lua_State *tolua_S)
static int tolua_game_Player_num_future_techs00(lua_State *tolua_S)
static int tolua_get_Tech_Type_Tech_Type_item_number(lua_State *tolua_S)
static int tolua_get_Tech_Type_Tech_Type_cost(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_Player_infrapoints00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_tech_parasite_allow_holes(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_Game_Info_Game_Info_tech_trade_loss_allow_holes(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_get_Game_Info_Game_Info_tech_loss_allow_holes(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_game_Player_can_research00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_tech_trade_allow_holes(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_game_game_tech_leakage_style00(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_get_Game_Info_Game_Info_min_tech_cost(lua_State *tolua_S)
static int tolua_game_Player_researching_cost00(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_get_Game_Info_Game_Info_base_tech_cost(lua_State *tolua_S)
static int tolua_game_methods_private_Tile_next_outward_index00(lua_State *tolua_S)
static int tolua_game_Player_properties_bulbs00(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)
#define game_info_substructure
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_counter01(lua_State *tolua_S)
static int tolua_game_find_counter00(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_game_Counter_name_translation00(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)