Freeciv-3.3
Loading...
Searching...
No Matches
luascript_types.h
Go to the documentation of this file.
1/*****************************************************************************
2 Freeciv - Copyright (C) 2005 - 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#ifndef FC__LUASCRIPT_TYPES_H
14#define FC__LUASCRIPT_TYPES_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* utility */
21#include "genlist.h"
22
23/* common */
24#include "achievements.h"
25#include "actions.h"
26#include "counters.h"
27#include "city.h"
28#include "connection.h"
29#include "events.h"
30#include "fc_types.h"
31#include "game.h"
32#include "government.h"
33#include "improvement.h"
34#include "nation.h"
35#include "player.h"
36#include "tech.h"
37#include "terrain.h"
38#include "tile.h"
39#include "unit.h"
40#include "unittype.h"
41
42/* Classes. */
43/* If a new class is defined, an entry should be added to the enum api_types
44 * below and the class name should be added to the api_types list in
45 * tolua_common_z.pkg. */
46typedef struct player Player;
47typedef struct player_ai Player_ai;
48typedef struct counter Counter;
49typedef struct city City;
50typedef struct unit Unit;
51typedef struct tile Tile;
52typedef struct government Government;
53typedef struct nation_type Nation_Type;
54typedef struct impr_type Building_Type;
55typedef struct unit_type Unit_Type;
56typedef struct advance Tech_Type;
57typedef struct terrain Terrain;
58typedef struct connection Connection;
59typedef enum direction8 Direction;
60typedef struct disaster_type Disaster;
61typedef struct achievement Achievement;
62typedef struct action Action;
64
65typedef void Nonexistent;
66
67/* List Classes.
68 * NOTE: These should not to be exposed since the pointers are not safe. They
69 * are only used by the API internally.
70 * Separate types makes use from lua type safe. */
71typedef const struct unit_list_link Unit_List_Link;
72typedef const struct city_list_link City_List_Link;
73
74#define SPECENUM_NAME api_types
75#define SPECENUM_VALUE0 API_TYPE_INT
76#define SPECENUM_VALUE0NAME "Int"
77#define SPECENUM_VALUE1 API_TYPE_BOOL
78#define SPECENUM_VALUE1NAME "Bool"
79#define SPECENUM_VALUE2 API_TYPE_STRING
80#define SPECENUM_VALUE2NAME "String"
81#define SPECENUM_VALUE3 API_TYPE_PLAYER
82#define SPECENUM_VALUE3NAME "Player"
83#define SPECENUM_VALUE4 API_TYPE_CITY
84#define SPECENUM_VALUE4NAME "City"
85#define SPECENUM_VALUE5 API_TYPE_UNIT
86#define SPECENUM_VALUE5NAME "Unit"
87#define SPECENUM_VALUE6 API_TYPE_TILE
88#define SPECENUM_VALUE6NAME "Tile"
89#define SPECENUM_VALUE7 API_TYPE_GOVERNMENT
90#define SPECENUM_VALUE7NAME "Government"
91#define SPECENUM_VALUE8 API_TYPE_BUILDING_TYPE
92#define SPECENUM_VALUE8NAME "Building_Type"
93#define SPECENUM_VALUE9 API_TYPE_NATION_TYPE
94#define SPECENUM_VALUE9NAME "Nation_Type"
95#define SPECENUM_VALUE10 API_TYPE_UNIT_TYPE
96#define SPECENUM_VALUE10NAME "Unit_Type"
97#define SPECENUM_VALUE11 API_TYPE_TECH_TYPE
98#define SPECENUM_VALUE11NAME "Tech_Type"
99#define SPECENUM_VALUE12 API_TYPE_TERRAIN
100#define SPECENUM_VALUE12NAME "Terrain"
101#define SPECENUM_VALUE13 API_TYPE_CONNECTION
102#define SPECENUM_VALUE13NAME "Connection"
103#define SPECENUM_VALUE14 API_TYPE_DIRECTION
104#define SPECENUM_VALUE14NAME "Direction"
105#define SPECENUM_VALUE15 API_TYPE_DISASTER
106#define SPECENUM_VALUE15NAME "Disaster"
107#define SPECENUM_VALUE16 API_TYPE_ACHIEVEMENT
108#define SPECENUM_VALUE16NAME "Achievement"
109#define SPECENUM_VALUE17 API_TYPE_ACTION
110#define SPECENUM_VALUE17NAME "Action"
111#include "specenum_gen.h"
112
113#ifdef __cplusplus
114}
115#endif /* __cplusplus */
116
117#endif /* FC__LUASCRIPT_TYPES_H */
char * incite_cost
Definition comments.c:74
const struct city_list_link City_List_Link
enum direction8 Direction
void Nonexistent
const struct unit_list_link Unit_List_Link
Definition city.h:320
Definition tile.h:50
Definition unit.h:140