Freeciv-3.2
Loading...
Searching...
No Matches
tolua_game_gen.c
Go to the documentation of this file.
1/*
2** Lua binding: game
3*/
4
5#include "tolua.h"
6
7#ifndef __cplusplus
8#include <stdlib.h>
9#endif
10#ifdef __cplusplus
11 extern "C" int tolua_bnd_takeownership (lua_State* L); // from tolua_map.c
12#else
13 int tolua_bnd_takeownership (lua_State* L); /* from tolua_map.c */
14#endif
15#include <string.h>
16
17/* Exported function */
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,"Government");
35 tolua_usertype(tolua_S,"Achievement");
36 tolua_usertype(tolua_S,"Nonexistent");
37 tolua_usertype(tolua_S,"City");
38 tolua_usertype(tolua_S,"Building_Type");
39 tolua_usertype(tolua_S,"Tech_Type");
40 tolua_usertype(tolua_S,"Unit_Type");
41 tolua_usertype(tolua_S,"Unit");
42 tolua_usertype(tolua_S,"Game_Info");
43 tolua_usertype(tolua_S,"Nation_Type");
44 tolua_usertype(tolua_S,"City_List_Link");
45 tolua_usertype(tolua_S,"Disaster");
46 tolua_usertype(tolua_S,"Unit_List_Link");
47 tolua_usertype(tolua_S,"Connection");
48 tolua_usertype(tolua_S,"Action");
49 tolua_usertype(tolua_S,"Player");
50 tolua_usertype(tolua_S,"Counter");
51 tolua_usertype(tolua_S,"Tile");
52 tolua_usertype(tolua_S,"Terrain");
53 tolua_usertype(tolua_S,"Direction");
54}
55
56/* get function: name of class Player */
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: tech_cost_style of class Game_Info */
842{
844#ifndef TOLUA_RELEASE
845 if (!self) {
846 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_cost_style'",NULL);
847 return 0;
848 }
849#endif
850 tolua_pushnumber(tolua_S,(lua_Number)self->tech_cost_style);
851 return 1;
852}
853
854/* get function: tech_leakage of class Game_Info */
856{
858#ifndef TOLUA_RELEASE
859 if (!self) {
860 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_leakage'",NULL);
861 return 0;
862 }
863#endif
864 tolua_pushnumber(tolua_S,(lua_Number)self->tech_leakage);
865 return 1;
866}
867
868/* get function: game_info_substructure */
874
875/* set function: game_info_substructure */
877{
878#ifndef TOLUA_RELEASE
880 if (!tolua_isusertype(tolua_S,2,"Game_Info",0,&tolua_err))
881 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
882#endif
884 return 0;
885}
886
887/* function: api_methods_game_turn */
889{
890#ifndef TOLUA_RELEASE
892 if (
894 )
895 goto tolua_lerror;
896 else
897#endif
898 {
900 {
903 }
904 }
905 return 1;
906#ifndef TOLUA_RELEASE
908 tolua_error(tolua_S,"#ferror in function 'current_turn'.",&tolua_err);
909 return 0;
910#endif
911}
912
913/* function: api_methods_game_turn_deprecated */
915{
916#ifndef TOLUA_RELEASE
918 if (
920 )
921 goto tolua_lerror;
922 else
923#endif
924 {
926 {
929 }
930 }
931 return 1;
932#ifndef TOLUA_RELEASE
934 tolua_error(tolua_S,"#ferror in function 'turn'.",&tolua_err);
935 return 0;
936#endif
937}
938
939/* function: api_methods_game_year */
941{
942#ifndef TOLUA_RELEASE
944 if (
946 )
947 goto tolua_lerror;
948 else
949#endif
950 {
952 {
955 }
956 }
957 return 1;
958#ifndef TOLUA_RELEASE
960 tolua_error(tolua_S,"#ferror in function 'current_year'.",&tolua_err);
961 return 0;
962#endif
963}
964
965/* function: api_methods_game_year_fragment */
967{
968#ifndef TOLUA_RELEASE
970 if (
972 )
973 goto tolua_lerror;
974 else
975#endif
976 {
978 {
981 }
982 }
983 return 1;
984#ifndef TOLUA_RELEASE
986 tolua_error(tolua_S,"#ferror in function 'current_fragment'.",&tolua_err);
987 return 0;
988#endif
989}
990
991/* function: api_methods_game_year_text */
993{
994#ifndef TOLUA_RELEASE
996 if (
998 )
999 goto tolua_lerror;
1000 else
1001#endif
1002 {
1003 lua_State* L = tolua_S;
1004 {
1005 const char* tolua_ret = (const char*) api_methods_game_year_text(L);
1006 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1007 }
1008 }
1009 return 1;
1010#ifndef TOLUA_RELEASE
1012 tolua_error(tolua_S,"#ferror in function 'current_year_text'.",&tolua_err);
1013 return 0;
1014#endif
1015}
1016
1017/* function: api_methods_game_rulesetdir */
1019{
1020#ifndef TOLUA_RELEASE
1022 if (
1024 )
1025 goto tolua_lerror;
1026 else
1027#endif
1028 {
1029 lua_State* L = tolua_S;
1030 {
1031 const char* tolua_ret = (const char*) api_methods_game_rulesetdir(L);
1032 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1033 }
1034 }
1035 return 1;
1036#ifndef TOLUA_RELEASE
1038 tolua_error(tolua_S,"#ferror in function 'rulesetdir'.",&tolua_err);
1039 return 0;
1040#endif
1041}
1042
1043/* function: api_methods_game_ruleset_name */
1045{
1046#ifndef TOLUA_RELEASE
1048 if (
1050 )
1051 goto tolua_lerror;
1052 else
1053#endif
1054 {
1055 lua_State* L = tolua_S;
1056 {
1057 const char* tolua_ret = (const char*) api_methods_game_ruleset_name(L);
1058 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1059 }
1060 }
1061 return 1;
1062#ifndef TOLUA_RELEASE
1064 tolua_error(tolua_S,"#ferror in function 'ruleset_name'.",&tolua_err);
1065 return 0;
1066#endif
1067}
1068
1069/* function: api_methods_counter_rule_name */
1071{
1072#ifndef TOLUA_RELEASE
1074 if (
1075 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1077 )
1078 goto tolua_lerror;
1079 else
1080#endif
1081 {
1082 lua_State* L = tolua_S;
1083 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1084 {
1085 const char* tolua_ret = (const char*) api_methods_counter_rule_name(L,c);
1086 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1087 }
1088 }
1089 return 1;
1090#ifndef TOLUA_RELEASE
1092 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
1093 return 0;
1094#endif
1095}
1096
1097/* function: api_methods_counter_name_translation */
1099{
1100#ifndef TOLUA_RELEASE
1102 if (
1103 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1105 )
1106 goto tolua_lerror;
1107 else
1108#endif
1109 {
1110 lua_State* L = tolua_S;
1111 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1112 {
1113 const char* tolua_ret = (const char*) api_methods_counter_name_translation(L,c);
1114 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1115 }
1116 }
1117 return 1;
1118#ifndef TOLUA_RELEASE
1120 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
1121 return 0;
1122#endif
1123}
1124
1125/* function: api_methods_counter_city_get */
1127{
1128#ifndef TOLUA_RELEASE
1130 if (
1131 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1132 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
1134 )
1135 goto tolua_lerror;
1136 else
1137#endif
1138 {
1139 lua_State* L = tolua_S;
1140 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1141 City* city = ((City*) tolua_tousertype(tolua_S,2,0));
1142 {
1145 }
1146 }
1147 return 1;
1148#ifndef TOLUA_RELEASE
1150 tolua_error(tolua_S,"#ferror in function 'get'.",&tolua_err);
1151 return 0;
1152#endif
1153}
1154
1155/* function: api_methods_player_number */
1157{
1158#ifndef TOLUA_RELEASE
1160 if (
1161 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1163 )
1164 goto tolua_lerror;
1165 else
1166#endif
1167 {
1168 lua_State* L = tolua_S;
1170 {
1173 }
1174 }
1175 return 1;
1176#ifndef TOLUA_RELEASE
1178 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
1179 return 0;
1180#endif
1181}
1182
1183/* function: api_methods_player_bulbs */
1185{
1186#ifndef TOLUA_RELEASE
1188 if (
1189 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1191 )
1192 goto tolua_lerror;
1193 else
1194#endif
1195 {
1196 lua_State* L = tolua_S;
1197 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1198 {
1199 int tolua_ret = (int) api_methods_player_bulbs(L,pplayer);
1201 }
1202 }
1203 return 1;
1204#ifndef TOLUA_RELEASE
1206 tolua_error(tolua_S,"#ferror in function 'bulbs'.",&tolua_err);
1207 return 0;
1208#endif
1209}
1210
1211/* function: api_methods_player_controlling_gui */
1213{
1214#ifndef TOLUA_RELEASE
1216 if (
1217 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1219 )
1220 goto tolua_lerror;
1221 else
1222#endif
1223 {
1224 lua_State* L = tolua_S;
1226 {
1227 const char* tolua_ret = (const char*) api_methods_player_controlling_gui(L,self);
1228 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1229 }
1230 }
1231 return 1;
1232#ifndef TOLUA_RELEASE
1234 tolua_error(tolua_S,"#ferror in function 'controlling_gui'.",&tolua_err);
1235 return 0;
1236#endif
1237}
1238
1239/* function: api_methods_player_num_cities */
1241{
1242#ifndef TOLUA_RELEASE
1244 if (
1245 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1247 )
1248 goto tolua_lerror;
1249 else
1250#endif
1251 {
1252 lua_State* L = tolua_S;
1254 {
1257 }
1258 }
1259 return 1;
1260#ifndef TOLUA_RELEASE
1262 tolua_error(tolua_S,"#ferror in function 'num_cities'.",&tolua_err);
1263 return 0;
1264#endif
1265}
1266
1267/* function: api_methods_player_num_units */
1269{
1270#ifndef TOLUA_RELEASE
1272 if (
1273 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1275 )
1276 goto tolua_lerror;
1277 else
1278#endif
1279 {
1280 lua_State* L = tolua_S;
1282 {
1285 }
1286 }
1287 return 1;
1288#ifndef TOLUA_RELEASE
1290 tolua_error(tolua_S,"#ferror in function 'num_units'.",&tolua_err);
1291 return 0;
1292#endif
1293}
1294
1295/* function: api_methods_player_future */
1297{
1298#ifndef TOLUA_RELEASE
1300 if (
1301 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1303 )
1304 goto tolua_lerror;
1305 else
1306#endif
1307 {
1308 lua_State* L = tolua_S;
1309 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1310 {
1311 int tolua_ret = (int) api_methods_player_future(L,pplayer);
1313 }
1314 }
1315 return 1;
1316#ifndef TOLUA_RELEASE
1318 tolua_error(tolua_S,"#ferror in function 'num_future_techs'.",&tolua_err);
1319 return 0;
1320#endif
1321}
1322
1323/* function: api_methods_player_has_wonder */
1325{
1326#ifndef TOLUA_RELEASE
1328 if (
1329 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1330 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1332 )
1333 goto tolua_lerror;
1334 else
1335#endif
1336 {
1337 lua_State* L = tolua_S;
1340 {
1343 }
1344 }
1345 return 1;
1346#ifndef TOLUA_RELEASE
1348 tolua_error(tolua_S,"#ferror in function 'has_wonder'.",&tolua_err);
1349 return 0;
1350#endif
1351}
1352
1353/* function: api_methods_player_gold */
1355{
1356#ifndef TOLUA_RELEASE
1358 if (
1359 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1361 )
1362 goto tolua_lerror;
1363 else
1364#endif
1365 {
1366 lua_State* L = tolua_S;
1368 {
1371 }
1372 }
1373 return 1;
1374#ifndef TOLUA_RELEASE
1376 tolua_error(tolua_S,"#ferror in function 'gold'.",&tolua_err);
1377 return 0;
1378#endif
1379}
1380
1381/* function: api_methods_player_infrapoints */
1383{
1384#ifndef TOLUA_RELEASE
1386 if (
1387 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1389 )
1390 goto tolua_lerror;
1391 else
1392#endif
1393 {
1394 lua_State* L = tolua_S;
1396 {
1399 }
1400 }
1401 return 1;
1402#ifndef TOLUA_RELEASE
1404 tolua_error(tolua_S,"#ferror in function 'infrapoints'.",&tolua_err);
1405 return 0;
1406#endif
1407}
1408
1409/* function: api_methods_player_knows_tech */
1411{
1412#ifndef TOLUA_RELEASE
1414 if (
1415 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1416 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1418 )
1419 goto tolua_lerror;
1420 else
1421#endif
1422 {
1423 lua_State* L = tolua_S;
1426 {
1429 }
1430 }
1431 return 1;
1432#ifndef TOLUA_RELEASE
1434 tolua_error(tolua_S,"#ferror in function 'knows_tech'.",&tolua_err);
1435 return 0;
1436#endif
1437}
1438
1439/* function: api_method_player_can_research */
1441{
1442#ifndef TOLUA_RELEASE
1444 if (
1445 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1446 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1448 )
1449 goto tolua_lerror;
1450 else
1451#endif
1452 {
1453 lua_State* L = tolua_S;
1454 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1456 {
1459 }
1460 }
1461 return 1;
1462#ifndef TOLUA_RELEASE
1464 tolua_error(tolua_S,"#ferror in function 'can_research'.",&tolua_err);
1465 return 0;
1466#endif
1467}
1468
1469/* function: api_methods_player_tech_cost */
1471{
1472#ifndef TOLUA_RELEASE
1474 if (
1475 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1476 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1478 )
1479 goto tolua_lerror;
1480 else
1481#endif
1482 {
1483 lua_State* L = tolua_S;
1484 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1486 {
1489 }
1490 }
1491 return 1;
1492#ifndef TOLUA_RELEASE
1494 tolua_error(tolua_S,"#ferror in function 'tech_cost'.",&tolua_err);
1495 return 0;
1496#endif
1497}
1498
1499/* function: api_methods_player_researching */
1501{
1502#ifndef TOLUA_RELEASE
1504 if (
1505 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1507 )
1508 goto tolua_lerror;
1509 else
1510#endif
1511 {
1512 lua_State* L = tolua_S;
1513 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1514 {
1517 }
1518 }
1519 return 1;
1520#ifndef TOLUA_RELEASE
1522 tolua_error(tolua_S,"#ferror in function 'researching'.",&tolua_err);
1523 return 0;
1524#endif
1525}
1526
1527/* function: api_methods_player_research_cost */
1529{
1530#ifndef TOLUA_RELEASE
1532 if (
1533 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1535 )
1536 goto tolua_lerror;
1537 else
1538#endif
1539 {
1540 lua_State* L = tolua_S;
1541 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1542 {
1545 }
1546 }
1547 return 1;
1548#ifndef TOLUA_RELEASE
1550 tolua_error(tolua_S,"#ferror in function 'researching_cost'.",&tolua_err);
1551 return 0;
1552#endif
1553}
1554
1555/* function: api_methods_player_shares_research */
1557{
1558#ifndef TOLUA_RELEASE
1560 if (
1561 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1562 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
1564 )
1565 goto tolua_lerror;
1566 else
1567#endif
1568 {
1569 lua_State* L = tolua_S;
1572 {
1575 }
1576 }
1577 return 1;
1578#ifndef TOLUA_RELEASE
1580 tolua_error(tolua_S,"#ferror in function 'shares_research'.",&tolua_err);
1581 return 0;
1582#endif
1583}
1584
1585/* function: api_methods_research_rule_name */
1587{
1588#ifndef TOLUA_RELEASE
1590 if (
1591 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1593 )
1594 goto tolua_lerror;
1595 else
1596#endif
1597 {
1598 lua_State* L = tolua_S;
1600 {
1601 const char* tolua_ret = (const char*) api_methods_research_rule_name(L,self);
1602 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1603 }
1604 }
1605 return 1;
1606#ifndef TOLUA_RELEASE
1608 tolua_error(tolua_S,"#ferror in function 'research_rule_name'.",&tolua_err);
1609 return 0;
1610#endif
1611}
1612
1613/* function: api_methods_research_name_translation */
1615{
1616#ifndef TOLUA_RELEASE
1618 if (
1619 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1621 )
1622 goto tolua_lerror;
1623 else
1624#endif
1625 {
1626 lua_State* L = tolua_S;
1628 {
1629 const char* tolua_ret = (const char*) api_methods_research_name_translation(L,self);
1630 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1631 }
1632 }
1633 return 1;
1634#ifndef TOLUA_RELEASE
1636 tolua_error(tolua_S,"#ferror in function 'research_name_translation'.",&tolua_err);
1637 return 0;
1638#endif
1639}
1640
1641/* function: api_methods_player_culture_get */
1643{
1644#ifndef TOLUA_RELEASE
1646 if (
1647 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1649 )
1650 goto tolua_lerror;
1651 else
1652#endif
1653 {
1654 lua_State* L = tolua_S;
1656 {
1659 }
1660 }
1661 return 1;
1662#ifndef TOLUA_RELEASE
1664 tolua_error(tolua_S,"#ferror in function 'culture'.",&tolua_err);
1665 return 0;
1666#endif
1667}
1668
1669/* function: api_methods_player_has_flag */
1671{
1672#ifndef TOLUA_RELEASE
1674 if (
1675 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1678 )
1679 goto tolua_lerror;
1680 else
1681#endif
1682 {
1683 lua_State* L = tolua_S;
1685 const char* flag = ((const char*) tolua_tostring(tolua_S,2,0));
1686 {
1689 }
1690 }
1691 return 1;
1692#ifndef TOLUA_RELEASE
1694 tolua_error(tolua_S,"#ferror in function 'has_flag'.",&tolua_err);
1695 return 0;
1696#endif
1697}
1698
1699/* function: api_methods_player_can_upgrade */
1701{
1702#ifndef TOLUA_RELEASE
1704 if (
1705 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1706 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
1708 )
1709 goto tolua_lerror;
1710 else
1711#endif
1712 {
1713 lua_State* L = tolua_S;
1714 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1715 Unit_Type* utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
1716 {
1718 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
1719 }
1720 }
1721 return 1;
1722#ifndef TOLUA_RELEASE
1724 tolua_error(tolua_S,"#ferror in function 'can_upgrade'.",&tolua_err);
1725 return 0;
1726#endif
1727}
1728
1729/* function: api_methods_player_can_build_impr_direct */
1731{
1732#ifndef TOLUA_RELEASE
1734 if (
1735 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1736 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1738 )
1739 goto tolua_lerror;
1740 else
1741#endif
1742 {
1743 lua_State* L = tolua_S;
1744 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1746 {
1749 }
1750 }
1751 return 1;
1752#ifndef TOLUA_RELEASE
1754 tolua_error(tolua_S,"#ferror in function 'can_build_direct'.",&tolua_err);
1755 return 0;
1756#endif
1757}
1758
1759/* function: api_methods_player_can_build_unit_direct */
1761{
1763 if (
1764 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1765 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
1767 )
1768 goto tolua_lerror;
1769 else
1770 {
1771 lua_State* L = tolua_S;
1772 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1773 Unit_Type* utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
1774 {
1777 }
1778 }
1779 return 1;
1782}
1783
1784/* function: api_methods_private_list_players */
1786{
1787#ifndef TOLUA_RELEASE
1789 if (
1791 )
1792 goto tolua_lerror;
1793 else
1794#endif
1795 {
1796 lua_State* L = tolua_S;
1797 {
1800 }
1801 }
1802 return 1;
1803#ifndef TOLUA_RELEASE
1805 tolua_error(tolua_S,"#ferror in function 'list_players'.",&tolua_err);
1806 return 0;
1807#endif
1808}
1809
1810/* function: api_methods_private_player_unit_list_head */
1812{
1813#ifndef TOLUA_RELEASE
1815 if (
1816 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1818 )
1819 goto tolua_lerror;
1820 else
1821#endif
1822 {
1823 lua_State* L = tolua_S;
1825 {
1827 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
1828 }
1829 }
1830 return 1;
1831#ifndef TOLUA_RELEASE
1833 tolua_error(tolua_S,"#ferror in function 'unit_list_head'.",&tolua_err);
1834 return 0;
1835#endif
1836}
1837
1838/* function: api_methods_private_player_city_list_head */
1840{
1841#ifndef TOLUA_RELEASE
1843 if (
1844 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1846 )
1847 goto tolua_lerror;
1848 else
1849#endif
1850 {
1851 lua_State* L = tolua_S;
1853 {
1855 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City_List_Link");
1856 }
1857 }
1858 return 1;
1859#ifndef TOLUA_RELEASE
1861 tolua_error(tolua_S,"#ferror in function 'city_list_head'.",&tolua_err);
1862 return 0;
1863#endif
1864}
1865
1866/* function: api_methods_city_size_get */
1868{
1869#ifndef TOLUA_RELEASE
1871 if (
1872 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1874 )
1875 goto tolua_lerror;
1876 else
1877#endif
1878 {
1879 lua_State* L = tolua_S;
1880 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1881 {
1884 }
1885 }
1886 return 1;
1887#ifndef TOLUA_RELEASE
1889 tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err);
1890 return 0;
1891#endif
1892}
1893
1894/* function: api_methods_city_tile_get */
1896{
1897#ifndef TOLUA_RELEASE
1899 if (
1900 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1902 )
1903 goto tolua_lerror;
1904 else
1905#endif
1906 {
1907 lua_State* L = tolua_S;
1908 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1909 {
1911 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
1912 }
1913 }
1914 return 1;
1915#ifndef TOLUA_RELEASE
1917 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
1918 return 0;
1919#endif
1920}
1921
1922/* function: api_methods_city_has_building */
1924{
1925#ifndef TOLUA_RELEASE
1927 if (
1928 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1929 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1931 )
1932 goto tolua_lerror;
1933 else
1934#endif
1935 {
1936 lua_State* L = tolua_S;
1937 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1939 {
1942 }
1943 }
1944 return 1;
1945#ifndef TOLUA_RELEASE
1947 tolua_error(tolua_S,"#ferror in function 'has_building'.",&tolua_err);
1948 return 0;
1949#endif
1950}
1951
1952/* function: api_methods_city_map_sq_radius */
1954{
1955#ifndef TOLUA_RELEASE
1957 if (
1958 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1960 )
1961 goto tolua_lerror;
1962 else
1963#endif
1964 {
1965 lua_State* L = tolua_S;
1966 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1967 {
1970 }
1971 }
1972 return 1;
1973#ifndef TOLUA_RELEASE
1975 tolua_error(tolua_S,"#ferror in function 'map_sq_radius'.",&tolua_err);
1976 return 0;
1977#endif
1978}
1979
1980/* function: api_methods_city_inspire_partisans */
1982{
1983#ifndef TOLUA_RELEASE
1985 if (
1986 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1987 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
1989 )
1990 goto tolua_lerror;
1991 else
1992#endif
1993 {
1994 lua_State* L = tolua_S;
1995 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1997 {
2000 }
2001 }
2002 return 1;
2003#ifndef TOLUA_RELEASE
2005 tolua_error(tolua_S,"#ferror in function 'inspire_partisans'.",&tolua_err);
2006 return 0;
2007#endif
2008}
2009
2010/* function: api_methods_city_culture_get */
2012{
2013#ifndef TOLUA_RELEASE
2015 if (
2016 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2018 )
2019 goto tolua_lerror;
2020 else
2021#endif
2022 {
2023 lua_State* L = tolua_S;
2024 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2025 {
2028 }
2029 }
2030 return 1;
2031#ifndef TOLUA_RELEASE
2033 tolua_error(tolua_S,"#ferror in function 'culture'.",&tolua_err);
2034 return 0;
2035#endif
2036}
2037
2038/* function: api_methods_is_city_happy */
2040{
2041#ifndef TOLUA_RELEASE
2043 if (
2044 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2046 )
2047 goto tolua_lerror;
2048 else
2049#endif
2050 {
2051 lua_State* L = tolua_S;
2052 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2053 {
2056 }
2057 }
2058 return 1;
2059#ifndef TOLUA_RELEASE
2061 tolua_error(tolua_S,"#ferror in function 'is_happy'.",&tolua_err);
2062 return 0;
2063#endif
2064}
2065
2066/* function: api_methods_is_city_unhappy */
2068{
2069#ifndef TOLUA_RELEASE
2071 if (
2072 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2074 )
2075 goto tolua_lerror;
2076 else
2077#endif
2078 {
2079 lua_State* L = tolua_S;
2080 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2081 {
2084 }
2085 }
2086 return 1;
2087#ifndef TOLUA_RELEASE
2089 tolua_error(tolua_S,"#ferror in function 'is_unhappy'.",&tolua_err);
2090 return 0;
2091#endif
2092}
2093
2094/* function: api_methods_is_city_celebrating */
2096{
2097#ifndef TOLUA_RELEASE
2099 if (
2100 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2102 )
2103 goto tolua_lerror;
2104 else
2105#endif
2106 {
2107 lua_State* L = tolua_S;
2108 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2109 {
2112 }
2113 }
2114 return 1;
2115#ifndef TOLUA_RELEASE
2117 tolua_error(tolua_S,"#ferror in function 'is_celebrating'.",&tolua_err);
2118 return 0;
2119#endif
2120}
2121
2122/* function: api_methods_is_gov_center */
2124{
2125#ifndef TOLUA_RELEASE
2127 if (
2128 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2130 )
2131 goto tolua_lerror;
2132 else
2133#endif
2134 {
2135 lua_State* L = tolua_S;
2136 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2137 {
2140 }
2141 }
2142 return 1;
2143#ifndef TOLUA_RELEASE
2145 tolua_error(tolua_S,"#ferror in function 'is_gov_center'.",&tolua_err);
2146 return 0;
2147#endif
2148}
2149
2150/* function: api_methods_is_capital */
2152{
2153#ifndef TOLUA_RELEASE
2155 if (
2156 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2158 )
2159 goto tolua_lerror;
2160 else
2161#endif
2162 {
2163 lua_State* L = tolua_S;
2164 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2165 {
2168 }
2169 }
2170 return 1;
2171#ifndef TOLUA_RELEASE
2173 tolua_error(tolua_S,"#ferror in function 'is_capital'.",&tolua_err);
2174 return 0;
2175#endif
2176}
2177
2178/* function: api_methods_is_primary_capital */
2180{
2181#ifndef TOLUA_RELEASE
2183 if (
2184 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2186 )
2187 goto tolua_lerror;
2188 else
2189#endif
2190 {
2191 lua_State* L = tolua_S;
2192 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2193 {
2196 }
2197 }
2198 return 1;
2199#ifndef TOLUA_RELEASE
2201 tolua_error(tolua_S,"#ferror in function 'is_primary_capital'.",&tolua_err);
2202 return 0;
2203#endif
2204}
2205
2206/* function: api_methods_city_link */
2208{
2209#ifndef TOLUA_RELEASE
2211 if (
2212 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2214 )
2215 goto tolua_lerror;
2216 else
2217#endif
2218 {
2219 lua_State* L = tolua_S;
2220 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2221 {
2222 const char* tolua_ret = (const char*) api_methods_city_link(L,self);
2223 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2224 }
2225 }
2226 return 1;
2227#ifndef TOLUA_RELEASE
2229 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2230 return 0;
2231#endif
2232}
2233
2234/* function: api_methods_city_tile_link */
2236{
2237#ifndef TOLUA_RELEASE
2239 if (
2240 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2242 )
2243 goto tolua_lerror;
2244 else
2245#endif
2246 {
2247 lua_State* L = tolua_S;
2248 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2249 {
2250 const char* tolua_ret = (const char*) api_methods_city_tile_link(L,self);
2251 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2252 }
2253 }
2254 return 1;
2255#ifndef TOLUA_RELEASE
2257 tolua_error(tolua_S,"#ferror in function 'tile_link_text'.",&tolua_err);
2258 return 0;
2259#endif
2260}
2261
2262/* function: api_methods_unit_tile_get */
2264{
2265#ifndef TOLUA_RELEASE
2267 if (
2268 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2270 )
2271 goto tolua_lerror;
2272 else
2273#endif
2274 {
2275 lua_State* L = tolua_S;
2276 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2277 {
2279 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
2280 }
2281 }
2282 return 1;
2283#ifndef TOLUA_RELEASE
2285 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
2286 return 0;
2287#endif
2288}
2289
2290/* function: api_methods_unit_transporter */
2292{
2293#ifndef TOLUA_RELEASE
2295 if (
2296 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2298 )
2299 goto tolua_lerror;
2300 else
2301#endif
2302 {
2303 lua_State* L = tolua_S;
2304 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2305 {
2307 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
2308 }
2309 }
2310 return 1;
2311#ifndef TOLUA_RELEASE
2313 tolua_error(tolua_S,"#ferror in function 'transporter'.",&tolua_err);
2314 return 0;
2315#endif
2316}
2317
2318/* function: api_methods_unit_city_can_be_built_here */
2320{
2321#ifndef TOLUA_RELEASE
2323 if (
2324 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2326 )
2327 goto tolua_lerror;
2328 else
2329#endif
2330 {
2331 lua_State* L = tolua_S;
2332 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2333 {
2336 }
2337 }
2338 return 1;
2339#ifndef TOLUA_RELEASE
2341 tolua_error(tolua_S,"#ferror in function 'is_on_possible_city_tile'.",&tolua_err);
2342 return 0;
2343#endif
2344}
2345
2346/* function: api_methods_unit_can_upgrade */
2348{
2349#ifndef TOLUA_RELEASE
2351 if (
2352 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2355 )
2356 goto tolua_lerror;
2357 else
2358#endif
2359 {
2360 lua_State* L = tolua_S;
2361 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2362 bool is_free = ((bool) tolua_toboolean(tolua_S,2,TRUE));
2363 {
2366 }
2367 }
2368 return 1;
2369#ifndef TOLUA_RELEASE
2371 tolua_error(tolua_S,"#ferror in function 'can_upgrade'.",&tolua_err);
2372 return 0;
2373#endif
2374}
2375
2376/* function: api_methods_unit_transform_problem */
2378{
2379#ifndef TOLUA_RELEASE
2381 if (
2382 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2383 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
2385 )
2386 goto tolua_lerror;
2387 else
2388#endif
2389 {
2390 lua_State* L = tolua_S;
2391 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2393 {
2394 const char* tolua_ret = (const char*) api_methods_unit_transform_problem(L,punit,ptype);
2395 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2396 }
2397 }
2398 return 1;
2399#ifndef TOLUA_RELEASE
2401 tolua_error(tolua_S,"#ferror in function 'transform_problem'.",&tolua_err);
2402 return 0;
2403#endif
2404}
2405
2406/* function: api_methods_unit_orientation_get */
2408{
2409#ifndef TOLUA_RELEASE
2411 if (
2412 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2414 )
2415 goto tolua_lerror;
2416 else
2417#endif
2418 {
2419 lua_State* L = tolua_S;
2420 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2421 {
2423 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
2424 }
2425 }
2426 return 1;
2427#ifndef TOLUA_RELEASE
2429 tolua_error(tolua_S,"#ferror in function 'facing'.",&tolua_err);
2430 return 0;
2431#endif
2432}
2433
2434/* function: api_methods_unit_link */
2436{
2437#ifndef TOLUA_RELEASE
2439 if (
2440 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2442 )
2443 goto tolua_lerror;
2444 else
2445#endif
2446 {
2447 lua_State* L = tolua_S;
2448 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2449 {
2450 const char* tolua_ret = (const char*) api_methods_unit_link(L,self);
2451 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2452 }
2453 }
2454 return 1;
2455#ifndef TOLUA_RELEASE
2457 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2458 return 0;
2459#endif
2460}
2461
2462/* function: api_methods_unit_tile_link */
2464{
2465#ifndef TOLUA_RELEASE
2467 if (
2468 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2470 )
2471 goto tolua_lerror;
2472 else
2473#endif
2474 {
2475 lua_State* L = tolua_S;
2476 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2477 {
2478 const char* tolua_ret = (const char*) api_methods_unit_tile_link(L,self);
2479 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2480 }
2481 }
2482 return 1;
2483#ifndef TOLUA_RELEASE
2485 tolua_error(tolua_S,"#ferror in function 'tile_link_text'.",&tolua_err);
2486 return 0;
2487#endif
2488}
2489
2490/* function: api_methods_private_unit_cargo_list_head */
2492{
2493#ifndef TOLUA_RELEASE
2495 if (
2496 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2498 )
2499 goto tolua_lerror;
2500 else
2501#endif
2502 {
2503 lua_State* L = tolua_S;
2504 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2505 {
2507 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
2508 }
2509 }
2510 return 1;
2511#ifndef TOLUA_RELEASE
2513 tolua_error(tolua_S,"#ferror in function 'cargo_list_head'.",&tolua_err);
2514 return 0;
2515#endif
2516}
2517
2518/* function: api_methods_tile_nat_x */
2520{
2521#ifndef TOLUA_RELEASE
2523 if (
2524 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2526 )
2527 goto tolua_lerror;
2528 else
2529#endif
2530 {
2531 lua_State* L = tolua_S;
2532 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2533 {
2536 }
2537 }
2538 return 1;
2539#ifndef TOLUA_RELEASE
2541 tolua_error(tolua_S,"#ferror in function 'nat_x'.",&tolua_err);
2542 return 0;
2543#endif
2544}
2545
2546/* function: api_methods_tile_nat_y */
2548{
2549#ifndef TOLUA_RELEASE
2551 if (
2552 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2554 )
2555 goto tolua_lerror;
2556 else
2557#endif
2558 {
2559 lua_State* L = tolua_S;
2560 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2561 {
2564 }
2565 }
2566 return 1;
2567#ifndef TOLUA_RELEASE
2569 tolua_error(tolua_S,"#ferror in function 'nat_y'.",&tolua_err);
2570 return 0;
2571#endif
2572}
2573
2574/* function: api_methods_tile_map_x */
2576{
2577#ifndef TOLUA_RELEASE
2579 if (
2580 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2582 )
2583 goto tolua_lerror;
2584 else
2585#endif
2586 {
2587 lua_State* L = tolua_S;
2588 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2589 {
2592 }
2593 }
2594 return 1;
2595#ifndef TOLUA_RELEASE
2597 tolua_error(tolua_S,"#ferror in function 'x'.",&tolua_err);
2598 return 0;
2599#endif
2600}
2601
2602/* function: api_methods_tile_map_y */
2604{
2605#ifndef TOLUA_RELEASE
2607 if (
2608 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2610 )
2611 goto tolua_lerror;
2612 else
2613#endif
2614 {
2615 lua_State* L = tolua_S;
2616 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2617 {
2620 }
2621 }
2622 return 1;
2623#ifndef TOLUA_RELEASE
2625 tolua_error(tolua_S,"#ferror in function 'y'.",&tolua_err);
2626 return 0;
2627#endif
2628}
2629
2630/* function: api_methods_tile_city */
2632{
2633#ifndef TOLUA_RELEASE
2635 if (
2636 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2638 )
2639 goto tolua_lerror;
2640 else
2641#endif
2642 {
2643 lua_State* L = tolua_S;
2644 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2645 {
2647 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
2648 }
2649 }
2650 return 1;
2651#ifndef TOLUA_RELEASE
2653 tolua_error(tolua_S,"#ferror in function 'city'.",&tolua_err);
2654 return 0;
2655#endif
2656}
2657
2658/* function: api_methods_tile_city_exists_within_max_city_map */
2660{
2661#ifndef TOLUA_RELEASE
2663 if (
2664 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2667 )
2668 goto tolua_lerror;
2669 else
2670#endif
2671 {
2672 lua_State* L = tolua_S;
2673 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2674 bool center = ((bool) tolua_toboolean(tolua_S,2,0));
2675 {
2678 }
2679 }
2680 return 1;
2681#ifndef TOLUA_RELEASE
2683 tolua_error(tolua_S,"#ferror in function 'city_exists_within_max_city_map'.",&tolua_err);
2684 return 0;
2685#endif
2686}
2687
2688/* function: api_methods_tile_has_extra */
2690{
2691#ifndef TOLUA_RELEASE
2693 if (
2694 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2697 )
2698 goto tolua_lerror;
2699 else
2700#endif
2701 {
2702 lua_State* L = tolua_S;
2703 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2704 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2705 {
2708 }
2709 }
2710 return 1;
2711#ifndef TOLUA_RELEASE
2713 tolua_error(tolua_S,"#ferror in function 'has_extra'.",&tolua_err);
2714 return 0;
2715#endif
2716}
2717
2718/* function: api_methods_tile_has_base */
2720{
2721#ifndef TOLUA_RELEASE
2723 if (
2724 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2727 )
2728 goto tolua_lerror;
2729 else
2730#endif
2731 {
2732 lua_State* L = tolua_S;
2733 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2734 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2735 {
2738 }
2739 }
2740 return 1;
2741#ifndef TOLUA_RELEASE
2743 tolua_error(tolua_S,"#ferror in function 'has_base'.",&tolua_err);
2744 return 0;
2745#endif
2746}
2747
2748/* function: api_methods_tile_has_road */
2750{
2751#ifndef TOLUA_RELEASE
2753 if (
2754 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2757 )
2758 goto tolua_lerror;
2759 else
2760#endif
2761 {
2762 lua_State* L = tolua_S;
2763 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2764 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2765 {
2768 }
2769 }
2770 return 1;
2771#ifndef TOLUA_RELEASE
2773 tolua_error(tolua_S,"#ferror in function 'has_road'.",&tolua_err);
2774 return 0;
2775#endif
2776}
2777
2778/* function: api_methods_tile_extra_owner */
2780{
2781#ifndef TOLUA_RELEASE
2783 if (
2784 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2787 )
2788 goto tolua_lerror;
2789 else
2790#endif
2791 {
2792 lua_State* L = tolua_S;
2793 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2794 const char* extra_name = ((const char*) tolua_tostring(tolua_S,2,0));
2795 {
2797 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
2798 }
2799 }
2800 return 1;
2801#ifndef TOLUA_RELEASE
2803 tolua_error(tolua_S,"#ferror in function 'extra_owner'.",&tolua_err);
2804 return 0;
2805#endif
2806}
2807
2808/* function: api_methods_enemy_tile */
2810{
2811#ifndef TOLUA_RELEASE
2813 if (
2814 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2815 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
2817 )
2818 goto tolua_lerror;
2819 else
2820#endif
2821 {
2822 lua_State* L = tolua_S;
2823 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2825 {
2828 }
2829 }
2830 return 1;
2831#ifndef TOLUA_RELEASE
2833 tolua_error(tolua_S,"#ferror in function 'is_enemy'.",&tolua_err);
2834 return 0;
2835#endif
2836}
2837
2838/* function: api_methods_tile_num_units */
2840{
2841#ifndef TOLUA_RELEASE
2843 if (
2844 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2846 )
2847 goto tolua_lerror;
2848 else
2849#endif
2850 {
2851 lua_State* L = tolua_S;
2852 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2853 {
2856 }
2857 }
2858 return 1;
2859#ifndef TOLUA_RELEASE
2861 tolua_error(tolua_S,"#ferror in function 'num_units'.",&tolua_err);
2862 return 0;
2863#endif
2864}
2865
2866/* function: api_methods_tile_sq_distance */
2868{
2869#ifndef TOLUA_RELEASE
2871 if (
2872 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2873 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
2875 )
2876 goto tolua_lerror;
2877 else
2878#endif
2879 {
2880 lua_State* L = tolua_S;
2881 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2882 Tile* other = ((Tile*) tolua_tousertype(tolua_S,2,0));
2883 {
2886 }
2887 }
2888 return 1;
2889#ifndef TOLUA_RELEASE
2891 tolua_error(tolua_S,"#ferror in function 'sq_distance'.",&tolua_err);
2892 return 0;
2893#endif
2894}
2895
2896/* function: api_methods_tile_link */
2898{
2899#ifndef TOLUA_RELEASE
2901 if (
2902 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2904 )
2905 goto tolua_lerror;
2906 else
2907#endif
2908 {
2909 lua_State* L = tolua_S;
2910 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2911 {
2912 const char* tolua_ret = (const char*) api_methods_tile_link(L,self);
2913 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2914 }
2915 }
2916 return 1;
2917#ifndef TOLUA_RELEASE
2919 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2920 return 0;
2921#endif
2922}
2923
2924/* function: api_methods_private_tile_next_outward_index */
2926{
2927#ifndef TOLUA_RELEASE
2929 if (
2930 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2934 )
2935 goto tolua_lerror;
2936 else
2937#endif
2938 {
2939 lua_State* L = tolua_S;
2941 int tindex = ((int) tolua_tonumber(tolua_S,2,0));
2942 int max_dist = ((int) tolua_tonumber(tolua_S,3,0));
2943 {
2946 }
2947 }
2948 return 1;
2949#ifndef TOLUA_RELEASE
2951 tolua_error(tolua_S,"#ferror in function 'next_outward_index'.",&tolua_err);
2952 return 0;
2953#endif
2954}
2955
2956/* function: api_methods_private_tile_for_outward_index */
2958{
2959#ifndef TOLUA_RELEASE
2961 if (
2962 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2965 )
2966 goto tolua_lerror;
2967 else
2968#endif
2969 {
2970 lua_State* L = tolua_S;
2972 int tindex = ((int) tolua_tonumber(tolua_S,2,0));
2973 {
2975 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
2976 }
2977 }
2978 return 1;
2979#ifndef TOLUA_RELEASE
2981 tolua_error(tolua_S,"#ferror in function 'tile_for_outward_index'.",&tolua_err);
2982 return 0;
2983#endif
2984}
2985
2986/* function: api_methods_private_tile_unit_list_head */
2988{
2989#ifndef TOLUA_RELEASE
2991 if (
2992 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2994 )
2995 goto tolua_lerror;
2996 else
2997#endif
2998 {
2999 lua_State* L = tolua_S;
3000 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
3001 {
3003 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
3004 }
3005 }
3006 return 1;
3007#ifndef TOLUA_RELEASE
3009 tolua_error(tolua_S,"#ferror in function 'unit_list_head'.",&tolua_err);
3010 return 0;
3011#endif
3012}
3013
3014/* function: api_methods_government_rule_name */
3016{
3017#ifndef TOLUA_RELEASE
3019 if (
3020 !tolua_isusertype(tolua_S,1,"Government",0,&tolua_err) ||
3022 )
3023 goto tolua_lerror;
3024 else
3025#endif
3026 {
3027 lua_State* L = tolua_S;
3029 {
3030 const char* tolua_ret = (const char*) api_methods_government_rule_name(L,self);
3031 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3032 }
3033 }
3034 return 1;
3035#ifndef TOLUA_RELEASE
3037 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3038 return 0;
3039#endif
3040}
3041
3042/* function: api_methods_government_name_translation */
3044{
3045#ifndef TOLUA_RELEASE
3047 if (
3048 !tolua_isusertype(tolua_S,1,"Government",0,&tolua_err) ||
3050 )
3051 goto tolua_lerror;
3052 else
3053#endif
3054 {
3055 lua_State* L = tolua_S;
3057 {
3058 const char* tolua_ret = (const char*) api_methods_government_name_translation(L,self);
3059 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3060 }
3061 }
3062 return 1;
3063#ifndef TOLUA_RELEASE
3065 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3066 return 0;
3067#endif
3068}
3069
3070/* function: api_methods_nation_type_rule_name */
3072{
3073#ifndef TOLUA_RELEASE
3075 if (
3076 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3078 )
3079 goto tolua_lerror;
3080 else
3081#endif
3082 {
3083 lua_State* L = tolua_S;
3085 {
3086 const char* tolua_ret = (const char*) api_methods_nation_type_rule_name(L,self);
3087 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3088 }
3089 }
3090 return 1;
3091#ifndef TOLUA_RELEASE
3093 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3094 return 0;
3095#endif
3096}
3097
3098/* function: api_methods_nation_type_name_translation */
3100{
3101#ifndef TOLUA_RELEASE
3103 if (
3104 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3106 )
3107 goto tolua_lerror;
3108 else
3109#endif
3110 {
3111 lua_State* L = tolua_S;
3113 {
3114 const char* tolua_ret = (const char*) api_methods_nation_type_name_translation(L,self);
3115 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3116 }
3117 }
3118 return 1;
3119#ifndef TOLUA_RELEASE
3121 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3122 return 0;
3123#endif
3124}
3125
3126/* function: api_methods_nation_type_plural_translation */
3128{
3129#ifndef TOLUA_RELEASE
3131 if (
3132 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3134 )
3135 goto tolua_lerror;
3136 else
3137#endif
3138 {
3139 lua_State* L = tolua_S;
3141 {
3142 const char* tolua_ret = (const char*) api_methods_nation_type_plural_translation(L,self);
3143 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3144 }
3145 }
3146 return 1;
3147#ifndef TOLUA_RELEASE
3149 tolua_error(tolua_S,"#ferror in function 'plural_translation'.",&tolua_err);
3150 return 0;
3151#endif
3152}
3153
3154/* function: api_methods_building_type_is_wonder */
3156{
3157#ifndef TOLUA_RELEASE
3159 if (
3160 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3162 )
3163 goto tolua_lerror;
3164 else
3165#endif
3166 {
3167 lua_State* L = tolua_S;
3169 {
3172 }
3173 }
3174 return 1;
3175#ifndef TOLUA_RELEASE
3177 tolua_error(tolua_S,"#ferror in function 'is_wonder'.",&tolua_err);
3178 return 0;
3179#endif
3180}
3181
3182/* function: api_methods_building_type_is_great_wonder */
3184{
3185#ifndef TOLUA_RELEASE
3187 if (
3188 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3190 )
3191 goto tolua_lerror;
3192 else
3193#endif
3194 {
3195 lua_State* L = tolua_S;
3197 {
3200 }
3201 }
3202 return 1;
3203#ifndef TOLUA_RELEASE
3205 tolua_error(tolua_S,"#ferror in function 'is_great_wonder'.",&tolua_err);
3206 return 0;
3207#endif
3208}
3209
3210/* function: api_methods_building_type_is_small_wonder */
3212{
3213#ifndef TOLUA_RELEASE
3215 if (
3216 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3218 )
3219 goto tolua_lerror;
3220 else
3221#endif
3222 {
3223 lua_State* L = tolua_S;
3225 {
3228 }
3229 }
3230 return 1;
3231#ifndef TOLUA_RELEASE
3233 tolua_error(tolua_S,"#ferror in function 'is_small_wonder'.",&tolua_err);
3234 return 0;
3235#endif
3236}
3237
3238/* function: api_methods_building_type_is_improvement */
3240{
3241#ifndef TOLUA_RELEASE
3243 if (
3244 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3246 )
3247 goto tolua_lerror;
3248 else
3249#endif
3250 {
3251 lua_State* L = tolua_S;
3253 {
3256 }
3257 }
3258 return 1;
3259#ifndef TOLUA_RELEASE
3261 tolua_error(tolua_S,"#ferror in function 'is_improvement'.",&tolua_err);
3262 return 0;
3263#endif
3264}
3265
3266/* function: api_methods_building_type_rule_name */
3268{
3269#ifndef TOLUA_RELEASE
3271 if (
3272 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3274 )
3275 goto tolua_lerror;
3276 else
3277#endif
3278 {
3279 lua_State* L = tolua_S;
3281 {
3282 const char* tolua_ret = (const char*) api_methods_building_type_rule_name(L,self);
3283 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3284 }
3285 }
3286 return 1;
3287#ifndef TOLUA_RELEASE
3289 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3290 return 0;
3291#endif
3292}
3293
3294/* function: api_methods_building_type_name_translation */
3296{
3297#ifndef TOLUA_RELEASE
3299 if (
3300 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3302 )
3303 goto tolua_lerror;
3304 else
3305#endif
3306 {
3307 lua_State* L = tolua_S;
3309 {
3310 const char* tolua_ret = (const char*) api_methods_building_type_name_translation(L,self);
3311 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3312 }
3313 }
3314 return 1;
3315#ifndef TOLUA_RELEASE
3317 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3318 return 0;
3319#endif
3320}
3321
3322/* function: api_methods_unit_type_has_flag */
3324{
3325#ifndef TOLUA_RELEASE
3327 if (
3328 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3331 )
3332 goto tolua_lerror;
3333 else
3334#endif
3335 {
3336 lua_State* L = tolua_S;
3338 const char* flag = ((const char*) tolua_tostring(tolua_S,2,0));
3339 {
3342 }
3343 }
3344 return 1;
3345#ifndef TOLUA_RELEASE
3347 tolua_error(tolua_S,"#ferror in function 'has_flag'.",&tolua_err);
3348 return 0;
3349#endif
3350}
3351
3352/* function: api_methods_unit_type_has_role */
3354{
3355#ifndef TOLUA_RELEASE
3357 if (
3358 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3361 )
3362 goto tolua_lerror;
3363 else
3364#endif
3365 {
3366 lua_State* L = tolua_S;
3368 const char* role = ((const char*) tolua_tostring(tolua_S,2,0));
3369 {
3372 }
3373 }
3374 return 1;
3375#ifndef TOLUA_RELEASE
3377 tolua_error(tolua_S,"#ferror in function 'has_role'.",&tolua_err);
3378 return 0;
3379#endif
3380}
3381
3382/* function: api_methods_unit_type_rule_name */
3384{
3385#ifndef TOLUA_RELEASE
3387 if (
3388 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3390 )
3391 goto tolua_lerror;
3392 else
3393#endif
3394 {
3395 lua_State* L = tolua_S;
3397 {
3398 const char* tolua_ret = (const char*) api_methods_unit_type_rule_name(L,self);
3399 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3400 }
3401 }
3402 return 1;
3403#ifndef TOLUA_RELEASE
3405 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3406 return 0;
3407#endif
3408}
3409
3410/* function: api_methods_unit_type_name_translation */
3412{
3413#ifndef TOLUA_RELEASE
3415 if (
3416 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3418 )
3419 goto tolua_lerror;
3420 else
3421#endif
3422 {
3423 lua_State* L = tolua_S;
3425 {
3426 const char* tolua_ret = (const char*) api_methods_unit_type_name_translation(L,self);
3427 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3428 }
3429 }
3430 return 1;
3431#ifndef TOLUA_RELEASE
3433 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3434 return 0;
3435#endif
3436}
3437
3438/* function: api_methods_unit_type_can_exist_at_tile */
3440{
3441#ifndef TOLUA_RELEASE
3443 if (
3444 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3445 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
3447 )
3448 goto tolua_lerror;
3449 else
3450#endif
3451 {
3452 lua_State* L = tolua_S;
3454 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
3455 {
3458 }
3459 }
3460 return 1;
3461#ifndef TOLUA_RELEASE
3463 tolua_error(tolua_S,"#ferror in function 'can_exist_at_tile'.",&tolua_err);
3464 return 0;
3465#endif
3466}
3467
3468/* function: api_methods_tech_type_rule_name */
3470{
3471#ifndef TOLUA_RELEASE
3473 if (
3474 !tolua_isusertype(tolua_S,1,"Tech_Type",0,&tolua_err) ||
3476 )
3477 goto tolua_lerror;
3478 else
3479#endif
3480 {
3481 lua_State* L = tolua_S;
3483 {
3484 const char* tolua_ret = (const char*) api_methods_tech_type_rule_name(L,self);
3485 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3486 }
3487 }
3488 return 1;
3489#ifndef TOLUA_RELEASE
3491 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3492 return 0;
3493#endif
3494}
3495
3496/* function: api_methods_tech_type_name_translation */
3498{
3499#ifndef TOLUA_RELEASE
3501 if (
3502 !tolua_isusertype(tolua_S,1,"Tech_Type",0,&tolua_err) ||
3504 )
3505 goto tolua_lerror;
3506 else
3507#endif
3508 {
3509 lua_State* L = tolua_S;
3511 {
3512 const char* tolua_ret = (const char*) api_methods_tech_type_name_translation(L,self);
3513 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3514 }
3515 }
3516 return 1;
3517#ifndef TOLUA_RELEASE
3519 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3520 return 0;
3521#endif
3522}
3523
3524/* function: api_methods_terrain_rule_name */
3526{
3527#ifndef TOLUA_RELEASE
3529 if (
3530 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3532 )
3533 goto tolua_lerror;
3534 else
3535#endif
3536 {
3537 lua_State* L = tolua_S;
3539 {
3540 const char* tolua_ret = (const char*) api_methods_terrain_rule_name(L,self);
3541 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3542 }
3543 }
3544 return 1;
3545#ifndef TOLUA_RELEASE
3547 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3548 return 0;
3549#endif
3550}
3551
3552/* function: api_methods_terrain_name_translation */
3554{
3555#ifndef TOLUA_RELEASE
3557 if (
3558 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3560 )
3561 goto tolua_lerror;
3562 else
3563#endif
3564 {
3565 lua_State* L = tolua_S;
3567 {
3568 const char* tolua_ret = (const char*) api_methods_terrain_name_translation(L,self);
3569 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3570 }
3571 }
3572 return 1;
3573#ifndef TOLUA_RELEASE
3575 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3576 return 0;
3577#endif
3578}
3579
3580/* function: api_methods_terrain_class_name */
3582{
3583#ifndef TOLUA_RELEASE
3585 if (
3586 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3588 )
3589 goto tolua_lerror;
3590 else
3591#endif
3592 {
3593 lua_State* L = tolua_S;
3595 {
3596 const char* tolua_ret = (const char*) api_methods_terrain_class_name(L,self);
3597 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3598 }
3599 }
3600 return 1;
3601#ifndef TOLUA_RELEASE
3603 tolua_error(tolua_S,"#ferror in function 'class_name'.",&tolua_err);
3604 return 0;
3605#endif
3606}
3607
3608/* function: api_methods_disaster_rule_name */
3610{
3611#ifndef TOLUA_RELEASE
3613 if (
3614 !tolua_isusertype(tolua_S,1,"Disaster",0,&tolua_err) ||
3616 )
3617 goto tolua_lerror;
3618 else
3619#endif
3620 {
3621 lua_State* L = tolua_S;
3623 {
3624 const char* tolua_ret = (const char*) api_methods_disaster_rule_name(L,self);
3625 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3626 }
3627 }
3628 return 1;
3629#ifndef TOLUA_RELEASE
3631 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3632 return 0;
3633#endif
3634}
3635
3636/* function: api_methods_disaster_name_translation */
3638{
3639#ifndef TOLUA_RELEASE
3641 if (
3642 !tolua_isusertype(tolua_S,1,"Disaster",0,&tolua_err) ||
3644 )
3645 goto tolua_lerror;
3646 else
3647#endif
3648 {
3649 lua_State* L = tolua_S;
3651 {
3652 const char* tolua_ret = (const char*) api_methods_disaster_name_translation(L,self);
3653 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3654 }
3655 }
3656 return 1;
3657#ifndef TOLUA_RELEASE
3659 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3660 return 0;
3661#endif
3662}
3663
3664/* function: api_methods_achievement_rule_name */
3666{
3667#ifndef TOLUA_RELEASE
3669 if (
3670 !tolua_isusertype(tolua_S,1,"Achievement",0,&tolua_err) ||
3672 )
3673 goto tolua_lerror;
3674 else
3675#endif
3676 {
3677 lua_State* L = tolua_S;
3679 {
3680 const char* tolua_ret = (const char*) api_methods_achievement_rule_name(L,self);
3681 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3682 }
3683 }
3684 return 1;
3685#ifndef TOLUA_RELEASE
3687 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3688 return 0;
3689#endif
3690}
3691
3692/* function: api_methods_achievement_name_translation */
3694{
3695#ifndef TOLUA_RELEASE
3697 if (
3698 !tolua_isusertype(tolua_S,1,"Achievement",0,&tolua_err) ||
3700 )
3701 goto tolua_lerror;
3702 else
3703#endif
3704 {
3705 lua_State* L = tolua_S;
3707 {
3708 const char* tolua_ret = (const char*) api_methods_achievement_name_translation(L,self);
3709 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3710 }
3711 }
3712 return 1;
3713#ifndef TOLUA_RELEASE
3715 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3716 return 0;
3717#endif
3718}
3719
3720/* function: api_methods_action_rule_name */
3722{
3723#ifndef TOLUA_RELEASE
3725 if (
3726 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3728 )
3729 goto tolua_lerror;
3730 else
3731#endif
3732 {
3733 lua_State* L = tolua_S;
3735 {
3736 const char* tolua_ret = (const char*) api_methods_action_rule_name(L,self);
3737 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3738 }
3739 }
3740 return 1;
3741#ifndef TOLUA_RELEASE
3743 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3744 return 0;
3745#endif
3746}
3747
3748/* function: api_methods_action_name_translation */
3750{
3751#ifndef TOLUA_RELEASE
3753 if (
3754 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3756 )
3757 goto tolua_lerror;
3758 else
3759#endif
3760 {
3761 lua_State* L = tolua_S;
3763 {
3764 const char* tolua_ret = (const char*) api_methods_action_name_translation(L,self);
3765 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3766 }
3767 }
3768 return 1;
3769#ifndef TOLUA_RELEASE
3771 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3772 return 0;
3773#endif
3774}
3775
3776/* function: api_methods_action_target_kind */
3778{
3779#ifndef TOLUA_RELEASE
3781 if (
3782 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3784 )
3785 goto tolua_lerror;
3786 else
3787#endif
3788 {
3789 lua_State* L = tolua_S;
3791 {
3792 const char* tolua_ret = (const char*) api_methods_action_target_kind(L,self);
3793 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3794 }
3795 }
3796 return 1;
3797#ifndef TOLUA_RELEASE
3799 tolua_error(tolua_S,"#ferror in function 'target_kind'.",&tolua_err);
3800 return 0;
3801#endif
3802}
3803
3804/* function: api_methods_unit_list_link_data */
3806{
3807#ifndef TOLUA_RELEASE
3809 if (
3810 !tolua_isusertype(tolua_S,1,"Unit_List_Link",0,&tolua_err) ||
3812 )
3813 goto tolua_lerror;
3814 else
3815#endif
3816 {
3817 lua_State* L = tolua_S;
3819 {
3821 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
3822 }
3823 }
3824 return 1;
3825#ifndef TOLUA_RELEASE
3827 tolua_error(tolua_S,"#ferror in function 'data'.",&tolua_err);
3828 return 0;
3829#endif
3830}
3831
3832/* function: api_methods_unit_list_next_link */
3834{
3835#ifndef TOLUA_RELEASE
3837 if (
3838 !tolua_isusertype(tolua_S,1,"Unit_List_Link",0,&tolua_err) ||
3840 )
3841 goto tolua_lerror;
3842 else
3843#endif
3844 {
3845 lua_State* L = tolua_S;
3847 {
3849 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
3850 }
3851 }
3852 return 1;
3853#ifndef TOLUA_RELEASE
3855 tolua_error(tolua_S,"#ferror in function 'next'.",&tolua_err);
3856 return 0;
3857#endif
3858}
3859
3860/* function: api_methods_city_list_link_data */
3862{
3863#ifndef TOLUA_RELEASE
3865 if (
3866 !tolua_isusertype(tolua_S,1,"City_List_Link",0,&tolua_err) ||
3868 )
3869 goto tolua_lerror;
3870 else
3871#endif
3872 {
3873 lua_State* L = tolua_S;
3875 {
3877 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
3878 }
3879 }
3880 return 1;
3881#ifndef TOLUA_RELEASE
3883 tolua_error(tolua_S,"#ferror in function 'data'.",&tolua_err);
3884 return 0;
3885#endif
3886}
3887
3888/* function: api_methods_city_list_next_link */
3890{
3891#ifndef TOLUA_RELEASE
3893 if (
3894 !tolua_isusertype(tolua_S,1,"City_List_Link",0,&tolua_err) ||
3896 )
3897 goto tolua_lerror;
3898 else
3899#endif
3900 {
3901 lua_State* L = tolua_S;
3903 {
3905 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City_List_Link");
3906 }
3907 }
3908 return 1;
3909#ifndef TOLUA_RELEASE
3911 tolua_error(tolua_S,"#ferror in function 'next'.",&tolua_err);
3912 return 0;
3913#endif
3914}
3915
3916/* function: api_find_counter_by_name */
3918{
3919#ifndef TOLUA_RELEASE
3921 if (
3924 )
3925 goto tolua_lerror;
3926 else
3927#endif
3928 {
3929 lua_State* L = tolua_S;
3930 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
3931 {
3933 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Counter");
3934 }
3935 }
3936 return 1;
3937#ifndef TOLUA_RELEASE
3939 tolua_error(tolua_S,"#ferror in function 'counter'.",&tolua_err);
3940 return 0;
3941#endif
3942}
3943
3944/* function: api_find_counter */
3946{
3948 if (
3951 )
3952 goto tolua_lerror;
3953 else
3954 {
3955 lua_State* L = tolua_S;
3956 int counter_id = ((int) tolua_tonumber(tolua_S,1,0));
3957 {
3959 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Counter");
3960 }
3961 }
3962 return 1;
3965}
3966
3967/* function: api_find_player_by_name */
3969{
3970#ifndef TOLUA_RELEASE
3972 if (
3975 )
3976 goto tolua_lerror;
3977 else
3978#endif
3979 {
3980 lua_State* L = tolua_S;
3981 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
3982 {
3984 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
3985 }
3986 }
3987 return 1;
3988#ifndef TOLUA_RELEASE
3990 tolua_error(tolua_S,"#ferror in function 'player'.",&tolua_err);
3991 return 0;
3992#endif
3993}
3994
3995/* function: api_find_player */
3997{
3999 if (
4002 )
4003 goto tolua_lerror;
4004 else
4005 {
4006 lua_State* L = tolua_S;
4007 int player_id = ((int) tolua_tonumber(tolua_S,1,0));
4008 {
4009 Player* tolua_ret = (Player*) api_find_player(L,player_id);
4010 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
4011 }
4012 }
4013 return 1;
4016}
4017
4018/* function: api_find_city */
4020{
4021#ifndef TOLUA_RELEASE
4023 if (
4024 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4027 )
4028 goto tolua_lerror;
4029 else
4030#endif
4031 {
4032 lua_State* L = tolua_S;
4033 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4034 int city_id = ((int) tolua_tonumber(tolua_S,2,0));
4035 {
4036 City* tolua_ret = (City*) api_find_city(L,pplayer,city_id);
4037 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
4038 }
4039 }
4040 return 1;
4041#ifndef TOLUA_RELEASE
4043 tolua_error(tolua_S,"#ferror in function 'city'.",&tolua_err);
4044 return 0;
4045#endif
4046}
4047
4048/* function: api_find_unit */
4050{
4051#ifndef TOLUA_RELEASE
4053 if (
4054 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4057 )
4058 goto tolua_lerror;
4059 else
4060#endif
4061 {
4062 lua_State* L = tolua_S;
4063 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4064 int unit_id = ((int) tolua_tonumber(tolua_S,2,0));
4065 {
4066 Unit* tolua_ret = (Unit*) api_find_unit(L,pplayer,unit_id);
4067 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
4068 }
4069 }
4070 return 1;
4071#ifndef TOLUA_RELEASE
4073 tolua_error(tolua_S,"#ferror in function 'unit'.",&tolua_err);
4074 return 0;
4075#endif
4076}
4077
4078/* function: api_find_transport_unit */
4080{
4081#ifndef TOLUA_RELEASE
4083 if (
4084 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4085 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
4086 !tolua_isusertype(tolua_S,3,"Tile",0,&tolua_err) ||
4088 )
4089 goto tolua_lerror;
4090 else
4091#endif
4092 {
4093 lua_State* L = tolua_S;
4094 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4096 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,3,0));
4097 {
4098 Unit* tolua_ret = (Unit*) api_find_transport_unit(L,pplayer,ptype,ptile);
4099 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
4100 }
4101 }
4102 return 1;
4103#ifndef TOLUA_RELEASE
4105 tolua_error(tolua_S,"#ferror in function 'transport_unit'.",&tolua_err);
4106 return 0;
4107#endif
4108}
4109
4110/* function: api_find_tile */
4112{
4113#ifndef TOLUA_RELEASE
4115 if (
4119 )
4120 goto tolua_lerror;
4121 else
4122#endif
4123 {
4124 lua_State* L = tolua_S;
4125 int nat_x = ((int) tolua_tonumber(tolua_S,1,0));
4126 int nat_y = ((int) tolua_tonumber(tolua_S,2,0));
4127 {
4129 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
4130 }
4131 }
4132 return 1;
4133#ifndef TOLUA_RELEASE
4135 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
4136 return 0;
4137#endif
4138}
4139
4140/* function: api_find_tile_by_index */
4142{
4144 if (
4147 )
4148 goto tolua_lerror;
4149 else
4150 {
4151 lua_State* L = tolua_S;
4152 int tindex = ((int) tolua_tonumber(tolua_S,1,0));
4153 {
4155 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
4156 }
4157 }
4158 return 1;
4161}
4162
4163/* function: api_find_government_by_name */
4165{
4166#ifndef TOLUA_RELEASE
4168 if (
4171 )
4172 goto tolua_lerror;
4173 else
4174#endif
4175 {
4176 lua_State* L = tolua_S;
4177 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4178 {
4180 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Government");
4181 }
4182 }
4183 return 1;
4184#ifndef TOLUA_RELEASE
4186 tolua_error(tolua_S,"#ferror in function 'government'.",&tolua_err);
4187 return 0;
4188#endif
4189}
4190
4191/* function: api_find_government */
4193{
4195 if (
4198 )
4199 goto tolua_lerror;
4200 else
4201 {
4202 lua_State* L = tolua_S;
4203 int government_id = ((int) tolua_tonumber(tolua_S,1,0));
4204 {
4206 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Government");
4207 }
4208 }
4209 return 1;
4212}
4213
4214/* function: api_find_nation_type_by_name */
4216{
4217#ifndef TOLUA_RELEASE
4219 if (
4222 )
4223 goto tolua_lerror;
4224 else
4225#endif
4226 {
4227 lua_State* L = tolua_S;
4228 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4229 {
4231 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nation_Type");
4232 }
4233 }
4234 return 1;
4235#ifndef TOLUA_RELEASE
4237 tolua_error(tolua_S,"#ferror in function 'nation_type'.",&tolua_err);
4238 return 0;
4239#endif
4240}
4241
4242/* function: api_find_nation_type */
4244{
4246 if (
4249 )
4250 goto tolua_lerror;
4251 else
4252 {
4253 lua_State* L = tolua_S;
4255 {
4257 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nation_Type");
4258 }
4259 }
4260 return 1;
4263}
4264
4265/* function: api_find_action_by_name */
4267{
4268#ifndef TOLUA_RELEASE
4270 if (
4273 )
4274 goto tolua_lerror;
4275 else
4276#endif
4277 {
4278 lua_State* L = tolua_S;
4279 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4280 {
4282 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4283 }
4284 }
4285 return 1;
4286#ifndef TOLUA_RELEASE
4288 tolua_error(tolua_S,"#ferror in function 'action'.",&tolua_err);
4289 return 0;
4290#endif
4291}
4292
4293/* function: api_find_action */
4295{
4297 if (
4300 )
4301 goto tolua_lerror;
4302 else
4303 {
4304 lua_State* L = tolua_S;
4306 {
4308 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4309 }
4310 }
4311 return 1;
4314}
4315
4316/* function: api_find_building_type_by_name */
4318{
4319#ifndef TOLUA_RELEASE
4321 if (
4324 )
4325 goto tolua_lerror;
4326 else
4327#endif
4328 {
4329 lua_State* L = tolua_S;
4330 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4331 {
4333 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Building_Type");
4334 }
4335 }
4336 return 1;
4337#ifndef TOLUA_RELEASE
4339 tolua_error(tolua_S,"#ferror in function 'building_type'.",&tolua_err);
4340 return 0;
4341#endif
4342}
4343
4344/* function: api_find_building_type */
4346{
4348 if (
4351 )
4352 goto tolua_lerror;
4353 else
4354 {
4355 lua_State* L = tolua_S;
4357 {
4359 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Building_Type");
4360 }
4361 }
4362 return 1;
4365}
4366
4367/* function: api_find_unit_type_by_name */
4369{
4370#ifndef TOLUA_RELEASE
4372 if (
4375 )
4376 goto tolua_lerror;
4377 else
4378#endif
4379 {
4380 lua_State* L = tolua_S;
4381 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4382 {
4384 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4385 }
4386 }
4387 return 1;
4388#ifndef TOLUA_RELEASE
4390 tolua_error(tolua_S,"#ferror in function 'unit_type'.",&tolua_err);
4391 return 0;
4392#endif
4393}
4394
4395/* function: api_find_unit_type */
4397{
4399 if (
4402 )
4403 goto tolua_lerror;
4404 else
4405 {
4406 lua_State* L = tolua_S;
4407 int unit_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4408 {
4410 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4411 }
4412 }
4413 return 1;
4416}
4417
4418/* function: api_find_role_unit_type */
4420{
4421#ifndef TOLUA_RELEASE
4423 if (
4425 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
4427 )
4428 goto tolua_lerror;
4429 else
4430#endif
4431 {
4432 lua_State* L = tolua_S;
4433 const char* role_name = ((const char*) tolua_tostring(tolua_S,1,0));
4434 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
4435 {
4437 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4438 }
4439 }
4440 return 1;
4441#ifndef TOLUA_RELEASE
4443 tolua_error(tolua_S,"#ferror in function 'role_unit_type'.",&tolua_err);
4444 return 0;
4445#endif
4446}
4447
4448/* function: api_find_tech_type_by_name */
4450{
4451#ifndef TOLUA_RELEASE
4453 if (
4456 )
4457 goto tolua_lerror;
4458 else
4459#endif
4460 {
4461 lua_State* L = tolua_S;
4462 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4463 {
4465 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
4466 }
4467 }
4468 return 1;
4469#ifndef TOLUA_RELEASE
4471 tolua_error(tolua_S,"#ferror in function 'tech_type'.",&tolua_err);
4472 return 0;
4473#endif
4474}
4475
4476/* function: api_find_tech_type */
4478{
4480 if (
4483 )
4484 goto tolua_lerror;
4485 else
4486 {
4487 lua_State* L = tolua_S;
4488 int tech_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4489 {
4491 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
4492 }
4493 }
4494 return 1;
4497}
4498
4499/* function: api_find_terrain_by_name */
4501{
4502#ifndef TOLUA_RELEASE
4504 if (
4507 )
4508 goto tolua_lerror;
4509 else
4510#endif
4511 {
4512 lua_State* L = tolua_S;
4513 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4514 {
4516 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Terrain");
4517 }
4518 }
4519 return 1;
4520#ifndef TOLUA_RELEASE
4522 tolua_error(tolua_S,"#ferror in function 'terrain'.",&tolua_err);
4523 return 0;
4524#endif
4525}
4526
4527/* function: api_find_terrain */
4529{
4531 if (
4534 )
4535 goto tolua_lerror;
4536 else
4537 {
4538 lua_State* L = tolua_S;
4539 int terrain_id = ((int) tolua_tonumber(tolua_S,1,0));
4540 {
4542 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Terrain");
4543 }
4544 }
4545 return 1;
4548}
4549
4550/* function: api_find_achievement_by_name */
4552{
4553#ifndef TOLUA_RELEASE
4555 if (
4558 )
4559 goto tolua_lerror;
4560 else
4561#endif
4562 {
4563 lua_State* L = tolua_S;
4564 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4565 {
4567 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Achievement");
4568 }
4569 }
4570 return 1;
4571#ifndef TOLUA_RELEASE
4573 tolua_error(tolua_S,"#ferror in function 'achievement'.",&tolua_err);
4574 return 0;
4575#endif
4576}
4577
4578/* function: api_find_achievement */
4580{
4582 if (
4585 )
4586 goto tolua_lerror;
4587 else
4588 {
4589 lua_State* L = tolua_S;
4591 {
4593 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Achievement");
4594 }
4595 }
4596 return 1;
4599}
4600
4601/* function: api_find_disaster_by_name */
4603{
4605 if (
4608 )
4609 goto tolua_lerror;
4610 else
4611 {
4612 lua_State* L = tolua_S;
4613 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4614 {
4616 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Disaster");
4617 }
4618 }
4619 return 1;
4622}
4623
4624/* function: api_find_disaster */
4626{
4627#ifndef TOLUA_RELEASE
4629 if (
4632 )
4633 goto tolua_lerror;
4634 else
4635#endif
4636 {
4637 lua_State* L = tolua_S;
4638 int disaster_id = ((int) tolua_tonumber(tolua_S,1,0));
4639 {
4641 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Disaster");
4642 }
4643 }
4644 return 1;
4645#ifndef TOLUA_RELEASE
4647 tolua_error(tolua_S,"#ferror in function 'disaster'.",&tolua_err);
4648 return 0;
4649#endif
4650}
4651
4652/* function: api_utilities_str2dir */
4654{
4655#ifndef TOLUA_RELEASE
4657 if (
4660 )
4661 goto tolua_lerror;
4662 else
4663#endif
4664 {
4665 lua_State* L = tolua_S;
4666 const char* str = ((const char*) tolua_tostring(tolua_S,1,0));
4667 {
4669 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
4670 }
4671 }
4672 return 1;
4673#ifndef TOLUA_RELEASE
4675 tolua_error(tolua_S,"#ferror in function 'direction'.",&tolua_err);
4676 return 0;
4677#endif
4678}
4679
4680/* function: api_find_direction */
4682{
4684 if (
4687 )
4688 goto tolua_lerror;
4689 else
4690 {
4691 lua_State* L = tolua_S;
4692 int id = ((int) tolua_tonumber(tolua_S,1,0));
4693 {
4695 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
4696 }
4697 }
4698 return 1;
4701}
4702
4703/* function: api_find_action_type_by_name */
4705{
4707 if (
4710 )
4711 goto tolua_lerror;
4712 else
4713 {
4714 lua_State* L = tolua_S;
4715 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
4716 {
4718 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4719 }
4720 }
4721 return 1;
4724}
4725
4726/* function: api_find_action_type_by_id */
4728{
4730 if (
4733 )
4734 goto tolua_lerror;
4735 else
4736 {
4737 lua_State* L = tolua_S;
4738 int id = ((int) tolua_tonumber(tolua_S,1,0));
4739 {
4741 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4742 }
4743 }
4744 return 1;
4747}
4748
4749/* function: api_find_nonexistent */
4751{
4752#ifndef TOLUA_RELEASE
4754 if (
4756 )
4757 goto tolua_lerror;
4758 else
4759#endif
4760 {
4761 lua_State* L = tolua_S;
4762 {
4764 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nonexistent");
4765 }
4766 }
4767 return 1;
4768#ifndef TOLUA_RELEASE
4770 tolua_error(tolua_S,"#ferror in function 'nonexistent'.",&tolua_err);
4771 return 0;
4772#endif
4773}
4774
4775/* function: api_effects_world_bonus */
4777{
4778#ifndef TOLUA_RELEASE
4780 if (
4783 )
4784 goto tolua_lerror;
4785 else
4786#endif
4787 {
4788 lua_State* L = tolua_S;
4789 const char* effect_type = ((const char*) tolua_tostring(tolua_S,1,0));
4790 {
4791 int tolua_ret = (int) api_effects_world_bonus(L,effect_type);
4793 }
4794 }
4795 return 1;
4796#ifndef TOLUA_RELEASE
4798 tolua_error(tolua_S,"#ferror in function 'world_bonus'.",&tolua_err);
4799 return 0;
4800#endif
4801}
4802
4803/* function: api_effects_player_bonus */
4805{
4806#ifndef TOLUA_RELEASE
4808 if (
4809 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4812 )
4813 goto tolua_lerror;
4814 else
4815#endif
4816 {
4817 lua_State* L = tolua_S;
4818 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4819 const char* effect_type = ((const char*) tolua_tostring(tolua_S,2,0));
4820 {
4821 int tolua_ret = (int) api_effects_player_bonus(L,pplayer,effect_type);
4823 }
4824 }
4825 return 1;
4826#ifndef TOLUA_RELEASE
4828 tolua_error(tolua_S,"#ferror in function 'player_bonus'.",&tolua_err);
4829 return 0;
4830#endif
4831}
4832
4833/* function: api_effects_city_bonus */
4835{
4836#ifndef TOLUA_RELEASE
4838 if (
4839 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
4842 )
4843 goto tolua_lerror;
4844 else
4845#endif
4846 {
4847 lua_State* L = tolua_S;
4848 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
4849 const char* effect_type = ((const char*) tolua_tostring(tolua_S,2,0));
4850 {
4851 int tolua_ret = (int) api_effects_city_bonus(L,pcity,effect_type);
4853 }
4854 }
4855 return 1;
4856#ifndef TOLUA_RELEASE
4858 tolua_error(tolua_S,"#ferror in function 'city_bonus'.",&tolua_err);
4859 return 0;
4860#endif
4861}
4862
4863/* function: api_effects_unit_bonus */
4865{
4866#ifndef TOLUA_RELEASE
4868 if (
4869 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
4870 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
4873 )
4874 goto tolua_lerror;
4875 else
4876#endif
4877 {
4878 lua_State* L = tolua_S;
4879 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
4880 Player* other_player = ((Player*) tolua_tousertype(tolua_S,2,0));
4881 const char* effect_type = ((const char*) tolua_tostring(tolua_S,3,0));
4882 {
4883 int tolua_ret = (int) api_effects_unit_bonus(L,punit,other_player,effect_type);
4885 }
4886 }
4887 return 1;
4888#ifndef TOLUA_RELEASE
4890 tolua_error(tolua_S,"#ferror in function 'unit_bonus'.",&tolua_err);
4891 return 0;
4892#endif
4893}
4894
4895/* function: api_effects_tile_bonus */
4897{
4898#ifndef TOLUA_RELEASE
4900 if (
4901 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
4902 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
4906 )
4907 goto tolua_lerror;
4908 else
4909#endif
4910 {
4911 lua_State* L = tolua_S;
4912 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
4913 City* pcity = ((City*) tolua_tousertype(tolua_S,2,0));
4914 const char* output_id = ((const char*) tolua_tostring(tolua_S,3,0));
4915 const char* effect_type = ((const char*) tolua_tostring(tolua_S,4,0));
4916 {
4917 int tolua_ret = (int) api_effects_tile_bonus(L,ptile,pcity,output_id,effect_type);
4919 }
4920 }
4921 return 1;
4922#ifndef TOLUA_RELEASE
4924 tolua_error(tolua_S,"#ferror in function 'tile_bonus'.",&tolua_err);
4925 return 0;
4926#endif
4927}
4928
4929/* function: api_effects_unit_vs_tile_bonus */
4931{
4932#ifndef TOLUA_RELEASE
4934 if (
4935 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
4936 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
4939 )
4940 goto tolua_lerror;
4941 else
4942#endif
4943 {
4944 lua_State* L = tolua_S;
4945 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
4946 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
4947 const char* effect_type = ((const char*) tolua_tostring(tolua_S,3,0));
4948 {
4949 int tolua_ret = (int) api_effects_unit_vs_tile_bonus(L,punit,ptile,effect_type);
4951 }
4952 }
4953 return 1;
4954#ifndef TOLUA_RELEASE
4956 tolua_error(tolua_S,"#ferror in function 'unit_vs_tile_bonus'.",&tolua_err);
4957 return 0;
4958#endif
4959}
4960
4961/* function: api_utilities_direction_id */
4963{
4964#ifndef TOLUA_RELEASE
4966 if (
4967 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
4969 )
4970 goto tolua_lerror;
4971 else
4972#endif
4973 {
4974 lua_State* L = tolua_S;
4976 {
4979 }
4980 }
4981 return 1;
4982#ifndef TOLUA_RELEASE
4984 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
4985 return 0;
4986#endif
4987}
4988
4989/* function: api_utilities_dir2str */
4991{
4992#ifndef TOLUA_RELEASE
4994 if (
4995 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
4997 )
4998 goto tolua_lerror;
4999 else
5000#endif
5001 {
5002 lua_State* L = tolua_S;
5004 {
5005 const char* tolua_ret = (const char*) api_utilities_dir2str(L,dir);
5006 tolua_pushstring(tolua_S,(const char*)tolua_ret);
5007 }
5008 }
5009 return 1;
5010#ifndef TOLUA_RELEASE
5012 tolua_error(tolua_S,"#ferror in function 'name'.",&tolua_err);
5013 return 0;
5014#endif
5015}
5016
5017/* function: api_utilities_direction_is_cardinal */
5019{
5020#ifndef TOLUA_RELEASE
5022 if (
5023 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5025 )
5026 goto tolua_lerror;
5027 else
5028#endif
5029 {
5030 lua_State* L = tolua_S;
5032 {
5035 }
5036 }
5037 return 1;
5038#ifndef TOLUA_RELEASE
5040 tolua_error(tolua_S,"#ferror in function 'cardinal'.",&tolua_err);
5041 return 0;
5042#endif
5043}
5044
5045/* function: api_utilities_str2dir */
5047{
5048#ifndef TOLUA_RELEASE
5050 if (
5053 )
5054 goto tolua_lerror;
5055 else
5056#endif
5057 {
5058 lua_State* L = tolua_S;
5059 const char* str = ((const char*) tolua_tostring(tolua_S,1,0));
5060 {
5062 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5063 }
5064 }
5065 return 1;
5066#ifndef TOLUA_RELEASE
5068 tolua_error(tolua_S,"#ferror in function 'str2dir'.",&tolua_err);
5069 return 0;
5070#endif
5071}
5072
5073/* function: api_utilities_dir_ccw */
5075{
5076#ifndef TOLUA_RELEASE
5078 if (
5079 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5081 )
5082 goto tolua_lerror;
5083 else
5084#endif
5085 {
5086 lua_State* L = tolua_S;
5088 {
5090 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5091 }
5092 }
5093 return 1;
5094#ifndef TOLUA_RELEASE
5096 tolua_error(tolua_S,"#ferror in function 'next_ccw'.",&tolua_err);
5097 return 0;
5098#endif
5099}
5100
5101/* function: api_utilities_dir_cw */
5103{
5104#ifndef TOLUA_RELEASE
5106 if (
5107 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5109 )
5110 goto tolua_lerror;
5111 else
5112#endif
5113 {
5114 lua_State* L = tolua_S;
5116 {
5118 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5119 }
5120 }
5121 return 1;
5122#ifndef TOLUA_RELEASE
5124 tolua_error(tolua_S,"#ferror in function 'next_cw'.",&tolua_err);
5125 return 0;
5126#endif
5127}
5128
5129/* function: api_utilities_opposite_dir */
5131{
5132#ifndef TOLUA_RELEASE
5134 if (
5135 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5137 )
5138 goto tolua_lerror;
5139 else
5140#endif
5141 {
5142 lua_State* L = tolua_S;
5144 {
5146 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5147 }
5148 }
5149 return 1;
5150#ifndef TOLUA_RELEASE
5152 tolua_error(tolua_S,"#ferror in function 'opposite'.",&tolua_err);
5153 return 0;
5154#endif
5155}
5156
5157/* Open lib function */
5159{
5164 tolua_cclass(tolua_S,"Player","Player","",NULL);
5165 tolua_beginmodule(tolua_S,"Player");
5171 tolua_cclass(tolua_S,"City","City","",NULL);
5172 tolua_beginmodule(tolua_S,"City");
5178 tolua_cclass(tolua_S,"Counter","Counter","",NULL);
5179 tolua_beginmodule(tolua_S,"Counter");
5181 tolua_cclass(tolua_S,"Connection","Connection","",NULL);
5182 tolua_beginmodule(tolua_S,"Connection");
5185 tolua_cclass(tolua_S,"Unit","Unit","",NULL);
5186 tolua_beginmodule(tolua_S,"Unit");
5193 tolua_cclass(tolua_S,"Tile","Tile","",NULL);
5194 tolua_beginmodule(tolua_S,"Tile");
5199 tolua_cclass(tolua_S,"Government","Government","",NULL);
5200 tolua_beginmodule(tolua_S,"Government");
5203 tolua_cclass(tolua_S,"Nation_Type","Nation_Type","",NULL);
5204 tolua_beginmodule(tolua_S,"Nation_Type");
5207 tolua_cclass(tolua_S,"Building_Type","Building_Type","",NULL);
5208 tolua_beginmodule(tolua_S,"Building_Type");
5212 tolua_cclass(tolua_S,"Unit_Type","Unit_Type","",NULL);
5213 tolua_beginmodule(tolua_S,"Unit_Type");
5218 tolua_cclass(tolua_S,"Tech_Type","Tech_Type","",NULL);
5219 tolua_beginmodule(tolua_S,"Tech_Type");
5223 tolua_cclass(tolua_S,"Terrain","Terrain","",NULL);
5224 tolua_beginmodule(tolua_S,"Terrain");
5227 tolua_cclass(tolua_S,"Disaster","Disaster","",NULL);
5228 tolua_beginmodule(tolua_S,"Disaster");
5231 tolua_cclass(tolua_S,"Achievement","Achievement","",NULL);
5232 tolua_beginmodule(tolua_S,"Achievement");
5235 tolua_cclass(tolua_S,"Action","Action","",NULL);
5236 tolua_beginmodule(tolua_S,"Action");
5239 tolua_cclass(tolua_S,"Direction","Direction","",NULL);
5240 tolua_beginmodule(tolua_S,"Direction");
5242 tolua_cclass(tolua_S,"Unit_List_Link","Unit_List_Link","",NULL);
5243 tolua_beginmodule(tolua_S,"Unit_List_Link");
5245 tolua_cclass(tolua_S,"City_List_Link","City_List_Link","",NULL);
5246 tolua_beginmodule(tolua_S,"City_List_Link");
5248 tolua_cclass(tolua_S,"Game_Info","Game_Info","",NULL);
5249 tolua_beginmodule(tolua_S,"Game_Info");
5262 tolua_module(tolua_S,"game",1);
5263 tolua_beginmodule(tolua_S,"game");
5273 tolua_module(tolua_S,"Counter",0);
5274 tolua_beginmodule(tolua_S,"Counter");
5279 tolua_module(tolua_S,"Player",0);
5280 tolua_beginmodule(tolua_S,"Player");
5281 tolua_module(tolua_S,"properties",0);
5282 tolua_beginmodule(tolua_S,"properties");
5307 tolua_module(tolua_S,"methods_private",0);
5308 tolua_beginmodule(tolua_S,"methods_private");
5310 tolua_module(tolua_S,"Player",0);
5311 tolua_beginmodule(tolua_S,"Player");
5316
5317 { /* begin embedded lua code */
5318 static unsigned char B[] = {
5319 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,101,
5320 114, 58,105,115, 95,104,117,109, 97,110, 40, 41, 10,114,101,
5321 116,117,114,110, 32,110,111,116, 32,115,101,108,102, 46,104,
5322 97,115, 95,102,108, 97,103, 40,115,101,108,102, 44, 32, 34,
5323 65, 73, 34, 41, 59, 10,101,110,100, 10,102,117,110, 99,116,
5324 105,111,110, 32, 80,108, 97,121,101,114, 58,101,120,105,115,
5325 116,115, 40, 41, 10,114,101,116,117,114,110, 32,116,114,117,
5326 101, 10,101,110,100,32
5327 };
5328 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5330 } /* end of embedded lua code */
5331
5332 tolua_module(tolua_S,"City",0);
5333 tolua_beginmodule(tolua_S,"City");
5334 tolua_module(tolua_S,"properties",0);
5335 tolua_beginmodule(tolua_S,"properties");
5352
5353 { /* begin embedded lua code */
5354 static unsigned char B[] = {
5355 10,102,117,110, 99,116,105,111,110, 32, 67,105,116,121, 58,
5356 101,120,105,115,116,115, 40, 41, 10,114,101,116,117,114,110,
5357 32,116,114,117,101, 10,101,110,100,32
5358 };
5359 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5361 } /* end of embedded lua code */
5362
5363 tolua_module(tolua_S,"Unit",0);
5364 tolua_beginmodule(tolua_S,"Unit");
5365 tolua_module(tolua_S,"properties",0);
5366 tolua_beginmodule(tolua_S,"properties");
5377 tolua_module(tolua_S,"methods_private",0);
5378 tolua_beginmodule(tolua_S,"methods_private");
5379 tolua_module(tolua_S,"Unit",0);
5380 tolua_beginmodule(tolua_S,"Unit");
5384
5385 { /* begin embedded lua code */
5386 static unsigned char B[] = {
5387 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 58,
5388 101,120,105,115,116,115, 40, 41, 10,114,101,116,117,114,110,
5389 32,116,114,117,101, 10,101,110,100, 10,102,117,110, 99,116,
5390 105,111,110, 32, 85,110,105,116, 58,103,101,116, 95,104,111,
5391 109,101, 99,105,116,121, 40, 41, 10,114,101,116,117,114,110,
5392 32,102,105,110,100, 46, 99,105,116,121, 40,115,101,108,102,
5393 46,111,119,110,101,114, 44, 32,115,101,108,102, 46,104,111,
5394 109,101, 99,105,116,121, 41, 10,101,110,100,32
5395 };
5396 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5398 } /* end of embedded lua code */
5399
5400 tolua_module(tolua_S,"Tile",0);
5401 tolua_beginmodule(tolua_S,"Tile");
5402 tolua_module(tolua_S,"properties",0);
5403 tolua_beginmodule(tolua_S,"properties");
5420
5421 { /* begin embedded lua code */
5422 static unsigned char B[] = {
5423 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,101, 58,
5424 99,105,116,121, 95,101,120,105,115,116,115, 95,119,105,116,
5425 104,105,110, 95, 99,105,116,121, 95,114, 97,100,105,117,115,
5426 40, 99,101,110,116,101,114, 41, 10,108,111,103, 46,100,101,
5427 112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,
5428 110,103, 40, 34, 99,105,116,121, 95,101,120,105,115,116,115,
5429 95,119,105,116,104,105,110, 95, 99,105,116,121, 95,114, 97,
5430 100,105,117,115, 40, 41, 34, 44, 32, 34, 99,105,116,121, 95,
5431 101,120,105,115,116,115, 95,119,105,116,104,105,110, 95,109,
5432 97,120, 95, 99,105,116,121, 95,109, 97,112, 40, 41, 34, 44,
5433 10, 34, 50, 46, 51, 34, 41, 59, 10,114,101,116,117,114,110,
5434 32,115,101,108,102, 58, 99,105,116,121, 95,101,120,105,115,
5435 116,115, 95,119,105,116,104,105,110, 95,109, 97,120, 95, 99,
5436 105,116,121, 95,109, 97,112, 40, 99,101,110,116,101,114, 41,
5437 10,101,110,100,32
5438 };
5439 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5441 } /* end of embedded lua code */
5442
5443 tolua_module(tolua_S,"methods_private",0);
5444 tolua_beginmodule(tolua_S,"methods_private");
5445 tolua_module(tolua_S,"Tile",0);
5446 tolua_beginmodule(tolua_S,"Tile");
5452 tolua_module(tolua_S,"Government",0);
5453 tolua_beginmodule(tolua_S,"Government");
5457 tolua_module(tolua_S,"Nation_Type",0);
5458 tolua_beginmodule(tolua_S,"Nation_Type");
5463 tolua_module(tolua_S,"Building_Type",0);
5464 tolua_beginmodule(tolua_S,"Building_Type");
5472
5473 { /* begin embedded lua code */
5474 static unsigned char B[] = {
5475 10,102,117,110, 99,116,105,111,110, 32, 66,117,105,108,100,
5476 105,110,103, 95, 84,121,112,101, 58, 98,117,105,108,100, 95,
5477 115,104,105,101,108,100, 95, 99,111,115,116, 40, 41, 10,114,
5478 101,116,117,114,110, 32,115,101,108,102, 46, 98,117,105,108,
5479 100, 95, 99,111,115,116, 10,101,110,100,32
5480 };
5481 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5483 } /* end of embedded lua code */
5484
5485 tolua_module(tolua_S,"Unit_Type",0);
5486 tolua_beginmodule(tolua_S,"Unit_Type");
5493
5494 { /* begin embedded lua code */
5495 static unsigned char B[] = {
5496 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 95,
5497 84,121,112,101, 58, 98,117,105,108,100, 95,115,104,105,101,
5498 108,100, 95, 99,111,115,116, 40, 41, 10,114,101,116,117,114,
5499 110, 32,115,101,108,102, 46, 98,117,105,108,100, 95, 99,111,
5500 115,116, 10,101,110,100,32
5501 };
5502 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5504 } /* end of embedded lua code */
5505
5506 tolua_module(tolua_S,"Tech_Type",0);
5507 tolua_beginmodule(tolua_S,"Tech_Type");
5511
5512 { /* begin embedded lua code */
5513 static unsigned char B[] = {
5514 10,108,111, 99, 97,108, 32,112,116, 99,111,115,116, 32, 61,
5515 32, 80,108, 97,121,101,114, 46,116,101, 99,104, 95, 99,111,
5516 115,116, 10,102,117,110, 99,116,105,111,110, 32, 84,101, 99,
5517 104, 95, 84,121,112,101, 58, 99,111,115,116, 40, 41, 10,114,
5518 101,116,117,114,110, 32,112,116, 99,111,115,116, 40,110,105,
5519 108, 44, 32,115,101,108,102, 41, 10,101,110,100,32
5520 };
5521 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5523 } /* end of embedded lua code */
5524
5525 tolua_module(tolua_S,"Terrain",0);
5526 tolua_beginmodule(tolua_S,"Terrain");
5531 tolua_module(tolua_S,"Disaster",0);
5532 tolua_beginmodule(tolua_S,"Disaster");
5536 tolua_module(tolua_S,"Achievement",0);
5537 tolua_beginmodule(tolua_S,"Achievement");
5541 tolua_module(tolua_S,"Action",0);
5542 tolua_beginmodule(tolua_S,"Action");
5547 tolua_module(tolua_S,"Unit_List_Link",0);
5548 tolua_beginmodule(tolua_S,"Unit_List_Link");
5552 tolua_module(tolua_S,"City_List_Link",0);
5553 tolua_beginmodule(tolua_S,"City_List_Link");
5557 tolua_module(tolua_S,"find",0);
5558 tolua_beginmodule(tolua_S,"find");
5593
5594 { /* begin embedded lua code */
5595 static unsigned char B[] = {
5596 10,108,111, 99, 97,108, 32,103, 97,109,101, 95,105,110,102,
5597 111, 32, 61, 32,103, 97,109,101, 46,105,110,102,111, 10,102,
5598 117,110, 99,116,105,111,110, 32,102,105,110,100, 46,103, 97,
5599 109,101, 95,105,110,102,111, 40, 41, 10,114,101,116,117,114,
5600 110, 32,103, 97,109,101, 95,105,110,102,111, 10,101,110,100,
5601 32
5602 };
5603 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5605 } /* end of embedded lua code */
5606
5607 tolua_module(tolua_S,"E",0);
5610 tolua_module(tolua_S,"effects",0);
5611 tolua_beginmodule(tolua_S,"effects");
5619 tolua_module(tolua_S,"Direction",0);
5620 tolua_beginmodule(tolua_S,"Direction");
5621 tolua_module(tolua_S,"properties",0);
5622 tolua_beginmodule(tolua_S,"properties");
5628 tolua_module(tolua_S,"direction",0);
5629 tolua_beginmodule(tolua_S,"direction");
5635
5636 { /* begin embedded lua code */
5637 static unsigned char B[] = {
5638 10,102,117,110, 99,116,105,111,110, 32,115,116,114, 50,100,
5639 105,114,101, 99,116,105,111,110, 40,115,116,114, 41, 10,114,
5640 101,116,117,114,110, 32,100,105,114,101, 99,116,105,111,110,
5641 46,115,116,114, 50,100,105,114, 40,115,116,114, 41, 10,101,
5642 110,100, 10, 68,105,114,101, 99,116,105,111,110, 46,112,114,
5643 111,112,101,114,116,105,101,115, 46,110,101,120,116, 95, 99,
5644 99,119, 32, 61, 32,100,105,114,101, 99,116,105,111,110, 46,
5645 110,101,120,116, 95, 99, 99,119, 10, 68,105,114,101, 99,116,
5646 105,111,110, 46,112,114,111,112,101,114,116,105,101,115, 46,
5647 110,101,120,116, 95, 99,119, 32, 61, 32,100,105,114,101, 99,
5648 116,105,111,110, 46,110,101,120,116, 95, 99,119, 10, 68,105,
5649 114,101, 99,116,105,111,110, 46,112,114,111,112,101,114,116,
5650 105,101,115, 46,111,112,112,111,115,105,116,101, 32, 61, 32,
5651 100,105,114,101, 99,116,105,111,110, 46,111,112,112,111,115,
5652 105,116,101,32
5653 };
5654 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5656 } /* end of embedded lua code */
5657
5658 tolua_module(tolua_S,"Game_Info",0);
5659 tolua_beginmodule(tolua_S,"Game_Info");
5661
5662 { /* begin embedded lua code */
5663 static unsigned char B[] = {
5664 10,108,111, 99, 97,108, 32,116, 99,115, 44, 32,116,108,115,
5665 32, 61, 32, 84, 69, 67, 72, 95, 67, 79, 83, 84, 44, 32, 84,
5666 69, 67, 72, 95, 76, 69, 65, 75, 65, 71, 69, 10, 84, 69, 67,
5667 72, 95, 67, 79, 83, 84, 44, 32, 84, 69, 67, 72, 95, 76, 69,
5668 65, 75, 65, 71, 69, 32, 61, 32,110,105,108, 44, 32,110,105,
5669 108, 10, 71, 97,109,101, 95, 73,110,102,111, 46,112,114,111,
5670 112,101,114,116,105,101,115, 32, 61, 32,123, 10,116,101, 99,
5671 104, 95, 99,111,115,116, 95,115,116,121,108,101, 32, 61, 32,
5672 102,117,110, 99,116,105,111,110, 40,115,101,108,102, 41, 10,
5673 114,101,116,117,114,110, 32,116, 99,115, 91,115,101,108,102,
5674 46,116,101, 99,104, 95, 99,111,115,116, 95,115,116,121,108,
5675 101, 95,105,100, 93, 59, 10,101,110,100, 44, 10,116,101, 99,
5676 104, 95,108,101, 97,107, 97,103,101, 95,115,116,121,108,101,
5677 32, 61, 32,102,117,110, 99,116,105,111,110, 40,115,101,108,
5678 102, 41, 10,114,101,116,117,114,110, 32,116,108,115, 91,115,
5679 101,108,102, 46,116,101, 99,104, 95,108,101, 97,107, 97,103,
5680 101, 95,115,116,121,108,101, 95,105,100, 93, 59, 10,101,110,
5681 100, 10,125, 10,100,111, 10,108,111, 99, 97,108, 32,112,114,
5682 105,118, 97,116,101, 32, 61, 32,109,101,116,104,111,100,115,
5683 95,112,114,105,118, 97,116,101, 10,108,111, 99, 97,108, 32,
5684 102,117,110, 99,116,105,111,110, 32,118, 97,108,117,101, 95,
5685 105,116,101,114, 97,116,111,114, 40, 97,114,114, 97,121, 41,
5686 10,108,111, 99, 97,108, 32,105, 32, 61, 32, 48, 10,108,111,
5687 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,105,116,
5688 101,114, 97,116,111,114, 40, 41, 10,105, 32, 61, 32,105, 32,
5689 43, 32, 49, 10,114,101,116,117,114,110, 32, 97,114,114, 97,
5690 121, 91,105, 93, 10,101,110,100, 10,114,101,116,117,114,110,
5691 32,105,116,101,114, 97,116,111,114, 10,101,110,100, 10,108,
5692 111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,115,
5693 97,102,101, 95,105,116,101,114, 97,116,101, 95,108,105,115,
5694 116, 40,108,105,110,107, 41, 10,108,111, 99, 97,108, 32,111,
5695 98,106,115, 32, 61, 32,123,125, 10,119,104,105,108,101, 32,
5696 108,105,110,107, 32,100,111, 10,111, 98,106,115, 91, 35,111,
5697 98,106,115, 32, 43, 32, 49, 93, 32, 61, 32,108,105,110,107,
5698 58,100, 97,116, 97, 40, 41, 10,108,105,110,107, 32, 61, 32,
5699 108,105,110,107, 58,110,101,120,116, 40, 41, 10,101,110,100,
5700 10,114,101,116,117,114,110, 32,118, 97,108,117,101, 95,105,
5701 116,101,114, 97,116,111,114, 40,111, 98,106,115, 41, 10,101,
5702 110,100, 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,
5703 121,101,114, 58,117,110,105,116,115, 95,105,116,101,114, 97,
5704 116,101, 40, 41, 10,114,101,116,117,114,110, 32,115, 97,102,
5705 101, 95,105,116,101,114, 97,116,101, 95,108,105,115,116, 40,
5706 112,114,105,118, 97,116,101, 46, 80,108, 97,121,101,114, 46,
5707 117,110,105,116, 95,108,105,115,116, 95,104,101, 97,100, 40,
5708 115,101,108,102, 41, 41, 10,101,110,100, 10,102,117,110, 99,
5709 116,105,111,110, 32, 80,108, 97,121,101,114, 58, 99,105,116,
5710 105,101,115, 95,105,116,101,114, 97,116,101, 40, 41, 10,114,
5711 101,116,117,114,110, 32,115, 97,102,101, 95,105,116,101,114,
5712 97,116,101, 95,108,105,115,116, 40,112,114,105,118, 97,116,
5713 101, 46, 80,108, 97,121,101,114, 46, 99,105,116,121, 95,108,
5714 105,115,116, 95,104,101, 97,100, 40,115,101,108,102, 41, 41,
5715 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 84,
5716 105,108,101, 58,117,110,105,116,115, 95,105,116,101,114, 97,
5717 116,101, 40, 41, 10,114,101,116,117,114,110, 32,115, 97,102,
5718 101, 95,105,116,101,114, 97,116,101, 95,108,105,115,116, 40,
5719 112,114,105,118, 97,116,101, 46, 84,105,108,101, 46,117,110,
5720 105,116, 95,108,105,115,116, 95,104,101, 97,100, 40,115,101,
5721 108,102, 41, 41, 10,101,110,100, 10,102,117,110, 99,116,105,
5722 111,110, 32, 85,110,105,116, 58, 99, 97,114,103,111, 95,105,
5723 116,101,114, 97,116,101, 40, 41, 10,114,101,116,117,114,110,
5724 32,115, 97,102,101, 95,105,116,101,114, 97,116,101, 95,108,
5725 105,115,116, 40,112,114,105,118, 97,116,101, 46, 85,110,105,
5726 116, 46, 99, 97,114,103,111, 95,108,105,115,116, 95,104,101,
5727 97,100, 40,115,101,108,102, 41, 41, 10,101,110,100, 10,101,
5728 110,100, 10,100,111, 10,108,111, 99, 97,108, 32,110,101,120,
5729 116, 95,111,117,116,119, 97,114,100, 95,105,110,100,101,120,
5730 32, 61, 32,109,101,116,104,111,100,115, 95,112,114,105,118,
5731 97,116,101, 46, 84,105,108,101, 46,110,101,120,116, 95,111,
5732 117,116,119, 97,114,100, 95,105,110,100,101,120, 10,108,111,
5733 99, 97,108, 32,116,105,108,101, 95,102,111,114, 95,111,117,
5734 116,119, 97,114,100, 95,105,110,100,101,120, 32, 61, 32,109,
5735 101,116,104,111,100,115, 95,112,114,105,118, 97,116,101, 46,
5736 84,105,108,101, 46,116,105,108,101, 95,102,111,114, 95,111,
5737 117,116,119, 97,114,100, 95,105,110,100,101,120, 10,102,117,
5738 110, 99,116,105,111,110, 32, 84,105,108,101, 58,115,113,117,
5739 97,114,101, 95,105,116,101,114, 97,116,101, 40,114, 97,100,
5740 105,117,115, 41, 10,108,111, 99, 97,108, 32,105,110,100,101,
5741 120, 32, 61, 32, 45, 49, 10,108,111, 99, 97,108, 32,102,117,
5742 110, 99,116,105,111,110, 32,105,116,101,114, 97,116,111,114,
5743 40, 41, 10,105,110,100,101,120, 32, 61, 32,110,101,120,116,
5744 95,111,117,116,119, 97,114,100, 95,105,110,100,101,120, 40,
5745 115,101,108,102, 44, 32,105,110,100,101,120, 44, 32,114, 97,
5746 100,105,117,115, 41, 10,105,102, 32,105,110,100,101,120, 32,
5747 60, 32, 48, 32,116,104,101,110, 10,114,101,116,117,114,110,
5748 32,110,105,108, 10,101,108,115,101, 10,114,101,116,117,114,
5749 110, 32,116,105,108,101, 95,102,111,114, 95,111,117,116,119,
5750 97,114,100, 95,105,110,100,101,120, 40,115,101,108,102, 44,
5751 32,105,110,100,101,120, 41, 10,101,110,100, 10,101,110,100,
5752 10,114,101,116,117,114,110, 32,105,116,101,114, 97,116,111,
5753 114, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
5754 84,105,108,101, 58, 99,105,114, 99,108,101, 95,105,116,101,
5755 114, 97,116,101, 40,115,113, 95,114, 97,100,105,117,115, 41,
5756 10,108,111, 99, 97,108, 32, 99,114, 95,114, 97,100,105,117,
5757 115, 32, 61, 32,109, 97,116,104, 46,102,108,111,111,114, 40,
5758 109, 97,116,104, 46,115,113,114,116, 40,115,113, 95,114, 97,
5759 100,105,117,115, 41, 41, 10,108,111, 99, 97,108, 32,115,113,
5760 95,105,116,101,114, 32, 61, 32,115,101,108,102, 58,115,113,
5761 117, 97,114,101, 95,105,116,101,114, 97,116,101, 40, 99,114,
5762 95,114, 97,100,105,117,115, 41, 10,108,111, 99, 97,108, 32,
5763 102,117,110, 99,116,105,111,110, 32,105,116,101,114, 97,116,
5764 111,114, 40, 41, 10,108,111, 99, 97,108, 32,116,105,108,101,
5765 32, 61, 32,110,105,108, 10,114,101,112,101, 97,116, 10,116,
5766 105,108,101, 32, 61, 32,115,113, 95,105,116,101,114, 40, 41,
5767 10,117,110,116,105,108, 32,110,111,116, 32,116,105,108,101,
5768 32,111,114, 32,115,101,108,102, 58,115,113, 95,100,105,115,
5769 116, 97,110, 99,101, 40,116,105,108,101, 41, 32, 60, 61, 32,
5770 115,113, 95,114, 97,100,105,117,115, 10,114,101,116,117,114,
5771 110, 32,116,105,108,101, 10,101,110,100, 10,114,101,116,117,
5772 114,110, 32,105,116,101,114, 97,116,111,114, 10,101,110,100,
5773 10,101,110,100,32
5774 };
5775 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5777 } /* end of embedded lua code */
5778
5779
5780 { /* begin embedded lua code */
5781 static unsigned char B[] = {
5782 10,100,111, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,
5783 105,111,110, 32,105,110,100,101,120, 95,105,116,101,114, 97,
5784 116,101, 40,108,111,111,107,117,112, 41, 10,108,111, 99, 97,
5785 108, 32,105,110,100,101,120, 32, 61, 32, 45, 49, 10,108,111,
5786 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,105,116,
5787 101,114, 97,116,111,114, 40, 41, 10,105,110,100,101,120, 32,
5788 61, 32,105,110,100,101,120, 32, 43, 32, 49, 10,114,101,116,
5789 117,114,110, 32,108,111,111,107,117,112, 40,105,110,100,101,
5790 120, 41, 10,101,110,100, 10,114,101,116,117,114,110, 32,105,
5791 116,101,114, 97,116,111,114, 10,101,110,100, 10,108,111, 99,
5792 97,108, 32,108,105,115,116,112, 32, 61, 32,109,101,116,104,
5793 111,100,115, 95,112,114,105,118, 97,116,101, 46,108,105,115,
5794 116, 95,112,108, 97,121,101,114,115, 10,102,117,110, 99,116,
5795 105,111,110, 32,112,108, 97,121,101,114,115, 95,105,116,101,
5796 114, 97,116,101, 40, 41, 10,108,111, 99, 97,108, 32,112,108,
5797 105,115,116, 32, 61, 32,108,105,115,116,112, 40, 41, 10,108,
5798 111, 99, 97,108, 32,105,110,100,101,120, 32, 61, 32, 48, 10,
5799 114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110,
5800 40, 41, 10,105,110,100,101,120, 32, 61, 32,105,110,100,101,
5801 120, 32, 43, 32, 49, 10,114,101,116,117,114,110, 32,112,108,
5802 105,115,116, 91,105,110,100,101,120, 93, 10,101,110,100, 10,
5803 101,110,100, 10,102,117,110, 99,116,105,111,110, 32,119,104,
5804 111,108,101, 95,109, 97,112, 95,105,116,101,114, 97,116,101,
5805 40, 41, 10,114,101,116,117,114,110, 32,105,110,100,101,120,
5806 95,105,116,101,114, 97,116,101, 40,102,105,110,100, 46,116,
5807 105,108,101, 41, 10,101,110,100, 10,101,110,100,32
5808 };
5809 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5811 } /* end of embedded lua code */
5812
5814 return 1;
5815}
5816/* Open tolua function */
5818{
5820 lua_pushstring(tolua_S, "game");
5821 lua_call(tolua_S, 1, 0);
5822 return 1;
5823}
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)
City * api_methods_tile_city(lua_State *L, Tile *ptile)
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:45
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:138
#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_tech_cost_style(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_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_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_get_Game_Info_Game_Info_tech_leakage(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)