Freeciv-3.1: /fast/freeciv/nightly/S3_1/common/scriptcore/api_game_find.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
api_game_find.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
14#ifndef FC__API_GAME_FIND_H
15#define FC__API_GAME_FIND_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21/* dependencies/lua */
22#include "lua.h"
23
24/* common/scriptcore */
25#include "luascript_types.h"
26
27/* Object find module. */
28 Player *api_find_player_by_name(lua_State *L, const char *name);
29 Player *api_find_player(lua_State *L, int player_id);
30
31 City *api_find_city(lua_State *L, Player *pplayer, int city_id);
32
33 Unit *api_find_unit(lua_State *L, Player *pplayer, int unit_id);
34 Unit *api_find_transport_unit(lua_State *L, Player *pplayer, Unit_Type *ptype,
35 Tile *ptile);
36 Tile *api_find_tile(lua_State *L, int nat_x, int nat_y);
37 Tile *api_find_tile_by_index(lua_State *L, int tindex);
38
39 Government *api_find_government(lua_State *L, int government_id);
40 Government *api_find_government_by_name(lua_State *L, const char *name_orig);
41
42 Nation_Type *api_find_nation_type(lua_State *L, int nation_type_id);
43 Nation_Type *api_find_nation_type_by_name(lua_State *L,
44 const char *name_orig);
45 Action *api_find_action(lua_State *L, action_id act_id);
46 Action *api_find_action_by_name(lua_State *L, const char *name_orig);
47 Building_Type *api_find_building_type(lua_State *L, int building_type_id);
48 Building_Type *api_find_building_type_by_name(lua_State *L,
49 const char *name_orig);
50 Unit_Type *api_find_unit_type(lua_State *L, int unit_type_id);
51 Unit_Type *api_find_unit_type_by_name(lua_State *L, const char *name_orig);
52 Unit_Type *api_find_role_unit_type(lua_State *L, const char *role_name,
53 Player *pplayer);
54 Tech_Type *api_find_tech_type(lua_State *L, int tech_type_id);
55 Tech_Type *api_find_tech_type_by_name(lua_State *L, const char *name_orig);
56
57 Terrain *api_find_terrain(lua_State *L, int terrain_id);
58 Terrain *api_find_terrain_by_name(lua_State *L, const char *name_orig);
59
60 Achievement *api_find_achievement(lua_State *L, int achievement_id);
61 Achievement *api_find_achievement_by_name(lua_State *L, const char *name_orig);
62
63 Disaster *api_find_disaster(lua_State *L, int disaster_id);
64 Disaster *api_find_disaster_by_name(lua_State *L, const char *name_orig);
65
66const Direction *api_find_direction (lua_State *L, int id);
67
68 Action *api_find_action_type_by_id(lua_State *L, int id);
69 Action *api_find_action_type_by_name(lua_State *L, const char *name);
70
71 Nonexistent *api_find_nonexistent(lua_State *L);
72
73#ifdef __cplusplus
74}
75#endif /* __cplusplus */
76
77#endif /* API_GAME_FIND */
78
api_find_nation_type
Nation_Type * api_find_nation_type(lua_State *L, int nation_type_id)
Definition api_game_find.c:173
api_find_tile
Tile * api_find_tile(lua_State *L, int nat_x, int nat_y)
Definition api_game_find.c:131
api_find_unit_type
Unit_Type * api_find_unit_type(lua_State *L, int unit_type_id)
Definition api_game_find.c:239
api_find_government_by_name
Government * api_find_government_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:161
api_find_player
Player * api_find_player(lua_State *L, int player_id)
Definition api_game_find.c:41
api_find_achievement_by_name
Achievement * api_find_achievement_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:312
api_find_achievement
Achievement * api_find_achievement(lua_State *L, int achievement_id)
Definition api_game_find.c:302
api_find_role_unit_type
Unit_Type * api_find_role_unit_type(lua_State *L, const char *role_name, Player *pplayer)
Definition api_game_find.c:102
api_find_direction
const Direction * api_find_direction(lua_State *L, int id)
Definition api_game_find.c:344
api_find_action_type_by_name
Action * api_find_action_type_by_name(lua_State *L, const char *name)
Definition api_game_find.c:364
api_find_tile_by_index
Tile * api_find_tile_by_index(lua_State *L, int tindex)
Definition api_game_find.c:141
api_find_building_type_by_name
Building_Type * api_find_building_type_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:227
api_find_nation_type_by_name
Nation_Type * api_find_nation_type_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:183
api_find_disaster
Disaster * api_find_disaster(lua_State *L, int disaster_id)
Definition api_game_find.c:323
api_find_tech_type_by_name
Tech_Type * api_find_tech_type_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:270
api_find_government
Government * api_find_government(lua_State *L, int government_id)
Definition api_game_find.c:151
api_find_disaster_by_name
Disaster * api_find_disaster_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:333
api_find_building_type
Building_Type * api_find_building_type(lua_State *L, int building_type_id)
Definition api_game_find.c:217
api_find_action_type_by_id
Action * api_find_action_type_by_id(lua_State *L, int id)
Definition api_game_find.c:354
api_find_action_by_name
Action * api_find_action_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:205
api_find_nonexistent
Nonexistent * api_find_nonexistent(lua_State *L)
Definition api_game_find.c:375
api_find_player_by_name
Player * api_find_player_by_name(lua_State *L, const char *name)
Definition api_game_find.c:31
api_find_transport_unit
Unit * api_find_transport_unit(lua_State *L, Player *pplayer, Unit_Type *ptype, Tile *ptile)
Definition api_game_find.c:79
api_find_tech_type
Tech_Type * api_find_tech_type(lua_State *L, int tech_type_id)
Definition api_game_find.c:260
api_find_city
City * api_find_city(lua_State *L, Player *pplayer, int city_id)
Definition api_game_find.c:51
api_find_unit
Unit * api_find_unit(lua_State *L, Player *pplayer, int unit_id)
Definition api_game_find.c:65
api_find_action
Action * api_find_action(lua_State *L, action_id act_id)
Definition api_game_find.c:195
api_find_terrain
Terrain * api_find_terrain(lua_State *L, int terrain_id)
Definition api_game_find.c:281
api_find_terrain_by_name
Terrain * api_find_terrain_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:291
api_find_unit_type_by_name
Unit_Type * api_find_unit_type_by_name(lua_State *L, const char *name_orig)
Definition api_game_find.c:249
action_id
int action_id
Definition fc_types.h:359
name
const char * name
Definition inputfile.c:127
luascript_types.h
Direction
enum direction8 Direction
Definition luascript_types.h:57
Nonexistent
void Nonexistent
Definition luascript_types.h:62
nat_x
#define nat_x
nat_y
#define nat_y
achievement
Definition achievements.h:26
action
Definition actions.h:379
advance
Definition tech.h:124
city
Definition city.h:309
disaster_type
Definition disaster.h:46
government
Definition government.h:52
impr_type
Definition improvement.h:68
nation_type
Definition nation.h:97
player
Definition player.h:249
terrain
Definition terrain.h:176
tile
Definition tile.h:49
unit_type
Definition unittype.h:481
unit
Definition unit.h:138