Freeciv-3.3
Loading...
Searching...
No Matches
tolua_game_gen.c
Go to the documentation of this file.
1/*
2** Lua binding: game
3*/
4
5#include "tolua.h"
6
7#ifndef __cplusplus
8#include <stdlib.h>
9#endif
10#ifdef __cplusplus
11 extern "C" int tolua_bnd_takeownership (lua_State* L); // from tolua_map.c
12#else
13 int tolua_bnd_takeownership (lua_State* L); /* from tolua_map.c */
14#endif
15#include <string.h>
16
17/* Exported function */
20
21#ifdef HAVE_CONFIG_H
22#include <fc_config.h>
23#endif
25#include "api_game_effects.h"
26#include "api_game_find.h"
27#include "api_game_methods.h"
28#include "luascript_types.h"
29#define game_info_substructure game.info
30
31/* function to register type */
33{
34 tolua_usertype(tolua_S,"Unit_Type");
35 tolua_usertype(tolua_S,"Connection");
36 tolua_usertype(tolua_S,"City_List_Link");
37 tolua_usertype(tolua_S,"Building_Type");
38 tolua_usertype(tolua_S,"Counter");
39 tolua_usertype(tolua_S,"Tech_Type");
40 tolua_usertype(tolua_S,"Nation_Type");
41 tolua_usertype(tolua_S,"Action");
42 tolua_usertype(tolua_S,"City");
43 tolua_usertype(tolua_S,"Direction");
44 tolua_usertype(tolua_S,"Nonexistent");
45 tolua_usertype(tolua_S,"Tile");
46 tolua_usertype(tolua_S,"Government");
47 tolua_usertype(tolua_S,"Achievement");
48 tolua_usertype(tolua_S,"Game_Info");
49 tolua_usertype(tolua_S,"Player");
50 tolua_usertype(tolua_S,"Terrain");
51 tolua_usertype(tolua_S,"Disaster");
52 tolua_usertype(tolua_S,"Unit_List_Link");
53 tolua_usertype(tolua_S,"Unit");
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: nationality of class Unit */
331{
333#ifndef TOLUA_RELEASE
334 if (!self) {
335 tolua_error(tolua_S,"invalid 'self' in accessing variable 'nationality'",NULL);
336 return 0;
337 }
338#endif
339 tolua_pushusertype(tolua_S,(void*)self->nationality,"Player");
340 return 1;
341}
342
343/* set function: nationality of class Unit */
345{
347#ifndef TOLUA_RELEASE
349 if (!self) {
350 tolua_error(tolua_S,"invalid 'self' in accessing variable 'nationality'",NULL);
351 return 0;
352 }
353 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
354 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
355#endif
356 self->nationality = ((Player*) tolua_tousertype(tolua_S,2,0));
357 return 0;
358}
359
360/* get function: homecity of class Unit */
362{
364#ifndef TOLUA_RELEASE
365 if (!self) {
366 tolua_error(tolua_S,"invalid 'self' in accessing variable 'homecity'",NULL);
367 return 0;
368 }
369#endif
371 return 1;
372}
373
374/* set function: homecity of class Unit */
376{
378#ifndef TOLUA_RELEASE
380 if (!self) {
381 tolua_error(tolua_S,"invalid 'self' in accessing variable 'homecity'",NULL);
382 return 0;
383 }
385 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
386#endif
387 self->homecity = ((int) tolua_tonumber(tolua_S,2,0));
388 return 0;
389}
390
391/* get function: veteran of class Unit */
393{
395#ifndef TOLUA_RELEASE
396 if (!self) {
397 tolua_error(tolua_S,"invalid 'self' in accessing variable 'veteran'",NULL);
398 return 0;
399 }
400#endif
402 return 1;
403}
404
405/* set function: veteran of class Unit */
407{
409#ifndef TOLUA_RELEASE
411 if (!self) {
412 tolua_error(tolua_S,"invalid 'self' in accessing variable 'veteran'",NULL);
413 return 0;
414 }
416 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
417#endif
418 self->veteran = ((int) tolua_tonumber(tolua_S,2,0));
419 return 0;
420}
421
422/* get function: id of class Unit */
424{
426#ifndef TOLUA_RELEASE
427 if (!self) {
428 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
429 return 0;
430 }
431#endif
433 return 1;
434}
435
436/* get function: terrain of class Tile */
438{
440#ifndef TOLUA_RELEASE
441 if (!self) {
442 tolua_error(tolua_S,"invalid 'self' in accessing variable 'terrain'",NULL);
443 return 0;
444 }
445#endif
446 tolua_pushusertype(tolua_S,(void*)self->terrain,"Terrain");
447 return 1;
448}
449
450/* set function: terrain of class Tile */
452{
454#ifndef TOLUA_RELEASE
456 if (!self) {
457 tolua_error(tolua_S,"invalid 'self' in accessing variable 'terrain'",NULL);
458 return 0;
459 }
460 if (!tolua_isusertype(tolua_S,2,"Terrain",0,&tolua_err))
461 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
462#endif
463 self->terrain = ((Terrain*) tolua_tousertype(tolua_S,2,0));
464 return 0;
465}
466
467/* get function: owner of class Tile */
469{
471#ifndef TOLUA_RELEASE
472 if (!self) {
473 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
474 return 0;
475 }
476#endif
477 tolua_pushusertype(tolua_S,(void*)self->owner,"Player");
478 return 1;
479}
480
481/* set function: owner of class Tile */
483{
485#ifndef TOLUA_RELEASE
487 if (!self) {
488 tolua_error(tolua_S,"invalid 'self' in accessing variable 'owner'",NULL);
489 return 0;
490 }
491 if (!tolua_isusertype(tolua_S,2,"Player",0,&tolua_err))
492 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
493#endif
494 self->owner = ((Player*) tolua_tousertype(tolua_S,2,0));
495 return 0;
496}
497
498/* get function: index of class Tile */
500{
502#ifndef TOLUA_RELEASE
503 if (!self) {
504 tolua_error(tolua_S,"invalid 'self' in accessing variable 'index'",NULL);
505 return 0;
506 }
507#endif
509 return 1;
510}
511
512/* get function: item_number of class Government */
514{
516#ifndef TOLUA_RELEASE
517 if (!self) {
518 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
519 return 0;
520 }
521#endif
523 return 1;
524}
525
526/* get function: item_number of class Nation_Type */
528{
530#ifndef TOLUA_RELEASE
531 if (!self) {
532 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
533 return 0;
534 }
535#endif
537 return 1;
538}
539
540/* get function: build_cost of class Building_Type */
542{
544#ifndef TOLUA_RELEASE
545 if (!self) {
546 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
547 return 0;
548 }
549#endif
551 return 1;
552}
553
554/* set function: build_cost of class Building_Type */
556{
558#ifndef TOLUA_RELEASE
560 if (!self) {
561 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
562 return 0;
563 }
565 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
566#endif
567 self->build_cost = ((int) tolua_tonumber(tolua_S,2,0));
568 return 0;
569}
570
571/* get function: item_number of class Building_Type */
573{
575#ifndef TOLUA_RELEASE
576 if (!self) {
577 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
578 return 0;
579 }
580#endif
582 return 1;
583}
584
585/* get function: build_cost of class Unit_Type */
587{
589#ifndef TOLUA_RELEASE
590 if (!self) {
591 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
592 return 0;
593 }
594#endif
596 return 1;
597}
598
599/* set function: build_cost of class Unit_Type */
601{
603#ifndef TOLUA_RELEASE
605 if (!self) {
606 tolua_error(tolua_S,"invalid 'self' in accessing variable 'build_cost'",NULL);
607 return 0;
608 }
610 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
611#endif
612 self->build_cost = ((int) tolua_tonumber(tolua_S,2,0));
613 return 0;
614}
615
616/* get function: obsoleted_by of class Unit_Type */
618{
620#ifndef TOLUA_RELEASE
621 if (!self) {
622 tolua_error(tolua_S,"invalid 'self' in accessing variable 'obsoleted_by'",NULL);
623 return 0;
624 }
625#endif
626 tolua_pushusertype(tolua_S,(void*)self->obsoleted_by,"Unit_Type");
627 return 1;
628}
629
630/* set function: obsoleted_by of class Unit_Type */
632{
634#ifndef TOLUA_RELEASE
636 if (!self) {
637 tolua_error(tolua_S,"invalid 'self' in accessing variable 'obsoleted_by'",NULL);
638 return 0;
639 }
640 if (!tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err))
641 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
642#endif
643 self->obsoleted_by = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
644 return 0;
645}
646
647/* get function: item_number of class Unit_Type */
649{
651#ifndef TOLUA_RELEASE
652 if (!self) {
653 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
654 return 0;
655 }
656#endif
658 return 1;
659}
660
661/* get function: item_number of class Tech_Type */
663{
665#ifndef TOLUA_RELEASE
666 if (!self) {
667 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
668 return 0;
669 }
670#endif
672 return 1;
673}
674
675/* get function: cost of class Tech_Type */
677{
679#ifndef TOLUA_RELEASE
680 if (!self) {
681 tolua_error(tolua_S,"invalid 'self' in accessing variable 'cost'",NULL);
682 return 0;
683 }
684#endif
686 return 1;
687}
688
689/* get function: item_number of class Terrain */
691{
693#ifndef TOLUA_RELEASE
694 if (!self) {
695 tolua_error(tolua_S,"invalid 'self' in accessing variable 'item_number'",NULL);
696 return 0;
697 }
698#endif
700 return 1;
701}
702
703/* get function: id of class Disaster */
705{
707#ifndef TOLUA_RELEASE
708 if (!self) {
709 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
710 return 0;
711 }
712#endif
714 return 1;
715}
716
717/* get function: id of class Achievement */
719{
721#ifndef TOLUA_RELEASE
722 if (!self) {
723 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
724 return 0;
725 }
726#endif
728 return 1;
729}
730
731/* get function: id of class Action */
733{
735#ifndef TOLUA_RELEASE
736 if (!self) {
737 tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
738 return 0;
739 }
740#endif
742 return 1;
743}
744
745/* get function: base_tech_cost of class Game_Info */
747{
749#ifndef TOLUA_RELEASE
750 if (!self) {
751 tolua_error(tolua_S,"invalid 'self' in accessing variable 'base_tech_cost'",NULL);
752 return 0;
753 }
754#endif
755 tolua_pushnumber(tolua_S,(lua_Number)self->base_tech_cost);
756 return 1;
757}
758
759/* get function: min_tech_cost of class Game_Info */
761{
763#ifndef TOLUA_RELEASE
764 if (!self) {
765 tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_tech_cost'",NULL);
766 return 0;
767 }
768#endif
769 tolua_pushnumber(tolua_S,(lua_Number)self->min_tech_cost);
770 return 1;
771}
772
773/* get function: tech_leak_pct of class Game_Info */
775{
777#ifndef TOLUA_RELEASE
778 if (!self) {
779 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_leak_pct'",NULL);
780 return 0;
781 }
782#endif
783 tolua_pushnumber(tolua_S,(lua_Number)self->tech_leak_pct);
784 return 1;
785}
786
787/* get function: tech_steal_allow_holes of class Game_Info */
789{
791#ifndef TOLUA_RELEASE
792 if (!self) {
793 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_steal_allow_holes'",NULL);
794 return 0;
795 }
796#endif
797 tolua_pushboolean(tolua_S,(bool)self->tech_steal_allow_holes);
798 return 1;
799}
800
801/* get function: tech_trade_allow_holes of class Game_Info */
803{
805#ifndef TOLUA_RELEASE
806 if (!self) {
807 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_trade_allow_holes'",NULL);
808 return 0;
809 }
810#endif
811 tolua_pushboolean(tolua_S,(bool)self->tech_trade_allow_holes);
812 return 1;
813}
814
815/* get function: tech_trade_loss_allow_holes of class Game_Info */
817{
819#ifndef TOLUA_RELEASE
820 if (!self) {
821 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_trade_loss_allow_holes'",NULL);
822 return 0;
823 }
824#endif
825 tolua_pushboolean(tolua_S,(bool)self->tech_trade_loss_allow_holes);
826 return 1;
827}
828
829/* get function: tech_parasite_allow_holes of class Game_Info */
831{
833#ifndef TOLUA_RELEASE
834 if (!self) {
835 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_parasite_allow_holes'",NULL);
836 return 0;
837 }
838#endif
839 tolua_pushboolean(tolua_S,(bool)self->tech_parasite_allow_holes);
840 return 1;
841}
842
843/* get function: tech_loss_allow_holes of class Game_Info */
845{
847#ifndef TOLUA_RELEASE
848 if (!self) {
849 tolua_error(tolua_S,"invalid 'self' in accessing variable 'tech_loss_allow_holes'",NULL);
850 return 0;
851 }
852#endif
853 tolua_pushboolean(tolua_S,(bool)self->tech_loss_allow_holes);
854 return 1;
855}
856
857/* get function: sciencebox of class Game_Info */
859{
861#ifndef TOLUA_RELEASE
862 if (!self) {
863 tolua_error(tolua_S,"invalid 'self' in accessing variable 'sciencebox'",NULL);
864 return 0;
865 }
866#endif
868 return 1;
869}
870
871/* get function: game_info_substructure */
877
878/* set function: game_info_substructure */
880{
881#ifndef TOLUA_RELEASE
883 if (!tolua_isusertype(tolua_S,2,"Game_Info",0,&tolua_err))
884 tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
885#endif
887 return 0;
888}
889
890/* function: api_methods_game_turn */
892{
893#ifndef TOLUA_RELEASE
895 if (
897 )
898 goto tolua_lerror;
899 else
900#endif
901 {
903 {
906 }
907 }
908 return 1;
909#ifndef TOLUA_RELEASE
911 tolua_error(tolua_S,"#ferror in function 'current_turn'.",&tolua_err);
912 return 0;
913#endif
914}
915
916/* function: api_methods_game_turn_deprecated */
918{
919#ifndef TOLUA_RELEASE
921 if (
923 )
924 goto tolua_lerror;
925 else
926#endif
927 {
929 {
932 }
933 }
934 return 1;
935#ifndef TOLUA_RELEASE
937 tolua_error(tolua_S,"#ferror in function 'turn'.",&tolua_err);
938 return 0;
939#endif
940}
941
942/* function: api_methods_game_year */
944{
945#ifndef TOLUA_RELEASE
947 if (
949 )
950 goto tolua_lerror;
951 else
952#endif
953 {
955 {
958 }
959 }
960 return 1;
961#ifndef TOLUA_RELEASE
963 tolua_error(tolua_S,"#ferror in function 'current_year'.",&tolua_err);
964 return 0;
965#endif
966}
967
968/* function: api_methods_game_year_fragment */
970{
971#ifndef TOLUA_RELEASE
973 if (
975 )
976 goto tolua_lerror;
977 else
978#endif
979 {
981 {
984 }
985 }
986 return 1;
987#ifndef TOLUA_RELEASE
989 tolua_error(tolua_S,"#ferror in function 'current_fragment'.",&tolua_err);
990 return 0;
991#endif
992}
993
994/* function: api_methods_game_year_text */
996{
997#ifndef TOLUA_RELEASE
999 if (
1001 )
1002 goto tolua_lerror;
1003 else
1004#endif
1005 {
1006 lua_State* L = tolua_S;
1007 {
1008 const char* tolua_ret = (const char*) api_methods_game_year_text(L);
1009 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1010 }
1011 }
1012 return 1;
1013#ifndef TOLUA_RELEASE
1015 tolua_error(tolua_S,"#ferror in function 'current_year_text'.",&tolua_err);
1016 return 0;
1017#endif
1018}
1019
1020/* function: api_methods_game_rulesetdir */
1022{
1023#ifndef TOLUA_RELEASE
1025 if (
1027 )
1028 goto tolua_lerror;
1029 else
1030#endif
1031 {
1032 lua_State* L = tolua_S;
1033 {
1034 const char* tolua_ret = (const char*) api_methods_game_rulesetdir(L);
1035 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1036 }
1037 }
1038 return 1;
1039#ifndef TOLUA_RELEASE
1041 tolua_error(tolua_S,"#ferror in function 'rulesetdir'.",&tolua_err);
1042 return 0;
1043#endif
1044}
1045
1046/* function: api_methods_game_ruleset_name */
1048{
1049#ifndef TOLUA_RELEASE
1051 if (
1053 )
1054 goto tolua_lerror;
1055 else
1056#endif
1057 {
1058 lua_State* L = tolua_S;
1059 {
1060 const char* tolua_ret = (const char*) api_methods_game_ruleset_name(L);
1061 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1062 }
1063 }
1064 return 1;
1065#ifndef TOLUA_RELEASE
1067 tolua_error(tolua_S,"#ferror in function 'ruleset_name'.",&tolua_err);
1068 return 0;
1069#endif
1070}
1071
1072/* function: api_methods_tech_cost_style */
1074{
1075#ifndef TOLUA_RELEASE
1077 if (
1079 )
1080 goto tolua_lerror;
1081 else
1082#endif
1083 {
1084 lua_State* L = tolua_S;
1085 {
1086 const char* tolua_ret = (const char*) api_methods_tech_cost_style(L);
1087 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1088 }
1089 }
1090 return 1;
1091#ifndef TOLUA_RELEASE
1093 tolua_error(tolua_S,"#ferror in function 'tech_cost_style'.",&tolua_err);
1094 return 0;
1095#endif
1096}
1097
1098/* function: api_methods_tech_leakage_style */
1100{
1101#ifndef TOLUA_RELEASE
1103 if (
1105 )
1106 goto tolua_lerror;
1107 else
1108#endif
1109 {
1110 lua_State* L = tolua_S;
1111 {
1112 const char* tolua_ret = (const char*) api_methods_tech_leakage_style(L);
1113 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1114 }
1115 }
1116 return 1;
1117#ifndef TOLUA_RELEASE
1119 tolua_error(tolua_S,"#ferror in function 'tech_leakage_style'.",&tolua_err);
1120 return 0;
1121#endif
1122}
1123
1124/* function: api_methods_counter_rule_name */
1126{
1127#ifndef TOLUA_RELEASE
1129 if (
1130 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1132 )
1133 goto tolua_lerror;
1134 else
1135#endif
1136 {
1137 lua_State* L = tolua_S;
1138 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1139 {
1140 const char* tolua_ret = (const char*) api_methods_counter_rule_name(L,c);
1141 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1142 }
1143 }
1144 return 1;
1145#ifndef TOLUA_RELEASE
1147 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
1148 return 0;
1149#endif
1150}
1151
1152/* function: api_methods_counter_name_translation */
1154{
1155#ifndef TOLUA_RELEASE
1157 if (
1158 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1160 )
1161 goto tolua_lerror;
1162 else
1163#endif
1164 {
1165 lua_State* L = tolua_S;
1166 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1167 {
1168 const char* tolua_ret = (const char*) api_methods_counter_name_translation(L,c);
1169 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1170 }
1171 }
1172 return 1;
1173#ifndef TOLUA_RELEASE
1175 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
1176 return 0;
1177#endif
1178}
1179
1180/* function: api_methods_counter_city_get */
1182{
1183#ifndef TOLUA_RELEASE
1185 if (
1186 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
1187 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
1189 )
1190 goto tolua_lerror;
1191 else
1192#endif
1193 {
1194 lua_State* L = tolua_S;
1195 Counter* c = ((Counter*) tolua_tousertype(tolua_S,1,0));
1196 City* city = ((City*) tolua_tousertype(tolua_S,2,0));
1197 {
1200 }
1201 }
1202 return 1;
1203#ifndef TOLUA_RELEASE
1205 tolua_error(tolua_S,"#ferror in function 'get'.",&tolua_err);
1206 return 0;
1207#endif
1208}
1209
1210/* function: api_methods_player_number */
1212{
1213#ifndef TOLUA_RELEASE
1215 if (
1216 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1218 )
1219 goto tolua_lerror;
1220 else
1221#endif
1222 {
1223 lua_State* L = tolua_S;
1225 {
1228 }
1229 }
1230 return 1;
1231#ifndef TOLUA_RELEASE
1233 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
1234 return 0;
1235#endif
1236}
1237
1238/* function: api_methods_player_bulbs */
1240{
1241#ifndef TOLUA_RELEASE
1243 if (
1244 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1246 )
1247 goto tolua_lerror;
1248 else
1249#endif
1250 {
1251 lua_State* L = tolua_S;
1252 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1253 {
1254 int tolua_ret = (int) api_methods_player_bulbs(L,pplayer);
1256 }
1257 }
1258 return 1;
1259#ifndef TOLUA_RELEASE
1261 tolua_error(tolua_S,"#ferror in function 'bulbs'.",&tolua_err);
1262 return 0;
1263#endif
1264}
1265
1266/* function: api_methods_player_controlling_gui */
1268{
1269#ifndef TOLUA_RELEASE
1271 if (
1272 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1274 )
1275 goto tolua_lerror;
1276 else
1277#endif
1278 {
1279 lua_State* L = tolua_S;
1281 {
1282 const char* tolua_ret = (const char*) api_methods_player_controlling_gui(L,self);
1283 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1284 }
1285 }
1286 return 1;
1287#ifndef TOLUA_RELEASE
1289 tolua_error(tolua_S,"#ferror in function 'controlling_gui'.",&tolua_err);
1290 return 0;
1291#endif
1292}
1293
1294/* function: api_methods_player_num_cities */
1296{
1297#ifndef TOLUA_RELEASE
1299 if (
1300 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1302 )
1303 goto tolua_lerror;
1304 else
1305#endif
1306 {
1307 lua_State* L = tolua_S;
1309 {
1312 }
1313 }
1314 return 1;
1315#ifndef TOLUA_RELEASE
1317 tolua_error(tolua_S,"#ferror in function 'num_cities'.",&tolua_err);
1318 return 0;
1319#endif
1320}
1321
1322/* function: api_methods_player_num_units */
1324{
1325#ifndef TOLUA_RELEASE
1327 if (
1328 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1330 )
1331 goto tolua_lerror;
1332 else
1333#endif
1334 {
1335 lua_State* L = tolua_S;
1337 {
1340 }
1341 }
1342 return 1;
1343#ifndef TOLUA_RELEASE
1345 tolua_error(tolua_S,"#ferror in function 'num_units'.",&tolua_err);
1346 return 0;
1347#endif
1348}
1349
1350/* function: api_methods_player_future */
1352{
1353#ifndef TOLUA_RELEASE
1355 if (
1356 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1358 )
1359 goto tolua_lerror;
1360 else
1361#endif
1362 {
1363 lua_State* L = tolua_S;
1364 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1365 {
1366 int tolua_ret = (int) api_methods_player_future(L,pplayer);
1368 }
1369 }
1370 return 1;
1371#ifndef TOLUA_RELEASE
1373 tolua_error(tolua_S,"#ferror in function 'num_future_techs'.",&tolua_err);
1374 return 0;
1375#endif
1376}
1377
1378/* function: api_methods_player_has_wonder */
1380{
1381#ifndef TOLUA_RELEASE
1383 if (
1384 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1385 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1387 )
1388 goto tolua_lerror;
1389 else
1390#endif
1391 {
1392 lua_State* L = tolua_S;
1395 {
1398 }
1399 }
1400 return 1;
1401#ifndef TOLUA_RELEASE
1403 tolua_error(tolua_S,"#ferror in function 'has_wonder'.",&tolua_err);
1404 return 0;
1405#endif
1406}
1407
1408/* function: api_methods_player_gold */
1410{
1411#ifndef TOLUA_RELEASE
1413 if (
1414 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1416 )
1417 goto tolua_lerror;
1418 else
1419#endif
1420 {
1421 lua_State* L = tolua_S;
1423 {
1426 }
1427 }
1428 return 1;
1429#ifndef TOLUA_RELEASE
1431 tolua_error(tolua_S,"#ferror in function 'gold'.",&tolua_err);
1432 return 0;
1433#endif
1434}
1435
1436/* function: api_methods_player_infrapoints */
1438{
1439#ifndef TOLUA_RELEASE
1441 if (
1442 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1444 )
1445 goto tolua_lerror;
1446 else
1447#endif
1448 {
1449 lua_State* L = tolua_S;
1451 {
1454 }
1455 }
1456 return 1;
1457#ifndef TOLUA_RELEASE
1459 tolua_error(tolua_S,"#ferror in function 'infrapoints'.",&tolua_err);
1460 return 0;
1461#endif
1462}
1463
1464/* function: api_methods_player_knows_tech */
1466{
1467#ifndef TOLUA_RELEASE
1469 if (
1470 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1471 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1473 )
1474 goto tolua_lerror;
1475 else
1476#endif
1477 {
1478 lua_State* L = tolua_S;
1481 {
1484 }
1485 }
1486 return 1;
1487#ifndef TOLUA_RELEASE
1489 tolua_error(tolua_S,"#ferror in function 'knows_tech'.",&tolua_err);
1490 return 0;
1491#endif
1492}
1493
1494/* function: api_method_player_can_research */
1496{
1497#ifndef TOLUA_RELEASE
1499 if (
1500 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1501 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1503 )
1504 goto tolua_lerror;
1505 else
1506#endif
1507 {
1508 lua_State* L = tolua_S;
1509 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1511 {
1514 }
1515 }
1516 return 1;
1517#ifndef TOLUA_RELEASE
1519 tolua_error(tolua_S,"#ferror in function 'can_research'.",&tolua_err);
1520 return 0;
1521#endif
1522}
1523
1524/* function: api_methods_player_tech_cost */
1526{
1527#ifndef TOLUA_RELEASE
1529 if (
1530 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1531 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1533 )
1534 goto tolua_lerror;
1535 else
1536#endif
1537 {
1538 lua_State* L = tolua_S;
1539 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1541 {
1544 }
1545 }
1546 return 1;
1547#ifndef TOLUA_RELEASE
1549 tolua_error(tolua_S,"#ferror in function 'tech_cost'.",&tolua_err);
1550 return 0;
1551#endif
1552}
1553
1554/* function: api_methods_player_researching */
1556{
1557#ifndef TOLUA_RELEASE
1559 if (
1560 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1562 )
1563 goto tolua_lerror;
1564 else
1565#endif
1566 {
1567 lua_State* L = tolua_S;
1568 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1569 {
1572 }
1573 }
1574 return 1;
1575#ifndef TOLUA_RELEASE
1577 tolua_error(tolua_S,"#ferror in function 'researching'.",&tolua_err);
1578 return 0;
1579#endif
1580}
1581
1582/* function: api_methods_player_research_cost */
1584{
1585#ifndef TOLUA_RELEASE
1587 if (
1588 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1590 )
1591 goto tolua_lerror;
1592 else
1593#endif
1594 {
1595 lua_State* L = tolua_S;
1596 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1597 {
1600 }
1601 }
1602 return 1;
1603#ifndef TOLUA_RELEASE
1605 tolua_error(tolua_S,"#ferror in function 'researching_cost'.",&tolua_err);
1606 return 0;
1607#endif
1608}
1609
1610/* function: api_methods_player_shares_research */
1612{
1613#ifndef TOLUA_RELEASE
1615 if (
1616 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1617 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
1619 )
1620 goto tolua_lerror;
1621 else
1622#endif
1623 {
1624 lua_State* L = tolua_S;
1627 {
1630 }
1631 }
1632 return 1;
1633#ifndef TOLUA_RELEASE
1635 tolua_error(tolua_S,"#ferror in function 'shares_research'.",&tolua_err);
1636 return 0;
1637#endif
1638}
1639
1640/* function: api_methods_research_rule_name */
1642{
1643#ifndef TOLUA_RELEASE
1645 if (
1646 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1648 )
1649 goto tolua_lerror;
1650 else
1651#endif
1652 {
1653 lua_State* L = tolua_S;
1655 {
1656 const char* tolua_ret = (const char*) api_methods_research_rule_name(L,self);
1657 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1658 }
1659 }
1660 return 1;
1661#ifndef TOLUA_RELEASE
1663 tolua_error(tolua_S,"#ferror in function 'research_rule_name'.",&tolua_err);
1664 return 0;
1665#endif
1666}
1667
1668/* function: api_methods_research_name_translation */
1670{
1671#ifndef TOLUA_RELEASE
1673 if (
1674 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1676 )
1677 goto tolua_lerror;
1678 else
1679#endif
1680 {
1681 lua_State* L = tolua_S;
1683 {
1684 const char* tolua_ret = (const char*) api_methods_research_name_translation(L,self);
1685 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1686 }
1687 }
1688 return 1;
1689#ifndef TOLUA_RELEASE
1691 tolua_error(tolua_S,"#ferror in function 'research_name_translation'.",&tolua_err);
1692 return 0;
1693#endif
1694}
1695
1696/* function: api_methods_player_culture_get */
1698{
1699#ifndef TOLUA_RELEASE
1701 if (
1702 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1704 )
1705 goto tolua_lerror;
1706 else
1707#endif
1708 {
1709 lua_State* L = tolua_S;
1711 {
1714 }
1715 }
1716 return 1;
1717#ifndef TOLUA_RELEASE
1719 tolua_error(tolua_S,"#ferror in function 'culture'.",&tolua_err);
1720 return 0;
1721#endif
1722}
1723
1724/* function: api_methods_player_has_flag */
1726{
1727#ifndef TOLUA_RELEASE
1729 if (
1730 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1733 )
1734 goto tolua_lerror;
1735 else
1736#endif
1737 {
1738 lua_State* L = tolua_S;
1740 const char* flag = ((const char*) tolua_tostring(tolua_S,2,0));
1741 {
1744 }
1745 }
1746 return 1;
1747#ifndef TOLUA_RELEASE
1749 tolua_error(tolua_S,"#ferror in function 'has_flag'.",&tolua_err);
1750 return 0;
1751#endif
1752}
1753
1754/* function: api_methods_player_can_upgrade */
1756{
1757#ifndef TOLUA_RELEASE
1759 if (
1760 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1761 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
1763 )
1764 goto tolua_lerror;
1765 else
1766#endif
1767 {
1768 lua_State* L = tolua_S;
1769 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1770 Unit_Type* utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
1771 {
1773 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
1774 }
1775 }
1776 return 1;
1777#ifndef TOLUA_RELEASE
1779 tolua_error(tolua_S,"#ferror in function 'can_upgrade'.",&tolua_err);
1780 return 0;
1781#endif
1782}
1783
1784/* function: api_methods_player_can_build_impr_direct */
1786{
1787#ifndef TOLUA_RELEASE
1789 if (
1790 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1791 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
1793 )
1794 goto tolua_lerror;
1795 else
1796#endif
1797 {
1798 lua_State* L = tolua_S;
1799 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1801 {
1804 }
1805 }
1806 return 1;
1807#ifndef TOLUA_RELEASE
1809 tolua_error(tolua_S,"#ferror in function 'can_build_direct'.",&tolua_err);
1810 return 0;
1811#endif
1812}
1813
1814/* function: api_methods_player_can_build_unit_direct */
1816{
1818 if (
1819 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1820 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
1822 )
1823 goto tolua_lerror;
1824 else
1825 {
1826 lua_State* L = tolua_S;
1827 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1828 Unit_Type* utype = ((Unit_Type*) tolua_tousertype(tolua_S,2,0));
1829 {
1832 }
1833 }
1834 return 1;
1837}
1838
1839/* function: api_methods_player_primary_capital */
1841{
1842#ifndef TOLUA_RELEASE
1844 if (
1845 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1847 )
1848 goto tolua_lerror;
1849 else
1850#endif
1851 {
1852 lua_State* L = tolua_S;
1853 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1854 {
1856 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
1857 }
1858 }
1859 return 1;
1860#ifndef TOLUA_RELEASE
1862 tolua_error(tolua_S,"#ferror in function 'primary_capital'.",&tolua_err);
1863 return 0;
1864#endif
1865}
1866
1867/* function: api_methods_get_diplstate */
1869{
1870#ifndef TOLUA_RELEASE
1872 if (
1873 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1874 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
1876 )
1877 goto tolua_lerror;
1878 else
1879#endif
1880 {
1881 lua_State* L = tolua_S;
1884 {
1885 const char* tolua_ret = (const char*) api_methods_get_diplstate(L,pplayer1,pplayer2);
1886 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1887 }
1888 }
1889 return 1;
1890#ifndef TOLUA_RELEASE
1892 tolua_error(tolua_S,"#ferror in function 'diplstate'.",&tolua_err);
1893 return 0;
1894#endif
1895}
1896
1897/* function: api_methods_private_list_players */
1899{
1900#ifndef TOLUA_RELEASE
1902 if (
1904 )
1905 goto tolua_lerror;
1906 else
1907#endif
1908 {
1909 lua_State* L = tolua_S;
1910 {
1913 }
1914 }
1915 return 1;
1916#ifndef TOLUA_RELEASE
1918 tolua_error(tolua_S,"#ferror in function 'list_players'.",&tolua_err);
1919 return 0;
1920#endif
1921}
1922
1923/* function: api_methods_private_player_unit_list_head */
1925{
1926#ifndef TOLUA_RELEASE
1928 if (
1929 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1931 )
1932 goto tolua_lerror;
1933 else
1934#endif
1935 {
1936 lua_State* L = tolua_S;
1938 {
1940 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
1941 }
1942 }
1943 return 1;
1944#ifndef TOLUA_RELEASE
1946 tolua_error(tolua_S,"#ferror in function 'unit_list_head'.",&tolua_err);
1947 return 0;
1948#endif
1949}
1950
1951/* function: api_methods_private_player_city_list_head */
1953{
1954#ifndef TOLUA_RELEASE
1956 if (
1957 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1959 )
1960 goto tolua_lerror;
1961 else
1962#endif
1963 {
1964 lua_State* L = tolua_S;
1966 {
1968 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City_List_Link");
1969 }
1970 }
1971 return 1;
1972#ifndef TOLUA_RELEASE
1974 tolua_error(tolua_S,"#ferror in function 'city_list_head'.",&tolua_err);
1975 return 0;
1976#endif
1977}
1978
1979/* function: api_methods_city_size_get */
1981{
1982#ifndef TOLUA_RELEASE
1984 if (
1985 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1987 )
1988 goto tolua_lerror;
1989 else
1990#endif
1991 {
1992 lua_State* L = tolua_S;
1993 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1994 {
1997 }
1998 }
1999 return 1;
2000#ifndef TOLUA_RELEASE
2002 tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err);
2003 return 0;
2004#endif
2005}
2006
2007/* function: api_methods_city_tile_get */
2009{
2010#ifndef TOLUA_RELEASE
2012 if (
2013 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2015 )
2016 goto tolua_lerror;
2017 else
2018#endif
2019 {
2020 lua_State* L = tolua_S;
2021 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2022 {
2024 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
2025 }
2026 }
2027 return 1;
2028#ifndef TOLUA_RELEASE
2030 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
2031 return 0;
2032#endif
2033}
2034
2035/* function: api_methods_city_has_building */
2037{
2038#ifndef TOLUA_RELEASE
2040 if (
2041 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2042 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
2044 )
2045 goto tolua_lerror;
2046 else
2047#endif
2048 {
2049 lua_State* L = tolua_S;
2050 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2052 {
2055 }
2056 }
2057 return 1;
2058#ifndef TOLUA_RELEASE
2060 tolua_error(tolua_S,"#ferror in function 'has_building'.",&tolua_err);
2061 return 0;
2062#endif
2063}
2064
2065/* function: api_methods_city_map_sq_radius */
2067{
2068#ifndef TOLUA_RELEASE
2070 if (
2071 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2073 )
2074 goto tolua_lerror;
2075 else
2076#endif
2077 {
2078 lua_State* L = tolua_S;
2079 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2080 {
2083 }
2084 }
2085 return 1;
2086#ifndef TOLUA_RELEASE
2088 tolua_error(tolua_S,"#ferror in function 'map_sq_radius'.",&tolua_err);
2089 return 0;
2090#endif
2091}
2092
2093/* function: api_methods_city_inspire_partisans */
2095{
2096#ifndef TOLUA_RELEASE
2098 if (
2099 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2100 !tolua_isusertype(tolua_S,2,"Player",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));
2110 {
2113 }
2114 }
2115 return 1;
2116#ifndef TOLUA_RELEASE
2118 tolua_error(tolua_S,"#ferror in function 'inspire_partisans'.",&tolua_err);
2119 return 0;
2120#endif
2121}
2122
2123/* function: api_methods_city_culture_get */
2125{
2126#ifndef TOLUA_RELEASE
2128 if (
2129 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2131 )
2132 goto tolua_lerror;
2133 else
2134#endif
2135 {
2136 lua_State* L = tolua_S;
2137 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2138 {
2141 }
2142 }
2143 return 1;
2144#ifndef TOLUA_RELEASE
2146 tolua_error(tolua_S,"#ferror in function 'culture'.",&tolua_err);
2147 return 0;
2148#endif
2149}
2150
2151/* function: api_methods_is_city_happy */
2153{
2154#ifndef TOLUA_RELEASE
2156 if (
2157 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2159 )
2160 goto tolua_lerror;
2161 else
2162#endif
2163 {
2164 lua_State* L = tolua_S;
2165 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2166 {
2169 }
2170 }
2171 return 1;
2172#ifndef TOLUA_RELEASE
2174 tolua_error(tolua_S,"#ferror in function 'is_happy'.",&tolua_err);
2175 return 0;
2176#endif
2177}
2178
2179/* function: api_methods_is_city_unhappy */
2181{
2182#ifndef TOLUA_RELEASE
2184 if (
2185 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2187 )
2188 goto tolua_lerror;
2189 else
2190#endif
2191 {
2192 lua_State* L = tolua_S;
2193 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2194 {
2197 }
2198 }
2199 return 1;
2200#ifndef TOLUA_RELEASE
2202 tolua_error(tolua_S,"#ferror in function 'is_unhappy'.",&tolua_err);
2203 return 0;
2204#endif
2205}
2206
2207/* function: api_methods_is_city_celebrating */
2209{
2210#ifndef TOLUA_RELEASE
2212 if (
2213 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2215 )
2216 goto tolua_lerror;
2217 else
2218#endif
2219 {
2220 lua_State* L = tolua_S;
2221 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2222 {
2225 }
2226 }
2227 return 1;
2228#ifndef TOLUA_RELEASE
2230 tolua_error(tolua_S,"#ferror in function 'is_celebrating'.",&tolua_err);
2231 return 0;
2232#endif
2233}
2234
2235/* function: api_methods_is_gov_center */
2237{
2238#ifndef TOLUA_RELEASE
2240 if (
2241 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2243 )
2244 goto tolua_lerror;
2245 else
2246#endif
2247 {
2248 lua_State* L = tolua_S;
2249 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2250 {
2253 }
2254 }
2255 return 1;
2256#ifndef TOLUA_RELEASE
2258 tolua_error(tolua_S,"#ferror in function 'is_gov_center'.",&tolua_err);
2259 return 0;
2260#endif
2261}
2262
2263/* function: api_methods_is_capital */
2265{
2266#ifndef TOLUA_RELEASE
2268 if (
2269 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2271 )
2272 goto tolua_lerror;
2273 else
2274#endif
2275 {
2276 lua_State* L = tolua_S;
2277 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2278 {
2281 }
2282 }
2283 return 1;
2284#ifndef TOLUA_RELEASE
2286 tolua_error(tolua_S,"#ferror in function 'is_capital'.",&tolua_err);
2287 return 0;
2288#endif
2289}
2290
2291/* function: api_methods_is_primary_capital */
2293{
2294#ifndef TOLUA_RELEASE
2296 if (
2297 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2299 )
2300 goto tolua_lerror;
2301 else
2302#endif
2303 {
2304 lua_State* L = tolua_S;
2305 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2306 {
2309 }
2310 }
2311 return 1;
2312#ifndef TOLUA_RELEASE
2314 tolua_error(tolua_S,"#ferror in function 'is_primary_capital'.",&tolua_err);
2315 return 0;
2316#endif
2317}
2318
2319/* function: api_methods_city_link */
2321{
2322#ifndef TOLUA_RELEASE
2324 if (
2325 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2327 )
2328 goto tolua_lerror;
2329 else
2330#endif
2331 {
2332 lua_State* L = tolua_S;
2333 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2334 {
2335 const char* tolua_ret = (const char*) api_methods_city_link(L,self);
2336 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2337 }
2338 }
2339 return 1;
2340#ifndef TOLUA_RELEASE
2342 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2343 return 0;
2344#endif
2345}
2346
2347/* function: api_methods_city_tile_link */
2349{
2350#ifndef TOLUA_RELEASE
2352 if (
2353 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2355 )
2356 goto tolua_lerror;
2357 else
2358#endif
2359 {
2360 lua_State* L = tolua_S;
2361 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2362 {
2363 const char* tolua_ret = (const char*) api_methods_city_tile_link(L,self);
2364 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2365 }
2366 }
2367 return 1;
2368#ifndef TOLUA_RELEASE
2370 tolua_error(tolua_S,"#ferror in function 'tile_link_text'.",&tolua_err);
2371 return 0;
2372#endif
2373}
2374
2375/* function: api_methods_city_nationality_citizens */
2377{
2378#ifndef TOLUA_RELEASE
2380 if (
2381 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
2382 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
2384 )
2385 goto tolua_lerror;
2386 else
2387#endif
2388 {
2389 lua_State* L = tolua_S;
2390 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
2391 Player* nationality = ((Player*) tolua_tousertype(tolua_S,2,0));
2392 {
2395 }
2396 }
2397 return 1;
2398#ifndef TOLUA_RELEASE
2400 tolua_error(tolua_S,"#ferror in function 'nationality_citizens'.",&tolua_err);
2401 return 0;
2402#endif
2403}
2404
2405/* function: api_methods_unit_tile_get */
2407{
2408#ifndef TOLUA_RELEASE
2410 if (
2411 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2413 )
2414 goto tolua_lerror;
2415 else
2416#endif
2417 {
2418 lua_State* L = tolua_S;
2419 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2420 {
2422 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
2423 }
2424 }
2425 return 1;
2426#ifndef TOLUA_RELEASE
2428 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
2429 return 0;
2430#endif
2431}
2432
2433/* function: api_methods_unit_transporter */
2435{
2436#ifndef TOLUA_RELEASE
2438 if (
2439 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2441 )
2442 goto tolua_lerror;
2443 else
2444#endif
2445 {
2446 lua_State* L = tolua_S;
2447 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2448 {
2450 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
2451 }
2452 }
2453 return 1;
2454#ifndef TOLUA_RELEASE
2456 tolua_error(tolua_S,"#ferror in function 'transporter'.",&tolua_err);
2457 return 0;
2458#endif
2459}
2460
2461/* function: api_methods_unit_city_can_be_built_here */
2463{
2464#ifndef TOLUA_RELEASE
2466 if (
2467 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2469 )
2470 goto tolua_lerror;
2471 else
2472#endif
2473 {
2474 lua_State* L = tolua_S;
2475 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2476 {
2479 }
2480 }
2481 return 1;
2482#ifndef TOLUA_RELEASE
2484 tolua_error(tolua_S,"#ferror in function 'is_on_possible_city_tile'.",&tolua_err);
2485 return 0;
2486#endif
2487}
2488
2489/* function: api_methods_unit_can_upgrade */
2491{
2492#ifndef TOLUA_RELEASE
2494 if (
2495 !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* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2505 bool is_free = ((bool) tolua_toboolean(tolua_S,2,TRUE));
2506 {
2509 }
2510 }
2511 return 1;
2512#ifndef TOLUA_RELEASE
2514 tolua_error(tolua_S,"#ferror in function 'can_upgrade'.",&tolua_err);
2515 return 0;
2516#endif
2517}
2518
2519/* function: api_methods_unit_transform_problem */
2521{
2522#ifndef TOLUA_RELEASE
2524 if (
2525 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2526 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
2528 )
2529 goto tolua_lerror;
2530 else
2531#endif
2532 {
2533 lua_State* L = tolua_S;
2534 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2536 {
2537 const char* tolua_ret = (const char*) api_methods_unit_transform_problem(L,punit,ptype);
2538 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2539 }
2540 }
2541 return 1;
2542#ifndef TOLUA_RELEASE
2544 tolua_error(tolua_S,"#ferror in function 'transform_problem'.",&tolua_err);
2545 return 0;
2546#endif
2547}
2548
2549/* function: api_methods_unit_orientation_get */
2551{
2552#ifndef TOLUA_RELEASE
2554 if (
2555 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2557 )
2558 goto tolua_lerror;
2559 else
2560#endif
2561 {
2562 lua_State* L = tolua_S;
2563 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2564 {
2566 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
2567 }
2568 }
2569 return 1;
2570#ifndef TOLUA_RELEASE
2572 tolua_error(tolua_S,"#ferror in function 'facing'.",&tolua_err);
2573 return 0;
2574#endif
2575}
2576
2577/* function: api_methods_unit_link */
2579{
2580#ifndef TOLUA_RELEASE
2582 if (
2583 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2585 )
2586 goto tolua_lerror;
2587 else
2588#endif
2589 {
2590 lua_State* L = tolua_S;
2591 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2592 {
2593 const char* tolua_ret = (const char*) api_methods_unit_link(L,self);
2594 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2595 }
2596 }
2597 return 1;
2598#ifndef TOLUA_RELEASE
2600 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
2601 return 0;
2602#endif
2603}
2604
2605/* function: api_methods_unit_tile_link */
2607{
2608#ifndef TOLUA_RELEASE
2610 if (
2611 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2613 )
2614 goto tolua_lerror;
2615 else
2616#endif
2617 {
2618 lua_State* L = tolua_S;
2619 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2620 {
2621 const char* tolua_ret = (const char*) api_methods_unit_tile_link(L,self);
2622 tolua_pushstring(tolua_S,(const char*)tolua_ret);
2623 }
2624 }
2625 return 1;
2626#ifndef TOLUA_RELEASE
2628 tolua_error(tolua_S,"#ferror in function 'tile_link_text'.",&tolua_err);
2629 return 0;
2630#endif
2631}
2632
2633/* function: api_methods_unit_seen */
2635{
2636#ifndef TOLUA_RELEASE
2638 if (
2639 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2640 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
2642 )
2643 goto tolua_lerror;
2644 else
2645#endif
2646 {
2647 lua_State* L = tolua_S;
2648 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2650 {
2653 }
2654 }
2655 return 1;
2656#ifndef TOLUA_RELEASE
2658 tolua_error(tolua_S,"#ferror in function 'seen'.",&tolua_err);
2659 return 0;
2660#endif
2661}
2662
2663/* function: api_methods_private_unit_cargo_list_head */
2665{
2666#ifndef TOLUA_RELEASE
2668 if (
2669 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2671 )
2672 goto tolua_lerror;
2673 else
2674#endif
2675 {
2676 lua_State* L = tolua_S;
2677 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
2678 {
2680 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
2681 }
2682 }
2683 return 1;
2684#ifndef TOLUA_RELEASE
2686 tolua_error(tolua_S,"#ferror in function 'cargo_list_head'.",&tolua_err);
2687 return 0;
2688#endif
2689}
2690
2691/* function: api_methods_tile_nat_x */
2693{
2694#ifndef TOLUA_RELEASE
2696 if (
2697 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2699 )
2700 goto tolua_lerror;
2701 else
2702#endif
2703 {
2704 lua_State* L = tolua_S;
2705 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2706 {
2709 }
2710 }
2711 return 1;
2712#ifndef TOLUA_RELEASE
2714 tolua_error(tolua_S,"#ferror in function 'nat_x'.",&tolua_err);
2715 return 0;
2716#endif
2717}
2718
2719/* function: api_methods_tile_nat_y */
2721{
2722#ifndef TOLUA_RELEASE
2724 if (
2725 !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 {
2737 }
2738 }
2739 return 1;
2740#ifndef TOLUA_RELEASE
2742 tolua_error(tolua_S,"#ferror in function 'nat_y'.",&tolua_err);
2743 return 0;
2744#endif
2745}
2746
2747/* function: api_methods_tile_map_x */
2749{
2750#ifndef TOLUA_RELEASE
2752 if (
2753 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2755 )
2756 goto tolua_lerror;
2757 else
2758#endif
2759 {
2760 lua_State* L = tolua_S;
2761 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2762 {
2765 }
2766 }
2767 return 1;
2768#ifndef TOLUA_RELEASE
2770 tolua_error(tolua_S,"#ferror in function 'x'.",&tolua_err);
2771 return 0;
2772#endif
2773}
2774
2775/* function: api_methods_tile_map_y */
2777{
2778#ifndef TOLUA_RELEASE
2780 if (
2781 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2783 )
2784 goto tolua_lerror;
2785 else
2786#endif
2787 {
2788 lua_State* L = tolua_S;
2789 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2790 {
2793 }
2794 }
2795 return 1;
2796#ifndef TOLUA_RELEASE
2798 tolua_error(tolua_S,"#ferror in function 'y'.",&tolua_err);
2799 return 0;
2800#endif
2801}
2802
2803/* function: api_methods_tile_city */
2805{
2806#ifndef TOLUA_RELEASE
2808 if (
2809 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2811 )
2812 goto tolua_lerror;
2813 else
2814#endif
2815 {
2816 lua_State* L = tolua_S;
2817 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2818 {
2820 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
2821 }
2822 }
2823 return 1;
2824#ifndef TOLUA_RELEASE
2826 tolua_error(tolua_S,"#ferror in function 'city'.",&tolua_err);
2827 return 0;
2828#endif
2829}
2830
2831/* function: api_methods_tile_city_exists_within_max_city_map */
2833{
2834#ifndef TOLUA_RELEASE
2836 if (
2837 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2840 )
2841 goto tolua_lerror;
2842 else
2843#endif
2844 {
2845 lua_State* L = tolua_S;
2846 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2847 bool center = ((bool) tolua_toboolean(tolua_S,2,0));
2848 {
2851 }
2852 }
2853 return 1;
2854#ifndef TOLUA_RELEASE
2856 tolua_error(tolua_S,"#ferror in function 'city_exists_within_max_city_map'.",&tolua_err);
2857 return 0;
2858#endif
2859}
2860
2861/* function: api_methods_tile_has_extra */
2863{
2864#ifndef TOLUA_RELEASE
2866 if (
2867 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2870 )
2871 goto tolua_lerror;
2872 else
2873#endif
2874 {
2875 lua_State* L = tolua_S;
2876 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2877 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2878 {
2881 }
2882 }
2883 return 1;
2884#ifndef TOLUA_RELEASE
2886 tolua_error(tolua_S,"#ferror in function 'has_extra'.",&tolua_err);
2887 return 0;
2888#endif
2889}
2890
2891/* function: api_methods_tile_has_base */
2893{
2894#ifndef TOLUA_RELEASE
2896 if (
2897 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2900 )
2901 goto tolua_lerror;
2902 else
2903#endif
2904 {
2905 lua_State* L = tolua_S;
2906 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2907 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2908 {
2911 }
2912 }
2913 return 1;
2914#ifndef TOLUA_RELEASE
2916 tolua_error(tolua_S,"#ferror in function 'has_base'.",&tolua_err);
2917 return 0;
2918#endif
2919}
2920
2921/* function: api_methods_tile_has_road */
2923{
2924#ifndef TOLUA_RELEASE
2926 if (
2927 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2930 )
2931 goto tolua_lerror;
2932 else
2933#endif
2934 {
2935 lua_State* L = tolua_S;
2936 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2937 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
2938 {
2941 }
2942 }
2943 return 1;
2944#ifndef TOLUA_RELEASE
2946 tolua_error(tolua_S,"#ferror in function 'has_road'.",&tolua_err);
2947 return 0;
2948#endif
2949}
2950
2951/* function: api_methods_tile_extra_owner */
2953{
2954#ifndef TOLUA_RELEASE
2956 if (
2957 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2960 )
2961 goto tolua_lerror;
2962 else
2963#endif
2964 {
2965 lua_State* L = tolua_S;
2966 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2967 const char* extra_name = ((const char*) tolua_tostring(tolua_S,2,0));
2968 {
2970 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
2971 }
2972 }
2973 return 1;
2974#ifndef TOLUA_RELEASE
2976 tolua_error(tolua_S,"#ferror in function 'extra_owner'.",&tolua_err);
2977 return 0;
2978#endif
2979}
2980
2981/* function: api_methods_enemy_tile */
2983{
2984#ifndef TOLUA_RELEASE
2986 if (
2987 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
2988 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
2990 )
2991 goto tolua_lerror;
2992 else
2993#endif
2994 {
2995 lua_State* L = tolua_S;
2996 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
2998 {
3001 }
3002 }
3003 return 1;
3004#ifndef TOLUA_RELEASE
3006 tolua_error(tolua_S,"#ferror in function 'is_enemy'.",&tolua_err);
3007 return 0;
3008#endif
3009}
3010
3011/* function: api_methods_tile_num_units */
3013{
3014#ifndef TOLUA_RELEASE
3016 if (
3017 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
3019 )
3020 goto tolua_lerror;
3021 else
3022#endif
3023 {
3024 lua_State* L = tolua_S;
3025 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
3026 {
3029 }
3030 }
3031 return 1;
3032#ifndef TOLUA_RELEASE
3034 tolua_error(tolua_S,"#ferror in function 'num_units'.",&tolua_err);
3035 return 0;
3036#endif
3037}
3038
3039/* function: api_methods_tile_sq_distance */
3041{
3042#ifndef TOLUA_RELEASE
3044 if (
3045 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
3046 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
3048 )
3049 goto tolua_lerror;
3050 else
3051#endif
3052 {
3053 lua_State* L = tolua_S;
3054 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
3055 Tile* other = ((Tile*) tolua_tousertype(tolua_S,2,0));
3056 {
3059 }
3060 }
3061 return 1;
3062#ifndef TOLUA_RELEASE
3064 tolua_error(tolua_S,"#ferror in function 'sq_distance'.",&tolua_err);
3065 return 0;
3066#endif
3067}
3068
3069/* function: api_methods_tile_link */
3071{
3072#ifndef TOLUA_RELEASE
3074 if (
3075 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
3077 )
3078 goto tolua_lerror;
3079 else
3080#endif
3081 {
3082 lua_State* L = tolua_S;
3083 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
3084 {
3085 const char* tolua_ret = (const char*) api_methods_tile_link(L,self);
3086 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3087 }
3088 }
3089 return 1;
3090#ifndef TOLUA_RELEASE
3092 tolua_error(tolua_S,"#ferror in function 'link_text'.",&tolua_err);
3093 return 0;
3094#endif
3095}
3096
3097/* function: api_methods_tile_known */
3099{
3100#ifndef TOLUA_RELEASE
3102 if (
3103 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
3104 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
3106 )
3107 goto tolua_lerror;
3108 else
3109#endif
3110 {
3111 lua_State* L = tolua_S;
3112 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
3114 {
3117 }
3118 }
3119 return 1;
3120#ifndef TOLUA_RELEASE
3122 tolua_error(tolua_S,"#ferror in function 'known'.",&tolua_err);
3123 return 0;
3124#endif
3125}
3126
3127/* function: api_methods_tile_seen */
3129{
3130#ifndef TOLUA_RELEASE
3132 if (
3133 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
3134 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
3136 )
3137 goto tolua_lerror;
3138 else
3139#endif
3140 {
3141 lua_State* L = tolua_S;
3142 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
3144 {
3147 }
3148 }
3149 return 1;
3150#ifndef TOLUA_RELEASE
3152 tolua_error(tolua_S,"#ferror in function 'seen'.",&tolua_err);
3153 return 0;
3154#endif
3155}
3156
3157/* function: api_methods_private_tile_next_outward_index */
3159{
3160#ifndef TOLUA_RELEASE
3162 if (
3163 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
3167 )
3168 goto tolua_lerror;
3169 else
3170#endif
3171 {
3172 lua_State* L = tolua_S;
3174 int tindex = ((int) tolua_tonumber(tolua_S,2,0));
3175 int max_dist = ((int) tolua_tonumber(tolua_S,3,0));
3176 {
3179 }
3180 }
3181 return 1;
3182#ifndef TOLUA_RELEASE
3184 tolua_error(tolua_S,"#ferror in function 'next_outward_index'.",&tolua_err);
3185 return 0;
3186#endif
3187}
3188
3189/* function: api_methods_private_tile_for_outward_index */
3191{
3192#ifndef TOLUA_RELEASE
3194 if (
3195 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
3198 )
3199 goto tolua_lerror;
3200 else
3201#endif
3202 {
3203 lua_State* L = tolua_S;
3205 int tindex = ((int) tolua_tonumber(tolua_S,2,0));
3206 {
3208 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
3209 }
3210 }
3211 return 1;
3212#ifndef TOLUA_RELEASE
3214 tolua_error(tolua_S,"#ferror in function 'tile_for_outward_index'.",&tolua_err);
3215 return 0;
3216#endif
3217}
3218
3219/* function: api_methods_private_tile_unit_list_head */
3221{
3222#ifndef TOLUA_RELEASE
3224 if (
3225 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
3227 )
3228 goto tolua_lerror;
3229 else
3230#endif
3231 {
3232 lua_State* L = tolua_S;
3233 Tile* self = ((Tile*) tolua_tousertype(tolua_S,1,0));
3234 {
3236 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
3237 }
3238 }
3239 return 1;
3240#ifndef TOLUA_RELEASE
3242 tolua_error(tolua_S,"#ferror in function 'unit_list_head'.",&tolua_err);
3243 return 0;
3244#endif
3245}
3246
3247/* function: api_methods_government_rule_name */
3249{
3250#ifndef TOLUA_RELEASE
3252 if (
3253 !tolua_isusertype(tolua_S,1,"Government",0,&tolua_err) ||
3255 )
3256 goto tolua_lerror;
3257 else
3258#endif
3259 {
3260 lua_State* L = tolua_S;
3262 {
3263 const char* tolua_ret = (const char*) api_methods_government_rule_name(L,self);
3264 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3265 }
3266 }
3267 return 1;
3268#ifndef TOLUA_RELEASE
3270 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3271 return 0;
3272#endif
3273}
3274
3275/* function: api_methods_government_name_translation */
3277{
3278#ifndef TOLUA_RELEASE
3280 if (
3281 !tolua_isusertype(tolua_S,1,"Government",0,&tolua_err) ||
3283 )
3284 goto tolua_lerror;
3285 else
3286#endif
3287 {
3288 lua_State* L = tolua_S;
3290 {
3291 const char* tolua_ret = (const char*) api_methods_government_name_translation(L,self);
3292 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3293 }
3294 }
3295 return 1;
3296#ifndef TOLUA_RELEASE
3298 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3299 return 0;
3300#endif
3301}
3302
3303/* function: api_methods_nation_type_rule_name */
3305{
3306#ifndef TOLUA_RELEASE
3308 if (
3309 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3311 )
3312 goto tolua_lerror;
3313 else
3314#endif
3315 {
3316 lua_State* L = tolua_S;
3318 {
3319 const char* tolua_ret = (const char*) api_methods_nation_type_rule_name(L,self);
3320 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3321 }
3322 }
3323 return 1;
3324#ifndef TOLUA_RELEASE
3326 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3327 return 0;
3328#endif
3329}
3330
3331/* function: api_methods_nation_type_name_translation */
3333{
3334#ifndef TOLUA_RELEASE
3336 if (
3337 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3339 )
3340 goto tolua_lerror;
3341 else
3342#endif
3343 {
3344 lua_State* L = tolua_S;
3346 {
3347 const char* tolua_ret = (const char*) api_methods_nation_type_name_translation(L,self);
3348 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3349 }
3350 }
3351 return 1;
3352#ifndef TOLUA_RELEASE
3354 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3355 return 0;
3356#endif
3357}
3358
3359/* function: api_methods_nation_type_plural_translation */
3361{
3362#ifndef TOLUA_RELEASE
3364 if (
3365 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
3367 )
3368 goto tolua_lerror;
3369 else
3370#endif
3371 {
3372 lua_State* L = tolua_S;
3374 {
3375 const char* tolua_ret = (const char*) api_methods_nation_type_plural_translation(L,self);
3376 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3377 }
3378 }
3379 return 1;
3380#ifndef TOLUA_RELEASE
3382 tolua_error(tolua_S,"#ferror in function 'plural_translation'.",&tolua_err);
3383 return 0;
3384#endif
3385}
3386
3387/* function: api_methods_building_type_is_wonder */
3389{
3390#ifndef TOLUA_RELEASE
3392 if (
3393 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3395 )
3396 goto tolua_lerror;
3397 else
3398#endif
3399 {
3400 lua_State* L = tolua_S;
3402 {
3405 }
3406 }
3407 return 1;
3408#ifndef TOLUA_RELEASE
3410 tolua_error(tolua_S,"#ferror in function 'is_wonder'.",&tolua_err);
3411 return 0;
3412#endif
3413}
3414
3415/* function: api_methods_building_type_is_great_wonder */
3417{
3418#ifndef TOLUA_RELEASE
3420 if (
3421 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3423 )
3424 goto tolua_lerror;
3425 else
3426#endif
3427 {
3428 lua_State* L = tolua_S;
3430 {
3433 }
3434 }
3435 return 1;
3436#ifndef TOLUA_RELEASE
3438 tolua_error(tolua_S,"#ferror in function 'is_great_wonder'.",&tolua_err);
3439 return 0;
3440#endif
3441}
3442
3443/* function: api_methods_building_type_is_small_wonder */
3445{
3446#ifndef TOLUA_RELEASE
3448 if (
3449 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3451 )
3452 goto tolua_lerror;
3453 else
3454#endif
3455 {
3456 lua_State* L = tolua_S;
3458 {
3461 }
3462 }
3463 return 1;
3464#ifndef TOLUA_RELEASE
3466 tolua_error(tolua_S,"#ferror in function 'is_small_wonder'.",&tolua_err);
3467 return 0;
3468#endif
3469}
3470
3471/* function: api_methods_building_type_is_improvement */
3473{
3474#ifndef TOLUA_RELEASE
3476 if (
3477 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3479 )
3480 goto tolua_lerror;
3481 else
3482#endif
3483 {
3484 lua_State* L = tolua_S;
3486 {
3489 }
3490 }
3491 return 1;
3492#ifndef TOLUA_RELEASE
3494 tolua_error(tolua_S,"#ferror in function 'is_improvement'.",&tolua_err);
3495 return 0;
3496#endif
3497}
3498
3499/* function: api_methods_building_type_rule_name */
3501{
3502#ifndef TOLUA_RELEASE
3504 if (
3505 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3507 )
3508 goto tolua_lerror;
3509 else
3510#endif
3511 {
3512 lua_State* L = tolua_S;
3514 {
3515 const char* tolua_ret = (const char*) api_methods_building_type_rule_name(L,self);
3516 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3517 }
3518 }
3519 return 1;
3520#ifndef TOLUA_RELEASE
3522 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3523 return 0;
3524#endif
3525}
3526
3527/* function: api_methods_building_type_name_translation */
3529{
3530#ifndef TOLUA_RELEASE
3532 if (
3533 !tolua_isusertype(tolua_S,1,"Building_Type",0,&tolua_err) ||
3535 )
3536 goto tolua_lerror;
3537 else
3538#endif
3539 {
3540 lua_State* L = tolua_S;
3542 {
3543 const char* tolua_ret = (const char*) api_methods_building_type_name_translation(L,self);
3544 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3545 }
3546 }
3547 return 1;
3548#ifndef TOLUA_RELEASE
3550 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3551 return 0;
3552#endif
3553}
3554
3555/* function: api_methods_unit_type_has_flag */
3557{
3558#ifndef TOLUA_RELEASE
3560 if (
3561 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3564 )
3565 goto tolua_lerror;
3566 else
3567#endif
3568 {
3569 lua_State* L = tolua_S;
3571 const char* flag = ((const char*) tolua_tostring(tolua_S,2,0));
3572 {
3575 }
3576 }
3577 return 1;
3578#ifndef TOLUA_RELEASE
3580 tolua_error(tolua_S,"#ferror in function 'has_flag'.",&tolua_err);
3581 return 0;
3582#endif
3583}
3584
3585/* function: api_methods_unit_type_has_role */
3587{
3588#ifndef TOLUA_RELEASE
3590 if (
3591 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3594 )
3595 goto tolua_lerror;
3596 else
3597#endif
3598 {
3599 lua_State* L = tolua_S;
3601 const char* role = ((const char*) tolua_tostring(tolua_S,2,0));
3602 {
3605 }
3606 }
3607 return 1;
3608#ifndef TOLUA_RELEASE
3610 tolua_error(tolua_S,"#ferror in function 'has_role'.",&tolua_err);
3611 return 0;
3612#endif
3613}
3614
3615/* function: api_methods_unit_type_rule_name */
3617{
3618#ifndef TOLUA_RELEASE
3620 if (
3621 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3623 )
3624 goto tolua_lerror;
3625 else
3626#endif
3627 {
3628 lua_State* L = tolua_S;
3630 {
3631 const char* tolua_ret = (const char*) api_methods_unit_type_rule_name(L,self);
3632 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3633 }
3634 }
3635 return 1;
3636#ifndef TOLUA_RELEASE
3638 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3639 return 0;
3640#endif
3641}
3642
3643/* function: api_methods_unit_type_name_translation */
3645{
3646#ifndef TOLUA_RELEASE
3648 if (
3649 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3651 )
3652 goto tolua_lerror;
3653 else
3654#endif
3655 {
3656 lua_State* L = tolua_S;
3658 {
3659 const char* tolua_ret = (const char*) api_methods_unit_type_name_translation(L,self);
3660 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3661 }
3662 }
3663 return 1;
3664#ifndef TOLUA_RELEASE
3666 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3667 return 0;
3668#endif
3669}
3670
3671/* function: api_methods_unit_type_can_exist_at_tile */
3673{
3674#ifndef TOLUA_RELEASE
3676 if (
3677 !tolua_isusertype(tolua_S,1,"Unit_Type",0,&tolua_err) ||
3678 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
3680 )
3681 goto tolua_lerror;
3682 else
3683#endif
3684 {
3685 lua_State* L = tolua_S;
3687 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
3688 {
3691 }
3692 }
3693 return 1;
3694#ifndef TOLUA_RELEASE
3696 tolua_error(tolua_S,"#ferror in function 'can_exist_at_tile'.",&tolua_err);
3697 return 0;
3698#endif
3699}
3700
3701/* function: api_methods_tech_type_rule_name */
3703{
3704#ifndef TOLUA_RELEASE
3706 if (
3707 !tolua_isusertype(tolua_S,1,"Tech_Type",0,&tolua_err) ||
3709 )
3710 goto tolua_lerror;
3711 else
3712#endif
3713 {
3714 lua_State* L = tolua_S;
3716 {
3717 const char* tolua_ret = (const char*) api_methods_tech_type_rule_name(L,self);
3718 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3719 }
3720 }
3721 return 1;
3722#ifndef TOLUA_RELEASE
3724 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3725 return 0;
3726#endif
3727}
3728
3729/* function: api_methods_tech_type_name_translation */
3731{
3732#ifndef TOLUA_RELEASE
3734 if (
3735 !tolua_isusertype(tolua_S,1,"Tech_Type",0,&tolua_err) ||
3737 )
3738 goto tolua_lerror;
3739 else
3740#endif
3741 {
3742 lua_State* L = tolua_S;
3744 {
3745 const char* tolua_ret = (const char*) api_methods_tech_type_name_translation(L,self);
3746 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3747 }
3748 }
3749 return 1;
3750#ifndef TOLUA_RELEASE
3752 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3753 return 0;
3754#endif
3755}
3756
3757/* function: api_methods_terrain_rule_name */
3759{
3760#ifndef TOLUA_RELEASE
3762 if (
3763 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3765 )
3766 goto tolua_lerror;
3767 else
3768#endif
3769 {
3770 lua_State* L = tolua_S;
3772 {
3773 const char* tolua_ret = (const char*) api_methods_terrain_rule_name(L,self);
3774 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3775 }
3776 }
3777 return 1;
3778#ifndef TOLUA_RELEASE
3780 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3781 return 0;
3782#endif
3783}
3784
3785/* function: api_methods_terrain_name_translation */
3787{
3788#ifndef TOLUA_RELEASE
3790 if (
3791 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3793 )
3794 goto tolua_lerror;
3795 else
3796#endif
3797 {
3798 lua_State* L = tolua_S;
3800 {
3801 const char* tolua_ret = (const char*) api_methods_terrain_name_translation(L,self);
3802 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3803 }
3804 }
3805 return 1;
3806#ifndef TOLUA_RELEASE
3808 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3809 return 0;
3810#endif
3811}
3812
3813/* function: api_methods_terrain_class_name */
3815{
3816#ifndef TOLUA_RELEASE
3818 if (
3819 !tolua_isusertype(tolua_S,1,"Terrain",0,&tolua_err) ||
3821 )
3822 goto tolua_lerror;
3823 else
3824#endif
3825 {
3826 lua_State* L = tolua_S;
3828 {
3829 const char* tolua_ret = (const char*) api_methods_terrain_class_name(L,self);
3830 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3831 }
3832 }
3833 return 1;
3834#ifndef TOLUA_RELEASE
3836 tolua_error(tolua_S,"#ferror in function 'class_name'.",&tolua_err);
3837 return 0;
3838#endif
3839}
3840
3841/* function: api_methods_disaster_rule_name */
3843{
3844#ifndef TOLUA_RELEASE
3846 if (
3847 !tolua_isusertype(tolua_S,1,"Disaster",0,&tolua_err) ||
3849 )
3850 goto tolua_lerror;
3851 else
3852#endif
3853 {
3854 lua_State* L = tolua_S;
3856 {
3857 const char* tolua_ret = (const char*) api_methods_disaster_rule_name(L,self);
3858 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3859 }
3860 }
3861 return 1;
3862#ifndef TOLUA_RELEASE
3864 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3865 return 0;
3866#endif
3867}
3868
3869/* function: api_methods_disaster_name_translation */
3871{
3872#ifndef TOLUA_RELEASE
3874 if (
3875 !tolua_isusertype(tolua_S,1,"Disaster",0,&tolua_err) ||
3877 )
3878 goto tolua_lerror;
3879 else
3880#endif
3881 {
3882 lua_State* L = tolua_S;
3884 {
3885 const char* tolua_ret = (const char*) api_methods_disaster_name_translation(L,self);
3886 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3887 }
3888 }
3889 return 1;
3890#ifndef TOLUA_RELEASE
3892 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3893 return 0;
3894#endif
3895}
3896
3897/* function: api_methods_achievement_rule_name */
3899{
3900#ifndef TOLUA_RELEASE
3902 if (
3903 !tolua_isusertype(tolua_S,1,"Achievement",0,&tolua_err) ||
3905 )
3906 goto tolua_lerror;
3907 else
3908#endif
3909 {
3910 lua_State* L = tolua_S;
3912 {
3913 const char* tolua_ret = (const char*) api_methods_achievement_rule_name(L,self);
3914 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3915 }
3916 }
3917 return 1;
3918#ifndef TOLUA_RELEASE
3920 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3921 return 0;
3922#endif
3923}
3924
3925/* function: api_methods_achievement_name_translation */
3927{
3928#ifndef TOLUA_RELEASE
3930 if (
3931 !tolua_isusertype(tolua_S,1,"Achievement",0,&tolua_err) ||
3933 )
3934 goto tolua_lerror;
3935 else
3936#endif
3937 {
3938 lua_State* L = tolua_S;
3940 {
3941 const char* tolua_ret = (const char*) api_methods_achievement_name_translation(L,self);
3942 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3943 }
3944 }
3945 return 1;
3946#ifndef TOLUA_RELEASE
3948 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
3949 return 0;
3950#endif
3951}
3952
3953/* function: api_methods_action_rule_name */
3955{
3956#ifndef TOLUA_RELEASE
3958 if (
3959 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3961 )
3962 goto tolua_lerror;
3963 else
3964#endif
3965 {
3966 lua_State* L = tolua_S;
3968 {
3969 const char* tolua_ret = (const char*) api_methods_action_rule_name(L,self);
3970 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3971 }
3972 }
3973 return 1;
3974#ifndef TOLUA_RELEASE
3976 tolua_error(tolua_S,"#ferror in function 'rule_name'.",&tolua_err);
3977 return 0;
3978#endif
3979}
3980
3981/* function: api_methods_action_name_translation */
3983{
3984#ifndef TOLUA_RELEASE
3986 if (
3987 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
3989 )
3990 goto tolua_lerror;
3991 else
3992#endif
3993 {
3994 lua_State* L = tolua_S;
3996 {
3997 const char* tolua_ret = (const char*) api_methods_action_name_translation(L,self);
3998 tolua_pushstring(tolua_S,(const char*)tolua_ret);
3999 }
4000 }
4001 return 1;
4002#ifndef TOLUA_RELEASE
4004 tolua_error(tolua_S,"#ferror in function 'name_translation'.",&tolua_err);
4005 return 0;
4006#endif
4007}
4008
4009/* function: api_methods_action_target_kind */
4011{
4012#ifndef TOLUA_RELEASE
4014 if (
4015 !tolua_isusertype(tolua_S,1,"Action",0,&tolua_err) ||
4017 )
4018 goto tolua_lerror;
4019 else
4020#endif
4021 {
4022 lua_State* L = tolua_S;
4024 {
4025 const char* tolua_ret = (const char*) api_methods_action_target_kind(L,self);
4026 tolua_pushstring(tolua_S,(const char*)tolua_ret);
4027 }
4028 }
4029 return 1;
4030#ifndef TOLUA_RELEASE
4032 tolua_error(tolua_S,"#ferror in function 'target_kind'.",&tolua_err);
4033 return 0;
4034#endif
4035}
4036
4037/* function: api_methods_unit_list_link_data */
4039{
4040#ifndef TOLUA_RELEASE
4042 if (
4043 !tolua_isusertype(tolua_S,1,"Unit_List_Link",0,&tolua_err) ||
4045 )
4046 goto tolua_lerror;
4047 else
4048#endif
4049 {
4050 lua_State* L = tolua_S;
4052 {
4054 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
4055 }
4056 }
4057 return 1;
4058#ifndef TOLUA_RELEASE
4060 tolua_error(tolua_S,"#ferror in function 'data'.",&tolua_err);
4061 return 0;
4062#endif
4063}
4064
4065/* function: api_methods_unit_list_next_link */
4067{
4068#ifndef TOLUA_RELEASE
4070 if (
4071 !tolua_isusertype(tolua_S,1,"Unit_List_Link",0,&tolua_err) ||
4073 )
4074 goto tolua_lerror;
4075 else
4076#endif
4077 {
4078 lua_State* L = tolua_S;
4080 {
4082 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_List_Link");
4083 }
4084 }
4085 return 1;
4086#ifndef TOLUA_RELEASE
4088 tolua_error(tolua_S,"#ferror in function 'next'.",&tolua_err);
4089 return 0;
4090#endif
4091}
4092
4093/* function: api_methods_city_list_link_data */
4095{
4096#ifndef TOLUA_RELEASE
4098 if (
4099 !tolua_isusertype(tolua_S,1,"City_List_Link",0,&tolua_err) ||
4101 )
4102 goto tolua_lerror;
4103 else
4104#endif
4105 {
4106 lua_State* L = tolua_S;
4108 {
4110 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
4111 }
4112 }
4113 return 1;
4114#ifndef TOLUA_RELEASE
4116 tolua_error(tolua_S,"#ferror in function 'data'.",&tolua_err);
4117 return 0;
4118#endif
4119}
4120
4121/* function: api_methods_city_list_next_link */
4123{
4124#ifndef TOLUA_RELEASE
4126 if (
4127 !tolua_isusertype(tolua_S,1,"City_List_Link",0,&tolua_err) ||
4129 )
4130 goto tolua_lerror;
4131 else
4132#endif
4133 {
4134 lua_State* L = tolua_S;
4136 {
4138 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City_List_Link");
4139 }
4140 }
4141 return 1;
4142#ifndef TOLUA_RELEASE
4144 tolua_error(tolua_S,"#ferror in function 'next'.",&tolua_err);
4145 return 0;
4146#endif
4147}
4148
4149/* function: api_find_counter_by_name */
4151{
4152#ifndef TOLUA_RELEASE
4154 if (
4157 )
4158 goto tolua_lerror;
4159 else
4160#endif
4161 {
4162 lua_State* L = tolua_S;
4163 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
4164 {
4166 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Counter");
4167 }
4168 }
4169 return 1;
4170#ifndef TOLUA_RELEASE
4172 tolua_error(tolua_S,"#ferror in function 'counter'.",&tolua_err);
4173 return 0;
4174#endif
4175}
4176
4177/* function: api_find_counter */
4179{
4181 if (
4184 )
4185 goto tolua_lerror;
4186 else
4187 {
4188 lua_State* L = tolua_S;
4189 int counter_id = ((int) tolua_tonumber(tolua_S,1,0));
4190 {
4192 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Counter");
4193 }
4194 }
4195 return 1;
4198}
4199
4200/* function: api_find_player_by_name */
4202{
4203#ifndef TOLUA_RELEASE
4205 if (
4208 )
4209 goto tolua_lerror;
4210 else
4211#endif
4212 {
4213 lua_State* L = tolua_S;
4214 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
4215 {
4217 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
4218 }
4219 }
4220 return 1;
4221#ifndef TOLUA_RELEASE
4223 tolua_error(tolua_S,"#ferror in function 'player'.",&tolua_err);
4224 return 0;
4225#endif
4226}
4227
4228/* function: api_find_player */
4230{
4232 if (
4235 )
4236 goto tolua_lerror;
4237 else
4238 {
4239 lua_State* L = tolua_S;
4240 int player_id = ((int) tolua_tonumber(tolua_S,1,0));
4241 {
4242 Player* tolua_ret = (Player*) api_find_player(L,player_id);
4243 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
4244 }
4245 }
4246 return 1;
4249}
4250
4251/* function: api_find_city */
4253{
4254#ifndef TOLUA_RELEASE
4256 if (
4257 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4260 )
4261 goto tolua_lerror;
4262 else
4263#endif
4264 {
4265 lua_State* L = tolua_S;
4266 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4267 int city_id = ((int) tolua_tonumber(tolua_S,2,0));
4268 {
4269 City* tolua_ret = (City*) api_find_city(L,pplayer,city_id);
4270 tolua_pushusertype(tolua_S,(void*)tolua_ret,"City");
4271 }
4272 }
4273 return 1;
4274#ifndef TOLUA_RELEASE
4276 tolua_error(tolua_S,"#ferror in function 'city'.",&tolua_err);
4277 return 0;
4278#endif
4279}
4280
4281/* function: api_find_unit */
4283{
4284#ifndef TOLUA_RELEASE
4286 if (
4287 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4290 )
4291 goto tolua_lerror;
4292 else
4293#endif
4294 {
4295 lua_State* L = tolua_S;
4296 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4297 int unit_id = ((int) tolua_tonumber(tolua_S,2,0));
4298 {
4299 Unit* tolua_ret = (Unit*) api_find_unit(L,pplayer,unit_id);
4300 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
4301 }
4302 }
4303 return 1;
4304#ifndef TOLUA_RELEASE
4306 tolua_error(tolua_S,"#ferror in function 'unit'.",&tolua_err);
4307 return 0;
4308#endif
4309}
4310
4311/* function: api_find_transport_unit */
4313{
4314#ifndef TOLUA_RELEASE
4316 if (
4317 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
4318 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
4319 !tolua_isusertype(tolua_S,3,"Tile",0,&tolua_err) ||
4321 )
4322 goto tolua_lerror;
4323 else
4324#endif
4325 {
4326 lua_State* L = tolua_S;
4327 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
4329 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,3,0));
4330 {
4331 Unit* tolua_ret = (Unit*) api_find_transport_unit(L,pplayer,ptype,ptile);
4332 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
4333 }
4334 }
4335 return 1;
4336#ifndef TOLUA_RELEASE
4338 tolua_error(tolua_S,"#ferror in function 'transport_unit'.",&tolua_err);
4339 return 0;
4340#endif
4341}
4342
4343/* function: api_find_tile */
4345{
4346#ifndef TOLUA_RELEASE
4348 if (
4352 )
4353 goto tolua_lerror;
4354 else
4355#endif
4356 {
4357 lua_State* L = tolua_S;
4358 int nat_x = ((int) tolua_tonumber(tolua_S,1,0));
4359 int nat_y = ((int) tolua_tonumber(tolua_S,2,0));
4360 {
4362 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
4363 }
4364 }
4365 return 1;
4366#ifndef TOLUA_RELEASE
4368 tolua_error(tolua_S,"#ferror in function 'tile'.",&tolua_err);
4369 return 0;
4370#endif
4371}
4372
4373/* function: api_find_tile_by_index */
4375{
4377 if (
4380 )
4381 goto tolua_lerror;
4382 else
4383 {
4384 lua_State* L = tolua_S;
4385 int tindex = ((int) tolua_tonumber(tolua_S,1,0));
4386 {
4388 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tile");
4389 }
4390 }
4391 return 1;
4394}
4395
4396/* function: api_find_government_by_name */
4398{
4399#ifndef TOLUA_RELEASE
4401 if (
4404 )
4405 goto tolua_lerror;
4406 else
4407#endif
4408 {
4409 lua_State* L = tolua_S;
4410 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4411 {
4413 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Government");
4414 }
4415 }
4416 return 1;
4417#ifndef TOLUA_RELEASE
4419 tolua_error(tolua_S,"#ferror in function 'government'.",&tolua_err);
4420 return 0;
4421#endif
4422}
4423
4424/* function: api_find_government */
4426{
4428 if (
4431 )
4432 goto tolua_lerror;
4433 else
4434 {
4435 lua_State* L = tolua_S;
4436 int government_id = ((int) tolua_tonumber(tolua_S,1,0));
4437 {
4439 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Government");
4440 }
4441 }
4442 return 1;
4445}
4446
4447/* function: api_find_nation_type_by_name */
4449{
4450#ifndef TOLUA_RELEASE
4452 if (
4455 )
4456 goto tolua_lerror;
4457 else
4458#endif
4459 {
4460 lua_State* L = tolua_S;
4461 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4462 {
4464 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nation_Type");
4465 }
4466 }
4467 return 1;
4468#ifndef TOLUA_RELEASE
4470 tolua_error(tolua_S,"#ferror in function 'nation_type'.",&tolua_err);
4471 return 0;
4472#endif
4473}
4474
4475/* function: api_find_nation_type */
4477{
4479 if (
4482 )
4483 goto tolua_lerror;
4484 else
4485 {
4486 lua_State* L = tolua_S;
4488 {
4490 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nation_Type");
4491 }
4492 }
4493 return 1;
4496}
4497
4498/* function: api_find_action_by_name */
4500{
4501#ifndef TOLUA_RELEASE
4503 if (
4506 )
4507 goto tolua_lerror;
4508 else
4509#endif
4510 {
4511 lua_State* L = tolua_S;
4512 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4513 {
4515 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4516 }
4517 }
4518 return 1;
4519#ifndef TOLUA_RELEASE
4521 tolua_error(tolua_S,"#ferror in function 'action'.",&tolua_err);
4522 return 0;
4523#endif
4524}
4525
4526/* function: api_find_action */
4528{
4530 if (
4533 )
4534 goto tolua_lerror;
4535 else
4536 {
4537 lua_State* L = tolua_S;
4539 {
4541 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4542 }
4543 }
4544 return 1;
4547}
4548
4549/* function: api_find_building_type_by_name */
4551{
4552#ifndef TOLUA_RELEASE
4554 if (
4557 )
4558 goto tolua_lerror;
4559 else
4560#endif
4561 {
4562 lua_State* L = tolua_S;
4563 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4564 {
4566 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Building_Type");
4567 }
4568 }
4569 return 1;
4570#ifndef TOLUA_RELEASE
4572 tolua_error(tolua_S,"#ferror in function 'building_type'.",&tolua_err);
4573 return 0;
4574#endif
4575}
4576
4577/* function: api_find_building_type */
4579{
4581 if (
4584 )
4585 goto tolua_lerror;
4586 else
4587 {
4588 lua_State* L = tolua_S;
4590 {
4592 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Building_Type");
4593 }
4594 }
4595 return 1;
4598}
4599
4600/* function: api_find_unit_type_by_name */
4602{
4603#ifndef TOLUA_RELEASE
4605 if (
4608 )
4609 goto tolua_lerror;
4610 else
4611#endif
4612 {
4613 lua_State* L = tolua_S;
4614 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4615 {
4617 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4618 }
4619 }
4620 return 1;
4621#ifndef TOLUA_RELEASE
4623 tolua_error(tolua_S,"#ferror in function 'unit_type'.",&tolua_err);
4624 return 0;
4625#endif
4626}
4627
4628/* function: api_find_unit_type */
4630{
4632 if (
4635 )
4636 goto tolua_lerror;
4637 else
4638 {
4639 lua_State* L = tolua_S;
4640 int unit_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4641 {
4643 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4644 }
4645 }
4646 return 1;
4649}
4650
4651/* function: api_find_role_unit_type */
4653{
4654#ifndef TOLUA_RELEASE
4656 if (
4658 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
4660 )
4661 goto tolua_lerror;
4662 else
4663#endif
4664 {
4665 lua_State* L = tolua_S;
4666 const char* role_name = ((const char*) tolua_tostring(tolua_S,1,0));
4667 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
4668 {
4670 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit_Type");
4671 }
4672 }
4673 return 1;
4674#ifndef TOLUA_RELEASE
4676 tolua_error(tolua_S,"#ferror in function 'role_unit_type'.",&tolua_err);
4677 return 0;
4678#endif
4679}
4680
4681/* function: api_find_tech_type_by_name */
4683{
4684#ifndef TOLUA_RELEASE
4686 if (
4689 )
4690 goto tolua_lerror;
4691 else
4692#endif
4693 {
4694 lua_State* L = tolua_S;
4695 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4696 {
4698 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
4699 }
4700 }
4701 return 1;
4702#ifndef TOLUA_RELEASE
4704 tolua_error(tolua_S,"#ferror in function 'tech_type'.",&tolua_err);
4705 return 0;
4706#endif
4707}
4708
4709/* function: api_find_tech_type */
4711{
4713 if (
4716 )
4717 goto tolua_lerror;
4718 else
4719 {
4720 lua_State* L = tolua_S;
4721 int tech_type_id = ((int) tolua_tonumber(tolua_S,1,0));
4722 {
4724 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
4725 }
4726 }
4727 return 1;
4730}
4731
4732/* function: api_find_terrain_by_name */
4734{
4735#ifndef TOLUA_RELEASE
4737 if (
4740 )
4741 goto tolua_lerror;
4742 else
4743#endif
4744 {
4745 lua_State* L = tolua_S;
4746 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4747 {
4749 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Terrain");
4750 }
4751 }
4752 return 1;
4753#ifndef TOLUA_RELEASE
4755 tolua_error(tolua_S,"#ferror in function 'terrain'.",&tolua_err);
4756 return 0;
4757#endif
4758}
4759
4760/* function: api_find_terrain */
4762{
4764 if (
4767 )
4768 goto tolua_lerror;
4769 else
4770 {
4771 lua_State* L = tolua_S;
4772 int terrain_id = ((int) tolua_tonumber(tolua_S,1,0));
4773 {
4775 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Terrain");
4776 }
4777 }
4778 return 1;
4781}
4782
4783/* function: api_find_achievement_by_name */
4785{
4786#ifndef TOLUA_RELEASE
4788 if (
4791 )
4792 goto tolua_lerror;
4793 else
4794#endif
4795 {
4796 lua_State* L = tolua_S;
4797 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4798 {
4800 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Achievement");
4801 }
4802 }
4803 return 1;
4804#ifndef TOLUA_RELEASE
4806 tolua_error(tolua_S,"#ferror in function 'achievement'.",&tolua_err);
4807 return 0;
4808#endif
4809}
4810
4811/* function: api_find_achievement */
4813{
4815 if (
4818 )
4819 goto tolua_lerror;
4820 else
4821 {
4822 lua_State* L = tolua_S;
4824 {
4826 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Achievement");
4827 }
4828 }
4829 return 1;
4832}
4833
4834/* function: api_find_disaster_by_name */
4836{
4838 if (
4841 )
4842 goto tolua_lerror;
4843 else
4844 {
4845 lua_State* L = tolua_S;
4846 const char* name_orig = ((const char*) tolua_tostring(tolua_S,1,0));
4847 {
4849 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Disaster");
4850 }
4851 }
4852 return 1;
4855}
4856
4857/* function: api_find_disaster */
4859{
4860#ifndef TOLUA_RELEASE
4862 if (
4865 )
4866 goto tolua_lerror;
4867 else
4868#endif
4869 {
4870 lua_State* L = tolua_S;
4871 int disaster_id = ((int) tolua_tonumber(tolua_S,1,0));
4872 {
4874 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Disaster");
4875 }
4876 }
4877 return 1;
4878#ifndef TOLUA_RELEASE
4880 tolua_error(tolua_S,"#ferror in function 'disaster'.",&tolua_err);
4881 return 0;
4882#endif
4883}
4884
4885/* function: api_utilities_str2dir */
4887{
4888#ifndef TOLUA_RELEASE
4890 if (
4893 )
4894 goto tolua_lerror;
4895 else
4896#endif
4897 {
4898 lua_State* L = tolua_S;
4899 const char* str = ((const char*) tolua_tostring(tolua_S,1,0));
4900 {
4902 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
4903 }
4904 }
4905 return 1;
4906#ifndef TOLUA_RELEASE
4908 tolua_error(tolua_S,"#ferror in function 'direction'.",&tolua_err);
4909 return 0;
4910#endif
4911}
4912
4913/* function: api_find_direction */
4915{
4917 if (
4920 )
4921 goto tolua_lerror;
4922 else
4923 {
4924 lua_State* L = tolua_S;
4925 int id = ((int) tolua_tonumber(tolua_S,1,0));
4926 {
4928 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
4929 }
4930 }
4931 return 1;
4934}
4935
4936/* function: api_find_action_type_by_name */
4938{
4940 if (
4943 )
4944 goto tolua_lerror;
4945 else
4946 {
4947 lua_State* L = tolua_S;
4948 const char* name = ((const char*) tolua_tostring(tolua_S,1,0));
4949 {
4951 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4952 }
4953 }
4954 return 1;
4957}
4958
4959/* function: api_find_action_type_by_id */
4961{
4963 if (
4966 )
4967 goto tolua_lerror;
4968 else
4969 {
4970 lua_State* L = tolua_S;
4971 int id = ((int) tolua_tonumber(tolua_S,1,0));
4972 {
4974 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Action");
4975 }
4976 }
4977 return 1;
4980}
4981
4982/* function: api_find_nonexistent */
4984{
4985#ifndef TOLUA_RELEASE
4987 if (
4989 )
4990 goto tolua_lerror;
4991 else
4992#endif
4993 {
4994 lua_State* L = tolua_S;
4995 {
4997 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Nonexistent");
4998 }
4999 }
5000 return 1;
5001#ifndef TOLUA_RELEASE
5003 tolua_error(tolua_S,"#ferror in function 'nonexistent'.",&tolua_err);
5004 return 0;
5005#endif
5006}
5007
5008/* function: api_effects_world_bonus */
5010{
5011#ifndef TOLUA_RELEASE
5013 if (
5016 )
5017 goto tolua_lerror;
5018 else
5019#endif
5020 {
5021 lua_State* L = tolua_S;
5022 const char* effect_type = ((const char*) tolua_tostring(tolua_S,1,0));
5023 {
5024 int tolua_ret = (int) api_effects_world_bonus(L,effect_type);
5026 }
5027 }
5028 return 1;
5029#ifndef TOLUA_RELEASE
5031 tolua_error(tolua_S,"#ferror in function 'world_bonus'.",&tolua_err);
5032 return 0;
5033#endif
5034}
5035
5036/* function: api_effects_player_bonus */
5038{
5039#ifndef TOLUA_RELEASE
5041 if (
5042 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
5045 )
5046 goto tolua_lerror;
5047 else
5048#endif
5049 {
5050 lua_State* L = tolua_S;
5051 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
5052 const char* effect_type = ((const char*) tolua_tostring(tolua_S,2,0));
5053 {
5054 int tolua_ret = (int) api_effects_player_bonus(L,pplayer,effect_type);
5056 }
5057 }
5058 return 1;
5059#ifndef TOLUA_RELEASE
5061 tolua_error(tolua_S,"#ferror in function 'player_bonus'.",&tolua_err);
5062 return 0;
5063#endif
5064}
5065
5066/* function: api_effects_city_bonus */
5068{
5069#ifndef TOLUA_RELEASE
5071 if (
5072 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
5075 )
5076 goto tolua_lerror;
5077 else
5078#endif
5079 {
5080 lua_State* L = tolua_S;
5081 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
5082 const char* effect_type = ((const char*) tolua_tostring(tolua_S,2,0));
5083 {
5084 int tolua_ret = (int) api_effects_city_bonus(L,pcity,effect_type);
5086 }
5087 }
5088 return 1;
5089#ifndef TOLUA_RELEASE
5091 tolua_error(tolua_S,"#ferror in function 'city_bonus'.",&tolua_err);
5092 return 0;
5093#endif
5094}
5095
5096/* function: api_effects_unit_bonus */
5098{
5099#ifndef TOLUA_RELEASE
5101 if (
5102 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
5103 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
5106 )
5107 goto tolua_lerror;
5108 else
5109#endif
5110 {
5111 lua_State* L = tolua_S;
5112 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
5113 Player* other_player = ((Player*) tolua_tousertype(tolua_S,2,0));
5114 const char* effect_type = ((const char*) tolua_tostring(tolua_S,3,0));
5115 {
5116 int tolua_ret = (int) api_effects_unit_bonus(L,punit,other_player,effect_type);
5118 }
5119 }
5120 return 1;
5121#ifndef TOLUA_RELEASE
5123 tolua_error(tolua_S,"#ferror in function 'unit_bonus'.",&tolua_err);
5124 return 0;
5125#endif
5126}
5127
5128/* function: api_effects_tile_bonus */
5130{
5131#ifndef TOLUA_RELEASE
5133 if (
5134 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
5135 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
5139 )
5140 goto tolua_lerror;
5141 else
5142#endif
5143 {
5144 lua_State* L = tolua_S;
5145 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
5146 City* pcity = ((City*) tolua_tousertype(tolua_S,2,0));
5147 const char* output_id = ((const char*) tolua_tostring(tolua_S,3,0));
5148 const char* effect_type = ((const char*) tolua_tostring(tolua_S,4,0));
5149 {
5150 int tolua_ret = (int) api_effects_tile_bonus(L,ptile,pcity,output_id,effect_type);
5152 }
5153 }
5154 return 1;
5155#ifndef TOLUA_RELEASE
5157 tolua_error(tolua_S,"#ferror in function 'tile_bonus'.",&tolua_err);
5158 return 0;
5159#endif
5160}
5161
5162/* function: api_effects_unit_vs_tile_bonus */
5164{
5165#ifndef TOLUA_RELEASE
5167 if (
5168 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
5169 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
5172 )
5173 goto tolua_lerror;
5174 else
5175#endif
5176 {
5177 lua_State* L = tolua_S;
5178 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
5179 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
5180 const char* effect_type = ((const char*) tolua_tostring(tolua_S,3,0));
5181 {
5182 int tolua_ret = (int) api_effects_unit_vs_tile_bonus(L,punit,ptile,effect_type);
5184 }
5185 }
5186 return 1;
5187#ifndef TOLUA_RELEASE
5189 tolua_error(tolua_S,"#ferror in function 'unit_vs_tile_bonus'.",&tolua_err);
5190 return 0;
5191#endif
5192}
5193
5194/* function: api_utilities_direction_id */
5196{
5197#ifndef TOLUA_RELEASE
5199 if (
5200 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5202 )
5203 goto tolua_lerror;
5204 else
5205#endif
5206 {
5207 lua_State* L = tolua_S;
5209 {
5212 }
5213 }
5214 return 1;
5215#ifndef TOLUA_RELEASE
5217 tolua_error(tolua_S,"#ferror in function 'id'.",&tolua_err);
5218 return 0;
5219#endif
5220}
5221
5222/* function: api_utilities_dir2str */
5224{
5225#ifndef TOLUA_RELEASE
5227 if (
5228 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5230 )
5231 goto tolua_lerror;
5232 else
5233#endif
5234 {
5235 lua_State* L = tolua_S;
5237 {
5238 const char* tolua_ret = (const char*) api_utilities_dir2str(L,dir);
5239 tolua_pushstring(tolua_S,(const char*)tolua_ret);
5240 }
5241 }
5242 return 1;
5243#ifndef TOLUA_RELEASE
5245 tolua_error(tolua_S,"#ferror in function 'name'.",&tolua_err);
5246 return 0;
5247#endif
5248}
5249
5250/* function: api_utilities_direction_is_cardinal */
5252{
5253#ifndef TOLUA_RELEASE
5255 if (
5256 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5258 )
5259 goto tolua_lerror;
5260 else
5261#endif
5262 {
5263 lua_State* L = tolua_S;
5265 {
5268 }
5269 }
5270 return 1;
5271#ifndef TOLUA_RELEASE
5273 tolua_error(tolua_S,"#ferror in function 'cardinal'.",&tolua_err);
5274 return 0;
5275#endif
5276}
5277
5278/* function: api_utilities_str2dir */
5280{
5281#ifndef TOLUA_RELEASE
5283 if (
5286 )
5287 goto tolua_lerror;
5288 else
5289#endif
5290 {
5291 lua_State* L = tolua_S;
5292 const char* str = ((const char*) tolua_tostring(tolua_S,1,0));
5293 {
5295 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5296 }
5297 }
5298 return 1;
5299#ifndef TOLUA_RELEASE
5301 tolua_error(tolua_S,"#ferror in function 'str2dir'.",&tolua_err);
5302 return 0;
5303#endif
5304}
5305
5306/* function: api_utilities_dir_ccw */
5308{
5309#ifndef TOLUA_RELEASE
5311 if (
5312 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5314 )
5315 goto tolua_lerror;
5316 else
5317#endif
5318 {
5319 lua_State* L = tolua_S;
5321 {
5323 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5324 }
5325 }
5326 return 1;
5327#ifndef TOLUA_RELEASE
5329 tolua_error(tolua_S,"#ferror in function 'next_ccw'.",&tolua_err);
5330 return 0;
5331#endif
5332}
5333
5334/* function: api_utilities_dir_cw */
5336{
5337#ifndef TOLUA_RELEASE
5339 if (
5340 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5342 )
5343 goto tolua_lerror;
5344 else
5345#endif
5346 {
5347 lua_State* L = tolua_S;
5349 {
5351 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5352 }
5353 }
5354 return 1;
5355#ifndef TOLUA_RELEASE
5357 tolua_error(tolua_S,"#ferror in function 'next_cw'.",&tolua_err);
5358 return 0;
5359#endif
5360}
5361
5362/* function: api_utilities_opposite_dir */
5364{
5365#ifndef TOLUA_RELEASE
5367 if (
5368 !tolua_isusertype(tolua_S,1,"Direction",0,&tolua_err) ||
5370 )
5371 goto tolua_lerror;
5372 else
5373#endif
5374 {
5375 lua_State* L = tolua_S;
5377 {
5379 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Direction");
5380 }
5381 }
5382 return 1;
5383#ifndef TOLUA_RELEASE
5385 tolua_error(tolua_S,"#ferror in function 'opposite'.",&tolua_err);
5386 return 0;
5387#endif
5388}
5389
5390/* Open lib function */
5392{
5397 tolua_cclass(tolua_S,"Player","Player","",NULL);
5398 tolua_beginmodule(tolua_S,"Player");
5404 tolua_cclass(tolua_S,"City","City","",NULL);
5405 tolua_beginmodule(tolua_S,"City");
5411 tolua_cclass(tolua_S,"Counter","Counter","",NULL);
5412 tolua_beginmodule(tolua_S,"Counter");
5414 tolua_cclass(tolua_S,"Connection","Connection","",NULL);
5415 tolua_beginmodule(tolua_S,"Connection");
5418 tolua_cclass(tolua_S,"Unit","Unit","",NULL);
5419 tolua_beginmodule(tolua_S,"Unit");
5427 tolua_cclass(tolua_S,"Tile","Tile","",NULL);
5428 tolua_beginmodule(tolua_S,"Tile");
5433 tolua_cclass(tolua_S,"Government","Government","",NULL);
5434 tolua_beginmodule(tolua_S,"Government");
5437 tolua_cclass(tolua_S,"Nation_Type","Nation_Type","",NULL);
5438 tolua_beginmodule(tolua_S,"Nation_Type");
5441 tolua_cclass(tolua_S,"Building_Type","Building_Type","",NULL);
5442 tolua_beginmodule(tolua_S,"Building_Type");
5446 tolua_cclass(tolua_S,"Unit_Type","Unit_Type","",NULL);
5447 tolua_beginmodule(tolua_S,"Unit_Type");
5452 tolua_cclass(tolua_S,"Tech_Type","Tech_Type","",NULL);
5453 tolua_beginmodule(tolua_S,"Tech_Type");
5457 tolua_cclass(tolua_S,"Terrain","Terrain","",NULL);
5458 tolua_beginmodule(tolua_S,"Terrain");
5461 tolua_cclass(tolua_S,"Disaster","Disaster","",NULL);
5462 tolua_beginmodule(tolua_S,"Disaster");
5465 tolua_cclass(tolua_S,"Achievement","Achievement","",NULL);
5466 tolua_beginmodule(tolua_S,"Achievement");
5469 tolua_cclass(tolua_S,"Action","Action","",NULL);
5470 tolua_beginmodule(tolua_S,"Action");
5473 tolua_cclass(tolua_S,"Direction","Direction","",NULL);
5474 tolua_beginmodule(tolua_S,"Direction");
5476 tolua_cclass(tolua_S,"Unit_List_Link","Unit_List_Link","",NULL);
5477 tolua_beginmodule(tolua_S,"Unit_List_Link");
5479 tolua_cclass(tolua_S,"City_List_Link","City_List_Link","",NULL);
5480 tolua_beginmodule(tolua_S,"City_List_Link");
5482 tolua_cclass(tolua_S,"Game_Info","Game_Info","",NULL);
5483 tolua_beginmodule(tolua_S,"Game_Info");
5494 tolua_module(tolua_S,"game",1);
5495 tolua_beginmodule(tolua_S,"game");
5507 tolua_module(tolua_S,"Counter",0);
5508 tolua_beginmodule(tolua_S,"Counter");
5513 tolua_module(tolua_S,"Player",0);
5514 tolua_beginmodule(tolua_S,"Player");
5515 tolua_module(tolua_S,"properties",0);
5516 tolua_beginmodule(tolua_S,"properties");
5543 tolua_module(tolua_S,"methods_private",0);
5544 tolua_beginmodule(tolua_S,"methods_private");
5546 tolua_module(tolua_S,"Player",0);
5547 tolua_beginmodule(tolua_S,"Player");
5552
5553 { /* begin embedded lua code */
5554 static unsigned char B[] = {
5555 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,101,
5556 114, 58,105,115, 95,104,117,109, 97,110, 40, 41, 10,114,101,
5557 116,117,114,110, 32,110,111,116, 32,115,101,108,102, 46,104,
5558 97,115, 95,102,108, 97,103, 40,115,101,108,102, 44, 32, 34,
5559 65, 73, 34, 41, 59, 10,101,110,100, 10,102,117,110, 99,116,
5560 105,111,110, 32, 80,108, 97,121,101,114, 58,101,120,105,115,
5561 116,115, 40, 41, 10,114,101,116,117,114,110, 32,116,114,117,
5562 101, 10,101,110,100,32
5563 };
5564 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5566 } /* end of embedded lua code */
5567
5568 tolua_module(tolua_S,"City",0);
5569 tolua_beginmodule(tolua_S,"City");
5570 tolua_module(tolua_S,"properties",0);
5571 tolua_beginmodule(tolua_S,"properties");
5589
5590 { /* begin embedded lua code */
5591 static unsigned char B[] = {
5592 10,102,117,110, 99,116,105,111,110, 32, 67,105,116,121, 58,
5593 101,120,105,115,116,115, 40, 41, 10,114,101,116,117,114,110,
5594 32,116,114,117,101, 10,101,110,100,32
5595 };
5596 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5598 } /* end of embedded lua code */
5599
5600 tolua_module(tolua_S,"Unit",0);
5601 tolua_beginmodule(tolua_S,"Unit");
5602 tolua_module(tolua_S,"properties",0);
5603 tolua_beginmodule(tolua_S,"properties");
5615 tolua_module(tolua_S,"methods_private",0);
5616 tolua_beginmodule(tolua_S,"methods_private");
5617 tolua_module(tolua_S,"Unit",0);
5618 tolua_beginmodule(tolua_S,"Unit");
5622
5623 { /* begin embedded lua code */
5624 static unsigned char B[] = {
5625 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 58,
5626 101,120,105,115,116,115, 40, 41, 10,114,101,116,117,114,110,
5627 32,116,114,117,101, 10,101,110,100, 10,102,117,110, 99,116,
5628 105,111,110, 32, 85,110,105,116, 58,103,101,116, 95,104,111,
5629 109,101, 99,105,116,121, 40, 41, 10,114,101,116,117,114,110,
5630 32,102,105,110,100, 46, 99,105,116,121, 40,115,101,108,102,
5631 46,111,119,110,101,114, 44, 32,115,101,108,102, 46,104,111,
5632 109,101, 99,105,116,121, 41, 10,101,110,100,32
5633 };
5634 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5636 } /* end of embedded lua code */
5637
5638 tolua_module(tolua_S,"Tile",0);
5639 tolua_beginmodule(tolua_S,"Tile");
5640 tolua_module(tolua_S,"properties",0);
5641 tolua_beginmodule(tolua_S,"properties");
5660
5661 { /* begin embedded lua code */
5662 static unsigned char B[] = {
5663 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,101, 58,
5664 99,105,116,121, 95,101,120,105,115,116,115, 95,119,105,116,
5665 104,105,110, 95, 99,105,116,121, 95,114, 97,100,105,117,115,
5666 40, 99,101,110,116,101,114, 41, 10,108,111,103, 46,100,101,
5667 112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,
5668 110,103, 40, 34, 99,105,116,121, 95,101,120,105,115,116,115,
5669 95,119,105,116,104,105,110, 95, 99,105,116,121, 95,114, 97,
5670 100,105,117,115, 40, 41, 34, 44, 32, 34, 99,105,116,121, 95,
5671 101,120,105,115,116,115, 95,119,105,116,104,105,110, 95,109,
5672 97,120, 95, 99,105,116,121, 95,109, 97,112, 40, 41, 34, 44,
5673 10, 34, 50, 46, 51, 34, 41, 59, 10,114,101,116,117,114,110,
5674 32,115,101,108,102, 58, 99,105,116,121, 95,101,120,105,115,
5675 116,115, 95,119,105,116,104,105,110, 95,109, 97,120, 95, 99,
5676 105,116,121, 95,109, 97,112, 40, 99,101,110,116,101,114, 41,
5677 10,101,110,100,32
5678 };
5679 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5681 } /* end of embedded lua code */
5682
5683 tolua_module(tolua_S,"methods_private",0);
5684 tolua_beginmodule(tolua_S,"methods_private");
5685 tolua_module(tolua_S,"Tile",0);
5686 tolua_beginmodule(tolua_S,"Tile");
5692 tolua_module(tolua_S,"Government",0);
5693 tolua_beginmodule(tolua_S,"Government");
5697 tolua_module(tolua_S,"Nation_Type",0);
5698 tolua_beginmodule(tolua_S,"Nation_Type");
5703 tolua_module(tolua_S,"Building_Type",0);
5704 tolua_beginmodule(tolua_S,"Building_Type");
5712
5713 { /* begin embedded lua code */
5714 static unsigned char B[] = {
5715 10,102,117,110, 99,116,105,111,110, 32, 66,117,105,108,100,
5716 105,110,103, 95, 84,121,112,101, 58, 98,117,105,108,100, 95,
5717 115,104,105,101,108,100, 95, 99,111,115,116, 40, 41, 10,114,
5718 101,116,117,114,110, 32,115,101,108,102, 46, 98,117,105,108,
5719 100, 95, 99,111,115,116, 10,101,110,100,32
5720 };
5721 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5723 } /* end of embedded lua code */
5724
5725 tolua_module(tolua_S,"Unit_Type",0);
5726 tolua_beginmodule(tolua_S,"Unit_Type");
5733
5734 { /* begin embedded lua code */
5735 static unsigned char B[] = {
5736 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 95,
5737 84,121,112,101, 58, 98,117,105,108,100, 95,115,104,105,101,
5738 108,100, 95, 99,111,115,116, 40, 41, 10,114,101,116,117,114,
5739 110, 32,115,101,108,102, 46, 98,117,105,108,100, 95, 99,111,
5740 115,116, 10,101,110,100,32
5741 };
5742 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5744 } /* end of embedded lua code */
5745
5746 tolua_module(tolua_S,"Tech_Type",0);
5747 tolua_beginmodule(tolua_S,"Tech_Type");
5751
5752 { /* begin embedded lua code */
5753 static unsigned char B[] = {
5754 10,108,111, 99, 97,108, 32,112,116, 99,111,115,116, 32, 61,
5755 32, 80,108, 97,121,101,114, 46,116,101, 99,104, 95, 99,111,
5756 115,116, 10,102,117,110, 99,116,105,111,110, 32, 84,101, 99,
5757 104, 95, 84,121,112,101, 58, 99,111,115,116, 40, 41, 10,114,
5758 101,116,117,114,110, 32,112,116, 99,111,115,116, 40,110,105,
5759 108, 44, 32,115,101,108,102, 41, 10,101,110,100,32
5760 };
5761 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5763 } /* end of embedded lua code */
5764
5765 tolua_module(tolua_S,"Terrain",0);
5766 tolua_beginmodule(tolua_S,"Terrain");
5771 tolua_module(tolua_S,"Disaster",0);
5772 tolua_beginmodule(tolua_S,"Disaster");
5776 tolua_module(tolua_S,"Achievement",0);
5777 tolua_beginmodule(tolua_S,"Achievement");
5781 tolua_module(tolua_S,"Action",0);
5782 tolua_beginmodule(tolua_S,"Action");
5787 tolua_module(tolua_S,"Unit_List_Link",0);
5788 tolua_beginmodule(tolua_S,"Unit_List_Link");
5792 tolua_module(tolua_S,"City_List_Link",0);
5793 tolua_beginmodule(tolua_S,"City_List_Link");
5797 tolua_module(tolua_S,"find",0);
5798 tolua_beginmodule(tolua_S,"find");
5833
5834 { /* begin embedded lua code */
5835 static unsigned char B[] = {
5836 10,108,111, 99, 97,108, 32,103, 97,109,101, 95,105,110,102,
5837 111, 32, 61, 32,103, 97,109,101, 46,105,110,102,111, 10,102,
5838 117,110, 99,116,105,111,110, 32,102,105,110,100, 46,103, 97,
5839 109,101, 95,105,110,102,111, 40, 41, 10,114,101,116,117,114,
5840 110, 32,103, 97,109,101, 95,105,110,102,111, 10,101,110,100,
5841 32
5842 };
5843 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5845 } /* end of embedded lua code */
5846
5847 tolua_module(tolua_S,"E",0);
5850 tolua_module(tolua_S,"effects",0);
5851 tolua_beginmodule(tolua_S,"effects");
5859 tolua_module(tolua_S,"Direction",0);
5860 tolua_beginmodule(tolua_S,"Direction");
5861 tolua_module(tolua_S,"properties",0);
5862 tolua_beginmodule(tolua_S,"properties");
5868 tolua_module(tolua_S,"direction",0);
5869 tolua_beginmodule(tolua_S,"direction");
5875
5876 { /* begin embedded lua code */
5877 static unsigned char B[] = {
5878 10,102,117,110, 99,116,105,111,110, 32,115,116,114, 50,100,
5879 105,114,101, 99,116,105,111,110, 40,115,116,114, 41, 10,114,
5880 101,116,117,114,110, 32,100,105,114,101, 99,116,105,111,110,
5881 46,115,116,114, 50,100,105,114, 40,115,116,114, 41, 10,101,
5882 110,100, 10, 68,105,114,101, 99,116,105,111,110, 46,112,114,
5883 111,112,101,114,116,105,101,115, 46,110,101,120,116, 95, 99,
5884 99,119, 32, 61, 32,100,105,114,101, 99,116,105,111,110, 46,
5885 110,101,120,116, 95, 99, 99,119, 10, 68,105,114,101, 99,116,
5886 105,111,110, 46,112,114,111,112,101,114,116,105,101,115, 46,
5887 110,101,120,116, 95, 99,119, 32, 61, 32,100,105,114,101, 99,
5888 116,105,111,110, 46,110,101,120,116, 95, 99,119, 10, 68,105,
5889 114,101, 99,116,105,111,110, 46,112,114,111,112,101,114,116,
5890 105,101,115, 46,111,112,112,111,115,105,116,101, 32, 61, 32,
5891 100,105,114,101, 99,116,105,111,110, 46,111,112,112,111,115,
5892 105,116,101,32
5893 };
5894 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
5896 } /* end of embedded lua code */
5897
5898 tolua_module(tolua_S,"Game_Info",0);
5899 tolua_beginmodule(tolua_S,"Game_Info");
5901
5902 { /* begin embedded lua code */
5903 static unsigned char B[] = {
5904 10,100,111, 10,108,111, 99, 97,108, 32,112,114,105,118, 97,
5905 116,101, 32, 61, 32,109,101,116,104,111,100,115, 95,112,114,
5906 105,118, 97,116,101, 10,108,111, 99, 97,108, 32,102,117,110,
5907 99,116,105,111,110, 32,118, 97,108,117,101, 95,105,116,101,
5908 114, 97,116,111,114, 40, 97,114,114, 97,121, 41, 10,108,111,
5909 99, 97,108, 32,105, 32, 61, 32, 48, 10,108,111, 99, 97,108,
5910 32,102,117,110, 99,116,105,111,110, 32,105,116,101,114, 97,
5911 116,111,114, 40, 41, 10,105, 32, 61, 32,105, 32, 43, 32, 49,
5912 10,114,101,116,117,114,110, 32, 97,114,114, 97,121, 91,105,
5913 93, 10,101,110,100, 10,114,101,116,117,114,110, 32,105,116,
5914 101,114, 97,116,111,114, 10,101,110,100, 10,108,111, 99, 97,
5915 108, 32,102,117,110, 99,116,105,111,110, 32,115, 97,102,101,
5916 95,105,116,101,114, 97,116,101, 95,108,105,115,116, 40,108,
5917 105,110,107, 41, 10,108,111, 99, 97,108, 32,111, 98,106,115,
5918 32, 61, 32,123,125, 10,119,104,105,108,101, 32,108,105,110,
5919 107, 32,100,111, 10,111, 98,106,115, 91, 35,111, 98,106,115,
5920 32, 43, 32, 49, 93, 32, 61, 32,108,105,110,107, 58,100, 97,
5921 116, 97, 40, 41, 10,108,105,110,107, 32, 61, 32,108,105,110,
5922 107, 58,110,101,120,116, 40, 41, 10,101,110,100, 10,114,101,
5923 116,117,114,110, 32,118, 97,108,117,101, 95,105,116,101,114,
5924 97,116,111,114, 40,111, 98,106,115, 41, 10,101,110,100, 10,
5925 102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,101,114,
5926 58,117,110,105,116,115, 95,105,116,101,114, 97,116,101, 40,
5927 41, 10,114,101,116,117,114,110, 32,115, 97,102,101, 95,105,
5928 116,101,114, 97,116,101, 95,108,105,115,116, 40,112,114,105,
5929 118, 97,116,101, 46, 80,108, 97,121,101,114, 46,117,110,105,
5930 116, 95,108,105,115,116, 95,104,101, 97,100, 40,115,101,108,
5931 102, 41, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
5932 110, 32, 80,108, 97,121,101,114, 58, 99,105,116,105,101,115,
5933 95,105,116,101,114, 97,116,101, 40, 41, 10,114,101,116,117,
5934 114,110, 32,115, 97,102,101, 95,105,116,101,114, 97,116,101,
5935 95,108,105,115,116, 40,112,114,105,118, 97,116,101, 46, 80,
5936 108, 97,121,101,114, 46, 99,105,116,121, 95,108,105,115,116,
5937 95,104,101, 97,100, 40,115,101,108,102, 41, 41, 10,101,110,
5938 100, 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,101,
5939 58,117,110,105,116,115, 95,105,116,101,114, 97,116,101, 40,
5940 41, 10,114,101,116,117,114,110, 32,115, 97,102,101, 95,105,
5941 116,101,114, 97,116,101, 95,108,105,115,116, 40,112,114,105,
5942 118, 97,116,101, 46, 84,105,108,101, 46,117,110,105,116, 95,
5943 108,105,115,116, 95,104,101, 97,100, 40,115,101,108,102, 41,
5944 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
5945 85,110,105,116, 58, 99, 97,114,103,111, 95,105,116,101,114,
5946 97,116,101, 40, 41, 10,114,101,116,117,114,110, 32,115, 97,
5947 102,101, 95,105,116,101,114, 97,116,101, 95,108,105,115,116,
5948 40,112,114,105,118, 97,116,101, 46, 85,110,105,116, 46, 99,
5949 97,114,103,111, 95,108,105,115,116, 95,104,101, 97,100, 40,
5950 115,101,108,102, 41, 41, 10,101,110,100, 10,101,110,100, 10,
5951 100,111, 10,108,111, 99, 97,108, 32,110,101,120,116, 95,111,
5952 117,116,119, 97,114,100, 95,105,110,100,101,120, 32, 61, 32,
5953 109,101,116,104,111,100,115, 95,112,114,105,118, 97,116,101,
5954 46, 84,105,108,101, 46,110,101,120,116, 95,111,117,116,119,
5955 97,114,100, 95,105,110,100,101,120, 10,108,111, 99, 97,108,
5956 32,116,105,108,101, 95,102,111,114, 95,111,117,116,119, 97,
5957 114,100, 95,105,110,100,101,120, 32, 61, 32,109,101,116,104,
5958 111,100,115, 95,112,114,105,118, 97,116,101, 46, 84,105,108,
5959 101, 46,116,105,108,101, 95,102,111,114, 95,111,117,116,119,
5960 97,114,100, 95,105,110,100,101,120, 10,102,117,110, 99,116,
5961 105,111,110, 32, 84,105,108,101, 58,115,113,117, 97,114,101,
5962 95,105,116,101,114, 97,116,101, 40,114, 97,100,105,117,115,
5963 41, 10,108,111, 99, 97,108, 32,105,110,100,101,120, 32, 61,
5964 32, 45, 49, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,
5965 105,111,110, 32,105,116,101,114, 97,116,111,114, 40, 41, 10,
5966 105,110,100,101,120, 32, 61, 32,110,101,120,116, 95,111,117,
5967 116,119, 97,114,100, 95,105,110,100,101,120, 40,115,101,108,
5968 102, 44, 32,105,110,100,101,120, 44, 32,114, 97,100,105,117,
5969 115, 41, 10,105,102, 32,105,110,100,101,120, 32, 60, 32, 48,
5970 32,116,104,101,110, 10,114,101,116,117,114,110, 32,110,105,
5971 108, 10,101,108,115,101, 10,114,101,116,117,114,110, 32,116,
5972 105,108,101, 95,102,111,114, 95,111,117,116,119, 97,114,100,
5973 95,105,110,100,101,120, 40,115,101,108,102, 44, 32,105,110,
5974 100,101,120, 41, 10,101,110,100, 10,101,110,100, 10,114,101,
5975 116,117,114,110, 32,105,116,101,114, 97,116,111,114, 10,101,
5976 110,100, 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,
5977 101, 58, 99,105,114, 99,108,101, 95,105,116,101,114, 97,116,
5978 101, 40,115,113, 95,114, 97,100,105,117,115, 41, 10,108,111,
5979 99, 97,108, 32, 99,114, 95,114, 97,100,105,117,115, 32, 61,
5980 32,109, 97,116,104, 46,102,108,111,111,114, 40,109, 97,116,
5981 104, 46,115,113,114,116, 40,115,113, 95,114, 97,100,105,117,
5982 115, 41, 41, 10,108,111, 99, 97,108, 32,115,113, 95,105,116,
5983 101,114, 32, 61, 32,115,101,108,102, 58,115,113,117, 97,114,
5984 101, 95,105,116,101,114, 97,116,101, 40, 99,114, 95,114, 97,
5985 100,105,117,115, 41, 10,108,111, 99, 97,108, 32,102,117,110,
5986 99,116,105,111,110, 32,105,116,101,114, 97,116,111,114, 40,
5987 41, 10,108,111, 99, 97,108, 32,116,105,108,101, 32, 61, 32,
5988 110,105,108, 10,114,101,112,101, 97,116, 10,116,105,108,101,
5989 32, 61, 32,115,113, 95,105,116,101,114, 40, 41, 10,117,110,
5990 116,105,108, 32,110,111,116, 32,116,105,108,101, 32,111,114,
5991 32,115,101,108,102, 58,115,113, 95,100,105,115,116, 97,110,
5992 99,101, 40,116,105,108,101, 41, 32, 60, 61, 32,115,113, 95,
5993 114, 97,100,105,117,115, 10,114,101,116,117,114,110, 32,116,
5994 105,108,101, 10,101,110,100, 10,114,101,116,117,114,110, 32,
5995 105,116,101,114, 97,116,111,114, 10,101,110,100, 10,101,110,
5996 100,32
5997 };
5998 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
6000 } /* end of embedded lua code */
6001
6002
6003 { /* begin embedded lua code */
6004 static unsigned char B[] = {
6005 10,100,111, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,
6006 105,111,110, 32,105,110,100,101,120, 95,105,116,101,114, 97,
6007 116,101, 40,108,111,111,107,117,112, 41, 10,108,111, 99, 97,
6008 108, 32,105,110,100,101,120, 32, 61, 32, 45, 49, 10,108,111,
6009 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,105,116,
6010 101,114, 97,116,111,114, 40, 41, 10,105,110,100,101,120, 32,
6011 61, 32,105,110,100,101,120, 32, 43, 32, 49, 10,114,101,116,
6012 117,114,110, 32,108,111,111,107,117,112, 40,105,110,100,101,
6013 120, 41, 10,101,110,100, 10,114,101,116,117,114,110, 32,105,
6014 116,101,114, 97,116,111,114, 10,101,110,100, 10,108,111, 99,
6015 97,108, 32,108,105,115,116,112, 32, 61, 32,109,101,116,104,
6016 111,100,115, 95,112,114,105,118, 97,116,101, 46,108,105,115,
6017 116, 95,112,108, 97,121,101,114,115, 10,102,117,110, 99,116,
6018 105,111,110, 32,112,108, 97,121,101,114,115, 95,105,116,101,
6019 114, 97,116,101, 40, 41, 10,108,111, 99, 97,108, 32,112,108,
6020 105,115,116, 32, 61, 32,108,105,115,116,112, 40, 41, 10,108,
6021 111, 99, 97,108, 32,105,110,100,101,120, 32, 61, 32, 48, 10,
6022 114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110,
6023 40, 41, 10,105,110,100,101,120, 32, 61, 32,105,110,100,101,
6024 120, 32, 43, 32, 49, 10,114,101,116,117,114,110, 32,112,108,
6025 105,115,116, 91,105,110,100,101,120, 93, 10,101,110,100, 10,
6026 101,110,100, 10,102,117,110, 99,116,105,111,110, 32,119,104,
6027 111,108,101, 95,109, 97,112, 95,105,116,101,114, 97,116,101,
6028 40, 41, 10,114,101,116,117,114,110, 32,105,110,100,101,120,
6029 95,105,116,101,114, 97,116,101, 40,102,105,110,100, 46,116,
6030 105,108,101, 41, 10,101,110,100, 10,101,110,100,32
6031 };
6032 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
6034 } /* end of embedded lua code */
6035
6037 return 1;
6038}
6039/* Open tolua function */
6041{
6043 lua_pushstring(tolua_S, "game");
6044 lua_call(tolua_S, 1, 0);
6045 return 1;
6046}
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)
const char * api_methods_get_diplstate(lua_State *L, Player *pplayer1, Player *pplayer2)
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)
bool api_methods_unit_seen(lua_State *L, Unit *self, Player *watcher)
City * api_methods_city_list_link_data(lua_State *L, City_List_Link *cl_link)
const char * api_methods_unit_tile_link(lua_State *L, Unit *punit)
const char * api_methods_counter_rule_name(lua_State *L, Counter *c)
bool api_methods_player_can_build_impr_direct(lua_State *L, Player *pplayer, Building_Type *itype)
int api_methods_player_num_units(lua_State *L, Player *pplayer)
const char * api_methods_tech_type_rule_name(lua_State *L, Tech_Type *ptech)
int api_methods_tile_map_x(lua_State *L, Tile *ptile)
bool api_methods_is_city_happy(lua_State *L, City *pcity)
const char * api_methods_achievement_rule_name(lua_State *L, Achievement *pach)
Unit_Type * api_methods_player_can_upgrade(lua_State *L, Player *pplayer, Unit_Type *utype)
const char * api_methods_city_link(lua_State *L, City *pcity)
const char * api_methods_nation_type_name_translation(lua_State *L, Nation_Type *pnation)
const char * api_methods_government_rule_name(lua_State *L, Government *pgovernment)
const char * api_methods_terrain_rule_name(lua_State *L, Terrain *pterrain)
int api_methods_player_number(lua_State *L, Player *pplayer)
int api_methods_player_infrapoints(lua_State *L, Player *pplayer)
Unit_List_Link * api_methods_private_unit_cargo_list_head(lua_State *L, Unit *punit)
const char * api_methods_player_controlling_gui(lua_State *L, Player *pplayer)
const char * api_methods_action_name_translation(lua_State *L, Action *pact)
const char * api_methods_terrain_class_name(lua_State *L, Terrain *pterrain)
bool api_methods_player_shares_research(lua_State *L, Player *pplayer, Player *aplayer)
const char * api_methods_tech_type_name_translation(lua_State *L, Tech_Type *ptech)
Player * api_methods_tile_extra_owner(lua_State *L, Tile *ptile, const char *extra_name)
int api_methods_city_size_get(lua_State *L, City *pcity)
const char * api_methods_tech_cost_style(lua_State *L)
City * api_methods_tile_city(lua_State *L, Tile *ptile)
const char * api_methods_tech_leakage_style(lua_State *L)
const char * api_methods_government_name_translation(lua_State *L, Government *pgovernment)
bool api_method_player_can_research(lua_State *L, Player *pplayer, Tech_Type *ptech)
bool api_methods_tile_has_extra(lua_State *L, Tile *ptile, const char *name)
int api_methods_tile_sq_distance(lua_State *L, Tile *ptile1, Tile *ptile2)
bool api_methods_unit_type_has_role(lua_State *L, Unit_Type *punit_type, const char *role)
const char * api_methods_tile_link(lua_State *L, Tile *ptile)
int api_methods_player_culture_get(lua_State *L, Player *pplayer)
int api_methods_game_turn_deprecated(lua_State *L)
int api_methods_player_bulbs(lua_State *L, Player *pplayer)
const char * api_methods_achievement_name_translation(lua_State *L, Achievement *pach)
int api_methods_city_nationality_citizens(lua_State *L, City *pcity, Player *nationality)
bool api_methods_building_type_is_great_wonder(lua_State *L, Building_Type *pbuilding)
bool api_methods_tile_seen(lua_State *L, Tile *self, Player *watcher)
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)
bool api_methods_tile_known(lua_State *L, Tile *self, Player *watcher)
const char * api_methods_research_rule_name(lua_State *L, Player *pplayer)
bool api_methods_is_primary_capital(lua_State *L, City *pcity)
City * api_methods_player_primary_capital(lua_State *L, Player *pplayer)
int api_methods_player_research_cost(lua_State *L, Player *pplayer)
int api_methods_tile_map_y(lua_State *L, Tile *ptile)
Unit_List_Link * api_methods_private_player_unit_list_head(lua_State *L, Player *pplayer)
const char * api_methods_action_target_kind(lua_State *L, Action *pact)
City_List_Link * api_methods_private_player_city_list_head(lua_State *L, Player *pplayer)
const char * api_methods_terrain_name_translation(lua_State *L, Terrain *pterrain)
Tile * api_methods_city_tile_get(lua_State *L, City *pcity)
const char * api_methods_unit_link(lua_State *L, Unit *punit)
bool api_methods_is_city_celebrating(lua_State *L, City *pcity)
int api_methods_counter_city_get(lua_State *L, Counter *c, City *city)
bool api_methods_is_capital(lua_State *L, City *pcity)
bool api_methods_player_can_build_unit_direct(lua_State *L, Player *pplayer, Unit_Type *utype)
Unit * api_methods_unit_transporter(lua_State *L, Unit *punit)
#define str
Definition astring.c:76
static struct ai_type * self
Definition classicai.c:46
char * incite_cost
Definition comments.c:76
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
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 int const struct action *paction struct unit struct city * pcity
Definition dialogs_g.h:78
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:317
Definition tile.h:50
Definition unit.h:140
#define TRUE
Definition support.h:46
#define bool
Definition support.h:71
static int tolua_set_Unit_Unit_owner_ptr(lua_State *tolua_S)
static int tolua_get_Connection_Connection_id(lua_State *tolua_S)
static int tolua_game_Player_gold00(lua_State *tolua_S)
static int tolua_game_Player_researching00(lua_State *tolua_S)
static int tolua_game_find_tile00(lua_State *tolua_S)
static int tolua_game_direction_next_ccw00(lua_State *tolua_S)
static int tolua_game_game_current_year00(lua_State *tolua_S)
static int tolua_game_Terrain_name_translation00(lua_State *tolua_S)
static int tolua_game_Building_Type_is_wonder00(lua_State *tolua_S)
static int tolua_game_find_unit_type01(lua_State *tolua_S)
static int tolua_get_Tile_Tile_terrain_ptr(lua_State *tolua_S)
static int tolua_game_Unit_properties_tile00(lua_State *tolua_S)
static int tolua_game_Tile_is_enemy00(lua_State *tolua_S)
static int tolua_game_find_action01(lua_State *tolua_S)
static int tolua_get_Unit_Unit_nationality_ptr(lua_State *tolua_S)
static int tolua_game_game_current_fragment00(lua_State *tolua_S)
static int tolua_set_Unit_Type_Unit_Type_obsoleted_by_ptr(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_sciencebox(lua_State *tolua_S)
static int tolua_game_find_player01(lua_State *tolua_S)
static int tolua_game_City_is_primary_capital00(lua_State *tolua_S)
static int tolua_get_Terrain_Terrain_item_number(lua_State *tolua_S)
static int tolua_game_Tile_link_text00(lua_State *tolua_S)
static int tolua_game_find_nation_type00(lua_State *tolua_S)
static int tolua_game_City_culture00(lua_State *tolua_S)
static int tolua_game_Direction_properties_cardinal00(lua_State *tolua_S)
static int tolua_game_Unit_tile_link_text00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_tech_steal_allow_holes(lua_State *tolua_S)
static int tolua_game_find_building_type01(lua_State *tolua_S)
static int tolua_game_Achievement_rule_name00(lua_State *tolua_S)
static int tolua_game_find_disaster00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_tech_leak_pct(lua_State *tolua_S)
static int tolua_game_Unit_Type_has_role00(lua_State *tolua_S)
static int tolua_game_effects_unit_vs_tile_bonus00(lua_State *tolua_S)
static int tolua_game_Unit_List_Link_data00(lua_State *tolua_S)
static int tolua_game_City_nationality_citizens00(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_game_Tile_known00(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_Unit_seen00(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_set_Unit_Unit_nationality_ptr(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_Player_diplstate00(lua_State *tolua_S)
static int tolua_game_Unit_transform_problem00(lua_State *tolua_S)
static int tolua_game_find_government00(lua_State *tolua_S)
static int tolua_set_Unit_Unit_veteran(lua_State *tolua_S)
static void tolua_reg_types(lua_State *tolua_S)
static int tolua_game_methods_private_Unit_cargo_list_head00(lua_State *tolua_S)
static int tolua_game_Tile_has_extra00(lua_State *tolua_S)
static int tolua_game_City_properties_tile00(lua_State *tolua_S)
static int tolua_game_Unit_Type_name_translation00(lua_State *tolua_S)
static int tolua_game_game_tech_cost_style00(lua_State *tolua_S)
static int tolua_game_Player_num_future_techs00(lua_State *tolua_S)
static int tolua_get_Tech_Type_Tech_Type_item_number(lua_State *tolua_S)
static int tolua_get_Tech_Type_Tech_Type_cost(lua_State *tolua_S)
static int tolua_get_Government_Government_item_number(lua_State *tolua_S)
static int tolua_game_Direction_properties_name00(lua_State *tolua_S)
static int tolua_game_Tile_city_exists_within_max_city_map00(lua_State *tolua_S)
TOLUA_API int tolua_game_open(lua_State *tolua_S)
static int tolua_game_Player_research_name_translation00(lua_State *tolua_S)
static int tolua_get_Disaster_Disaster_id(lua_State *tolua_S)
static int tolua_game_find_unit00(lua_State *tolua_S)
static int tolua_game_Action_rule_name00(lua_State *tolua_S)
static int tolua_game_find_achievement02(lua_State *tolua_S)
static int tolua_game_find_achievement00(lua_State *tolua_S)
static int tolua_get_Unit_Unit_id(lua_State *tolua_S)
static int tolua_game_effects_city_bonus00(lua_State *tolua_S)
int tolua_bnd_takeownership(lua_State *L)
static int tolua_game_Disaster_name_translation00(lua_State *tolua_S)
static int tolua_game_Building_Type_name_translation00(lua_State *tolua_S)
static int tolua_get_Unit_Unit_utype_ptr(lua_State *tolua_S)
static int tolua_game_City_map_sq_radius00(lua_State *tolua_S)
static int tolua_set_Tile_Tile_terrain_ptr(lua_State *tolua_S)
static int tolua_game_Tile_num_units00(lua_State *tolua_S)
static int tolua_game_Direction_properties_id00(lua_State *tolua_S)
static int tolua_game_Unit_Type_has_flag00(lua_State *tolua_S)
static int tolua_game_Achievement_name_translation00(lua_State *tolua_S)
static int tolua_get_Player_Player_government_ptr(lua_State *tolua_S)
static int tolua_game_Tile_sq_distance00(lua_State *tolua_S)
static int tolua_game_City_tile_link_text00(lua_State *tolua_S)
static int tolua_game_Player_infrapoints00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_tech_parasite_allow_holes(lua_State *tolua_S)
static int tolua_game_find_unit_type00(lua_State *tolua_S)
static int tolua_game_game_ruleset_name00(lua_State *tolua_S)
static int tolua_game_find_building_type00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_tech_trade_loss_allow_holes(lua_State *tolua_S)
static int tolua_get_Unit_Unit_homecity(lua_State *tolua_S)
static int tolua_game_Unit_is_on_possible_city_tile00(lua_State *tolua_S)
static int tolua_game_direction_opposite00(lua_State *tolua_S)
static int tolua_get_City_City_name(lua_State *tolua_S)
static int tolua_game_Unit_List_Link_next00(lua_State *tolua_S)
static int tolua_set_Tile_Tile_owner_ptr(lua_State *tolua_S)
static int tolua_game_Player_can_build_direct00(lua_State *tolua_S)
static int tolua_set_City_City_owner_ptr(lua_State *tolua_S)
static int tolua_game_Player_properties_id00(lua_State *tolua_S)
static int tolua_game_Player_culture00(lua_State *tolua_S)
static int tolua_game_City_inspire_partisans00(lua_State *tolua_S)
static int tolua_game_methods_private_Player_city_list_head00(lua_State *tolua_S)
static int tolua_set_Player_Player_nation_ptr(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_tech_loss_allow_holes(lua_State *tolua_S)
static int tolua_game_Terrain_rule_name00(lua_State *tolua_S)
static int tolua_set_Unit_Type_Unit_Type_build_cost(lua_State *tolua_S)
static int tolua_get_City_City_owner_ptr(lua_State *tolua_S)
static int tolua_game_find_nation_type01(lua_State *tolua_S)
static int tolua_game_Tile_has_road00(lua_State *tolua_S)
static int tolua_game_Player_num_cities00(lua_State *tolua_S)
static int tolua_set_City_City_original_ptr(lua_State *tolua_S)
static int tolua_get_Unit_Unit_veteran(lua_State *tolua_S)
static int tolua_game_Player_controlling_gui00(lua_State *tolua_S)
static int tolua_game_methods_private_Tile_tile_for_outward_index00(lua_State *tolua_S)
static int tolua_get_Unit_Type_Unit_Type_obsoleted_by_ptr(lua_State *tolua_S)
static int tolua_game_find_tech_type00(lua_State *tolua_S)
static int tolua_game_Player_has_flag00(lua_State *tolua_S)
static int tolua_get_Player_Player_nation_ptr(lua_State *tolua_S)
static int tolua_game_game_current_turn00(lua_State *tolua_S)
static int tolua_game_find_role_unit_type00(lua_State *tolua_S)
static int tolua_game_Tile_properties_x00(lua_State *tolua_S)
static int tolua_game_Player_primary_capital00(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_Tile_seen00(lua_State *tolua_S)
static int tolua_game_Player_can_research00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_tech_trade_allow_holes(lua_State *tolua_S)
static int tolua_get_Achievement_Achievement_id(lua_State *tolua_S)
static int tolua_game_City_is_happy00(lua_State *tolua_S)
static int tolua_game_direction_next_cw00(lua_State *tolua_S)
static int tolua_get_Tile_Tile_owner_ptr(lua_State *tolua_S)
static int tolua_get_Unit_Unit_owner_ptr(lua_State *tolua_S)
static int tolua_game_find_tile01(lua_State *tolua_S)
static int tolua_game_Player_can_upgrade00(lua_State *tolua_S)
static int tolua_game_game_turn00(lua_State *tolua_S)
static int tolua_game_game_tech_leakage_style00(lua_State *tolua_S)
static int tolua_get_Unit_Type_Unit_Type_build_cost(lua_State *tolua_S)
static int tolua_game_Player_knows_tech00(lua_State *tolua_S)
static int tolua_game_City_is_unhappy00(lua_State *tolua_S)
static int tolua_game_City_is_celebrating00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_min_tech_cost(lua_State *tolua_S)
static int tolua_game_Player_researching_cost00(lua_State *tolua_S)
static int tolua_game_Tile_has_base00(lua_State *tolua_S)
static int tolua_game_Nation_Type_plural_translation00(lua_State *tolua_S)
static int tolua_get_Game_Info_Game_Info_base_tech_cost(lua_State *tolua_S)
static int tolua_game_methods_private_Tile_next_outward_index00(lua_State *tolua_S)
static int tolua_game_Player_properties_bulbs00(lua_State *tolua_S)
static int tolua_game_effects_unit_bonus00(lua_State *tolua_S)
static int tolua_game_Nation_Type_rule_name00(lua_State *tolua_S)
static int tolua_game_game_current_year_text00(lua_State *tolua_S)
static int tolua_get_Unit_Type_Unit_Type_item_number(lua_State *tolua_S)
static int tolua_game_find_tech_type01(lua_State *tolua_S)
static int tolua_game_Player_research_rule_name00(lua_State *tolua_S)
static int tolua_get_Building_Type_Building_Type_build_cost(lua_State *tolua_S)
static int tolua_game_City_List_Link_data00(lua_State *tolua_S)
static int tolua_game_Unit_can_upgrade00(lua_State *tolua_S)
static int tolua_game_direction_str2dir00(lua_State *tolua_S)
static int tolua_game_find_direction01(lua_State *tolua_S)
static int tolua_game_Action_target_kind00(lua_State *tolua_S)
#define game_info_substructure
static int tolua_game_City_is_capital00(lua_State *tolua_S)
static int tolua_get_City_City_id(lua_State *tolua_S)
static int tolua_game_find_counter01(lua_State *tolua_S)
static int tolua_game_find_counter00(lua_State *tolua_S)
static int tolua_game_find_terrain01(lua_State *tolua_S)
static int tolua_game_find_transport_unit00(lua_State *tolua_S)
static int tolua_game_Counter_name_translation00(lua_State *tolua_S)
static int tolua_get_Player_Player_is_alive(lua_State *tolua_S)
static int tolua_game_game_rulesetdir00(lua_State *tolua_S)
static int tolua_set_Player_Player_government_ptr(lua_State *tolua_S)
static int tolua_game_find_action00(lua_State *tolua_S)
static int tolua_game_effects_player_bonus00(lua_State *tolua_S)
static int tolua_game_Tech_Type_name_translation00(lua_State *tolua_S)
static int tolua_game_Unit_facing00(lua_State *tolua_S)
static int tolua_game_Player_can_build_direct01(lua_State *tolua_S)
static int tolua_game_Nation_Type_name_translation00(lua_State *tolua_S)