Freeciv-3.3
Loading...
Searching...
No Matches
tolua_server_gen.c
Go to the documentation of this file.
1/*
2** Lua binding: server
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
24#include "luascript_types.h"
25#include "commands.h"
26#include "console.h"
27#include "api_server_edit.h"
28#include "api_server_base.h"
29#include "api_server_counters.h"
30#include "api_server_luadata.h"
31#include "api_server_notify.h"
33#include "script_server.h"
34#define game_server_autoupgrade_veteran_loss (game.server.autoupgrade_veteran_loss)
35#define game_server_upgrade_veteran_loss (game.server.upgrade_veteran_loss)
36#define game_server_multiresearch (game.server.multiresearch)
37
38/* function to register type */
40{
41 tolua_usertype(tolua_S,"Nation_Type");
42 tolua_usertype(tolua_S,"Player");
43 tolua_usertype(tolua_S,"Action");
44 tolua_usertype(tolua_S,"Unit_Type");
45 tolua_usertype(tolua_S,"Terrain");
46 tolua_usertype(tolua_S,"Tile");
47 tolua_usertype(tolua_S,"Tech_Type");
48 tolua_usertype(tolua_S,"Counter");
49 tolua_usertype(tolua_S,"City");
50 tolua_usertype(tolua_S,"Direction");
51 tolua_usertype(tolua_S,"Unit");
52 tolua_usertype(tolua_S,"Building_Type");
53}
54
55/* function: api_server_save */
57{
58#ifndef TOLUA_RELEASE
60 if (
63 )
64 goto tolua_lerror;
65 else
66#endif
67 {
69 const char* filename = ((const char*) tolua_tostring(tolua_S,1,0));
70 {
71 bool tolua_ret = (bool) api_server_save(L,filename);
73 }
74 }
75 return 1;
76#ifndef TOLUA_RELEASE
78 tolua_error(tolua_S,"#ferror in function 'save'.",&tolua_err);
79 return 0;
80#endif
81}
82
83/* function: api_server_was_started */
85{
86#ifndef TOLUA_RELEASE
88 if (
90 )
91 goto tolua_lerror;
92 else
93#endif
94 {
96 {
99 }
100 }
101 return 1;
102#ifndef TOLUA_RELEASE
104 tolua_error(tolua_S,"#ferror in function 'started'.",&tolua_err);
105 return 0;
106#endif
107}
108
109/* function: api_server_player_civilization_score */
111{
112#ifndef TOLUA_RELEASE
114 if (
115 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
117 )
118 goto tolua_lerror;
119 else
120#endif
121 {
123 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
124 {
127 }
128 }
129 return 1;
130#ifndef TOLUA_RELEASE
132 tolua_error(tolua_S,"#ferror in function 'civilization_score'.",&tolua_err);
133 return 0;
134#endif
135}
136
137/* function: api_play_music */
139{
140#ifndef TOLUA_RELEASE
142 if (
143 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
146 )
147 goto tolua_lerror;
148 else
149#endif
150 {
152 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
153 const char* tag = ((const char*) tolua_tostring(tolua_S,2,0));
154 {
155 bool tolua_ret = (bool) api_play_music(L,pplayer,tag);
157 }
158 }
159 return 1;
160#ifndef TOLUA_RELEASE
162 tolua_error(tolua_S,"#ferror in function 'play_music'.",&tolua_err);
163 return 0;
164#endif
165}
166
167/* function: api_popup_image */
169{
170#ifndef TOLUA_RELEASE
172 if (
173 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
176 )
177 goto tolua_lerror;
178 else
179#endif
180 {
182 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
183 const char* tag = ((const char*) tolua_tostring(tolua_S,2,0));
184 {
185 bool tolua_ret = (bool) api_popup_image(L,pplayer,tag);
187 }
188 }
189 return 1;
190#ifndef TOLUA_RELEASE
192 tolua_error(tolua_S,"#ferror in function 'popup_image'.",&tolua_err);
193 return 0;
194#endif
195}
196
197/* function: api_server_setting_get */
199{
200#ifndef TOLUA_RELEASE
202 if (
205 )
206 goto tolua_lerror;
207 else
208#endif
209 {
211 const char* setting_name = ((const char*) tolua_tostring(tolua_S,1,0));
212 {
213 const char* tolua_ret = (const char*) api_server_setting_get(L,setting_name);
214 tolua_pushstring(tolua_S,(const char*)tolua_ret);
215 }
216 }
217 return 1;
218#ifndef TOLUA_RELEASE
220 tolua_error(tolua_S,"#ferror in function 'get'.",&tolua_err);
221 return 0;
222#endif
223}
224
225/* function: api_counter_increase */
227{
228#ifndef TOLUA_RELEASE
230 if (
231 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
232 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
234 )
235 goto tolua_lerror;
236 else
237#endif
238 {
242 {
244 }
245 }
246 return 0;
247#ifndef TOLUA_RELEASE
249 tolua_error(tolua_S,"#ferror in function 'increase'.",&tolua_err);
250 return 0;
251#endif
252}
253
254/* function: api_counter_zero */
256{
257#ifndef TOLUA_RELEASE
259 if (
260 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
261 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
263 )
264 goto tolua_lerror;
265 else
266#endif
267 {
271 {
273 }
274 }
275 return 0;
276#ifndef TOLUA_RELEASE
278 tolua_error(tolua_S,"#ferror in function 'zero'.",&tolua_err);
279 return 0;
280#endif
281}
282
283/* function: api_notify_embassies_msg */
285{
286#ifndef TOLUA_RELEASE
288 if (
289 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
290 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
294 )
295 goto tolua_lerror;
296 else
297#endif
298 {
300 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
301 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
302 int event = ((int) tolua_tonumber(tolua_S,3,0));
303 const char* message = ((const char*) tolua_tostring(tolua_S,4,0));
304 {
306 }
307 }
308 return 0;
309#ifndef TOLUA_RELEASE
311 tolua_error(tolua_S,"#ferror in function 'embassies_msg'.",&tolua_err);
312 return 0;
313#endif
314}
315
316/* function: api_notify_research_msg */
318{
319#ifndef TOLUA_RELEASE
321 if (
322 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
327 )
328 goto tolua_lerror;
329 else
330#endif
331 {
333 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
334 bool include_plr = ((bool) tolua_toboolean(tolua_S,2,0));
335 int event = ((int) tolua_tonumber(tolua_S,3,0));
336 const char* message = ((const char*) tolua_tostring(tolua_S,4,0));
337 {
339 }
340 }
341 return 0;
342#ifndef TOLUA_RELEASE
344 tolua_error(tolua_S,"#ferror in function 'research_msg'.",&tolua_err);
345 return 0;
346#endif
347}
348
349/* function: api_notify_research_embassies_msg */
351{
352#ifndef TOLUA_RELEASE
354 if (
355 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
359 )
360 goto tolua_lerror;
361 else
362#endif
363 {
365 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
366 int event = ((int) tolua_tonumber(tolua_S,2,0));
367 const char* message = ((const char*) tolua_tostring(tolua_S,3,0));
368 {
370 }
371 }
372 return 0;
373#ifndef TOLUA_RELEASE
375 tolua_error(tolua_S,"#ferror in function 'research_embassies_msg'.",&tolua_err);
376 return 0;
377#endif
378}
379
380/* function: api_notify_event_msg */
382{
383#ifndef TOLUA_RELEASE
385 if (
386 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
387 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
391 )
392 goto tolua_lerror;
393 else
394#endif
395 {
397 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
398 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
399 int event = ((int) tolua_tonumber(tolua_S,3,0));
400 const char* message = ((const char*) tolua_tostring(tolua_S,4,0));
401 {
402 api_notify_event_msg(L,pplayer,ptile,event,message);
403 }
404 }
405 return 0;
406#ifndef TOLUA_RELEASE
408 tolua_error(tolua_S,"#ferror in function 'event_msg'.",&tolua_err);
409 return 0;
410#endif
411}
412
413/* function: api_edit_create_unit */
415{
416#ifndef TOLUA_RELEASE
418 if (
419 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
420 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
421 !tolua_isusertype(tolua_S,3,"Unit_Type",0,&tolua_err) ||
423 !tolua_isusertype(tolua_S,5,"City",0,&tolua_err) ||
426 )
427 goto tolua_lerror;
428 else
429#endif
430 {
432 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
433 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
436 City* homecity = ((City*) tolua_tousertype(tolua_S,5,0));
437 int moves_left = ((int) tolua_tonumber(tolua_S,6,0));
438 {
439 Unit* tolua_ret = (Unit*) api_edit_create_unit(L,pplayer,ptile,ptype,veteran_level,homecity,moves_left);
440 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
441 }
442 }
443 return 1;
444#ifndef TOLUA_RELEASE
446 tolua_error(tolua_S,"#ferror in function 'create_unit'.",&tolua_err);
447 return 0;
448#endif
449}
450
451/* function: api_edit_create_unit_full */
453{
454#ifndef TOLUA_RELEASE
456 if (
457 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
458 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
459 !tolua_isusertype(tolua_S,3,"Unit_Type",0,&tolua_err) ||
461 !tolua_isusertype(tolua_S,5,"City",0,&tolua_err) ||
464 !tolua_isusertype(tolua_S,8,"Unit",0,&tolua_err) ||
466 )
467 goto tolua_lerror;
468 else
469#endif
470 {
472 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
473 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
476 City* homecity = ((City*) tolua_tousertype(tolua_S,5,0));
477 int moves_left = ((int) tolua_tonumber(tolua_S,6,0));
478 int hp_left = ((int) tolua_tonumber(tolua_S,7,0));
480 {
481 Unit* tolua_ret = (Unit*) api_edit_create_unit_full(L,pplayer,ptile,ptype,veteran_level,homecity,moves_left,hp_left,ptransport);
482 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
483 }
484 }
485 return 1;
486#ifndef TOLUA_RELEASE
488 tolua_error(tolua_S,"#ferror in function 'create_unit_full'.",&tolua_err);
489 return 0;
490#endif
491}
492
493/* function: api_edit_unit_teleport */
495{
496#ifndef TOLUA_RELEASE
498 if (
499 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
500 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
501 !tolua_isusertype(tolua_S,3,"Unit",0,&tolua_err) ||
508 )
509 goto tolua_lerror;
510 else
511#endif
512 {
515 Tile* dest = ((Tile*) tolua_tousertype(tolua_S,2,0));
520 bool enter_hut = ((bool) tolua_toboolean(tolua_S,7,0));
522 {
525 }
526 }
527 return 1;
528#ifndef TOLUA_RELEASE
530 tolua_error(tolua_S,"#ferror in function 'unit_teleport'.",&tolua_err);
531 return 0;
532#endif
533}
534
535/* function: api_edit_unit_kill */
537{
538#ifndef TOLUA_RELEASE
540 if (
541 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
543 !tolua_isusertype(tolua_S,3,"Player",0,&tolua_err) ||
545 )
546 goto tolua_lerror;
547 else
548#endif
549 {
552 const char* reason = ((const char*) tolua_tostring(tolua_S,2,0));
554 {
556 }
557 }
558 return 0;
559#ifndef TOLUA_RELEASE
561 tolua_error(tolua_S,"#ferror in function 'unit_kill'.",&tolua_err);
562 return 0;
563#endif
564}
565
566/* function: api_edit_change_terrain */
568{
569#ifndef TOLUA_RELEASE
571 if (
572 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
573 !tolua_isusertype(tolua_S,2,"Terrain",0,&tolua_err) ||
575 )
576 goto tolua_lerror;
577 else
578#endif
579 {
581 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
583 {
586 }
587 }
588 return 1;
589#ifndef TOLUA_RELEASE
591 tolua_error(tolua_S,"#ferror in function 'change_terrain'.",&tolua_err);
592 return 0;
593#endif
594}
595
596/* function: api_edit_create_city */
598{
599#ifndef TOLUA_RELEASE
601 if (
602 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
603 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
606 )
607 goto tolua_lerror;
608 else
609#endif
610 {
612 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
613 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
614 const char* name = ((const char*) tolua_tostring(tolua_S,3,0));
615 {
616 bool tolua_ret = (bool) api_edit_create_city(L,pplayer,ptile,name);
618 }
619 }
620 return 1;
621#ifndef TOLUA_RELEASE
623 tolua_error(tolua_S,"#ferror in function 'create_city'.",&tolua_err);
624 return 0;
625#endif
626}
627
628/* function: api_edit_transfer_city */
630{
631#ifndef TOLUA_RELEASE
633 if (
634 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
635 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
637 )
638 goto tolua_lerror;
639 else
640#endif
641 {
643 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
645 {
648 }
649 }
650 return 1;
651#ifndef TOLUA_RELEASE
653 tolua_error(tolua_S,"#ferror in function 'transfer_city'.",&tolua_err);
654 return 0;
655#endif
656}
657
658/* function: api_edit_remove_city */
660{
661#ifndef TOLUA_RELEASE
663 if (
664 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
666 )
667 goto tolua_lerror;
668 else
669#endif
670 {
672 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
673 {
674 api_edit_remove_city(L,pcity);
675 }
676 }
677 return 0;
678#ifndef TOLUA_RELEASE
680 tolua_error(tolua_S,"#ferror in function 'remove_city'.",&tolua_err);
681 return 0;
682#endif
683}
684
685/* function: api_edit_create_building */
687{
688#ifndef TOLUA_RELEASE
690 if (
691 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
692 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
694 )
695 goto tolua_lerror;
696 else
697#endif
698 {
700 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
702 {
703 api_edit_create_building(L,pcity,impr);
704 }
705 }
706 return 0;
707#ifndef TOLUA_RELEASE
709 tolua_error(tolua_S,"#ferror in function 'create_building'.",&tolua_err);
710 return 0;
711#endif
712}
713
714/* function: api_edit_remove_building */
716{
717#ifndef TOLUA_RELEASE
719 if (
720 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
721 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
723 )
724 goto tolua_lerror;
725 else
726#endif
727 {
729 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
731 {
732 api_edit_remove_building(L,pcity,impr);
733 }
734 }
735 return 0;
736#ifndef TOLUA_RELEASE
738 tolua_error(tolua_S,"#ferror in function 'remove_building'.",&tolua_err);
739 return 0;
740#endif
741}
742
743/* function: api_edit_create_owned_extra */
745{
746#ifndef TOLUA_RELEASE
748 if (
749 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
751 !tolua_isusertype(tolua_S,3,"Player",0,&tolua_err) ||
753 )
754 goto tolua_lerror;
755 else
756#endif
757 {
759 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
760 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
761 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,3,0));
762 {
763 api_edit_create_owned_extra(L,ptile,name,pplayer);
764 }
765 }
766 return 0;
767#ifndef TOLUA_RELEASE
769 tolua_error(tolua_S,"#ferror in function 'create_owned_extra'.",&tolua_err);
770 return 0;
771#endif
772}
773
774/* function: api_edit_create_extra */
776{
777#ifndef TOLUA_RELEASE
779 if (
780 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
783 )
784 goto tolua_lerror;
785 else
786#endif
787 {
789 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
790 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
791 {
793 }
794 }
795 return 0;
796#ifndef TOLUA_RELEASE
798 tolua_error(tolua_S,"#ferror in function 'create_extra'.",&tolua_err);
799 return 0;
800#endif
801}
802
803/* function: api_edit_create_base */
805{
806#ifndef TOLUA_RELEASE
808 if (
809 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
811 !tolua_isusertype(tolua_S,3,"Player",0,&tolua_err) ||
813 )
814 goto tolua_lerror;
815 else
816#endif
817 {
819 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
820 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
821 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,3,0));
822 {
823 api_edit_create_base(L,ptile,name,pplayer);
824 }
825 }
826 return 0;
827#ifndef TOLUA_RELEASE
829 tolua_error(tolua_S,"#ferror in function 'create_base'.",&tolua_err);
830 return 0;
831#endif
832}
833
834/* function: api_edit_create_road */
836{
837#ifndef TOLUA_RELEASE
839 if (
840 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
843 )
844 goto tolua_lerror;
845 else
846#endif
847 {
849 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
850 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
851 {
853 }
854 }
855 return 0;
856#ifndef TOLUA_RELEASE
858 tolua_error(tolua_S,"#ferror in function 'create_road'.",&tolua_err);
859 return 0;
860#endif
861}
862
863/* function: api_edit_remove_extra */
865{
866#ifndef TOLUA_RELEASE
868 if (
869 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
872 )
873 goto tolua_lerror;
874 else
875#endif
876 {
878 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
879 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
880 {
882 }
883 }
884 return 0;
885#ifndef TOLUA_RELEASE
887 tolua_error(tolua_S,"#ferror in function 'remove_extra'.",&tolua_err);
888 return 0;
889#endif
890}
891
892/* function: api_edit_tile_set_label */
894{
895#ifndef TOLUA_RELEASE
897 if (
898 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
901 )
902 goto tolua_lerror;
903 else
904#endif
905 {
907 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
908 const char* label = ((const char*) tolua_tostring(tolua_S,2,0));
909 {
910 api_edit_tile_set_label(L,ptile,label);
911 }
912 }
913 return 0;
914#ifndef TOLUA_RELEASE
916 tolua_error(tolua_S,"#ferror in function 'tile_set_label'.",&tolua_err);
917 return 0;
918#endif
919}
920
921/* function: api_edit_tile_show */
923{
924#ifndef TOLUA_RELEASE
926 if (
927 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
928 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
930 )
931 goto tolua_lerror;
932 else
933#endif
934 {
936 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
937 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
938 {
939 api_edit_tile_show(L,ptile,pplayer);
940 }
941 }
942 return 0;
943#ifndef TOLUA_RELEASE
945 tolua_error(tolua_S,"#ferror in function 'tile_show'.",&tolua_err);
946 return 0;
947#endif
948}
949
950/* function: api_edit_tile_hide */
952{
953#ifndef TOLUA_RELEASE
955 if (
956 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
957 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
959 )
960 goto tolua_lerror;
961 else
962#endif
963 {
965 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
966 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
967 {
968 bool tolua_ret = (bool) api_edit_tile_hide(L,ptile,pplayer);
970 }
971 }
972 return 1;
973#ifndef TOLUA_RELEASE
975 tolua_error(tolua_S,"#ferror in function 'tile_hide'.",&tolua_err);
976 return 0;
977#endif
978}
979
980/* function: api_edit_create_player */
982{
983#ifndef TOLUA_RELEASE
985 if (
987 !tolua_isusertype(tolua_S,2,"Nation_Type",0,&tolua_err) ||
990 )
991 goto tolua_lerror;
992 else
993#endif
994 {
996 const char* username = ((const char*) tolua_tostring(tolua_S,1,0));
998 const char* ai = ((const char*) tolua_tostring(tolua_S,3,0));
999 {
1000 Player* tolua_ret = (Player*) api_edit_create_player(L,username,nation,ai);
1001 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
1002 }
1003 }
1004 return 1;
1005#ifndef TOLUA_RELEASE
1007 tolua_error(tolua_S,"#ferror in function 'create_player'.",&tolua_err);
1008 return 0;
1009#endif
1010}
1011
1012/* function: api_edit_change_gold */
1014{
1015#ifndef TOLUA_RELEASE
1017 if (
1018 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1021 )
1022 goto tolua_lerror;
1023 else
1024#endif
1025 {
1026 lua_State* L = tolua_S;
1027 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1028 int amount = ((int) tolua_tonumber(tolua_S,2,0));
1029 {
1030 api_edit_change_gold(L,pplayer,amount);
1031 }
1032 }
1033 return 0;
1034#ifndef TOLUA_RELEASE
1036 tolua_error(tolua_S,"#ferror in function 'change_gold'.",&tolua_err);
1037 return 0;
1038#endif
1039}
1040
1041/* function: api_edit_change_infrapoints */
1043{
1044#ifndef TOLUA_RELEASE
1046 if (
1047 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1050 )
1051 goto tolua_lerror;
1052 else
1053#endif
1054 {
1055 lua_State* L = tolua_S;
1056 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1057 int amount = ((int) tolua_tonumber(tolua_S,2,0));
1058 {
1060 }
1061 }
1062 return 0;
1063#ifndef TOLUA_RELEASE
1065 tolua_error(tolua_S,"#ferror in function 'change_infrapoints'.",&tolua_err);
1066 return 0;
1067#endif
1068}
1069
1070/* function: api_edit_give_technology */
1072{
1073#ifndef TOLUA_RELEASE
1075 if (
1076 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1077 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1082 )
1083 goto tolua_lerror;
1084 else
1085#endif
1086 {
1087 lua_State* L = tolua_S;
1088 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1090 int cost = ((int) tolua_tonumber(tolua_S,3,0));
1091 bool notify = ((bool) tolua_toboolean(tolua_S,4,0));
1092 const char* reason = ((const char*) tolua_tostring(tolua_S,5,0));
1093 {
1095 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
1096 }
1097 }
1098 return 1;
1099#ifndef TOLUA_RELEASE
1101 tolua_error(tolua_S,"#ferror in function 'give_tech'.",&tolua_err);
1102 return 0;
1103#endif
1104}
1105
1106/* function: api_edit_trait_mod_set */
1108{
1109#ifndef TOLUA_RELEASE
1111 if (
1112 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1116 )
1117 goto tolua_lerror;
1118 else
1119#endif
1120 {
1121 lua_State* L = tolua_S;
1122 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1123 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
1124 const int mod = ((const int) tolua_tonumber(tolua_S,3,0));
1125 {
1126 bool tolua_ret = (bool) api_edit_trait_mod_set(L,pplayer,tname,mod);
1128 }
1129 }
1130 return 1;
1131#ifndef TOLUA_RELEASE
1133 tolua_error(tolua_S,"#ferror in function 'trait_mod'.",&tolua_err);
1134 return 0;
1135#endif
1136}
1137
1138/* function: api_edit_unleash_barbarians */
1140{
1141#ifndef TOLUA_RELEASE
1143 if (
1144 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
1146 )
1147 goto tolua_lerror;
1148 else
1149#endif
1150 {
1151 lua_State* L = tolua_S;
1152 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
1153 {
1156 }
1157 }
1158 return 1;
1159#ifndef TOLUA_RELEASE
1161 tolua_error(tolua_S,"#ferror in function 'unleash_barbarians'.",&tolua_err);
1162 return 0;
1163#endif
1164}
1165
1166/* function: api_edit_place_partisans */
1168{
1169#ifndef TOLUA_RELEASE
1171 if (
1172 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
1173 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
1177 )
1178 goto tolua_lerror;
1179 else
1180#endif
1181 {
1182 lua_State* L = tolua_S;
1183 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
1184 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
1185 int count = ((int) tolua_tonumber(tolua_S,3,0));
1186 int sq_radius = ((int) tolua_tonumber(tolua_S,4,0));
1187 {
1188 api_edit_place_partisans(L,ptile,pplayer,count,sq_radius);
1189 }
1190 }
1191 return 0;
1192#ifndef TOLUA_RELEASE
1194 tolua_error(tolua_S,"#ferror in function 'place_partisans'.",&tolua_err);
1195 return 0;
1196#endif
1197}
1198
1199/* function: api_edit_climate_change */
1201{
1202#ifndef TOLUA_RELEASE
1204 if (
1208 )
1209 goto tolua_lerror;
1210 else
1211#endif
1212 {
1213 lua_State* L = tolua_S;
1215 int effect = ((int) tolua_tonumber(tolua_S,2,0));
1216 {
1218 }
1219 }
1220 return 0;
1221#ifndef TOLUA_RELEASE
1223 tolua_error(tolua_S,"#ferror in function 'climate_change'.",&tolua_err);
1224 return 0;
1225#endif
1226}
1227
1228/* function: api_edit_civil_war */
1230{
1231#ifndef TOLUA_RELEASE
1233 if (
1234 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1237 )
1238 goto tolua_lerror;
1239 else
1240#endif
1241 {
1242 lua_State* L = tolua_S;
1243 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1244 int probability = ((int) tolua_tonumber(tolua_S,2,0));
1245 {
1247 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
1248 }
1249 }
1250 return 1;
1251#ifndef TOLUA_RELEASE
1253 tolua_error(tolua_S,"#ferror in function 'civil_war'.",&tolua_err);
1254 return 0;
1255#endif
1256}
1257
1258/* function: api_edit_unit_turn */
1260{
1261#ifndef TOLUA_RELEASE
1263 if (
1264 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1265 !tolua_isusertype(tolua_S,2,"Direction",0,&tolua_err) ||
1267 )
1268 goto tolua_lerror;
1269 else
1270#endif
1271 {
1272 lua_State* L = tolua_S;
1273 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1275 {
1277 }
1278 }
1279 return 0;
1280#ifndef TOLUA_RELEASE
1282 tolua_error(tolua_S,"#ferror in function 'unit_turn'.",&tolua_err);
1283 return 0;
1284#endif
1285}
1286
1287/* function: api_edit_player_victory */
1289{
1290#ifndef TOLUA_RELEASE
1292 if (
1293 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1295 )
1296 goto tolua_lerror;
1297 else
1298#endif
1299 {
1300 lua_State* L = tolua_S;
1302 {
1304 }
1305 }
1306 return 0;
1307#ifndef TOLUA_RELEASE
1309 tolua_error(tolua_S,"#ferror in function 'player_victory'.",&tolua_err);
1310 return 0;
1311#endif
1312}
1313
1314/* function: api_edit_unit_move */
1316{
1317#ifndef TOLUA_RELEASE
1319 if (
1320 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1321 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
1323 !tolua_isusertype(tolua_S,4,"Unit",0,&tolua_err) ||
1330 )
1331 goto tolua_lerror;
1332 else
1333#endif
1334 {
1335 lua_State* L = tolua_S;
1336 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
1338 int movecost = ((int) tolua_tonumber(tolua_S,3,0));
1341 bool conquer_city = ((bool) tolua_toboolean(tolua_S,6,0));
1342 bool conquer_extra = ((bool) tolua_toboolean(tolua_S,7,0));
1343 bool enter_hut = ((bool) tolua_toboolean(tolua_S,8,0));
1344 bool frighten_hut = ((bool) tolua_toboolean(tolua_S,9,0));
1345 {
1348 }
1349 }
1350 return 1;
1351#ifndef TOLUA_RELEASE
1353 tolua_error(tolua_S,"#ferror in function 'unit_move'.",&tolua_err);
1354 return 0;
1355#endif
1356}
1357
1358/* function: api_edit_unit_moving_disallow */
1360{
1361#ifndef TOLUA_RELEASE
1363 if (
1364 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1366 )
1367 goto tolua_lerror;
1368 else
1369#endif
1370 {
1371 lua_State* L = tolua_S;
1372 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
1373 {
1375 }
1376 }
1377 return 0;
1378#ifndef TOLUA_RELEASE
1380 tolua_error(tolua_S,"#ferror in function 'movement_disallow'.",&tolua_err);
1381 return 0;
1382#endif
1383}
1384
1385/* function: api_edit_unit_moving_allow */
1387{
1388#ifndef TOLUA_RELEASE
1390 if (
1391 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1393 )
1394 goto tolua_lerror;
1395 else
1396#endif
1397 {
1398 lua_State* L = tolua_S;
1399 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
1400 {
1402 }
1403 }
1404 return 0;
1405#ifndef TOLUA_RELEASE
1407 tolua_error(tolua_S,"#ferror in function 'movement_allow'.",&tolua_err);
1408 return 0;
1409#endif
1410}
1411
1412/* function: api_edit_perform_action_unit_vs_city */
1414{
1415#ifndef TOLUA_RELEASE
1417 if (
1418 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1419 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1420 !tolua_isusertype(tolua_S,3,"City",0,&tolua_err) ||
1422 )
1423 goto tolua_lerror;
1424 else
1425#endif
1426 {
1427 lua_State* L = tolua_S;
1428 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1430 City* tgt = ((City*) tolua_tousertype(tolua_S,3,0));
1431 {
1434 }
1435 }
1436 return 1;
1437#ifndef TOLUA_RELEASE
1439 tolua_error(tolua_S,"#ferror in function 'perform_action'.",&tolua_err);
1440 return 0;
1441#endif
1442}
1443
1444/* function: api_edit_perform_action_unit_vs_city_impr */
1446{
1448 if (
1449 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1450 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1451 !tolua_isusertype(tolua_S,3,"City",0,&tolua_err) ||
1452 !tolua_isusertype(tolua_S,4,"Building_Type",0,&tolua_err) ||
1454 )
1455 goto tolua_lerror;
1456 else
1457 {
1458 lua_State* L = tolua_S;
1459 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1461 City* tgt = ((City*) tolua_tousertype(tolua_S,3,0));
1463 {
1466 }
1467 }
1468 return 1;
1471}
1472
1473/* function: api_edit_perform_action_unit_vs_city_tech */
1475{
1477 if (
1478 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1479 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1480 !tolua_isusertype(tolua_S,3,"City",0,&tolua_err) ||
1481 !tolua_isusertype(tolua_S,4,"Tech_Type",0,&tolua_err) ||
1483 )
1484 goto tolua_lerror;
1485 else
1486 {
1487 lua_State* L = tolua_S;
1488 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1490 City* tgt = ((City*) tolua_tousertype(tolua_S,3,0));
1492 {
1495 }
1496 }
1497 return 1;
1500}
1501
1502/* function: api_edit_perform_action_unit_vs_unit */
1504{
1506 if (
1507 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1508 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1509 !tolua_isusertype(tolua_S,3,"Unit",0,&tolua_err) ||
1511 )
1512 goto tolua_lerror;
1513 else
1514 {
1515 lua_State* L = tolua_S;
1516 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1518 Unit* tgt = ((Unit*) tolua_tousertype(tolua_S,3,0));
1519 {
1522 }
1523 }
1524 return 1;
1527}
1528
1529/* function: api_edit_perform_action_unit_vs_tile */
1531{
1533 if (
1534 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1535 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1536 !tolua_isusertype(tolua_S,3,"Tile",0,&tolua_err) ||
1538 )
1539 goto tolua_lerror;
1540 else
1541 {
1542 lua_State* L = tolua_S;
1543 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1545 Tile* tgt = ((Tile*) tolua_tousertype(tolua_S,3,0));
1546 {
1549 }
1550 }
1551 return 1;
1554}
1555
1556/* function: api_edit_perform_action_unit_vs_tile_extra */
1558{
1560 if (
1561 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1562 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1563 !tolua_isusertype(tolua_S,3,"Tile",0,&tolua_err) ||
1566 )
1567 goto tolua_lerror;
1568 else
1569 {
1570 lua_State* L = tolua_S;
1571 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1573 Tile* tgt = ((Tile*) tolua_tousertype(tolua_S,3,0));
1574 const char* sub_tgt = ((const char*) tolua_tostring(tolua_S,4,0));
1575 {
1578 }
1579 }
1580 return 1;
1583}
1584
1585/* function: api_edit_perform_action_unit_vs_self */
1587{
1589 if (
1590 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1591 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1593 )
1594 goto tolua_lerror;
1595 else
1596 {
1597 lua_State* L = tolua_S;
1598 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1600 {
1603 }
1604 }
1605 return 1;
1608}
1609
1610/* function: api_edit_city_add_history */
1612{
1613#ifndef TOLUA_RELEASE
1615 if (
1616 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1619 )
1620 goto tolua_lerror;
1621 else
1622#endif
1623 {
1624 lua_State* L = tolua_S;
1625 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1626 int amount = ((int) tolua_tonumber(tolua_S,2,0));
1627 {
1629 }
1630 }
1631 return 0;
1632#ifndef TOLUA_RELEASE
1634 tolua_error(tolua_S,"#ferror in function 'add_city_history'.",&tolua_err);
1635 return 0;
1636#endif
1637}
1638
1639/* function: api_edit_player_add_history */
1641{
1642#ifndef TOLUA_RELEASE
1644 if (
1645 !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 int amount = ((int) tolua_tonumber(tolua_S,2,0));
1656 {
1658 }
1659 }
1660 return 0;
1661#ifndef TOLUA_RELEASE
1663 tolua_error(tolua_S,"#ferror in function 'add_player_history'.",&tolua_err);
1664 return 0;
1665#endif
1666}
1667
1668/* function: api_edit_player_give_bulbs */
1670{
1671#ifndef TOLUA_RELEASE
1673 if (
1674 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1676 !tolua_isusertype(tolua_S,3,"Tech_Type",1,&tolua_err) ||
1678 )
1679 goto tolua_lerror;
1680 else
1681#endif
1682 {
1683 lua_State* L = tolua_S;
1685 int amount = ((int) tolua_tonumber(tolua_S,2,0));
1687 {
1689 }
1690 }
1691 return 0;
1692#ifndef TOLUA_RELEASE
1694 tolua_error(tolua_S,"#ferror in function 'give_bulbs'.",&tolua_err);
1695 return 0;
1696#endif
1697}
1698
1699/* function: api_luadata_get_str */
1701{
1702#ifndef TOLUA_RELEASE
1704 if (
1707 )
1708 goto tolua_lerror;
1709 else
1710#endif
1711 {
1712 lua_State* L = tolua_S;
1713 const char* field = ((const char*) tolua_tostring(tolua_S,1,0));
1714 {
1715 const char* tolua_ret = (const char*) api_luadata_get_str(L,field);
1716 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1717 }
1718 }
1719 return 1;
1720#ifndef TOLUA_RELEASE
1722 tolua_error(tolua_S,"#ferror in function 'get_str'.",&tolua_err);
1723 return 0;
1724#endif
1725}
1726
1727/* function: api_methods_player_free_bulbs */
1729{
1730#ifndef TOLUA_RELEASE
1732 if (
1733 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1735 )
1736 goto tolua_lerror;
1737 else
1738#endif
1739 {
1740 lua_State* L = tolua_S;
1741 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1742 {
1745 }
1746 }
1747 return 1;
1748#ifndef TOLUA_RELEASE
1750 tolua_error(tolua_S,"#ferror in function 'free_bulbs'.",&tolua_err);
1751 return 0;
1752#endif
1753}
1754
1755/* function: api_methods_player_trait */
1757{
1758#ifndef TOLUA_RELEASE
1760 if (
1761 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1764 )
1765 goto tolua_lerror;
1766 else
1767#endif
1768 {
1769 lua_State* L = tolua_S;
1770 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1771 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
1772 {
1773 int tolua_ret = (int) api_methods_player_trait(L,pplayer,tname);
1775 }
1776 }
1777 return 1;
1778#ifndef TOLUA_RELEASE
1780 tolua_error(tolua_S,"#ferror in function 'trait'.",&tolua_err);
1781 return 0;
1782#endif
1783}
1784
1785/* function: api_methods_player_trait_base */
1787{
1788#ifndef TOLUA_RELEASE
1790 if (
1791 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1794 )
1795 goto tolua_lerror;
1796 else
1797#endif
1798 {
1799 lua_State* L = tolua_S;
1800 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1801 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
1802 {
1805 }
1806 }
1807 return 1;
1808#ifndef TOLUA_RELEASE
1810 tolua_error(tolua_S,"#ferror in function 'trait_base'.",&tolua_err);
1811 return 0;
1812#endif
1813}
1814
1815/* function: api_methods_player_trait_current_mod */
1817{
1818#ifndef TOLUA_RELEASE
1820 if (
1821 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1824 )
1825 goto tolua_lerror;
1826 else
1827#endif
1828 {
1829 lua_State* L = tolua_S;
1830 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1831 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
1832 {
1835 }
1836 }
1837 return 1;
1838#ifndef TOLUA_RELEASE
1840 tolua_error(tolua_S,"#ferror in function 'trait_current_mod'.",&tolua_err);
1841 return 0;
1842#endif
1843}
1844
1845/* function: api_methods_player_lose */
1847{
1848#ifndef TOLUA_RELEASE
1850 if (
1851 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1852 !tolua_isusertype(tolua_S,2,"Player",1,&tolua_err) ||
1854 )
1855 goto tolua_lerror;
1856 else
1857#endif
1858 {
1859 lua_State* L = tolua_S;
1860 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1862 {
1864 }
1865 }
1866 return 0;
1867#ifndef TOLUA_RELEASE
1869 tolua_error(tolua_S,"#ferror in function 'lose'.",&tolua_err);
1870 return 0;
1871#endif
1872}
1873
1874/* function: api_methods_player_tech_bulbs */
1876{
1877#ifndef TOLUA_RELEASE
1879 if (
1880 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1881 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1883 )
1884 goto tolua_lerror;
1885 else
1886#endif
1887 {
1888 lua_State* L = tolua_S;
1889 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1890 Tech_Type* tech = ((Tech_Type*) tolua_tousertype(tolua_S,2,0));
1891 {
1892 int tolua_ret = (int) api_methods_player_tech_bulbs(L,pplayer,tech);
1894 }
1895 }
1896 return 1;
1897#ifndef TOLUA_RELEASE
1899 tolua_error(tolua_S,"#ferror in function 'bulbs_saved'.",&tolua_err);
1900 return 0;
1901#endif
1902}
1903
1904/* get function: game_server_autoupgrade_veteran_loss */
1910
1911/* get function: game_server_upgrade_veteran_loss */
1917
1918/* get function: game_server_multiresearch */
1924
1925/* function: api_methods_nation_trait_min */
1927{
1928#ifndef TOLUA_RELEASE
1930 if (
1931 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
1934 )
1935 goto tolua_lerror;
1936 else
1937#endif
1938 {
1939 lua_State* L = tolua_S;
1940 Nation_Type* pnation = ((Nation_Type*) tolua_tousertype(tolua_S,1,0));
1941 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
1942 {
1945 }
1946 }
1947 return 1;
1948#ifndef TOLUA_RELEASE
1950 tolua_error(tolua_S,"#ferror in function 'trait_min'.",&tolua_err);
1951 return 0;
1952#endif
1953}
1954
1955/* function: api_methods_nation_trait_max */
1957{
1958#ifndef TOLUA_RELEASE
1960 if (
1961 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
1964 )
1965 goto tolua_lerror;
1966 else
1967#endif
1968 {
1969 lua_State* L = tolua_S;
1970 Nation_Type* pnation = ((Nation_Type*) tolua_tousertype(tolua_S,1,0));
1971 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
1972 {
1975 }
1976 }
1977 return 1;
1978#ifndef TOLUA_RELEASE
1980 tolua_error(tolua_S,"#ferror in function 'trait_max'.",&tolua_err);
1981 return 0;
1982#endif
1983}
1984
1985/* function: api_methods_nation_trait_default */
1987{
1988#ifndef TOLUA_RELEASE
1990 if (
1991 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
1994 )
1995 goto tolua_lerror;
1996 else
1997#endif
1998 {
1999 lua_State* L = tolua_S;
2000 Nation_Type* pnation = ((Nation_Type*) tolua_tousertype(tolua_S,1,0));
2001 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
2002 {
2005 }
2006 }
2007 return 1;
2008#ifndef TOLUA_RELEASE
2010 tolua_error(tolua_S,"#ferror in function 'trait_default'.",&tolua_err);
2011 return 0;
2012#endif
2013}
2014
2015/* function: api_edit_unit_upgrade */
2017{
2018#ifndef TOLUA_RELEASE
2020 if (
2021 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2024 )
2025 goto tolua_lerror;
2026 else
2027#endif
2028 {
2029 lua_State* L = tolua_S;
2030 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2031 int vet_loss = ((int) tolua_tonumber(tolua_S,2,0));
2032 {
2035 }
2036 }
2037 return 1;
2038#ifndef TOLUA_RELEASE
2040 tolua_error(tolua_S,"#ferror in function 'upgrade'.",&tolua_err);
2041 return 0;
2042#endif
2043}
2044
2045/* function: api_edit_unit_transform */
2047{
2048#ifndef TOLUA_RELEASE
2050 if (
2051 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2052 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
2055 )
2056 goto tolua_lerror;
2057 else
2058#endif
2059 {
2060 lua_State* L = tolua_S;
2061 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2063 int vet_loss = ((int) tolua_tonumber(tolua_S,3,0));
2064 {
2067 }
2068 }
2069 return 1;
2070#ifndef TOLUA_RELEASE
2072 tolua_error(tolua_S,"#ferror in function 'transform'.",&tolua_err);
2073 return 0;
2074#endif
2075}
2076
2077/* Open lib function */
2079{
2084 tolua_module(tolua_S,"server",0);
2085 tolua_beginmodule(tolua_S,"server");
2091 tolua_module(tolua_S,"setting",0);
2092 tolua_beginmodule(tolua_S,"setting");
2096 tolua_module(tolua_S,"Counter",0);
2097 tolua_beginmodule(tolua_S,"Counter");
2101 tolua_module(tolua_S,"notify",0);
2102 tolua_beginmodule(tolua_S,"notify");
2108
2109 { /* begin embedded lua code */
2110 static unsigned char B[] = {
2111 10,102,117,110, 99,116,105,111,110, 32,110,111,116,105,102,
2112 121, 46, 97,108,108, 40, 46, 46, 46, 41, 10,108,111, 99, 97,
2113 108, 32, 97,114,103, 32, 61, 32,116, 97, 98,108,101, 46,112,
2114 97, 99,107, 40, 46, 46, 46, 41, 59, 10,110,111,116,105,102,
2115 121, 46,101,118,101,110,116, 95,109,115,103, 40,110,105,108,
2116 44, 32,110,105,108, 44, 32, 69, 46, 83, 67, 82, 73, 80, 84,
2117 44, 32,115,116,114,105,110,103, 46,102,111,114,109, 97,116,
2118 40,116, 97, 98,108,101, 46,117,110,112, 97, 99,107, 40, 97,
2119 114,103, 41, 41, 41, 10,101,110,100, 10,102,117,110, 99,116,
2120 105,111,110, 32,110,111,116,105,102,121, 46,112,108, 97,121,
2121 101,114, 40,112,108, 97,121,101,114, 44, 32, 46, 46, 46, 41,
2122 10,108,111, 99, 97,108, 32, 97,114,103, 32, 61, 32,116, 97,
2123 98,108,101, 46,112, 97, 99,107, 40, 46, 46, 46, 41, 59, 10,
2124 110,111,116,105,102,121, 46,101,118,101,110,116, 95,109,115,
2125 103, 40,112,108, 97,121,101,114, 44, 32,110,105,108, 44, 32,
2126 69, 46, 83, 67, 82, 73, 80, 84, 44, 32,115,116,114,105,110,
2127 103, 46,102,111,114,109, 97,116, 40,116, 97, 98,108,101, 46,
2128 117,110,112, 97, 99,107, 40, 97,114,103, 41, 41, 41, 10,101,
2129 110,100, 10,102,117,110, 99,116,105,111,110, 32,110,111,116,
2130 105,102,121, 46,101,118,101,110,116, 40,112,108, 97,121,101,
2131 114, 44, 32,116,105,108,101, 44, 32,101,118,101,110,116, 44,
2132 32, 46, 46, 46, 41, 10,108,111, 99, 97,108, 32, 97,114,103,
2133 32, 61, 32,116, 97, 98,108,101, 46,112, 97, 99,107, 40, 46,
2134 46, 46, 41, 59, 10,110,111,116,105,102,121, 46,101,118,101,
2135 110,116, 95,109,115,103, 40,112,108, 97,121,101,114, 44, 32,
2136 116,105,108,101, 44, 32,101,118,101,110,116, 44, 32,115,116,
2137 114,105,110,103, 46,102,111,114,109, 97,116, 40,116, 97, 98,
2138 108,101, 46,117,110,112, 97, 99,107, 40, 97,114,103, 41, 41,
2139 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2140 110,111,116,105,102,121, 46,101,109, 98, 97,115,115,105,101,
2141 115, 40,112,108, 97,121,101,114, 44, 32,112,116,105,108,101,
2142 44, 32,101,118,101,110,116, 44, 32, 46, 46, 46, 41, 10,108,
2143 111, 99, 97,108, 32, 97,114,103, 32, 61, 32,116, 97, 98,108,
2144 101, 46,112, 97, 99,107, 40, 46, 46, 46, 41, 59, 10,110,111,
2145 116,105,102,121, 46,101,109, 98, 97,115,115,105,101,115, 95,
2146 109,115,103, 40,112,108, 97,121,101,114, 44, 32,112,116,105,
2147 108,101, 44, 32,101,118,101,110,116, 44, 32,115,116,114,105,
2148 110,103, 46,102,111,114,109, 97,116, 40,116, 97, 98,108,101,
2149 46,117,110,112, 97, 99,107, 40, 97,114,103, 41, 41, 41, 10,
2150 101,110,100, 10,102,117,110, 99,116,105,111,110, 32,110,111,
2151 116,105,102,121, 46,114,101,115,101, 97,114, 99,104, 40,112,
2152 108, 97,121,101,114, 44, 32,115,101,108,102,109,115,103, 44,
2153 32,101,118,101,110,116, 44, 32, 46, 46, 46, 41, 10,108,111,
2154 99, 97,108, 32, 97,114,103, 32, 61, 32,116, 97, 98,108,101,
2155 46,112, 97, 99,107, 40, 46, 46, 46, 41, 59, 10,110,111,116,
2156 105,102,121, 46,114,101,115,101, 97,114, 99,104, 95,109,115,
2157 103, 40,112,108, 97,121,101,114, 44, 32,115,101,108,102,109,
2158 115,103, 44, 32,101,118,101,110,116, 44, 32,115,116,114,105,
2159 110,103, 46,102,111,114,109, 97,116, 40,116, 97, 98,108,101,
2160 46,117,110,112, 97, 99,107, 40, 97,114,103, 41, 41, 41, 10,
2161 101,110,100, 10,102,117,110, 99,116,105,111,110, 32,110,111,
2162 116,105,102,121, 46,114,101,115,101, 97,114, 99,104, 95,101,
2163 109, 98, 97,115,115,105,101,115, 40,112,108, 97,121,101,114,
2164 44, 32,101,118,101,110,116, 44, 32, 46, 46, 46, 41, 10,108,
2165 111, 99, 97,108, 32, 97,114,103, 32, 61, 32,116, 97, 98,108,
2166 101, 46,112, 97, 99,107, 40, 46, 46, 46, 41, 59, 10,110,111,
2167 116,105,102,121, 46,114,101,115,101, 97,114, 99,104, 95,101,
2168 109, 98, 97,115,115,105,101,115, 95,109,115,103, 40,112,108,
2169 97,121,101,114, 44, 32,101,118,101,110,116, 44, 32,115,116,
2170 114,105,110,103, 46,102,111,114,109, 97,116, 40,116, 97, 98,
2171 108,101, 46,117,110,112, 97, 99,107, 40, 97,114,103, 41, 41,
2172 41, 10,101,110,100,32
2173 };
2174 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
2176 } /* end of embedded lua code */
2177
2178 tolua_module(tolua_S,"edit",0);
2179 tolua_beginmodule(tolua_S,"edit");
2225 tolua_module(tolua_S,"luadata",0);
2226 tolua_beginmodule(tolua_S,"luadata");
2229
2230 { /* begin embedded lua code */
2231 static unsigned char B[] = {
2232 10,102,117,110, 99,116,105,111,110, 32, 99,114,101, 97,116,
2233 101, 95,117,110,105,116, 40,112,108, 97,121,101,114, 44, 32,
2234 116,105,108,101, 44, 32,117,116,121,112,101, 44, 32,118,101,
2235 116,101,114, 97,110, 95,108,101,118,101,108, 44, 32,104,111,
2236 109,101, 99,105,116,121, 44, 32,109,111,118,101,115, 95,108,
2237 101,102,116, 41, 10,108,111,103, 46,100,101,112,114,101, 99,
2238 97,116,105,111,110, 95,119, 97,114,110,105,110,103, 40, 34,
2239 99,114,101, 97,116,101, 95,117,110,105,116, 40, 41, 34, 44,
2240 32, 34,101,100,105,116, 46, 99,114,101, 97,116,101, 95,117,
2241 110,105,116, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41, 59,
2242 10,114,101,116,117,114,110, 32,101,100,105,116, 46, 99,114,
2243 101, 97,116,101, 95,117,110,105,116, 40,112,108, 97,121,101,
2244 114, 44, 32,116,105,108,101, 44, 32,117,116,121,112,101, 44,
2245 32,118,101,116,101,114, 97,110, 95,108,101,118,101,108, 44,
2246 32,104,111,109,101, 99,105,116,121, 44, 10,109,111,118,101,
2247 115, 95,108,101,102,116, 41, 10,101,110,100, 10,102,117,110,
2248 99,116,105,111,110, 32, 99,114,101, 97,116,101, 95,117,110,
2249 105,116, 95,102,117,108,108, 40,112,108, 97,121,101,114, 44,
2250 32,116,105,108,101, 44, 32,117,116,121,112,101, 44, 32,118,
2251 101,116,101,114, 97,110, 95,108,101,118,101,108, 44, 32,104,
2252 111,109,101, 99,105,116,121, 44, 10,109,111,118,101,115, 95,
2253 108,101,102,116, 44, 32,104,112, 95,108,101,102,116, 44, 32,
2254 116,114, 97,110,115,112,111,114,116, 41, 10,108,111,103, 46,
2255 100,101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,
2256 110,105,110,103, 40, 34, 99,114,101, 97,116,101, 95,117,110,
2257 105,116, 95,102,117,108,108, 40, 41, 34, 44, 32, 34,101,100,
2258 105,116, 46, 99,114,101, 97,116,101, 95,117,110,105,116, 95,
2259 102,117,108,108, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41,
2260 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46, 99,
2261 114,101, 97,116,101, 95,117,110,105,116, 95,102,117,108,108,
2262 40,112,108, 97,121,101,114, 44, 32,116,105,108,101, 44, 32,
2263 117,116,121,112,101, 44, 32,118,101,116,101,114, 97,110, 95,
2264 108,101,118,101,108, 44, 32,104,111,109,101, 99,105,116,121,
2265 44, 10,109,111,118,101,115, 95,108,101,102,116, 44, 32,104,
2266 112, 95,108,101,102,116, 44, 32,116,114, 97,110,115,112,111,
2267 114,116, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
2268 110, 32, 99,114,101, 97,116,101, 95, 99,105,116,121, 40,112,
2269 108, 97,121,101,114, 44, 32,116,105,108,101, 44, 32,110, 97,
2270 109,101, 41, 10,108,111,103, 46,100,101,112,114,101, 99, 97,
2271 116,105,111,110, 95,119, 97,114,110,105,110,103, 40, 34, 99,
2272 114,101, 97,116,101, 95, 99,105,116,121, 40, 41, 34, 44, 32,
2273 34,101,100,105,116, 46, 99,114,101, 97,116,101, 95, 99,105,
2274 116,121, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41, 59, 10,
2275 101,100,105,116, 46, 99,114,101, 97,116,101, 95, 99,105,116,
2276 121, 32, 40,112,108, 97,121,101,114, 44, 32,116,105,108,101,
2277 44, 32,110, 97,109,101, 41, 10,101,110,100, 10,102,117,110,
2278 99,116,105,111,110, 32, 99,114,101, 97,116,101, 95, 98, 97,
2279 115,101, 40,116,105,108,101, 44, 32,110, 97,109,101, 44, 32,
2280 112,108, 97,121,101,114, 41, 10,108,111,103, 46,100,101,112,
2281 114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,110,
2282 103, 40, 34, 99,114,101, 97,116,101, 95, 98, 97,115,101, 40,
2283 41, 34, 44, 32, 34,101,100,105,116, 46, 99,114,101, 97,116,
2284 101, 95,111,119,110,101,100, 95,101,120,116,114, 97, 40, 41,
2285 34, 44, 10, 34, 50, 46, 52, 34, 41, 59, 10,101,100,105,116,
2286 46, 99,114,101, 97,116,101, 95, 98, 97,115,101, 40,116,105,
2287 108,101, 44, 32,110, 97,109,101, 44, 32,112,108, 97,121,101,
2288 114, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
2289 32, 99,114,101, 97,116,101, 95,112,108, 97,121,101,114, 40,
2290 117,115,101,114,110, 97,109,101, 44, 32,110, 97,116,105,111,
2291 110, 41, 10,108,111,103, 46,100,101,112,114,101, 99, 97,116,
2292 105,111,110, 95,119, 97,114,110,105,110,103, 40, 34, 99,114,
2293 101, 97,116,101, 95,112,108, 97,121,101,114, 40, 41, 34, 44,
2294 32, 34,101,100,105,116, 46, 99,114,101, 97,116,101, 95,112,
2295 108, 97,121,101,114, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34,
2296 41, 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,
2297 99,114,101, 97,116,101, 95,112,108, 97,121,101,114, 40,117,
2298 115,101,114,110, 97,109,101, 44, 32,110, 97,116,105,111,110,
2299 44, 32,110,105,108, 41, 10,101,110,100, 10,102,117,110, 99,
2300 116,105,111,110, 32, 99,104, 97,110,103,101, 95,103,111,108,
2301 100, 40,112,112,108, 97,121,101,114, 44, 32, 97,109,111,117,
2302 110,116, 41, 10,108,111,103, 46,100,101,112,114,101, 99, 97,
2303 116,105,111,110, 95,119, 97,114,110,105,110,103, 40, 34, 99,
2304 104, 97,110,103,101, 95,103,111,108,100, 40, 41, 34, 44, 32,
2305 34,101,100,105,116, 46, 99,104, 97,110,103,101, 95,103,111,
2306 108,100, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41, 59, 10,
2307 101,100,105,116, 46, 99,104, 97,110,103,101, 95,103,111,108,
2308 100, 40,112,112,108, 97,121,101,114, 44, 32, 97,109,111,117,
2309 110,116, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
2310 110, 32,103,105,118,101, 95,116,101, 99,104,110,111,108,111,
2311 103,121, 40,112,108, 97,121,101,114, 44, 32,116,101, 99,104,
2312 44, 32,114,101, 97,115,111,110, 41, 10,108,111,103, 46,100,
2313 101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,
2314 105,110,103, 40, 34,103,105,118,101, 95,116,101, 99,104,110,
2315 111,108,111,103,121, 40, 41, 34, 44, 32, 34,101,100,105,116,
2316 46,103,105,118,101, 95,116,101, 99,104, 40, 41, 34, 44, 10,
2317 34, 50, 46, 52, 34, 41, 59, 10,114,101,116,117,114,110, 32,
2318 101,100,105,116, 46,103,105,118,101, 95,116,101, 99,104, 40,
2319 112,108, 97,121,101,114, 44, 32,116,101, 99,104, 44, 32, 45,
2320 49, 44, 32,102, 97,108,115,101, 44, 32,114,101, 97,115,111,
2321 110, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
2322 32,101,100,105,116, 46,103,105,118,101, 95,116,101, 99,104,
2323 110,111,108,111,103,121, 40,112,108, 97,121,101,114, 44, 32,
2324 116,101, 99,104, 44, 32,114,101, 97,115,111,110, 41, 10,108,
2325 111,103, 46,100,101,112,114,101, 99, 97,116,105,111,110, 95,
2326 119, 97,114,110,105,110,103, 40, 34,101,100,105,116, 46,103,
2327 105,118,101, 95,116,101, 99,104,110,111,108,111,103,121, 40,
2328 41, 34, 44, 32, 34,101,100,105,116, 46,103,105,118,101, 95,
2329 116,101, 99,104, 40, 41, 34, 44, 10, 34, 50, 46, 54, 34, 41,
2330 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,103,
2331 105,118,101, 95,116,101, 99,104, 40,112,108, 97,121,101,114,
2332 44, 32,116,101, 99,104, 44, 32, 45, 49, 44, 32,102, 97,108,
2333 115,101, 44, 32,114,101, 97,115,111,110, 41, 10,101,110,100,
2334 10,102,117,110, 99,116,105,111,110, 32,116,114, 97,105,116,
2335 95,109,111,100, 40,112,108, 97,121,101,114, 44, 32,116,114,
2336 97,105,116, 44, 32,109,111,100, 41, 10,108,111,103, 46,100,
2337 101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,
2338 105,110,103, 40, 34,116,114, 97,105,116, 95,109,111,100, 40,
2339 41, 34, 44, 32, 34,101,100,105,116, 46,116,114, 97,105,116,
2340 95,109,111,100, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41,
2341 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,116,
2342 114, 97,105,116, 95,109,111,100, 40,112,108, 97,121,101,114,
2343 44, 32,116,114, 97,105,116, 44, 32,109,111,100, 41, 10,101,
2344 110,100, 10,102,117,110, 99,116,105,111,110, 32,117,110,108,
2345 101, 97,115,104, 95, 98, 97,114, 98, 97,114,105, 97,110,115,
2346 40,116,105,108,101, 41, 10,108,111,103, 46,100,101,112,114,
2347 101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,110,103,
2348 40, 34,117,110,108,101, 97,115,104, 95, 98, 97,114, 98, 97,
2349 114,105, 97,110,115, 40, 41, 34, 44, 32, 34,101,100,105,116,
2350 46,117,110,108,101, 97,115,104, 95, 98, 97,114, 98, 97,114,
2351 105, 97,110,115, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41,
2352 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,117,
2353 110,108,101, 97,115,104, 95, 98, 97,114, 98, 97,114,105, 97,
2354 110,115, 40,116,105,108,101, 41, 10,101,110,100, 10,102,117,
2355 110, 99,116,105,111,110, 32,112,108, 97, 99,101, 95,112, 97,
2356 114,116,105,115, 97,110,115, 40,116,105,108,101, 44, 32,112,
2357 108, 97,121,101,114, 44, 32, 99,111,117,110,116, 44, 32,115,
2358 113, 95,114, 97,100,105,117,115, 41, 10,108,111,103, 46,100,
2359 101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,
2360 105,110,103, 40, 34,112,108, 97, 99,101, 95,112, 97,114,116,
2361 105,115, 97,110,115, 40, 41, 34, 44, 32, 34,101,100,105,116,
2362 46,112,108, 97, 99,101, 95,112, 97,114,116,105,115, 97,110,
2363 115, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41, 59, 10,101,
2364 100,105,116, 46,112,108, 97, 99,101, 95,112, 97,114,116,105,
2365 115, 97,110,115, 40,116,105,108,101, 44, 32,112,108, 97,121,
2366 101,114, 44, 32, 99,111,117,110,116, 44, 32,115,113, 95,114,
2367 97,100,105,117,115, 41, 10,101,110,100, 10,102,117,110, 99,
2368 116,105,111,110, 32, 80,108, 97,121,101,114, 58, 99,114,101,
2369 97,116,101, 95,117,110,105,116, 40,116,105,108,101, 44, 32,
2370 117,116,121,112,101, 44, 32,118,101,116,101,114, 97,110, 95,
2371 108,101,118,101,108, 44, 32,104,111,109,101, 99,105,116,121,
2372 44, 32,109,111,118,101,115, 95,108,101,102,116, 41, 10,114,
2373 101,116,117,114,110, 32,101,100,105,116, 46, 99,114,101, 97,
2374 116,101, 95,117,110,105,116, 40,115,101,108,102, 44, 32,116,
2375 105,108,101, 44, 32,117,116,121,112,101, 44, 32,118,101,116,
2376 101,114, 97,110, 95,108,101,118,101,108, 44, 32,104,111,109,
2377 101, 99,105,116,121, 44, 10,109,111,118,101,115, 95,108,101,
2378 102,116, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
2379 110, 32, 80,108, 97,121,101,114, 58, 99,114,101, 97,116,101,
2380 95,117,110,105,116, 95,102,117,108,108, 40,116,105,108,101,
2381 44, 32,117,116,121,112,101, 44, 32,118,101,116,101,114, 97,
2382 110, 95,108,101,118,101,108, 44, 32,104,111,109,101, 99,105,
2383 116,121, 44, 10,109,111,118,101,115, 95,108,101,102,116, 44,
2384 32,104,112, 95,108,101,102,116, 44, 32,112,116,114, 97,110,
2385 115,112,111,114,116, 41, 10,114,101,116,117,114,110, 32,101,
2386 100,105,116, 46, 99,114,101, 97,116,101, 95,117,110,105,116,
2387 95,102,117,108,108, 40,115,101,108,102, 44, 32,116,105,108,
2388 101, 44, 32,117,116,121,112,101, 44, 32,118,101,116,101,114,
2389 97,110, 95,108,101,118,101,108, 44, 32,104,111,109,101, 99,
2390 105,116,121, 44, 10,109,111,118,101,115, 95,108,101,102,116,
2391 44, 32,104,112, 95,108,101,102,116, 44, 32,112,116,114, 97,
2392 110,115,112,111,114,116, 41, 10,101,110,100, 10,102,117,110,
2393 99,116,105,111,110, 32, 80,108, 97,121,101,114, 58, 99,105,
2394 118,105,108,105,122, 97,116,105,111,110, 95,115, 99,111,114,
2395 101, 40, 41, 10,114,101,116,117,114,110, 32,115,101,114,118,
2396 101,114, 46, 99,105,118,105,108,105,122, 97,116,105,111,110,
2397 95,115, 99,111,114,101, 40,115,101,108,102, 41, 10,101,110,
2398 100, 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,
2399 101,114, 58, 99,114,101, 97,116,101, 95, 99,105,116,121, 40,
2400 116,105,108,101, 44, 32,110, 97,109,101, 41, 10,101,100,105,
2401 116, 46, 99,114,101, 97,116,101, 95, 99,105,116,121, 40,115,
2402 101,108,102, 44, 32,116,105,108,101, 44, 32,110, 97,109,101,
2403 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2404 80,108, 97,121,101,114, 58, 99,104, 97,110,103,101, 95,103,
2405 111,108,100, 40, 97,109,111,117,110,116, 41, 10,101,100,105,
2406 116, 46, 99,104, 97,110,103,101, 95,103,111,108,100, 40,115,
2407 101,108,102, 44, 32, 97,109,111,117,110,116, 41, 10,101,110,
2408 100, 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,
2409 101,114, 58, 99,104, 97,110,103,101, 95,105,110,102,114, 97,
2410 112,111,105,110,116,115, 40, 97,109,111,117,110,116, 41, 10,
2411 101,100,105,116, 46, 99,104, 97,110,103,101, 95,105,110,102,
2412 114, 97,112,111,105,110,116,115, 40,115,101,108,102, 44, 32,
2413 97,109,111,117,110,116, 41, 10,101,110,100, 10,102,117,110,
2414 99,116,105,111,110, 32, 80,108, 97,121,101,114, 58,103,105,
2415 118,101, 95,116,101, 99,104, 40,116,101, 99,104, 44, 32, 99,
2416 111,115,116, 44, 32,110,111,116,105,102,121, 44, 32,114,101,
2417 97,115,111,110, 41, 10,114,101,116,117,114,110, 32,101,100,
2418 105,116, 46,103,105,118,101, 95,116,101, 99,104, 40,115,101,
2419 108,102, 44, 32,116,101, 99,104, 44, 32, 99,111,115,116, 44,
2420 32,110,111,116,105,102,121, 44, 32,114,101, 97,115,111,110,
2421 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2422 80,108, 97,121,101,114, 58,103,105,118,101, 95,116,101, 99,
2423 104,110,111,108,111,103,121, 40,116,101, 99,104, 44, 32,114,
2424 101, 97,115,111,110, 41, 10,108,111,103, 46,100,101,112,114,
2425 101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,110,103,
2426 40, 34, 80,108, 97,121,101,114, 58,103,105,118,101, 95,116,
2427 101, 99,104,110,111,108,111,103,121, 40, 41, 34, 44, 32, 34,
2428 80,108, 97,121,101,114, 58,103,105,118,101, 95,116,101, 99,
2429 104, 40, 41, 34, 44, 10, 34, 50, 46, 54, 34, 41, 59, 10,114,
2430 101,116,117,114,110, 32,101,100,105,116, 46,103,105,118,101,
2431 95,116,101, 99,104, 40,115,101,108,102, 44, 32,116,101, 99,
2432 104, 44, 32, 45, 49, 44, 32,102, 97,108,115,101, 44, 32,114,
2433 101, 97,115,111,110, 41, 10,101,110,100, 10,102,117,110, 99,
2434 116,105,111,110, 32, 80,108, 97,121,101,114, 58,116,114, 97,
2435 105,116, 95,109,111,100, 40,116,114, 97,105,116, 44, 32,109,
2436 111,100, 41, 10,114,101,116,117,114,110, 32,101,100,105,116,
2437 46,116,114, 97,105,116, 95,109,111,100, 40,115,101,108,102,
2438 44, 32,116,114, 97,105,116, 44, 32,109,111,100, 41, 10,101,
2439 110,100, 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,
2440 121,101,114, 58, 99,105,118,105,108, 95,119, 97,114, 40,112,
2441 114,111, 98, 97, 98,105,108,105,116,121, 41, 10,114,101,116,
2442 117,114,110, 32,101,100,105,116, 46, 99,105,118,105,108, 95,
2443 119, 97,114, 40,115,101,108,102, 44, 32,112,114,111, 98, 97,
2444 98,105,108,105,116,121, 41, 10,101,110,100, 10,102,117,110,
2445 99,116,105,111,110, 32, 80,108, 97,121,101,114, 58,118,105,
2446 99,116,111,114,121, 40, 41, 10,101,100,105,116, 46,112,108,
2447 97,121,101,114, 95,118,105, 99,116,111,114,121, 40,115,101,
2448 108,102, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
2449 110, 32, 80,108, 97,121,101,114, 58, 97,100,100, 95,104,105,
2450 115,116,111,114,121, 40, 97,109,111,117,110,116, 41, 10,101,
2451 100,105,116, 46, 97,100,100, 95,112,108, 97,121,101,114, 95,
2452 104,105,115,116,111,114,121, 40,115,101,108,102, 44, 32, 97,
2453 109,111,117,110,116, 41, 10,101,110,100, 10,102,117,110, 99,
2454 116,105,111,110, 32, 80,108, 97,121,101,114, 58,103,105,118,
2455 101, 95, 98,117,108, 98,115, 40, 97,109,111,117,110,116, 44,
2456 32,116,101, 99,104, 41, 10,101,100,105,116, 46,103,105,118,
2457 101, 95, 98,117,108, 98,115, 40,115,101,108,102, 44, 32, 97,
2458 109,111,117,110,116, 44, 32,116,101, 99,104, 41, 10,101,110,
2459 100, 10,102,117,110, 99,116,105,111,110, 32, 67,105,116,121,
2460 58,114,101,109,111,118,101, 40, 41, 10,101,100,105,116, 46,
2461 114,101,109,111,118,101, 95, 99,105,116,121, 40,115,101,108,
2462 102, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
2463 32, 67,105,116,121, 58,116,114, 97,110,115,102,101,114, 40,
2464 110,101,119, 95,111,119,110,101,114, 41, 10,101,100,105,116,
2465 46,116,114, 97,110,115,102,101,114, 95, 99,105,116,121, 40,
2466 115,101,108,102, 44, 32,110,101,119, 95,111,119,110,101,114,
2467 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2468 67,105,116,121, 58, 97,100,100, 95,104,105,115,116,111,114,
2469 121, 40, 97,109,111,117,110,116, 41, 10,101,100,105,116, 46,
2470 97,100,100, 95, 99,105,116,121, 95,104,105,115,116,111,114,
2471 121, 40,115,101,108,102, 44, 32, 97,109,111,117,110,116, 41,
2472 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 67,
2473 105,116,121, 58, 99,114,101, 97,116,101, 95, 98,117,105,108,
2474 100,105,110,103, 40,105,109,112,114, 41, 10,101,100,105,116,
2475 46, 99,114,101, 97,116,101, 95, 98,117,105,108,100,105,110,
2476 103, 40,115,101,108,102, 44, 32,105,109,112,114, 41, 10,101,
2477 110,100, 10,102,117,110, 99,116,105,111,110, 32, 67,105,116,
2478 121, 58,114,101,109,111,118,101, 95, 98,117,105,108,100,105,
2479 110,103, 40,105,109,112,114, 41, 10,101,100,105,116, 46,114,
2480 101,109,111,118,101, 95, 98,117,105,108,100,105,110,103, 40,
2481 115,101,108,102, 44, 32,105,109,112,114, 41, 10,101,110,100,
2482 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 58,
2483 116,101,108,101,112,111,114,116, 40,100,101,115,116, 44, 10,
2484 101,109, 98, 97,114,107, 95,116,111, 44, 32, 97,108,108,111,
2485 119, 95,100,105,115,101,109, 98, 97,114,107, 44, 10, 99,111,
2486 110,113,117,101,114, 95, 99,105,116,121, 44, 32, 99,111,110,
2487 113,117,101,114, 95,101,120,116,114, 97, 44, 10,101,110,116,
2488 101,114, 95,104,117,116, 44, 32,102,114,105,103,104,116,101,
2489 110, 95,104,117,116, 41, 10,105,102, 32, 97,108,108,111,119,
2490 95,100,105,115,101,109, 98, 97,114,107, 32, 61, 61, 32,110,
2491 105,108, 32,116,104,101,110, 10,114,101,116,117,114,110, 32,
2492 101,100,105,116, 46,117,110,105,116, 95,116,101,108,101,112,
2493 111,114,116, 40,115,101,108,102, 44, 32,100,101,115,116, 44,
2494 32,110,105,108, 44, 32,102, 97,108,115,101, 44, 10,102, 97,
2495 108,115,101, 44, 32,102, 97,108,115,101, 44, 32,102, 97,108,
2496 115,101, 44, 32,102, 97,108,115,101, 41, 10,101,108,115,101,
2497 10,114,101,116,117,114,110, 32,101,100,105,116, 46,117,110,
2498 105,116, 95,116,101,108,101,112,111,114,116, 40,115,101,108,
2499 102, 44, 32,100,101,115,116, 44, 10,101,109, 98, 97,114,107,
2500 95,116,111, 44, 32, 97,108,108,111,119, 95,100,105,115,101,
2501 109, 98, 97,114,107, 44, 10, 99,111,110,113,117,101,114, 95,
2502 99,105,116,121, 44, 32, 99,111,110,113,117,101,114, 95,101,
2503 120,116,114, 97, 44, 10,101,110,116,101,114, 95,104,117,116,
2504 44, 32,102,114,105,103,104,116,101,110, 95,104,117,116, 41,
2505 10,101,110,100, 10,101,110,100, 10,102,117,110, 99,116,105,
2506 111,110, 32, 85,110,105,116, 58,112,101,114,102,111,114,109,
2507 95, 97, 99,116,105,111,110, 40, 97, 99,116,105,111,110, 44,
2508 32,116, 97,114,103,101,116, 44, 32,115,117, 98, 95,116, 97,
2509 114,103,101,116, 41, 10,105,102, 32,116, 97,114,103,101,116,
2510 32, 61, 61, 32,110,105,108, 32,116,104,101,110, 10,114,101,
2511 116,117,114,110, 32,101,100,105,116, 46,112,101,114,102,111,
2512 114,109, 95, 97, 99,116,105,111,110, 40,115,101,108,102, 44,
2513 32, 97, 99,116,105,111,110, 41, 10,101,108,115,101,105,102,
2514 32,115,117, 98, 95,116, 97,114,103,101,116, 32, 61, 61, 32,
2515 110,105,108, 32,116,104,101,110, 10,114,101,116,117,114,110,
2516 32,101,100,105,116, 46,112,101,114,102,111,114,109, 95, 97,
2517 99,116,105,111,110, 40,115,101,108,102, 44, 32, 97, 99,116,
2518 105,111,110, 44, 32,116, 97,114,103,101,116, 41, 10,101,108,
2519 115,101, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,
2520 112,101,114,102,111,114,109, 95, 97, 99,116,105,111,110, 40,
2521 115,101,108,102, 44, 32, 97, 99,116,105,111,110, 44, 32,116,
2522 97,114,103,101,116, 44, 32,115,117, 98, 95,116, 97,114,103,
2523 101,116, 41, 10,101,110,100, 10,101,110,100, 10,102,117,110,
2524 99,116,105,111,110, 32, 85,110,105,116, 58,116,117,114,110,
2525 40,100,105,114,101, 99,116,105,111,110, 41, 10,101,100,105,
2526 116, 46,117,110,105,116, 95,116,117,114,110, 40,115,101,108,
2527 102, 44, 32,100,105,114,101, 99,116,105,111,110, 41, 10,101,
2528 110,100, 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,
2529 116, 58,107,105,108,108, 40,114,101, 97,115,111,110, 44, 32,
2530 107,105,108,108,101,114, 41, 10,101,100,105,116, 46,117,110,
2531 105,116, 95,107,105,108,108, 40,115,101,108,102, 44, 32,114,
2532 101, 97,115,111,110, 44, 32,107,105,108,108,101,114, 41, 10,
2533 101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 85,110,
2534 105,116, 58,109,111,118,101, 40,109,111,118,101,116,111, 44,
2535 32,109,111,118,101, 99,111,115,116, 44, 10,101,109, 98, 97,
2536 114,107, 95,116,111, 44, 32, 97,108,108,111,119, 95,100,105,
2537 115,101,109, 98, 97,114,107, 44, 10, 99,111,110,113,117,101,
2538 114, 95, 99,105,116,121, 44, 32, 99,111,110,113,117,101,114,
2539 95,101,120,116,114, 97, 44, 10,101,110,116,101,114, 95,104,
2540 117,116, 44, 32,102,114,105,103,104,116,101,110, 95,104,117,
2541 116, 41, 10,105,102, 32, 97,108,108,111,119, 95,100,105,115,
2542 101,109, 98, 97,114,107, 32, 61, 61, 32,110,105,108, 32,116,
2543 104,101,110, 10,114,101,116,117,114,110, 32,101,100,105,116,
2544 46,117,110,105,116, 95,109,111,118,101, 40,115,101,108,102,
2545 44, 32,109,111,118,101,116,111, 44, 32,109,111,118,101, 99,
2546 111,115,116, 44, 32,110,105,108, 44, 32,102, 97,108,115,101,
2547 44, 10,102, 97,108,115,101, 44, 32,102, 97,108,115,101, 44,
2548 32,102, 97,108,115,101, 44, 32,102, 97,108,115,101, 41, 10,
2549 101,108,115,101, 10,114,101,116,117,114,110, 32,101,100,105,
2550 116, 46,117,110,105,116, 95,109,111,118,101, 40,115,101,108,
2551 102, 44, 32,109,111,118,101,116,111, 44, 32,109,111,118,101,
2552 99,111,115,116, 44, 10,101,109, 98, 97,114,107, 95,116,111,
2553 44, 32, 97,108,108,111,119, 95,100,105,115,101,109, 98, 97,
2554 114,107, 44, 10, 99,111,110,113,117,101,114, 95, 99,105,116,
2555 121, 44, 32, 99,111,110,113,117,101,114, 95,101,120,116,114,
2556 97, 44, 10,101,110,116,101,114, 95,104,117,116, 44, 32,102,
2557 114,105,103,104,116,101,110, 95,104,117,116, 41, 10,101,110,
2558 100, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2559 85,110,105,116, 58,109,111,118,101,109,101,110,116, 95,100,
2560 105,115, 97,108,108,111,119, 40, 41, 10,101,100,105,116, 46,
2561 109,111,118,101,109,101,110,116, 95,100,105,115, 97,108,108,
2562 111,119, 40,115,101,108,102, 41, 10,101,110,100, 10,102,117,
2563 110, 99,116,105,111,110, 32, 85,110,105,116, 58,109,111,118,
2564 101,109,101,110,116, 95, 97,108,108,111,119, 40, 41, 10,101,
2565 100,105,116, 46,109,111,118,101,109,101,110,116, 95, 97,108,
2566 108,111,119, 40,115,101,108,102, 41, 10,101,110,100, 10,102,
2567 117,110, 99,116,105,111,110, 32, 84,105,108,101, 58, 99,114,
2568 101, 97,116,101, 95,111,119,110,101,100, 95,101,120,116,114,
2569 97, 40,110, 97,109,101, 44, 32,112,108, 97,121,101,114, 41,
2570 10,101,100,105,116, 46, 99,114,101, 97,116,101, 95,111,119,
2571 110,101,100, 95,101,120,116,114, 97, 40,115,101,108,102, 44,
2572 32,110, 97,109,101, 44, 32,112,108, 97,121,101,114, 41, 10,
2573 101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 84,105,
2574 108,101, 58, 99,114,101, 97,116,101, 95,101,120,116,114, 97,
2575 40,110, 97,109,101, 41, 10,101,100,105,116, 46, 99,114,101,
2576 97,116,101, 95,101,120,116,114, 97, 40,115,101,108,102, 44,
2577 32,110, 97,109,101, 41, 10,101,110,100, 10,102,117,110, 99,
2578 116,105,111,110, 32, 84,105,108,101, 58, 99,114,101, 97,116,
2579 101, 95, 98, 97,115,101, 40,110, 97,109,101, 44, 32,112,108,
2580 97,121,101,114, 41, 10,108,111,103, 46,100,101,112,114,101,
2581 99, 97,116,105,111,110, 95,119, 97,114,110,105,110,103, 40,
2582 34, 84,105,108,101, 58, 99,114,101, 97,116,101, 95, 98, 97,
2583 115,101, 40, 41, 34, 44, 32, 34, 84,105,108,101, 58, 99,114,
2584 101, 97,116,101, 95,111,119,110,101,100, 95,101,120,116,114,
2585 97, 40, 41, 34, 44, 10, 34, 51, 46, 48, 34, 41, 59, 10,101,
2586 100,105,116, 46, 99,114,101, 97,116,101, 95, 98, 97,115,101,
2587 40,115,101,108,102, 44, 32,110, 97,109,101, 44, 32,112,108,
2588 97,121,101,114, 41, 10,101,110,100, 10,102,117,110, 99,116,
2589 105,111,110, 32, 84,105,108,101, 58, 99,114,101, 97,116,101,
2590 95,114,111, 97,100, 40,110, 97,109,101, 41, 10,108,111,103,
2591 46,100,101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,
2592 114,110,105,110,103, 40, 34, 84,105,108,101, 58, 99,114,101,
2593 97,116,101, 95,114,111, 97,100, 40, 41, 34, 44, 32, 34, 84,
2594 105,108,101, 58, 99,114,101, 97,116,101, 95,101,120,116,114,
2595 97, 40, 41, 34, 44, 10, 34, 50, 46, 54, 34, 41, 59, 10,101,
2596 100,105,116, 46, 99,114,101, 97,116,101, 95,114,111, 97,100,
2597 40,115,101,108,102, 44, 32,110, 97,109,101, 41, 10,101,110,
2598 100, 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,101,
2599 58,114,101,109,111,118,101, 95,101,120,116,114, 97, 40,110,
2600 97,109,101, 41, 10,101,100,105,116, 46,114,101,109,111,118,
2601 101, 95,101,120,116,114, 97, 40,115,101,108,102, 44, 32,110,
2602 97,109,101, 41, 10,101,110,100, 10,102,117,110, 99,116,105,
2603 111,110, 32, 84,105,108,101, 58, 99,104, 97,110,103,101, 95,
2604 116,101,114,114, 97,105,110, 40,116,101,114,114, 97,105,110,
2605 41, 10,101,100,105,116, 46, 99,104, 97,110,103,101, 95,116,
2606 101,114,114, 97,105,110, 40,115,101,108,102, 44, 32,116,101,
2607 114,114, 97,105,110, 41, 10,101,110,100, 10,102,117,110, 99,
2608 116,105,111,110, 32, 84,105,108,101, 58,117,110,108,101, 97,
2609 115,104, 95, 98, 97,114, 98, 97,114,105, 97,110,115, 40, 41,
2610 10,114,101,116,117,114,110, 32,101,100,105,116, 46,117,110,
2611 108,101, 97,115,104, 95, 98, 97,114, 98, 97,114,105, 97,110,
2612 115, 40,115,101,108,102, 41, 10,101,110,100, 10,102,117,110,
2613 99,116,105,111,110, 32, 84,105,108,101, 58,112,108, 97, 99,
2614 101, 95,112, 97,114,116,105,115, 97,110,115, 40,112,108, 97,
2615 121,101,114, 44, 32, 99,111,117,110,116, 44, 32,115,113, 95,
2616 114, 97,100,105,117,115, 41, 10,101,100,105,116, 46,112,108,
2617 97, 99,101, 95,112, 97,114,116,105,115, 97,110,115, 40,115,
2618 101,108,102, 44, 32,112,108, 97,121,101,114, 44, 32, 99,111,
2619 117,110,116, 44, 32,115,113, 95,114, 97,100,105,117,115, 41,
2620 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 84,
2621 105,108,101, 58,115,101,116, 95,108, 97, 98,101,108, 40,108,
2622 97, 98,101,108, 41, 10,101,100,105,116, 46,116,105,108,101,
2623 95,115,101,116, 95,108, 97, 98,101,108, 40,115,101,108,102,
2624 44, 32,108, 97, 98,101,108, 41, 10,101,110,100, 10,102,117,
2625 110, 99,116,105,111,110, 32, 84,105,108,101, 58,115,104,111,
2626 119, 40,112,108, 97,121,101,114, 41, 10,101,100,105,116, 46,
2627 116,105,108,101, 95,115,104,111,119, 40,115,101,108,102, 44,
2628 32,112,108, 97,121,101,114, 41, 10,101,110,100, 10,102,117,
2629 110, 99,116,105,111,110, 32, 84,105,108,101, 58,104,105,100,
2630 101, 40,112,108, 97,121,101,114, 41, 10,114,101,116,117,114,
2631 110, 32,101,100,105,116, 46,116,105,108,101, 95,104,105,100,
2632 101, 40,115,101,108,102, 44, 32,112,108, 97,121,101,114, 41,
2633 10,101,110,100,32
2634 };
2635 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
2637 } /* end of embedded lua code */
2638
2639 tolua_module(tolua_S,"Player",0);
2640 tolua_beginmodule(tolua_S,"Player");
2641 tolua_module(tolua_S,"properties",0);
2642 tolua_beginmodule(tolua_S,"properties");
2651
2652 { /* begin embedded lua code */
2653 static unsigned char B[] = {
2654 10,101,100,105,116, 46,112,108, 97,121,101,114, 95,108,111,
2655 115,101, 32, 61, 32, 80,108, 97,121,101,114, 46,108,111,115,
2656 101,32
2657 };
2658 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
2660 } /* end of embedded lua code */
2661
2662 tolua_module(tolua_S,"game",1);
2663 tolua_beginmodule(tolua_S,"game");
2668 tolua_module(tolua_S,"Nation_Type",0);
2669 tolua_beginmodule(tolua_S,"Nation_Type");
2674 tolua_module(tolua_S,"Unit",0);
2675 tolua_beginmodule(tolua_S,"Unit");
2680 return 1;
2681}
2682/* Open tolua function */
2684{
2686 lua_pushstring(tolua_S, "server");
2687 lua_call(tolua_S, 1, 0);
2688 return 1;
2689}
const char * api_server_setting_get(lua_State *L, const char *sett_name)
bool api_server_was_started(lua_State *L)
bool api_popup_image(lua_State *L, Player *pplayer, const char *tag)
int api_server_player_civilization_score(lua_State *L, Player *pplayer)
bool api_play_music(lua_State *L, Player *pplayer, const char *tag)
bool api_server_save(lua_State *L, const char *filename)
void api_counter_increase(lua_State *L, Counter *c, City *city)
void api_counter_zero(lua_State *L, Counter *c, City *city)
bool api_edit_perform_action_unit_vs_tile_extra(lua_State *L, Unit *punit, Action *paction, Tile *tgt, const char *sub_tgt)
bool api_edit_perform_action_unit_vs_tile(lua_State *L, Unit *punit, Action *paction, Tile *tgt)
void api_edit_climate_change(lua_State *L, enum climate_change_type type, int effect)
void api_edit_player_give_bulbs(lua_State *L, Player *pplayer, int amount, Tech_Type *tech)
void api_edit_unit_moving_allow(lua_State *L, Unit *punit)
void api_edit_remove_city(lua_State *L, City *pcity)
bool api_edit_trait_mod_set(lua_State *L, Player *pplayer, const char *tname, const int mod)
bool api_edit_unleash_barbarians(lua_State *L, Tile *ptile)
void api_edit_remove_building(lua_State *L, City *pcity, Building_Type *impr)
void api_edit_player_victory(lua_State *L, Player *pplayer)
void api_edit_create_extra(lua_State *L, Tile *ptile, const char *name)
Unit * api_edit_create_unit(lua_State *L, Player *pplayer, Tile *ptile, Unit_Type *ptype, int veteran_level, City *homecity, int moves_left)
bool api_edit_perform_action_unit_vs_unit(lua_State *L, Unit *punit, Action *paction, Unit *tgt)
void api_edit_player_add_history(lua_State *L, Player *pplayer, int amount)
Tech_Type * api_edit_give_technology(lua_State *L, Player *pplayer, Tech_Type *ptech, int cost, bool notify, const char *reason)
bool api_edit_perform_action_unit_vs_city_impr(lua_State *L, Unit *punit, Action *paction, City *tgt, Building_Type *sub_tgt)
void api_edit_create_building(lua_State *L, City *pcity, Building_Type *impr)
Unit * api_edit_create_unit_full(lua_State *L, Player *pplayer, Tile *ptile, Unit_Type *ptype, int veteran_level, City *homecity, int moves_left, int hp_left, Unit *ptransport)
bool api_edit_transfer_city(lua_State *L, City *pcity, Player *new_owner)
bool api_edit_change_terrain(lua_State *L, Tile *ptile, Terrain *pterr)
void api_edit_create_owned_extra(lua_State *L, Tile *ptile, const char *name, Player *pplayer)
void api_edit_tile_show(lua_State *L, Tile *ptile, Player *pplayer)
void api_edit_unit_kill(lua_State *L, Unit *punit, const char *reason, Player *killer)
bool api_edit_tile_hide(lua_State *L, Tile *ptile, Player *pplayer)
void api_edit_unit_turn(lua_State *L, Unit *punit, Direction dir)
void api_edit_place_partisans(lua_State *L, Tile *ptile, Player *pplayer, int count, int sq_radius)
void api_edit_remove_extra(lua_State *L, Tile *ptile, const char *name)
void api_edit_tile_set_label(lua_State *L, Tile *ptile, const char *label)
void api_edit_create_road(lua_State *L, Tile *ptile, const char *name)
bool api_edit_perform_action_unit_vs_city(lua_State *L, Unit *punit, Action *paction, City *tgt)
void api_edit_city_add_history(lua_State *L, City *pcity, int amount)
bool api_edit_create_city(lua_State *L, Player *pplayer, Tile *ptile, const char *name)
bool api_edit_unit_teleport(lua_State *L, Unit *punit, Tile *dest, Unit *embark_to, bool allow_disembark, bool conquer_city, bool conquer_extra, bool enter_hut, bool frighten_hut)
void api_edit_unit_moving_disallow(lua_State *L, Unit *punit)
bool api_edit_unit_upgrade(lua_State *L, Unit *punit, int vet_loss)
bool api_edit_unit_move(lua_State *L, Unit *punit, Tile *ptile, int movecost, Unit *embark_to, bool disembark, bool conquer_city, bool conquer_extra, bool enter_hut, bool frighten_hut)
void api_edit_change_infrapoints(lua_State *L, Player *pplayer, int amount)
bool api_edit_perform_action_unit_vs_self(lua_State *L, Unit *punit, Action *paction)
Player * api_edit_create_player(lua_State *L, const char *username, Nation_Type *pnation, const char *ai)
bool api_edit_unit_transform(lua_State *L, Unit *punit, Unit_Type *ptype, int vet_loss)
void api_edit_change_gold(lua_State *L, Player *pplayer, int amount)
Player * api_edit_civil_war(lua_State *L, Player *pplayer, int probability)
bool api_edit_perform_action_unit_vs_city_tech(lua_State *L, Unit *punit, Action *paction, City *tgt, Tech_Type *sub_tgt)
void api_edit_create_base(lua_State *L, Tile *ptile, const char *name, Player *pplayer)
climate_change_type
@ CLIMATE_CHANGE_GLOBAL_WARMING
@ CLIMATE_CHANGE_NUCLEAR_WINTER
void api_methods_player_lose(lua_State *L, Player *pplayer, Player *looter)
int api_methods_nation_trait_min(lua_State *L, Nation_Type *pnation, const char *tname)
int api_methods_player_tech_bulbs(lua_State *L, Player *pplayer, Tech_Type *tech)
int api_methods_player_trait_base(lua_State *L, Player *pplayer, const char *tname)
int api_methods_player_free_bulbs(lua_State *L, Player *pplayer)
int api_methods_player_trait(lua_State *L, Player *pplayer, const char *tname)
int api_methods_nation_trait_default(lua_State *L, Nation_Type *pnation, const char *tname)
int api_methods_player_trait_current_mod(lua_State *L, Player *pplayer, const char *tname)
int api_methods_nation_trait_max(lua_State *L, Nation_Type *pnation, const char *tname)
const char * api_luadata_get_str(lua_State *L, const char *field)
void api_notify_event_msg(lua_State *L, Player *pplayer, Tile *ptile, int event, const char *message)
void api_notify_embassies_msg(lua_State *L, Player *pplayer, Tile *ptile, int event, const char *message)
void api_notify_research_embassies_msg(lua_State *L, Player *pplayer, int event, const char *message)
void api_notify_research_msg(lua_State *L, Player *pplayer, bool include_plr, int event, const char *message)
static struct ai_type * self
Definition classicai.c:46
char * incite_cost
Definition comments.c:74
static void conquer_city(QVariant data1, QVariant data2)
Definition dialogs.cpp:1854
static void enter_hut(QVariant data1, QVariant data2)
Definition dialogs.cpp:2665
static void frighten_hut(QVariant data1, QVariant data2)
Definition dialogs.cpp:2695
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 cost
Definition dialogs_g.h:74
enum event_type event
Definition events.c:81
GType type
Definition repodlgs.c:1313
const char * name
Definition inputfile.c:127
enum direction8 Direction
const char * setting_name(const struct setting *pset)
Definition settings.c:3326
Definition city.h:320
Definition tile.h:50
Definition unit.h:140
#define bool
Definition support.h:71
static int tolua_server_edit_unit_kill00(lua_State *tolua_S)
static int tolua_server_edit_perform_action01(lua_State *tolua_S)
static int tolua_server_server_started00(lua_State *tolua_S)
TOLUA_API int tolua_server_open(lua_State *tolua_S)
static int tolua_server_server_play_music00(lua_State *tolua_S)
static int tolua_server_luadata_get_str00(lua_State *tolua_S)
static int tolua_server_edit_perform_action04(lua_State *tolua_S)
static int tolua_server_server_popup_image00(lua_State *tolua_S)
static int tolua_server_edit_create_unit00(lua_State *tolua_S)
static int tolua_server_edit_perform_action03(lua_State *tolua_S)
static int tolua_server_edit_tile_show00(lua_State *tolua_S)
static int tolua_server_Counter_increase00(lua_State *tolua_S)
static int tolua_server_edit_player_victory00(lua_State *tolua_S)
static int tolua_server_Unit_transform00(lua_State *tolua_S)
static int tolua_server_notify_embassies_msg00(lua_State *tolua_S)
#define game_server_multiresearch
static int tolua_server_edit_give_tech00(lua_State *tolua_S)
static int tolua_server_edit_place_partisans00(lua_State *tolua_S)
static int tolua_get_game_game_server_autoupgrade_veteran_loss(lua_State *tolua_S)
static int tolua_server_edit_create_building00(lua_State *tolua_S)
static int tolua_server_edit_climate_change00(lua_State *tolua_S)
static int tolua_server_Counter_zero00(lua_State *tolua_S)
static int tolua_server_edit_change_terrain00(lua_State *tolua_S)
static int tolua_server_edit_perform_action06(lua_State *tolua_S)
static int tolua_server_Player_bulbs_saved00(lua_State *tolua_S)
static int tolua_server_server_civilization_score00(lua_State *tolua_S)
static void tolua_reg_types(lua_State *tolua_S)
static int tolua_server_notify_research_msg00(lua_State *tolua_S)
static int tolua_server_edit_create_owned_extra00(lua_State *tolua_S)
static int tolua_server_Nation_Type_trait_max00(lua_State *tolua_S)
static int tolua_server_notify_research_embassies_msg00(lua_State *tolua_S)
static int tolua_server_Nation_Type_trait_min00(lua_State *tolua_S)
static int tolua_server_edit_remove_city00(lua_State *tolua_S)
int tolua_bnd_takeownership(lua_State *L)
static int tolua_server_Player_lose00(lua_State *tolua_S)
static int tolua_server_edit_add_player_history00(lua_State *tolua_S)
static int tolua_server_server_setting_get00(lua_State *tolua_S)
static int tolua_server_edit_remove_extra00(lua_State *tolua_S)
static int tolua_server_edit_create_city00(lua_State *tolua_S)
static int tolua_server_edit_create_player00(lua_State *tolua_S)
static int tolua_server_server_save00(lua_State *tolua_S)
static int tolua_server_Player_trait_current_mod00(lua_State *tolua_S)
#define game_server_upgrade_veteran_loss
static int tolua_server_edit_unleash_barbarians00(lua_State *tolua_S)
static int tolua_server_edit_tile_set_label00(lua_State *tolua_S)
static int tolua_server_edit_change_gold00(lua_State *tolua_S)
static int tolua_get_game_game_server_multiresearch(lua_State *tolua_S)
static int tolua_server_edit_perform_action02(lua_State *tolua_S)
static int tolua_server_Nation_Type_trait_default00(lua_State *tolua_S)
static int tolua_server_edit_transfer_city00(lua_State *tolua_S)
static int tolua_server_edit_add_city_history00(lua_State *tolua_S)
static int tolua_get_game_game_server_upgrade_veteran_loss(lua_State *tolua_S)
static int tolua_server_edit_create_extra00(lua_State *tolua_S)
static int tolua_server_edit_movement_disallow00(lua_State *tolua_S)
static int tolua_server_edit_create_unit_full00(lua_State *tolua_S)
static int tolua_server_edit_create_road00(lua_State *tolua_S)
static int tolua_server_edit_unit_teleport00(lua_State *tolua_S)
static int tolua_server_edit_perform_action00(lua_State *tolua_S)
static int tolua_server_edit_perform_action05(lua_State *tolua_S)
#define game_server_autoupgrade_veteran_loss
static int tolua_server_Player_trait_base00(lua_State *tolua_S)
static int tolua_server_edit_tile_hide00(lua_State *tolua_S)
static int tolua_server_edit_give_bulbs00(lua_State *tolua_S)
static int tolua_server_edit_trait_mod00(lua_State *tolua_S)
static int tolua_server_notify_event_msg00(lua_State *tolua_S)
static int tolua_server_edit_remove_building00(lua_State *tolua_S)
static int tolua_server_edit_civil_war00(lua_State *tolua_S)
LUALIB_API int luaopen_server(lua_State *tolua_S)
static int tolua_server_edit_movement_allow00(lua_State *tolua_S)
static int tolua_server_Player_trait00(lua_State *tolua_S)
static int tolua_server_edit_change_infrapoints00(lua_State *tolua_S)
static int tolua_server_edit_create_base00(lua_State *tolua_S)
static int tolua_server_Unit_upgrade00(lua_State *tolua_S)
static int tolua_server_Player_properties_free_bulbs00(lua_State *tolua_S)
static int tolua_server_edit_unit_move00(lua_State *tolua_S)
static int tolua_server_edit_unit_turn00(lua_State *tolua_S)