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