Freeciv-3.3: /fast/freeciv/nightly/main/common/scriptcore/luascript_types.h Source File

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. */
46 typedef struct player Player;
47 typedef struct player_ai Player_ai;
48 typedef struct counter Counter;
49 typedef struct city City;
50 typedef struct unit Unit;
51 typedef struct tile Tile;
52 typedef struct government Government;
53 typedef struct nation_type Nation_Type;
54 typedef struct impr_type Building_Type;
55 typedef struct unit_type Unit_Type;
56 typedef struct advance Tech_Type;
57 typedef struct terrain Terrain;
58 typedef struct connection Connection;
59 typedef enum direction8 Direction;
60 typedef struct disaster_type Disaster;
61 typedef struct achievement Achievement;
62 typedef struct action Action;
63 typedef struct packet_game_info Game_Info;
64
65 typedef 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. */
71 typedef const struct unit_list_link Unit_List_Link;
72 typedef 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 */
achievements.h
actions.h
city.h
incite_cost
char * incite_cost
Definition comments.c:74
connection.h
counters.h
events.h
fc_types.h
game.h
genlist.h
government.h
improvement.h
City_List_Link
const struct city_list_link City_List_Link
Definition luascript_types.h:72
Direction
enum direction8 Direction
Definition luascript_types.h:59
Nonexistent
void Nonexistent
Definition luascript_types.h:65
Unit_List_Link
const struct unit_list_link Unit_List_Link
Definition luascript_types.h:71
nation.h
player.h
specenum_gen.h
achievement
Definition achievements.h:26
action
Definition actions.h:106
advance
Definition tech.h:124
city
Definition city.h:320
connection
Definition connection.h:136
counter
Definition counters.h:27
disaster_type
Definition disaster.h:48
government
Definition government.h:52
impr_type
Definition improvement.h:50
nation_type
Definition nation.h:98
packet_game_info
Definition packets_gen.h:118
player_ai
Definition player.h:113
player
Definition player.h:249
terrain
Definition terrain.h:75
tile
Definition tile.h:50
unit_type
Definition unittype.h:507
unit
Definition unit.h:140
tech.h
terrain.h
tile.h
unit.h
unittype.h