Freeciv-3.2
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,"Player");
42 tolua_usertype(tolua_S,"Tile");
43 tolua_usertype(tolua_S,"Terrain");
44 tolua_usertype(tolua_S,"Action");
45 tolua_usertype(tolua_S,"Nation_Type");
46 tolua_usertype(tolua_S,"Tech_Type");
47 tolua_usertype(tolua_S,"Direction");
48 tolua_usertype(tolua_S,"Counter");
49 tolua_usertype(tolua_S,"Unit");
50 tolua_usertype(tolua_S,"City");
51 tolua_usertype(tolua_S,"Unit_Type");
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_server_setting_get */
169{
170#ifndef TOLUA_RELEASE
172 if (
175 )
176 goto tolua_lerror;
177 else
178#endif
179 {
181 const char* setting_name = ((const char*) tolua_tostring(tolua_S,1,0));
182 {
183 const char* tolua_ret = (const char*) api_server_setting_get(L,setting_name);
184 tolua_pushstring(tolua_S,(const char*)tolua_ret);
185 }
186 }
187 return 1;
188#ifndef TOLUA_RELEASE
190 tolua_error(tolua_S,"#ferror in function 'get'.",&tolua_err);
191 return 0;
192#endif
193}
194
195/* function: api_counter_increase */
197{
198#ifndef TOLUA_RELEASE
200 if (
201 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
202 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
204 )
205 goto tolua_lerror;
206 else
207#endif
208 {
212 {
214 }
215 }
216 return 0;
217#ifndef TOLUA_RELEASE
219 tolua_error(tolua_S,"#ferror in function 'increase'.",&tolua_err);
220 return 0;
221#endif
222}
223
224/* function: api_counter_zero */
226{
227#ifndef TOLUA_RELEASE
229 if (
230 !tolua_isusertype(tolua_S,1,"Counter",0,&tolua_err) ||
231 !tolua_isusertype(tolua_S,2,"City",0,&tolua_err) ||
233 )
234 goto tolua_lerror;
235 else
236#endif
237 {
241 {
243 }
244 }
245 return 0;
246#ifndef TOLUA_RELEASE
248 tolua_error(tolua_S,"#ferror in function 'zero'.",&tolua_err);
249 return 0;
250#endif
251}
252
253/* function: api_notify_embassies_msg */
255{
256#ifndef TOLUA_RELEASE
258 if (
259 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
260 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
264 )
265 goto tolua_lerror;
266 else
267#endif
268 {
270 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
271 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
272 int event = ((int) tolua_tonumber(tolua_S,3,0));
273 const char* message = ((const char*) tolua_tostring(tolua_S,4,0));
274 {
276 }
277 }
278 return 0;
279#ifndef TOLUA_RELEASE
281 tolua_error(tolua_S,"#ferror in function 'embassies_msg'.",&tolua_err);
282 return 0;
283#endif
284}
285
286/* function: api_notify_research_msg */
288{
289#ifndef TOLUA_RELEASE
291 if (
292 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
297 )
298 goto tolua_lerror;
299 else
300#endif
301 {
303 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
304 bool include_plr = ((bool) tolua_toboolean(tolua_S,2,0));
305 int event = ((int) tolua_tonumber(tolua_S,3,0));
306 const char* message = ((const char*) tolua_tostring(tolua_S,4,0));
307 {
309 }
310 }
311 return 0;
312#ifndef TOLUA_RELEASE
314 tolua_error(tolua_S,"#ferror in function 'research_msg'.",&tolua_err);
315 return 0;
316#endif
317}
318
319/* function: api_notify_research_embassies_msg */
321{
322#ifndef TOLUA_RELEASE
324 if (
325 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
329 )
330 goto tolua_lerror;
331 else
332#endif
333 {
335 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
336 int event = ((int) tolua_tonumber(tolua_S,2,0));
337 const char* message = ((const char*) tolua_tostring(tolua_S,3,0));
338 {
340 }
341 }
342 return 0;
343#ifndef TOLUA_RELEASE
345 tolua_error(tolua_S,"#ferror in function 'research_embassies_msg'.",&tolua_err);
346 return 0;
347#endif
348}
349
350/* function: api_notify_event_msg */
352{
353#ifndef TOLUA_RELEASE
355 if (
356 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
357 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
361 )
362 goto tolua_lerror;
363 else
364#endif
365 {
367 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
368 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
369 int event = ((int) tolua_tonumber(tolua_S,3,0));
370 const char* message = ((const char*) tolua_tostring(tolua_S,4,0));
371 {
372 api_notify_event_msg(L,pplayer,ptile,event,message);
373 }
374 }
375 return 0;
376#ifndef TOLUA_RELEASE
378 tolua_error(tolua_S,"#ferror in function 'event_msg'.",&tolua_err);
379 return 0;
380#endif
381}
382
383/* function: api_edit_create_unit */
385{
386#ifndef TOLUA_RELEASE
388 if (
389 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
390 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
391 !tolua_isusertype(tolua_S,3,"Unit_Type",0,&tolua_err) ||
393 !tolua_isusertype(tolua_S,5,"City",0,&tolua_err) ||
396 )
397 goto tolua_lerror;
398 else
399#endif
400 {
402 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
403 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
406 City* homecity = ((City*) tolua_tousertype(tolua_S,5,0));
407 int moves_left = ((int) tolua_tonumber(tolua_S,6,0));
408 {
409 Unit* tolua_ret = (Unit*) api_edit_create_unit(L,pplayer,ptile,ptype,veteran_level,homecity,moves_left);
410 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
411 }
412 }
413 return 1;
414#ifndef TOLUA_RELEASE
416 tolua_error(tolua_S,"#ferror in function 'create_unit'.",&tolua_err);
417 return 0;
418#endif
419}
420
421/* function: api_edit_create_unit_full */
423{
424#ifndef TOLUA_RELEASE
426 if (
427 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
428 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
429 !tolua_isusertype(tolua_S,3,"Unit_Type",0,&tolua_err) ||
431 !tolua_isusertype(tolua_S,5,"City",0,&tolua_err) ||
434 !tolua_isusertype(tolua_S,8,"Unit",0,&tolua_err) ||
436 )
437 goto tolua_lerror;
438 else
439#endif
440 {
442 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
443 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
446 City* homecity = ((City*) tolua_tousertype(tolua_S,5,0));
447 int moves_left = ((int) tolua_tonumber(tolua_S,6,0));
448 int hp_left = ((int) tolua_tonumber(tolua_S,7,0));
450 {
451 Unit* tolua_ret = (Unit*) api_edit_create_unit_full(L,pplayer,ptile,ptype,veteran_level,homecity,moves_left,hp_left,ptransport);
452 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Unit");
453 }
454 }
455 return 1;
456#ifndef TOLUA_RELEASE
458 tolua_error(tolua_S,"#ferror in function 'create_unit_full'.",&tolua_err);
459 return 0;
460#endif
461}
462
463/* function: api_edit_unit_teleport */
465{
466#ifndef TOLUA_RELEASE
468 if (
469 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
470 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
471 !tolua_isusertype(tolua_S,3,"Unit",0,&tolua_err) ||
478 )
479 goto tolua_lerror;
480 else
481#endif
482 {
485 Tile* dest = ((Tile*) tolua_tousertype(tolua_S,2,0));
490 bool enter_hut = ((bool) tolua_toboolean(tolua_S,7,0));
492 {
495 }
496 }
497 return 1;
498#ifndef TOLUA_RELEASE
500 tolua_error(tolua_S,"#ferror in function 'unit_teleport'.",&tolua_err);
501 return 0;
502#endif
503}
504
505/* function: api_edit_unit_kill */
507{
508#ifndef TOLUA_RELEASE
510 if (
511 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
513 !tolua_isusertype(tolua_S,3,"Player",0,&tolua_err) ||
515 )
516 goto tolua_lerror;
517 else
518#endif
519 {
522 const char* reason = ((const char*) tolua_tostring(tolua_S,2,0));
524 {
526 }
527 }
528 return 0;
529#ifndef TOLUA_RELEASE
531 tolua_error(tolua_S,"#ferror in function 'unit_kill'.",&tolua_err);
532 return 0;
533#endif
534}
535
536/* function: api_edit_change_terrain */
538{
539#ifndef TOLUA_RELEASE
541 if (
542 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
543 !tolua_isusertype(tolua_S,2,"Terrain",0,&tolua_err) ||
545 )
546 goto tolua_lerror;
547 else
548#endif
549 {
551 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
553 {
556 }
557 }
558 return 1;
559#ifndef TOLUA_RELEASE
561 tolua_error(tolua_S,"#ferror in function 'change_terrain'.",&tolua_err);
562 return 0;
563#endif
564}
565
566/* function: api_edit_create_city */
568{
569#ifndef TOLUA_RELEASE
571 if (
572 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
573 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
576 )
577 goto tolua_lerror;
578 else
579#endif
580 {
582 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
583 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,2,0));
584 const char* name = ((const char*) tolua_tostring(tolua_S,3,0));
585 {
586 bool tolua_ret = (bool) api_edit_create_city(L,pplayer,ptile,name);
588 }
589 }
590 return 1;
591#ifndef TOLUA_RELEASE
593 tolua_error(tolua_S,"#ferror in function 'create_city'.",&tolua_err);
594 return 0;
595#endif
596}
597
598/* function: api_edit_transfer_city */
600{
601#ifndef TOLUA_RELEASE
603 if (
604 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
605 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
607 )
608 goto tolua_lerror;
609 else
610#endif
611 {
613 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
615 {
618 }
619 }
620 return 1;
621#ifndef TOLUA_RELEASE
623 tolua_error(tolua_S,"#ferror in function 'transfer_city'.",&tolua_err);
624 return 0;
625#endif
626}
627
628/* function: api_edit_remove_city */
630{
631#ifndef TOLUA_RELEASE
633 if (
634 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
636 )
637 goto tolua_lerror;
638 else
639#endif
640 {
642 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
643 {
644 api_edit_remove_city(L,pcity);
645 }
646 }
647 return 0;
648#ifndef TOLUA_RELEASE
650 tolua_error(tolua_S,"#ferror in function 'remove_city'.",&tolua_err);
651 return 0;
652#endif
653}
654
655/* function: api_edit_create_building */
657{
658#ifndef TOLUA_RELEASE
660 if (
661 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
662 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
664 )
665 goto tolua_lerror;
666 else
667#endif
668 {
670 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
672 {
673 api_edit_create_building(L,pcity,impr);
674 }
675 }
676 return 0;
677#ifndef TOLUA_RELEASE
679 tolua_error(tolua_S,"#ferror in function 'create_building'.",&tolua_err);
680 return 0;
681#endif
682}
683
684/* function: api_edit_remove_building */
686{
687#ifndef TOLUA_RELEASE
689 if (
690 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
691 !tolua_isusertype(tolua_S,2,"Building_Type",0,&tolua_err) ||
693 )
694 goto tolua_lerror;
695 else
696#endif
697 {
699 City* pcity = ((City*) tolua_tousertype(tolua_S,1,0));
701 {
702 api_edit_remove_building(L,pcity,impr);
703 }
704 }
705 return 0;
706#ifndef TOLUA_RELEASE
708 tolua_error(tolua_S,"#ferror in function 'remove_building'.",&tolua_err);
709 return 0;
710#endif
711}
712
713/* function: api_edit_create_owned_extra */
715{
716#ifndef TOLUA_RELEASE
718 if (
719 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
721 !tolua_isusertype(tolua_S,3,"Player",0,&tolua_err) ||
723 )
724 goto tolua_lerror;
725 else
726#endif
727 {
729 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
730 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
731 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,3,0));
732 {
733 api_edit_create_owned_extra(L,ptile,name,pplayer);
734 }
735 }
736 return 0;
737#ifndef TOLUA_RELEASE
739 tolua_error(tolua_S,"#ferror in function 'create_owned_extra'.",&tolua_err);
740 return 0;
741#endif
742}
743
744/* function: api_edit_create_extra */
746{
747#ifndef TOLUA_RELEASE
749 if (
750 !tolua_isusertype(tolua_S,1,"Tile",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 {
763 }
764 }
765 return 0;
766#ifndef TOLUA_RELEASE
768 tolua_error(tolua_S,"#ferror in function 'create_extra'.",&tolua_err);
769 return 0;
770#endif
771}
772
773/* function: api_edit_create_base */
775{
776#ifndef TOLUA_RELEASE
778 if (
779 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
781 !tolua_isusertype(tolua_S,3,"Player",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 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,3,0));
792 {
793 api_edit_create_base(L,ptile,name,pplayer);
794 }
795 }
796 return 0;
797#ifndef TOLUA_RELEASE
799 tolua_error(tolua_S,"#ferror in function 'create_base'.",&tolua_err);
800 return 0;
801#endif
802}
803
804/* function: api_edit_create_road */
806{
807#ifndef TOLUA_RELEASE
809 if (
810 !tolua_isusertype(tolua_S,1,"Tile",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 {
823 }
824 }
825 return 0;
826#ifndef TOLUA_RELEASE
828 tolua_error(tolua_S,"#ferror in function 'create_road'.",&tolua_err);
829 return 0;
830#endif
831}
832
833/* function: api_edit_remove_extra */
835{
836#ifndef TOLUA_RELEASE
838 if (
839 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
842 )
843 goto tolua_lerror;
844 else
845#endif
846 {
848 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
849 const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
850 {
852 }
853 }
854 return 0;
855#ifndef TOLUA_RELEASE
857 tolua_error(tolua_S,"#ferror in function 'remove_extra'.",&tolua_err);
858 return 0;
859#endif
860}
861
862/* function: api_edit_tile_set_label */
864{
865#ifndef TOLUA_RELEASE
867 if (
868 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
871 )
872 goto tolua_lerror;
873 else
874#endif
875 {
877 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
878 const char* label = ((const char*) tolua_tostring(tolua_S,2,0));
879 {
880 api_edit_tile_set_label(L,ptile,label);
881 }
882 }
883 return 0;
884#ifndef TOLUA_RELEASE
886 tolua_error(tolua_S,"#ferror in function 'tile_set_label'.",&tolua_err);
887 return 0;
888#endif
889}
890
891/* function: api_edit_tile_show */
893{
894#ifndef TOLUA_RELEASE
896 if (
897 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
898 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
900 )
901 goto tolua_lerror;
902 else
903#endif
904 {
906 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
907 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
908 {
909 api_edit_tile_show(L,ptile,pplayer);
910 }
911 }
912 return 0;
913#ifndef TOLUA_RELEASE
915 tolua_error(tolua_S,"#ferror in function 'tile_show'.",&tolua_err);
916 return 0;
917#endif
918}
919
920/* function: api_edit_tile_hide */
922{
923#ifndef TOLUA_RELEASE
925 if (
926 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
927 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
929 )
930 goto tolua_lerror;
931 else
932#endif
933 {
935 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
936 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
937 {
938 bool tolua_ret = (bool) api_edit_tile_hide(L,ptile,pplayer);
940 }
941 }
942 return 1;
943#ifndef TOLUA_RELEASE
945 tolua_error(tolua_S,"#ferror in function 'tile_hide'.",&tolua_err);
946 return 0;
947#endif
948}
949
950/* function: api_edit_create_player */
952{
953#ifndef TOLUA_RELEASE
955 if (
957 !tolua_isusertype(tolua_S,2,"Nation_Type",0,&tolua_err) ||
960 )
961 goto tolua_lerror;
962 else
963#endif
964 {
966 const char* username = ((const char*) tolua_tostring(tolua_S,1,0));
968 const char* ai = ((const char*) tolua_tostring(tolua_S,3,0));
969 {
970 Player* tolua_ret = (Player*) api_edit_create_player(L,username,nation,ai);
971 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
972 }
973 }
974 return 1;
975#ifndef TOLUA_RELEASE
977 tolua_error(tolua_S,"#ferror in function 'create_player'.",&tolua_err);
978 return 0;
979#endif
980}
981
982/* function: api_edit_change_gold */
984{
985#ifndef TOLUA_RELEASE
987 if (
988 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
991 )
992 goto tolua_lerror;
993 else
994#endif
995 {
997 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
998 int amount = ((int) tolua_tonumber(tolua_S,2,0));
999 {
1000 api_edit_change_gold(L,pplayer,amount);
1001 }
1002 }
1003 return 0;
1004#ifndef TOLUA_RELEASE
1006 tolua_error(tolua_S,"#ferror in function 'change_gold'.",&tolua_err);
1007 return 0;
1008#endif
1009}
1010
1011/* function: api_edit_change_infrapoints */
1013{
1014#ifndef TOLUA_RELEASE
1016 if (
1017 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1020 )
1021 goto tolua_lerror;
1022 else
1023#endif
1024 {
1025 lua_State* L = tolua_S;
1026 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1027 int amount = ((int) tolua_tonumber(tolua_S,2,0));
1028 {
1030 }
1031 }
1032 return 0;
1033#ifndef TOLUA_RELEASE
1035 tolua_error(tolua_S,"#ferror in function 'change_infrapoints'.",&tolua_err);
1036 return 0;
1037#endif
1038}
1039
1040/* function: api_edit_give_technology */
1042{
1043#ifndef TOLUA_RELEASE
1045 if (
1046 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1047 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1052 )
1053 goto tolua_lerror;
1054 else
1055#endif
1056 {
1057 lua_State* L = tolua_S;
1058 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1060 int cost = ((int) tolua_tonumber(tolua_S,3,0));
1061 bool notify = ((bool) tolua_toboolean(tolua_S,4,0));
1062 const char* reason = ((const char*) tolua_tostring(tolua_S,5,0));
1063 {
1065 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Tech_Type");
1066 }
1067 }
1068 return 1;
1069#ifndef TOLUA_RELEASE
1071 tolua_error(tolua_S,"#ferror in function 'give_tech'.",&tolua_err);
1072 return 0;
1073#endif
1074}
1075
1076/* function: api_edit_trait_mod_set */
1078{
1079#ifndef TOLUA_RELEASE
1081 if (
1082 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1086 )
1087 goto tolua_lerror;
1088 else
1089#endif
1090 {
1091 lua_State* L = tolua_S;
1092 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1093 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
1094 const int mod = ((const int) tolua_tonumber(tolua_S,3,0));
1095 {
1096 bool tolua_ret = (bool) api_edit_trait_mod_set(L,pplayer,tname,mod);
1098 }
1099 }
1100 return 1;
1101#ifndef TOLUA_RELEASE
1103 tolua_error(tolua_S,"#ferror in function 'trait_mod'.",&tolua_err);
1104 return 0;
1105#endif
1106}
1107
1108/* function: api_edit_unleash_barbarians */
1110{
1111#ifndef TOLUA_RELEASE
1113 if (
1114 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
1116 )
1117 goto tolua_lerror;
1118 else
1119#endif
1120 {
1121 lua_State* L = tolua_S;
1122 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
1123 {
1126 }
1127 }
1128 return 1;
1129#ifndef TOLUA_RELEASE
1131 tolua_error(tolua_S,"#ferror in function 'unleash_barbarians'.",&tolua_err);
1132 return 0;
1133#endif
1134}
1135
1136/* function: api_edit_place_partisans */
1138{
1139#ifndef TOLUA_RELEASE
1141 if (
1142 !tolua_isusertype(tolua_S,1,"Tile",0,&tolua_err) ||
1143 !tolua_isusertype(tolua_S,2,"Player",0,&tolua_err) ||
1147 )
1148 goto tolua_lerror;
1149 else
1150#endif
1151 {
1152 lua_State* L = tolua_S;
1153 Tile* ptile = ((Tile*) tolua_tousertype(tolua_S,1,0));
1154 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,2,0));
1155 int count = ((int) tolua_tonumber(tolua_S,3,0));
1156 int sq_radius = ((int) tolua_tonumber(tolua_S,4,0));
1157 {
1158 api_edit_place_partisans(L,ptile,pplayer,count,sq_radius);
1159 }
1160 }
1161 return 0;
1162#ifndef TOLUA_RELEASE
1164 tolua_error(tolua_S,"#ferror in function 'place_partisans'.",&tolua_err);
1165 return 0;
1166#endif
1167}
1168
1169/* function: api_edit_climate_change */
1171{
1172#ifndef TOLUA_RELEASE
1174 if (
1178 )
1179 goto tolua_lerror;
1180 else
1181#endif
1182 {
1183 lua_State* L = tolua_S;
1185 int effect = ((int) tolua_tonumber(tolua_S,2,0));
1186 {
1188 }
1189 }
1190 return 0;
1191#ifndef TOLUA_RELEASE
1193 tolua_error(tolua_S,"#ferror in function 'climate_change'.",&tolua_err);
1194 return 0;
1195#endif
1196}
1197
1198/* function: api_edit_civil_war */
1200{
1201#ifndef TOLUA_RELEASE
1203 if (
1204 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1207 )
1208 goto tolua_lerror;
1209 else
1210#endif
1211 {
1212 lua_State* L = tolua_S;
1213 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1214 int probability = ((int) tolua_tonumber(tolua_S,2,0));
1215 {
1217 tolua_pushusertype(tolua_S,(void*)tolua_ret,"Player");
1218 }
1219 }
1220 return 1;
1221#ifndef TOLUA_RELEASE
1223 tolua_error(tolua_S,"#ferror in function 'civil_war'.",&tolua_err);
1224 return 0;
1225#endif
1226}
1227
1228/* function: api_edit_unit_turn */
1230{
1231#ifndef TOLUA_RELEASE
1233 if (
1234 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1235 !tolua_isusertype(tolua_S,2,"Direction",0,&tolua_err) ||
1237 )
1238 goto tolua_lerror;
1239 else
1240#endif
1241 {
1242 lua_State* L = tolua_S;
1243 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1245 {
1247 }
1248 }
1249 return 0;
1250#ifndef TOLUA_RELEASE
1252 tolua_error(tolua_S,"#ferror in function 'unit_turn'.",&tolua_err);
1253 return 0;
1254#endif
1255}
1256
1257/* function: api_edit_player_victory */
1259{
1260#ifndef TOLUA_RELEASE
1262 if (
1263 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1265 )
1266 goto tolua_lerror;
1267 else
1268#endif
1269 {
1270 lua_State* L = tolua_S;
1272 {
1274 }
1275 }
1276 return 0;
1277#ifndef TOLUA_RELEASE
1279 tolua_error(tolua_S,"#ferror in function 'player_victory'.",&tolua_err);
1280 return 0;
1281#endif
1282}
1283
1284/* function: api_edit_unit_move */
1286{
1287#ifndef TOLUA_RELEASE
1289 if (
1290 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1291 !tolua_isusertype(tolua_S,2,"Tile",0,&tolua_err) ||
1293 !tolua_isusertype(tolua_S,4,"Unit",0,&tolua_err) ||
1300 )
1301 goto tolua_lerror;
1302 else
1303#endif
1304 {
1305 lua_State* L = tolua_S;
1306 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
1308 int movecost = ((int) tolua_tonumber(tolua_S,3,0));
1311 bool conquer_city = ((bool) tolua_toboolean(tolua_S,6,0));
1312 bool conquer_extra = ((bool) tolua_toboolean(tolua_S,7,0));
1313 bool enter_hut = ((bool) tolua_toboolean(tolua_S,8,0));
1314 bool frighten_hut = ((bool) tolua_toboolean(tolua_S,9,0));
1315 {
1318 }
1319 }
1320 return 1;
1321#ifndef TOLUA_RELEASE
1323 tolua_error(tolua_S,"#ferror in function 'unit_move'.",&tolua_err);
1324 return 0;
1325#endif
1326}
1327
1328/* function: api_edit_unit_moving_disallow */
1330{
1331#ifndef TOLUA_RELEASE
1333 if (
1334 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1336 )
1337 goto tolua_lerror;
1338 else
1339#endif
1340 {
1341 lua_State* L = tolua_S;
1342 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
1343 {
1345 }
1346 }
1347 return 0;
1348#ifndef TOLUA_RELEASE
1350 tolua_error(tolua_S,"#ferror in function 'movement_disallow'.",&tolua_err);
1351 return 0;
1352#endif
1353}
1354
1355/* function: api_edit_unit_moving_allow */
1357{
1358#ifndef TOLUA_RELEASE
1360 if (
1361 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1363 )
1364 goto tolua_lerror;
1365 else
1366#endif
1367 {
1368 lua_State* L = tolua_S;
1369 Unit* self = ((Unit*) tolua_tousertype(tolua_S,1,0));
1370 {
1372 }
1373 }
1374 return 0;
1375#ifndef TOLUA_RELEASE
1377 tolua_error(tolua_S,"#ferror in function 'movement_allow'.",&tolua_err);
1378 return 0;
1379#endif
1380}
1381
1382/* function: api_edit_perform_action_unit_vs_city */
1384{
1385#ifndef TOLUA_RELEASE
1387 if (
1388 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1389 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1390 !tolua_isusertype(tolua_S,3,"City",0,&tolua_err) ||
1392 )
1393 goto tolua_lerror;
1394 else
1395#endif
1396 {
1397 lua_State* L = tolua_S;
1398 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1400 City* tgt = ((City*) tolua_tousertype(tolua_S,3,0));
1401 {
1404 }
1405 }
1406 return 1;
1407#ifndef TOLUA_RELEASE
1409 tolua_error(tolua_S,"#ferror in function 'perform_action'.",&tolua_err);
1410 return 0;
1411#endif
1412}
1413
1414/* function: api_edit_perform_action_unit_vs_city_impr */
1416{
1418 if (
1419 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1420 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1421 !tolua_isusertype(tolua_S,3,"City",0,&tolua_err) ||
1422 !tolua_isusertype(tolua_S,4,"Building_Type",0,&tolua_err) ||
1424 )
1425 goto tolua_lerror;
1426 else
1427 {
1428 lua_State* L = tolua_S;
1429 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1431 City* tgt = ((City*) tolua_tousertype(tolua_S,3,0));
1433 {
1436 }
1437 }
1438 return 1;
1441}
1442
1443/* function: api_edit_perform_action_unit_vs_city_tech */
1445{
1447 if (
1448 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1449 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1450 !tolua_isusertype(tolua_S,3,"City",0,&tolua_err) ||
1451 !tolua_isusertype(tolua_S,4,"Tech_Type",0,&tolua_err) ||
1453 )
1454 goto tolua_lerror;
1455 else
1456 {
1457 lua_State* L = tolua_S;
1458 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1460 City* tgt = ((City*) tolua_tousertype(tolua_S,3,0));
1462 {
1465 }
1466 }
1467 return 1;
1470}
1471
1472/* function: api_edit_perform_action_unit_vs_unit */
1474{
1476 if (
1477 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1478 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1479 !tolua_isusertype(tolua_S,3,"Unit",0,&tolua_err) ||
1481 )
1482 goto tolua_lerror;
1483 else
1484 {
1485 lua_State* L = tolua_S;
1486 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1488 Unit* tgt = ((Unit*) tolua_tousertype(tolua_S,3,0));
1489 {
1492 }
1493 }
1494 return 1;
1497}
1498
1499/* function: api_edit_perform_action_unit_vs_tile */
1501{
1503 if (
1504 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1505 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1506 !tolua_isusertype(tolua_S,3,"Tile",0,&tolua_err) ||
1508 )
1509 goto tolua_lerror;
1510 else
1511 {
1512 lua_State* L = tolua_S;
1513 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1515 Tile* tgt = ((Tile*) tolua_tousertype(tolua_S,3,0));
1516 {
1519 }
1520 }
1521 return 1;
1524}
1525
1526/* function: api_edit_perform_action_unit_vs_tile_extra */
1528{
1530 if (
1531 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1532 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1533 !tolua_isusertype(tolua_S,3,"Tile",0,&tolua_err) ||
1536 )
1537 goto tolua_lerror;
1538 else
1539 {
1540 lua_State* L = tolua_S;
1541 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1543 Tile* tgt = ((Tile*) tolua_tousertype(tolua_S,3,0));
1544 const char* sub_tgt = ((const char*) tolua_tostring(tolua_S,4,0));
1545 {
1548 }
1549 }
1550 return 1;
1553}
1554
1555/* function: api_edit_perform_action_unit_vs_self */
1557{
1559 if (
1560 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1561 !tolua_isusertype(tolua_S,2,"Action",0,&tolua_err) ||
1563 )
1564 goto tolua_lerror;
1565 else
1566 {
1567 lua_State* L = tolua_S;
1568 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
1570 {
1573 }
1574 }
1575 return 1;
1578}
1579
1580/* function: api_edit_city_add_history */
1582{
1583#ifndef TOLUA_RELEASE
1585 if (
1586 !tolua_isusertype(tolua_S,1,"City",0,&tolua_err) ||
1589 )
1590 goto tolua_lerror;
1591 else
1592#endif
1593 {
1594 lua_State* L = tolua_S;
1595 City* self = ((City*) tolua_tousertype(tolua_S,1,0));
1596 int amount = ((int) tolua_tonumber(tolua_S,2,0));
1597 {
1599 }
1600 }
1601 return 0;
1602#ifndef TOLUA_RELEASE
1604 tolua_error(tolua_S,"#ferror in function 'add_city_history'.",&tolua_err);
1605 return 0;
1606#endif
1607}
1608
1609/* function: api_edit_player_add_history */
1611{
1612#ifndef TOLUA_RELEASE
1614 if (
1615 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1618 )
1619 goto tolua_lerror;
1620 else
1621#endif
1622 {
1623 lua_State* L = tolua_S;
1625 int amount = ((int) tolua_tonumber(tolua_S,2,0));
1626 {
1628 }
1629 }
1630 return 0;
1631#ifndef TOLUA_RELEASE
1633 tolua_error(tolua_S,"#ferror in function 'add_player_history'.",&tolua_err);
1634 return 0;
1635#endif
1636}
1637
1638/* function: api_edit_player_give_bulbs */
1640{
1641#ifndef TOLUA_RELEASE
1643 if (
1644 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1646 !tolua_isusertype(tolua_S,3,"Tech_Type",1,&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));
1657 {
1659 }
1660 }
1661 return 0;
1662#ifndef TOLUA_RELEASE
1664 tolua_error(tolua_S,"#ferror in function 'give_bulbs'.",&tolua_err);
1665 return 0;
1666#endif
1667}
1668
1669/* function: api_luadata_get_str */
1671{
1672#ifndef TOLUA_RELEASE
1674 if (
1677 )
1678 goto tolua_lerror;
1679 else
1680#endif
1681 {
1682 lua_State* L = tolua_S;
1683 const char* field = ((const char*) tolua_tostring(tolua_S,1,0));
1684 {
1685 const char* tolua_ret = (const char*) api_luadata_get_str(L,field);
1686 tolua_pushstring(tolua_S,(const char*)tolua_ret);
1687 }
1688 }
1689 return 1;
1690#ifndef TOLUA_RELEASE
1692 tolua_error(tolua_S,"#ferror in function 'get_str'.",&tolua_err);
1693 return 0;
1694#endif
1695}
1696
1697/* function: api_methods_player_free_bulbs */
1699{
1700#ifndef TOLUA_RELEASE
1702 if (
1703 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1705 )
1706 goto tolua_lerror;
1707 else
1708#endif
1709 {
1710 lua_State* L = tolua_S;
1711 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1712 {
1715 }
1716 }
1717 return 1;
1718#ifndef TOLUA_RELEASE
1720 tolua_error(tolua_S,"#ferror in function 'free_bulbs'.",&tolua_err);
1721 return 0;
1722#endif
1723}
1724
1725/* function: api_methods_player_trait */
1727{
1728#ifndef TOLUA_RELEASE
1730 if (
1731 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1734 )
1735 goto tolua_lerror;
1736 else
1737#endif
1738 {
1739 lua_State* L = tolua_S;
1740 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1741 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
1742 {
1743 int tolua_ret = (int) api_methods_player_trait(L,pplayer,tname);
1745 }
1746 }
1747 return 1;
1748#ifndef TOLUA_RELEASE
1750 tolua_error(tolua_S,"#ferror in function 'trait'.",&tolua_err);
1751 return 0;
1752#endif
1753}
1754
1755/* function: api_methods_player_trait_base */
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 {
1775 }
1776 }
1777 return 1;
1778#ifndef TOLUA_RELEASE
1780 tolua_error(tolua_S,"#ferror in function 'trait_base'.",&tolua_err);
1781 return 0;
1782#endif
1783}
1784
1785/* function: api_methods_player_trait_current_mod */
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_current_mod'.",&tolua_err);
1811 return 0;
1812#endif
1813}
1814
1815/* function: api_methods_player_lose */
1817{
1818#ifndef TOLUA_RELEASE
1820 if (
1821 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1822 !tolua_isusertype(tolua_S,2,"Player",1,&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));
1832 {
1834 }
1835 }
1836 return 0;
1837#ifndef TOLUA_RELEASE
1839 tolua_error(tolua_S,"#ferror in function 'lose'.",&tolua_err);
1840 return 0;
1841#endif
1842}
1843
1844/* function: api_methods_player_tech_bulbs */
1846{
1847#ifndef TOLUA_RELEASE
1849 if (
1850 !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
1851 !tolua_isusertype(tolua_S,2,"Tech_Type",0,&tolua_err) ||
1853 )
1854 goto tolua_lerror;
1855 else
1856#endif
1857 {
1858 lua_State* L = tolua_S;
1859 Player* pplayer = ((Player*) tolua_tousertype(tolua_S,1,0));
1860 Tech_Type* tech = ((Tech_Type*) tolua_tousertype(tolua_S,2,0));
1861 {
1862 int tolua_ret = (int) api_methods_player_tech_bulbs(L,pplayer,tech);
1864 }
1865 }
1866 return 1;
1867#ifndef TOLUA_RELEASE
1869 tolua_error(tolua_S,"#ferror in function 'bulbs_saved'.",&tolua_err);
1870 return 0;
1871#endif
1872}
1873
1874/* get function: game_server_autoupgrade_veteran_loss */
1880
1881/* get function: game_server_upgrade_veteran_loss */
1887
1888/* get function: game_server_multiresearch */
1894
1895/* function: api_methods_nation_trait_min */
1897{
1898#ifndef TOLUA_RELEASE
1900 if (
1901 !tolua_isusertype(tolua_S,1,"Nation_Type",0,&tolua_err) ||
1904 )
1905 goto tolua_lerror;
1906 else
1907#endif
1908 {
1909 lua_State* L = tolua_S;
1910 Nation_Type* pnation = ((Nation_Type*) tolua_tousertype(tolua_S,1,0));
1911 const char* tname = ((const char*) tolua_tostring(tolua_S,2,0));
1912 {
1915 }
1916 }
1917 return 1;
1918#ifndef TOLUA_RELEASE
1920 tolua_error(tolua_S,"#ferror in function 'trait_min'.",&tolua_err);
1921 return 0;
1922#endif
1923}
1924
1925/* function: api_methods_nation_trait_max */
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_max'.",&tolua_err);
1951 return 0;
1952#endif
1953}
1954
1955/* function: api_methods_nation_trait_default */
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_default'.",&tolua_err);
1981 return 0;
1982#endif
1983}
1984
1985/* function: api_edit_unit_upgrade */
1987{
1988#ifndef TOLUA_RELEASE
1990 if (
1991 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
1994 )
1995 goto tolua_lerror;
1996 else
1997#endif
1998 {
1999 lua_State* L = tolua_S;
2000 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2001 int vet_loss = ((int) tolua_tonumber(tolua_S,2,0));
2002 {
2005 }
2006 }
2007 return 1;
2008#ifndef TOLUA_RELEASE
2010 tolua_error(tolua_S,"#ferror in function 'upgrade'.",&tolua_err);
2011 return 0;
2012#endif
2013}
2014
2015/* function: api_edit_unit_transform */
2017{
2018#ifndef TOLUA_RELEASE
2020 if (
2021 !tolua_isusertype(tolua_S,1,"Unit",0,&tolua_err) ||
2022 !tolua_isusertype(tolua_S,2,"Unit_Type",0,&tolua_err) ||
2025 )
2026 goto tolua_lerror;
2027 else
2028#endif
2029 {
2030 lua_State* L = tolua_S;
2031 Unit* punit = ((Unit*) tolua_tousertype(tolua_S,1,0));
2033 int vet_loss = ((int) tolua_tonumber(tolua_S,3,0));
2034 {
2037 }
2038 }
2039 return 1;
2040#ifndef TOLUA_RELEASE
2042 tolua_error(tolua_S,"#ferror in function 'transform'.",&tolua_err);
2043 return 0;
2044#endif
2045}
2046
2047/* Open lib function */
2049{
2054 tolua_module(tolua_S,"server",0);
2055 tolua_beginmodule(tolua_S,"server");
2060 tolua_module(tolua_S,"setting",0);
2061 tolua_beginmodule(tolua_S,"setting");
2065 tolua_module(tolua_S,"Counter",0);
2066 tolua_beginmodule(tolua_S,"Counter");
2070 tolua_module(tolua_S,"notify",0);
2071 tolua_beginmodule(tolua_S,"notify");
2077
2078 { /* begin embedded lua code */
2079 static unsigned char B[] = {
2080 10,102,117,110, 99,116,105,111,110, 32,110,111,116,105,102,
2081 121, 46, 97,108,108, 40, 46, 46, 46, 41, 10,108,111, 99, 97,
2082 108, 32, 97,114,103, 32, 61, 32,116, 97, 98,108,101, 46,112,
2083 97, 99,107, 40, 46, 46, 46, 41, 59, 10,110,111,116,105,102,
2084 121, 46,101,118,101,110,116, 95,109,115,103, 40,110,105,108,
2085 44, 32,110,105,108, 44, 32, 69, 46, 83, 67, 82, 73, 80, 84,
2086 44, 32,115,116,114,105,110,103, 46,102,111,114,109, 97,116,
2087 40,116, 97, 98,108,101, 46,117,110,112, 97, 99,107, 40, 97,
2088 114,103, 41, 41, 41, 10,101,110,100, 10,102,117,110, 99,116,
2089 105,111,110, 32,110,111,116,105,102,121, 46,112,108, 97,121,
2090 101,114, 40,112,108, 97,121,101,114, 44, 32, 46, 46, 46, 41,
2091 10,108,111, 99, 97,108, 32, 97,114,103, 32, 61, 32,116, 97,
2092 98,108,101, 46,112, 97, 99,107, 40, 46, 46, 46, 41, 59, 10,
2093 110,111,116,105,102,121, 46,101,118,101,110,116, 95,109,115,
2094 103, 40,112,108, 97,121,101,114, 44, 32,110,105,108, 44, 32,
2095 69, 46, 83, 67, 82, 73, 80, 84, 44, 32,115,116,114,105,110,
2096 103, 46,102,111,114,109, 97,116, 40,116, 97, 98,108,101, 46,
2097 117,110,112, 97, 99,107, 40, 97,114,103, 41, 41, 41, 10,101,
2098 110,100, 10,102,117,110, 99,116,105,111,110, 32,110,111,116,
2099 105,102,121, 46,101,118,101,110,116, 40,112,108, 97,121,101,
2100 114, 44, 32,116,105,108,101, 44, 32,101,118,101,110,116, 44,
2101 32, 46, 46, 46, 41, 10,108,111, 99, 97,108, 32, 97,114,103,
2102 32, 61, 32,116, 97, 98,108,101, 46,112, 97, 99,107, 40, 46,
2103 46, 46, 41, 59, 10,110,111,116,105,102,121, 46,101,118,101,
2104 110,116, 95,109,115,103, 40,112,108, 97,121,101,114, 44, 32,
2105 116,105,108,101, 44, 32,101,118,101,110,116, 44, 32,115,116,
2106 114,105,110,103, 46,102,111,114,109, 97,116, 40,116, 97, 98,
2107 108,101, 46,117,110,112, 97, 99,107, 40, 97,114,103, 41, 41,
2108 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2109 110,111,116,105,102,121, 46,101,109, 98, 97,115,115,105,101,
2110 115, 40,112,108, 97,121,101,114, 44, 32,112,116,105,108,101,
2111 44, 32,101,118,101,110,116, 44, 32, 46, 46, 46, 41, 10,108,
2112 111, 99, 97,108, 32, 97,114,103, 32, 61, 32,116, 97, 98,108,
2113 101, 46,112, 97, 99,107, 40, 46, 46, 46, 41, 59, 10,110,111,
2114 116,105,102,121, 46,101,109, 98, 97,115,115,105,101,115, 95,
2115 109,115,103, 40,112,108, 97,121,101,114, 44, 32,112,116,105,
2116 108,101, 44, 32,101,118,101,110,116, 44, 32,115,116,114,105,
2117 110,103, 46,102,111,114,109, 97,116, 40,116, 97, 98,108,101,
2118 46,117,110,112, 97, 99,107, 40, 97,114,103, 41, 41, 41, 10,
2119 101,110,100, 10,102,117,110, 99,116,105,111,110, 32,110,111,
2120 116,105,102,121, 46,114,101,115,101, 97,114, 99,104, 40,112,
2121 108, 97,121,101,114, 44, 32,115,101,108,102,109,115,103, 44,
2122 32,101,118,101,110,116, 44, 32, 46, 46, 46, 41, 10,108,111,
2123 99, 97,108, 32, 97,114,103, 32, 61, 32,116, 97, 98,108,101,
2124 46,112, 97, 99,107, 40, 46, 46, 46, 41, 59, 10,110,111,116,
2125 105,102,121, 46,114,101,115,101, 97,114, 99,104, 95,109,115,
2126 103, 40,112,108, 97,121,101,114, 44, 32,115,101,108,102,109,
2127 115,103, 44, 32,101,118,101,110,116, 44, 32,115,116,114,105,
2128 110,103, 46,102,111,114,109, 97,116, 40,116, 97, 98,108,101,
2129 46,117,110,112, 97, 99,107, 40, 97,114,103, 41, 41, 41, 10,
2130 101,110,100, 10,102,117,110, 99,116,105,111,110, 32,110,111,
2131 116,105,102,121, 46,114,101,115,101, 97,114, 99,104, 95,101,
2132 109, 98, 97,115,115,105,101,115, 40,112,108, 97,121,101,114,
2133 44, 32,101,118,101,110,116, 44, 32, 46, 46, 46, 41, 10,108,
2134 111, 99, 97,108, 32, 97,114,103, 32, 61, 32,116, 97, 98,108,
2135 101, 46,112, 97, 99,107, 40, 46, 46, 46, 41, 59, 10,110,111,
2136 116,105,102,121, 46,114,101,115,101, 97,114, 99,104, 95,101,
2137 109, 98, 97,115,115,105,101,115, 95,109,115,103, 40,112,108,
2138 97,121,101,114, 44, 32,101,118,101,110,116, 44, 32,115,116,
2139 114,105,110,103, 46,102,111,114,109, 97,116, 40,116, 97, 98,
2140 108,101, 46,117,110,112, 97, 99,107, 40, 97,114,103, 41, 41,
2141 41, 10,101,110,100,32
2142 };
2143 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
2145 } /* end of embedded lua code */
2146
2147 tolua_module(tolua_S,"edit",0);
2148 tolua_beginmodule(tolua_S,"edit");
2194 tolua_module(tolua_S,"luadata",0);
2195 tolua_beginmodule(tolua_S,"luadata");
2198
2199 { /* begin embedded lua code */
2200 static unsigned char B[] = {
2201 10,102,117,110, 99,116,105,111,110, 32, 99,114,101, 97,116,
2202 101, 95,117,110,105,116, 40,112,108, 97,121,101,114, 44, 32,
2203 116,105,108,101, 44, 32,117,116,121,112,101, 44, 32,118,101,
2204 116,101,114, 97,110, 95,108,101,118,101,108, 44, 32,104,111,
2205 109,101, 99,105,116,121, 44, 32,109,111,118,101,115, 95,108,
2206 101,102,116, 41, 10,108,111,103, 46,100,101,112,114,101, 99,
2207 97,116,105,111,110, 95,119, 97,114,110,105,110,103, 40, 34,
2208 99,114,101, 97,116,101, 95,117,110,105,116, 40, 41, 34, 44,
2209 32, 34,101,100,105,116, 46, 99,114,101, 97,116,101, 95,117,
2210 110,105,116, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41, 59,
2211 10,114,101,116,117,114,110, 32,101,100,105,116, 46, 99,114,
2212 101, 97,116,101, 95,117,110,105,116, 40,112,108, 97,121,101,
2213 114, 44, 32,116,105,108,101, 44, 32,117,116,121,112,101, 44,
2214 32,118,101,116,101,114, 97,110, 95,108,101,118,101,108, 44,
2215 32,104,111,109,101, 99,105,116,121, 44, 10,109,111,118,101,
2216 115, 95,108,101,102,116, 41, 10,101,110,100, 10,102,117,110,
2217 99,116,105,111,110, 32, 99,114,101, 97,116,101, 95,117,110,
2218 105,116, 95,102,117,108,108, 40,112,108, 97,121,101,114, 44,
2219 32,116,105,108,101, 44, 32,117,116,121,112,101, 44, 32,118,
2220 101,116,101,114, 97,110, 95,108,101,118,101,108, 44, 32,104,
2221 111,109,101, 99,105,116,121, 44, 10,109,111,118,101,115, 95,
2222 108,101,102,116, 44, 32,104,112, 95,108,101,102,116, 44, 32,
2223 116,114, 97,110,115,112,111,114,116, 41, 10,108,111,103, 46,
2224 100,101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,
2225 110,105,110,103, 40, 34, 99,114,101, 97,116,101, 95,117,110,
2226 105,116, 95,102,117,108,108, 40, 41, 34, 44, 32, 34,101,100,
2227 105,116, 46, 99,114,101, 97,116,101, 95,117,110,105,116, 95,
2228 102,117,108,108, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41,
2229 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46, 99,
2230 114,101, 97,116,101, 95,117,110,105,116, 95,102,117,108,108,
2231 40,112,108, 97,121,101,114, 44, 32,116,105,108,101, 44, 32,
2232 117,116,121,112,101, 44, 32,118,101,116,101,114, 97,110, 95,
2233 108,101,118,101,108, 44, 32,104,111,109,101, 99,105,116,121,
2234 44, 10,109,111,118,101,115, 95,108,101,102,116, 44, 32,104,
2235 112, 95,108,101,102,116, 44, 32,116,114, 97,110,115,112,111,
2236 114,116, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
2237 110, 32, 99,114,101, 97,116,101, 95, 99,105,116,121, 40,112,
2238 108, 97,121,101,114, 44, 32,116,105,108,101, 44, 32,110, 97,
2239 109,101, 41, 10,108,111,103, 46,100,101,112,114,101, 99, 97,
2240 116,105,111,110, 95,119, 97,114,110,105,110,103, 40, 34, 99,
2241 114,101, 97,116,101, 95, 99,105,116,121, 40, 41, 34, 44, 32,
2242 34,101,100,105,116, 46, 99,114,101, 97,116,101, 95, 99,105,
2243 116,121, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41, 59, 10,
2244 101,100,105,116, 46, 99,114,101, 97,116,101, 95, 99,105,116,
2245 121, 32, 40,112,108, 97,121,101,114, 44, 32,116,105,108,101,
2246 44, 32,110, 97,109,101, 41, 10,101,110,100, 10,102,117,110,
2247 99,116,105,111,110, 32, 99,114,101, 97,116,101, 95, 98, 97,
2248 115,101, 40,116,105,108,101, 44, 32,110, 97,109,101, 44, 32,
2249 112,108, 97,121,101,114, 41, 10,108,111,103, 46,100,101,112,
2250 114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,110,
2251 103, 40, 34, 99,114,101, 97,116,101, 95, 98, 97,115,101, 40,
2252 41, 34, 44, 32, 34,101,100,105,116, 46, 99,114,101, 97,116,
2253 101, 95,111,119,110,101,100, 95,101,120,116,114, 97, 40, 41,
2254 34, 44, 10, 34, 50, 46, 52, 34, 41, 59, 10,101,100,105,116,
2255 46, 99,114,101, 97,116,101, 95, 98, 97,115,101, 40,116,105,
2256 108,101, 44, 32,110, 97,109,101, 44, 32,112,108, 97,121,101,
2257 114, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
2258 32, 99,114,101, 97,116,101, 95,112,108, 97,121,101,114, 40,
2259 117,115,101,114,110, 97,109,101, 44, 32,110, 97,116,105,111,
2260 110, 41, 10,108,111,103, 46,100,101,112,114,101, 99, 97,116,
2261 105,111,110, 95,119, 97,114,110,105,110,103, 40, 34, 99,114,
2262 101, 97,116,101, 95,112,108, 97,121,101,114, 40, 41, 34, 44,
2263 32, 34,101,100,105,116, 46, 99,114,101, 97,116,101, 95,112,
2264 108, 97,121,101,114, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34,
2265 41, 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,
2266 99,114,101, 97,116,101, 95,112,108, 97,121,101,114, 40,117,
2267 115,101,114,110, 97,109,101, 44, 32,110, 97,116,105,111,110,
2268 44, 32,110,105,108, 41, 10,101,110,100, 10,102,117,110, 99,
2269 116,105,111,110, 32, 99,104, 97,110,103,101, 95,103,111,108,
2270 100, 40,112,112,108, 97,121,101,114, 44, 32, 97,109,111,117,
2271 110,116, 41, 10,108,111,103, 46,100,101,112,114,101, 99, 97,
2272 116,105,111,110, 95,119, 97,114,110,105,110,103, 40, 34, 99,
2273 104, 97,110,103,101, 95,103,111,108,100, 40, 41, 34, 44, 32,
2274 34,101,100,105,116, 46, 99,104, 97,110,103,101, 95,103,111,
2275 108,100, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41, 59, 10,
2276 101,100,105,116, 46, 99,104, 97,110,103,101, 95,103,111,108,
2277 100, 40,112,112,108, 97,121,101,114, 44, 32, 97,109,111,117,
2278 110,116, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
2279 110, 32,103,105,118,101, 95,116,101, 99,104,110,111,108,111,
2280 103,121, 40,112,108, 97,121,101,114, 44, 32,116,101, 99,104,
2281 44, 32,114,101, 97,115,111,110, 41, 10,108,111,103, 46,100,
2282 101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,
2283 105,110,103, 40, 34,103,105,118,101, 95,116,101, 99,104,110,
2284 111,108,111,103,121, 40, 41, 34, 44, 32, 34,101,100,105,116,
2285 46,103,105,118,101, 95,116,101, 99,104, 40, 41, 34, 44, 10,
2286 34, 50, 46, 52, 34, 41, 59, 10,114,101,116,117,114,110, 32,
2287 101,100,105,116, 46,103,105,118,101, 95,116,101, 99,104, 40,
2288 112,108, 97,121,101,114, 44, 32,116,101, 99,104, 44, 32, 45,
2289 49, 44, 32,102, 97,108,115,101, 44, 32,114,101, 97,115,111,
2290 110, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
2291 32,101,100,105,116, 46,103,105,118,101, 95,116,101, 99,104,
2292 110,111,108,111,103,121, 40,112,108, 97,121,101,114, 44, 32,
2293 116,101, 99,104, 44, 32,114,101, 97,115,111,110, 41, 10,108,
2294 111,103, 46,100,101,112,114,101, 99, 97,116,105,111,110, 95,
2295 119, 97,114,110,105,110,103, 40, 34,101,100,105,116, 46,103,
2296 105,118,101, 95,116,101, 99,104,110,111,108,111,103,121, 40,
2297 41, 34, 44, 32, 34,101,100,105,116, 46,103,105,118,101, 95,
2298 116,101, 99,104, 40, 41, 34, 44, 10, 34, 50, 46, 54, 34, 41,
2299 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,103,
2300 105,118,101, 95,116,101, 99,104, 40,112,108, 97,121,101,114,
2301 44, 32,116,101, 99,104, 44, 32, 45, 49, 44, 32,102, 97,108,
2302 115,101, 44, 32,114,101, 97,115,111,110, 41, 10,101,110,100,
2303 10,102,117,110, 99,116,105,111,110, 32,116,114, 97,105,116,
2304 95,109,111,100, 40,112,108, 97,121,101,114, 44, 32,116,114,
2305 97,105,116, 44, 32,109,111,100, 41, 10,108,111,103, 46,100,
2306 101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,
2307 105,110,103, 40, 34,116,114, 97,105,116, 95,109,111,100, 40,
2308 41, 34, 44, 32, 34,101,100,105,116, 46,116,114, 97,105,116,
2309 95,109,111,100, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41,
2310 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,116,
2311 114, 97,105,116, 95,109,111,100, 40,112,108, 97,121,101,114,
2312 44, 32,116,114, 97,105,116, 44, 32,109,111,100, 41, 10,101,
2313 110,100, 10,102,117,110, 99,116,105,111,110, 32,117,110,108,
2314 101, 97,115,104, 95, 98, 97,114, 98, 97,114,105, 97,110,115,
2315 40,116,105,108,101, 41, 10,108,111,103, 46,100,101,112,114,
2316 101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,110,103,
2317 40, 34,117,110,108,101, 97,115,104, 95, 98, 97,114, 98, 97,
2318 114,105, 97,110,115, 40, 41, 34, 44, 32, 34,101,100,105,116,
2319 46,117,110,108,101, 97,115,104, 95, 98, 97,114, 98, 97,114,
2320 105, 97,110,115, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41,
2321 59, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,117,
2322 110,108,101, 97,115,104, 95, 98, 97,114, 98, 97,114,105, 97,
2323 110,115, 40,116,105,108,101, 41, 10,101,110,100, 10,102,117,
2324 110, 99,116,105,111,110, 32,112,108, 97, 99,101, 95,112, 97,
2325 114,116,105,115, 97,110,115, 40,116,105,108,101, 44, 32,112,
2326 108, 97,121,101,114, 44, 32, 99,111,117,110,116, 44, 32,115,
2327 113, 95,114, 97,100,105,117,115, 41, 10,108,111,103, 46,100,
2328 101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,114,110,
2329 105,110,103, 40, 34,112,108, 97, 99,101, 95,112, 97,114,116,
2330 105,115, 97,110,115, 40, 41, 34, 44, 32, 34,101,100,105,116,
2331 46,112,108, 97, 99,101, 95,112, 97,114,116,105,115, 97,110,
2332 115, 40, 41, 34, 44, 10, 34, 50, 46, 52, 34, 41, 59, 10,101,
2333 100,105,116, 46,112,108, 97, 99,101, 95,112, 97,114,116,105,
2334 115, 97,110,115, 40,116,105,108,101, 44, 32,112,108, 97,121,
2335 101,114, 44, 32, 99,111,117,110,116, 44, 32,115,113, 95,114,
2336 97,100,105,117,115, 41, 10,101,110,100, 10,102,117,110, 99,
2337 116,105,111,110, 32, 80,108, 97,121,101,114, 58, 99,114,101,
2338 97,116,101, 95,117,110,105,116, 40,116,105,108,101, 44, 32,
2339 117,116,121,112,101, 44, 32,118,101,116,101,114, 97,110, 95,
2340 108,101,118,101,108, 44, 32,104,111,109,101, 99,105,116,121,
2341 44, 32,109,111,118,101,115, 95,108,101,102,116, 41, 10,114,
2342 101,116,117,114,110, 32,101,100,105,116, 46, 99,114,101, 97,
2343 116,101, 95,117,110,105,116, 40,115,101,108,102, 44, 32,116,
2344 105,108,101, 44, 32,117,116,121,112,101, 44, 32,118,101,116,
2345 101,114, 97,110, 95,108,101,118,101,108, 44, 32,104,111,109,
2346 101, 99,105,116,121, 44, 10,109,111,118,101,115, 95,108,101,
2347 102,116, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
2348 110, 32, 80,108, 97,121,101,114, 58, 99,114,101, 97,116,101,
2349 95,117,110,105,116, 95,102,117,108,108, 40,116,105,108,101,
2350 44, 32,117,116,121,112,101, 44, 32,118,101,116,101,114, 97,
2351 110, 95,108,101,118,101,108, 44, 32,104,111,109,101, 99,105,
2352 116,121, 44, 10,109,111,118,101,115, 95,108,101,102,116, 44,
2353 32,104,112, 95,108,101,102,116, 44, 32,112,116,114, 97,110,
2354 115,112,111,114,116, 41, 10,114,101,116,117,114,110, 32,101,
2355 100,105,116, 46, 99,114,101, 97,116,101, 95,117,110,105,116,
2356 95,102,117,108,108, 40,115,101,108,102, 44, 32,116,105,108,
2357 101, 44, 32,117,116,121,112,101, 44, 32,118,101,116,101,114,
2358 97,110, 95,108,101,118,101,108, 44, 32,104,111,109,101, 99,
2359 105,116,121, 44, 10,109,111,118,101,115, 95,108,101,102,116,
2360 44, 32,104,112, 95,108,101,102,116, 44, 32,112,116,114, 97,
2361 110,115,112,111,114,116, 41, 10,101,110,100, 10,102,117,110,
2362 99,116,105,111,110, 32, 80,108, 97,121,101,114, 58, 99,105,
2363 118,105,108,105,122, 97,116,105,111,110, 95,115, 99,111,114,
2364 101, 40, 41, 10,114,101,116,117,114,110, 32,115,101,114,118,
2365 101,114, 46, 99,105,118,105,108,105,122, 97,116,105,111,110,
2366 95,115, 99,111,114,101, 40,115,101,108,102, 41, 10,101,110,
2367 100, 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,
2368 101,114, 58, 99,114,101, 97,116,101, 95, 99,105,116,121, 40,
2369 116,105,108,101, 44, 32,110, 97,109,101, 41, 10,101,100,105,
2370 116, 46, 99,114,101, 97,116,101, 95, 99,105,116,121, 40,115,
2371 101,108,102, 44, 32,116,105,108,101, 44, 32,110, 97,109,101,
2372 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2373 80,108, 97,121,101,114, 58, 99,104, 97,110,103,101, 95,103,
2374 111,108,100, 40, 97,109,111,117,110,116, 41, 10,101,100,105,
2375 116, 46, 99,104, 97,110,103,101, 95,103,111,108,100, 40,115,
2376 101,108,102, 44, 32, 97,109,111,117,110,116, 41, 10,101,110,
2377 100, 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,121,
2378 101,114, 58, 99,104, 97,110,103,101, 95,105,110,102,114, 97,
2379 112,111,105,110,116,115, 40, 97,109,111,117,110,116, 41, 10,
2380 101,100,105,116, 46, 99,104, 97,110,103,101, 95,105,110,102,
2381 114, 97,112,111,105,110,116,115, 40,115,101,108,102, 44, 32,
2382 97,109,111,117,110,116, 41, 10,101,110,100, 10,102,117,110,
2383 99,116,105,111,110, 32, 80,108, 97,121,101,114, 58,103,105,
2384 118,101, 95,116,101, 99,104, 40,116,101, 99,104, 44, 32, 99,
2385 111,115,116, 44, 32,110,111,116,105,102,121, 44, 32,114,101,
2386 97,115,111,110, 41, 10,114,101,116,117,114,110, 32,101,100,
2387 105,116, 46,103,105,118,101, 95,116,101, 99,104, 40,115,101,
2388 108,102, 44, 32,116,101, 99,104, 44, 32, 99,111,115,116, 44,
2389 32,110,111,116,105,102,121, 44, 32,114,101, 97,115,111,110,
2390 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2391 80,108, 97,121,101,114, 58,103,105,118,101, 95,116,101, 99,
2392 104,110,111,108,111,103,121, 40,116,101, 99,104, 44, 32,114,
2393 101, 97,115,111,110, 41, 10,108,111,103, 46,100,101,112,114,
2394 101, 99, 97,116,105,111,110, 95,119, 97,114,110,105,110,103,
2395 40, 34, 80,108, 97,121,101,114, 58,103,105,118,101, 95,116,
2396 101, 99,104,110,111,108,111,103,121, 40, 41, 34, 44, 32, 34,
2397 80,108, 97,121,101,114, 58,103,105,118,101, 95,116,101, 99,
2398 104, 40, 41, 34, 44, 10, 34, 50, 46, 54, 34, 41, 59, 10,114,
2399 101,116,117,114,110, 32,101,100,105,116, 46,103,105,118,101,
2400 95,116,101, 99,104, 40,115,101,108,102, 44, 32,116,101, 99,
2401 104, 44, 32, 45, 49, 44, 32,102, 97,108,115,101, 44, 32,114,
2402 101, 97,115,111,110, 41, 10,101,110,100, 10,102,117,110, 99,
2403 116,105,111,110, 32, 80,108, 97,121,101,114, 58,116,114, 97,
2404 105,116, 95,109,111,100, 40,116,114, 97,105,116, 44, 32,109,
2405 111,100, 41, 10,114,101,116,117,114,110, 32,101,100,105,116,
2406 46,116,114, 97,105,116, 95,109,111,100, 40,115,101,108,102,
2407 44, 32,116,114, 97,105,116, 44, 32,109,111,100, 41, 10,101,
2408 110,100, 10,102,117,110, 99,116,105,111,110, 32, 80,108, 97,
2409 121,101,114, 58, 99,105,118,105,108, 95,119, 97,114, 40,112,
2410 114,111, 98, 97, 98,105,108,105,116,121, 41, 10,114,101,116,
2411 117,114,110, 32,101,100,105,116, 46, 99,105,118,105,108, 95,
2412 119, 97,114, 40,115,101,108,102, 44, 32,112,114,111, 98, 97,
2413 98,105,108,105,116,121, 41, 10,101,110,100, 10,102,117,110,
2414 99,116,105,111,110, 32, 80,108, 97,121,101,114, 58,118,105,
2415 99,116,111,114,121, 40, 41, 10,101,100,105,116, 46,112,108,
2416 97,121,101,114, 95,118,105, 99,116,111,114,121, 40,115,101,
2417 108,102, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,
2418 110, 32, 80,108, 97,121,101,114, 58, 97,100,100, 95,104,105,
2419 115,116,111,114,121, 40, 97,109,111,117,110,116, 41, 10,101,
2420 100,105,116, 46, 97,100,100, 95,112,108, 97,121,101,114, 95,
2421 104,105,115,116,111,114,121, 40,115,101,108,102, 44, 32, 97,
2422 109,111,117,110,116, 41, 10,101,110,100, 10,102,117,110, 99,
2423 116,105,111,110, 32, 80,108, 97,121,101,114, 58,103,105,118,
2424 101, 95, 98,117,108, 98,115, 40, 97,109,111,117,110,116, 44,
2425 32,116,101, 99,104, 41, 10,101,100,105,116, 46,103,105,118,
2426 101, 95, 98,117,108, 98,115, 40,115,101,108,102, 44, 32, 97,
2427 109,111,117,110,116, 44, 32,116,101, 99,104, 41, 10,101,110,
2428 100, 10,102,117,110, 99,116,105,111,110, 32, 67,105,116,121,
2429 58,114,101,109,111,118,101, 40, 41, 10,101,100,105,116, 46,
2430 114,101,109,111,118,101, 95, 99,105,116,121, 40,115,101,108,
2431 102, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
2432 32, 67,105,116,121, 58,116,114, 97,110,115,102,101,114, 40,
2433 110,101,119, 95,111,119,110,101,114, 41, 10,101,100,105,116,
2434 46,116,114, 97,110,115,102,101,114, 95, 99,105,116,121, 40,
2435 115,101,108,102, 44, 32,110,101,119, 95,111,119,110,101,114,
2436 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2437 67,105,116,121, 58, 97,100,100, 95,104,105,115,116,111,114,
2438 121, 40, 97,109,111,117,110,116, 41, 10,101,100,105,116, 46,
2439 97,100,100, 95, 99,105,116,121, 95,104,105,115,116,111,114,
2440 121, 40,115,101,108,102, 44, 32, 97,109,111,117,110,116, 41,
2441 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 67,
2442 105,116,121, 58, 99,114,101, 97,116,101, 95, 98,117,105,108,
2443 100,105,110,103, 40,105,109,112,114, 41, 10,101,100,105,116,
2444 46, 99,114,101, 97,116,101, 95, 98,117,105,108,100,105,110,
2445 103, 40,115,101,108,102, 44, 32,105,109,112,114, 41, 10,101,
2446 110,100, 10,102,117,110, 99,116,105,111,110, 32, 67,105,116,
2447 121, 58,114,101,109,111,118,101, 95, 98,117,105,108,100,105,
2448 110,103, 40,105,109,112,114, 41, 10,101,100,105,116, 46,114,
2449 101,109,111,118,101, 95, 98,117,105,108,100,105,110,103, 40,
2450 115,101,108,102, 44, 32,105,109,112,114, 41, 10,101,110,100,
2451 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,116, 58,
2452 116,101,108,101,112,111,114,116, 40,100,101,115,116, 44, 10,
2453 101,109, 98, 97,114,107, 95,116,111, 44, 32, 97,108,108,111,
2454 119, 95,100,105,115,101,109, 98, 97,114,107, 44, 10, 99,111,
2455 110,113,117,101,114, 95, 99,105,116,121, 44, 32, 99,111,110,
2456 113,117,101,114, 95,101,120,116,114, 97, 44, 10,101,110,116,
2457 101,114, 95,104,117,116, 44, 32,102,114,105,103,104,116,101,
2458 110, 95,104,117,116, 41, 10,105,102, 32, 97,108,108,111,119,
2459 95,100,105,115,101,109, 98, 97,114,107, 32, 61, 61, 32,110,
2460 105,108, 32,116,104,101,110, 10,114,101,116,117,114,110, 32,
2461 101,100,105,116, 46,117,110,105,116, 95,116,101,108,101,112,
2462 111,114,116, 40,115,101,108,102, 44, 32,100,101,115,116, 44,
2463 32,110,105,108, 44, 32,102, 97,108,115,101, 44, 10,102, 97,
2464 108,115,101, 44, 32,102, 97,108,115,101, 44, 32,102, 97,108,
2465 115,101, 44, 32,102, 97,108,115,101, 41, 10,101,108,115,101,
2466 10,114,101,116,117,114,110, 32,101,100,105,116, 46,117,110,
2467 105,116, 95,116,101,108,101,112,111,114,116, 40,115,101,108,
2468 102, 44, 32,100,101,115,116, 44, 10,101,109, 98, 97,114,107,
2469 95,116,111, 44, 32, 97,108,108,111,119, 95,100,105,115,101,
2470 109, 98, 97,114,107, 44, 10, 99,111,110,113,117,101,114, 95,
2471 99,105,116,121, 44, 32, 99,111,110,113,117,101,114, 95,101,
2472 120,116,114, 97, 44, 10,101,110,116,101,114, 95,104,117,116,
2473 44, 32,102,114,105,103,104,116,101,110, 95,104,117,116, 41,
2474 10,101,110,100, 10,101,110,100, 10,102,117,110, 99,116,105,
2475 111,110, 32, 85,110,105,116, 58,112,101,114,102,111,114,109,
2476 95, 97, 99,116,105,111,110, 40, 97, 99,116,105,111,110, 44,
2477 32,116, 97,114,103,101,116, 44, 32,115,117, 98, 95,116, 97,
2478 114,103,101,116, 41, 10,105,102, 32,116, 97,114,103,101,116,
2479 32, 61, 61, 32,110,105,108, 32,116,104,101,110, 10,114,101,
2480 116,117,114,110, 32,101,100,105,116, 46,112,101,114,102,111,
2481 114,109, 95, 97, 99,116,105,111,110, 40,115,101,108,102, 44,
2482 32, 97, 99,116,105,111,110, 41, 10,101,108,115,101,105,102,
2483 32,115,117, 98, 95,116, 97,114,103,101,116, 32, 61, 61, 32,
2484 110,105,108, 32,116,104,101,110, 10,114,101,116,117,114,110,
2485 32,101,100,105,116, 46,112,101,114,102,111,114,109, 95, 97,
2486 99,116,105,111,110, 40,115,101,108,102, 44, 32, 97, 99,116,
2487 105,111,110, 44, 32,116, 97,114,103,101,116, 41, 10,101,108,
2488 115,101, 10,114,101,116,117,114,110, 32,101,100,105,116, 46,
2489 112,101,114,102,111,114,109, 95, 97, 99,116,105,111,110, 40,
2490 115,101,108,102, 44, 32, 97, 99,116,105,111,110, 44, 32,116,
2491 97,114,103,101,116, 44, 32,115,117, 98, 95,116, 97,114,103,
2492 101,116, 41, 10,101,110,100, 10,101,110,100, 10,102,117,110,
2493 99,116,105,111,110, 32, 85,110,105,116, 58,116,117,114,110,
2494 40,100,105,114,101, 99,116,105,111,110, 41, 10,101,100,105,
2495 116, 46,117,110,105,116, 95,116,117,114,110, 40,115,101,108,
2496 102, 44, 32,100,105,114,101, 99,116,105,111,110, 41, 10,101,
2497 110,100, 10,102,117,110, 99,116,105,111,110, 32, 85,110,105,
2498 116, 58,107,105,108,108, 40,114,101, 97,115,111,110, 44, 32,
2499 107,105,108,108,101,114, 41, 10,101,100,105,116, 46,117,110,
2500 105,116, 95,107,105,108,108, 40,115,101,108,102, 44, 32,114,
2501 101, 97,115,111,110, 44, 32,107,105,108,108,101,114, 41, 10,
2502 101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 85,110,
2503 105,116, 58,109,111,118,101, 40,109,111,118,101,116,111, 44,
2504 32,109,111,118,101, 99,111,115,116, 44, 10,101,109, 98, 97,
2505 114,107, 95,116,111, 44, 32, 97,108,108,111,119, 95,100,105,
2506 115,101,109, 98, 97,114,107, 44, 10, 99,111,110,113,117,101,
2507 114, 95, 99,105,116,121, 44, 32, 99,111,110,113,117,101,114,
2508 95,101,120,116,114, 97, 44, 10,101,110,116,101,114, 95,104,
2509 117,116, 44, 32,102,114,105,103,104,116,101,110, 95,104,117,
2510 116, 41, 10,105,102, 32, 97,108,108,111,119, 95,100,105,115,
2511 101,109, 98, 97,114,107, 32, 61, 61, 32,110,105,108, 32,116,
2512 104,101,110, 10,114,101,116,117,114,110, 32,101,100,105,116,
2513 46,117,110,105,116, 95,109,111,118,101, 40,115,101,108,102,
2514 44, 32,109,111,118,101,116,111, 44, 32,109,111,118,101, 99,
2515 111,115,116, 44, 32,110,105,108, 44, 32,102, 97,108,115,101,
2516 44, 10,102, 97,108,115,101, 44, 32,102, 97,108,115,101, 44,
2517 32,102, 97,108,115,101, 44, 32,102, 97,108,115,101, 41, 10,
2518 101,108,115,101, 10,114,101,116,117,114,110, 32,101,100,105,
2519 116, 46,117,110,105,116, 95,109,111,118,101, 40,115,101,108,
2520 102, 44, 32,109,111,118,101,116,111, 44, 32,109,111,118,101,
2521 99,111,115,116, 44, 10,101,109, 98, 97,114,107, 95,116,111,
2522 44, 32, 97,108,108,111,119, 95,100,105,115,101,109, 98, 97,
2523 114,107, 44, 10, 99,111,110,113,117,101,114, 95, 99,105,116,
2524 121, 44, 32, 99,111,110,113,117,101,114, 95,101,120,116,114,
2525 97, 44, 10,101,110,116,101,114, 95,104,117,116, 44, 32,102,
2526 114,105,103,104,116,101,110, 95,104,117,116, 41, 10,101,110,
2527 100, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,
2528 85,110,105,116, 58,109,111,118,101,109,101,110,116, 95,100,
2529 105,115, 97,108,108,111,119, 40, 41, 10,101,100,105,116, 46,
2530 109,111,118,101,109,101,110,116, 95,100,105,115, 97,108,108,
2531 111,119, 40,115,101,108,102, 41, 10,101,110,100, 10,102,117,
2532 110, 99,116,105,111,110, 32, 85,110,105,116, 58,109,111,118,
2533 101,109,101,110,116, 95, 97,108,108,111,119, 40, 41, 10,101,
2534 100,105,116, 46,109,111,118,101,109,101,110,116, 95, 97,108,
2535 108,111,119, 40,115,101,108,102, 41, 10,101,110,100, 10,102,
2536 117,110, 99,116,105,111,110, 32, 84,105,108,101, 58, 99,114,
2537 101, 97,116,101, 95,111,119,110,101,100, 95,101,120,116,114,
2538 97, 40,110, 97,109,101, 44, 32,112,108, 97,121,101,114, 41,
2539 10,101,100,105,116, 46, 99,114,101, 97,116,101, 95,111,119,
2540 110,101,100, 95,101,120,116,114, 97, 40,115,101,108,102, 44,
2541 32,110, 97,109,101, 44, 32,112,108, 97,121,101,114, 41, 10,
2542 101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 84,105,
2543 108,101, 58, 99,114,101, 97,116,101, 95,101,120,116,114, 97,
2544 40,110, 97,109,101, 41, 10,101,100,105,116, 46, 99,114,101,
2545 97,116,101, 95,101,120,116,114, 97, 40,115,101,108,102, 44,
2546 32,110, 97,109,101, 41, 10,101,110,100, 10,102,117,110, 99,
2547 116,105,111,110, 32, 84,105,108,101, 58, 99,114,101, 97,116,
2548 101, 95, 98, 97,115,101, 40,110, 97,109,101, 44, 32,112,108,
2549 97,121,101,114, 41, 10,108,111,103, 46,100,101,112,114,101,
2550 99, 97,116,105,111,110, 95,119, 97,114,110,105,110,103, 40,
2551 34, 84,105,108,101, 58, 99,114,101, 97,116,101, 95, 98, 97,
2552 115,101, 40, 41, 34, 44, 32, 34, 84,105,108,101, 58, 99,114,
2553 101, 97,116,101, 95,111,119,110,101,100, 95,101,120,116,114,
2554 97, 40, 41, 34, 44, 10, 34, 51, 46, 48, 34, 41, 59, 10,101,
2555 100,105,116, 46, 99,114,101, 97,116,101, 95, 98, 97,115,101,
2556 40,115,101,108,102, 44, 32,110, 97,109,101, 44, 32,112,108,
2557 97,121,101,114, 41, 10,101,110,100, 10,102,117,110, 99,116,
2558 105,111,110, 32, 84,105,108,101, 58, 99,114,101, 97,116,101,
2559 95,114,111, 97,100, 40,110, 97,109,101, 41, 10,108,111,103,
2560 46,100,101,112,114,101, 99, 97,116,105,111,110, 95,119, 97,
2561 114,110,105,110,103, 40, 34, 84,105,108,101, 58, 99,114,101,
2562 97,116,101, 95,114,111, 97,100, 40, 41, 34, 44, 32, 34, 84,
2563 105,108,101, 58, 99,114,101, 97,116,101, 95,101,120,116,114,
2564 97, 40, 41, 34, 44, 10, 34, 50, 46, 54, 34, 41, 59, 10,101,
2565 100,105,116, 46, 99,114,101, 97,116,101, 95,114,111, 97,100,
2566 40,115,101,108,102, 44, 32,110, 97,109,101, 41, 10,101,110,
2567 100, 10,102,117,110, 99,116,105,111,110, 32, 84,105,108,101,
2568 58,114,101,109,111,118,101, 95,101,120,116,114, 97, 40,110,
2569 97,109,101, 41, 10,101,100,105,116, 46,114,101,109,111,118,
2570 101, 95,101,120,116,114, 97, 40,115,101,108,102, 44, 32,110,
2571 97,109,101, 41, 10,101,110,100, 10,102,117,110, 99,116,105,
2572 111,110, 32, 84,105,108,101, 58, 99,104, 97,110,103,101, 95,
2573 116,101,114,114, 97,105,110, 40,116,101,114,114, 97,105,110,
2574 41, 10,101,100,105,116, 46, 99,104, 97,110,103,101, 95,116,
2575 101,114,114, 97,105,110, 40,115,101,108,102, 44, 32,116,101,
2576 114,114, 97,105,110, 41, 10,101,110,100, 10,102,117,110, 99,
2577 116,105,111,110, 32, 84,105,108,101, 58,117,110,108,101, 97,
2578 115,104, 95, 98, 97,114, 98, 97,114,105, 97,110,115, 40, 41,
2579 10,114,101,116,117,114,110, 32,101,100,105,116, 46,117,110,
2580 108,101, 97,115,104, 95, 98, 97,114, 98, 97,114,105, 97,110,
2581 115, 40,115,101,108,102, 41, 10,101,110,100, 10,102,117,110,
2582 99,116,105,111,110, 32, 84,105,108,101, 58,112,108, 97, 99,
2583 101, 95,112, 97,114,116,105,115, 97,110,115, 40,112,108, 97,
2584 121,101,114, 44, 32, 99,111,117,110,116, 44, 32,115,113, 95,
2585 114, 97,100,105,117,115, 41, 10,101,100,105,116, 46,112,108,
2586 97, 99,101, 95,112, 97,114,116,105,115, 97,110,115, 40,115,
2587 101,108,102, 44, 32,112,108, 97,121,101,114, 44, 32, 99,111,
2588 117,110,116, 44, 32,115,113, 95,114, 97,100,105,117,115, 41,
2589 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 84,
2590 105,108,101, 58,115,101,116, 95,108, 97, 98,101,108, 40,108,
2591 97, 98,101,108, 41, 10,101,100,105,116, 46,116,105,108,101,
2592 95,115,101,116, 95,108, 97, 98,101,108, 40,115,101,108,102,
2593 44, 32,108, 97, 98,101,108, 41, 10,101,110,100, 10,102,117,
2594 110, 99,116,105,111,110, 32, 84,105,108,101, 58,115,104,111,
2595 119, 40,112,108, 97,121,101,114, 41, 10,101,100,105,116, 46,
2596 116,105,108,101, 95,115,104,111,119, 40,115,101,108,102, 44,
2597 32,112,108, 97,121,101,114, 41, 10,101,110,100, 10,102,117,
2598 110, 99,116,105,111,110, 32, 84,105,108,101, 58,104,105,100,
2599 101, 40,112,108, 97,121,101,114, 41, 10,114,101,116,117,114,
2600 110, 32,101,100,105,116, 46,116,105,108,101, 95,104,105,100,
2601 101, 40,115,101,108,102, 44, 32,112,108, 97,121,101,114, 41,
2602 10,101,110,100,32
2603 };
2604 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
2606 } /* end of embedded lua code */
2607
2608 tolua_module(tolua_S,"Player",0);
2609 tolua_beginmodule(tolua_S,"Player");
2610 tolua_module(tolua_S,"properties",0);
2611 tolua_beginmodule(tolua_S,"properties");
2620
2621 { /* begin embedded lua code */
2622 static unsigned char B[] = {
2623 10,101,100,105,116, 46,112,108, 97,121,101,114, 95,108,111,
2624 115,101, 32, 61, 32, 80,108, 97,121,101,114, 46,108,111,115,
2625 101,32
2626 };
2627 if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
2629 } /* end of embedded lua code */
2630
2631 tolua_module(tolua_S,"game",1);
2632 tolua_beginmodule(tolua_S,"game");
2637 tolua_module(tolua_S,"Nation_Type",0);
2638 tolua_beginmodule(tolua_S,"Nation_Type");
2643 tolua_module(tolua_S,"Unit",0);
2644 tolua_beginmodule(tolua_S,"Unit");
2649 return 1;
2650}
2651/* Open tolua function */
2653{
2655 lua_pushstring(tolua_S, "server");
2656 lua_call(tolua_S, 1, 0);
2657 return 1;
2658}
const char * api_server_setting_get(lua_State *L, const char *sett_name)
bool api_server_was_started(lua_State *L)
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:45
char * incite_cost
Definition comments.c:74
static void conquer_city(QVariant data1, QVariant data2)
Definition dialogs.cpp:1853
static void enter_hut(QVariant data1, QVariant data2)
Definition dialogs.cpp:2658
static void frighten_hut(QVariant data1, QVariant data2)
Definition dialogs.cpp:2688
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:3323
Definition city.h:320
Definition tile.h:50
Definition unit.h:138
#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_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)