Freeciv-3.2
Loading...
Searching...
No Matches
common
scriptcore
api_game_specenum.c
Go to the documentation of this file.
1
/*****************************************************************************
2
Freeciv - Copyright (C) 2010 - The Freeciv Project
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; either version 2, or (at your option)
6
any later version.
7
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
*****************************************************************************/
13
14
#ifdef HAVE_CONFIG_H
15
#include <fc_config.h>
16
#endif
17
18
#include <string.h>
19
20
/* dependencies/lua */
21
#include "lua.h"
22
#include "lualib.h"
23
#include "lauxlib.h"
24
25
/* utility */
26
#include "
support.h
"
27
28
/* common */
29
#include "
events.h
"
30
#include "
fc_types.h
"
31
32
/* common/scriptcore */
33
#include "
api_specenum.h
"
34
35
#include "
api_game_specenum.h
"
36
37
38
/**********************************************************************/
41
API_SPECENUM_DEFINE_INDEX
(
event_type
,
"E_"
)
42
API_SPECENUM_DEFINE_INDEX_REV
(tech_cost_style);
43
API_SPECENUM_DEFINE_INDEX_REV
(
tech_leakage_style
);
44
45
/**********************************************************************/
48
int
api_game_specenum_open
(
lua_State
*
L
)
49
{
50
API_SPECENUM_CREATE_TABLE
(
L
,
event_type
,
"E"
);
51
API_SPECENUM_CREATE_TABLE_REV
(
L
, tech_cost_style,
"TECH_COST"
);
52
API_SPECENUM_CREATE_TABLE_REV
(
L
,
tech_leakage_style
,
"TECH_LEAKAGE"
);
53
54
return
0;
55
}
api_game_specenum_open
int api_game_specenum_open(lua_State *L)
Definition
api_game_specenum.c:48
api_game_specenum.h
api_specenum.h
API_SPECENUM_CREATE_TABLE
#define API_SPECENUM_CREATE_TABLE(L, type, name)
Definition
api_specenum.h:81
API_SPECENUM_DEFINE_INDEX
#define API_SPECENUM_DEFINE_INDEX(type_name, prefix)
Definition
api_specenum.h:29
API_SPECENUM_CREATE_TABLE_REV
#define API_SPECENUM_CREATE_TABLE_REV(L, type, name)
Definition
api_specenum.h:83
API_SPECENUM_DEFINE_INDEX_REV
#define API_SPECENUM_DEFINE_INDEX_REV(type_name)
Definition
api_specenum.h:58
incite_cost
char * incite_cost
Definition
comments.c:74
events.h
fc_types.h
support.h
Generated on Sun Apr 14 2024 23:00:49 for Freeciv-3.2 by
1.9.8