![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "deprecations.h"#include "fcintl.h"#include "achievements.h"#include "actions.h"#include "calendar.h"#include "citizens.h"#include "culture.h"#include "game.h"#include "government.h"#include "improvement.h"#include "map.h"#include "movement.h"#include "nation.h"#include "research.h"#include "tech.h"#include "terrain.h"#include "tile.h"#include "unitlist.h"#include "unittype.h"#include "luascript.h"#include "api_game_methods.h"
Include dependency graph for api_game_methods.cpp:Go to the source code of this file.
Functions | |
| int | api_methods_game_turn (lua_State *L) |
| Return the current turn. More... | |
| int | api_methods_game_year (lua_State *L) |
| Return the current year. More... | |
| int | api_methods_game_year_fragment (lua_State *L) |
| Return the current year fragment. More... | |
| const char * | api_methods_game_year_text (lua_State *L) |
| Return the current year fragment. More... | |
| int | api_methods_game_turn_deprecated (lua_State *L) |
| Return the current turn, as if real turns started from 0. More... | |
| const char * | api_methods_game_rulesetdir (lua_State *L) |
| Return name of the current ruleset. More... | |
| const char * | api_methods_game_ruleset_name (lua_State *L) |
| Return name of the current ruleset. More... | |
| bool | api_methods_building_type_is_wonder (lua_State *L, Building_Type *pbuilding) |
| Return TRUE if pbuilding is a wonder. More... | |
| bool | api_methods_building_type_is_great_wonder (lua_State *L, Building_Type *pbuilding) |
| Return TRUE if pbuilding is a great wonder. More... | |
| bool | api_methods_building_type_is_small_wonder (lua_State *L, Building_Type *pbuilding) |
| Return TRUE if pbuilding is a small wonder. More... | |
| bool | api_methods_building_type_is_improvement (lua_State *L, Building_Type *pbuilding) |
| Return TRUE if pbuilding is a building. More... | |
| const char * | api_methods_building_type_rule_name (lua_State *L, Building_Type *pbuilding) |
| Return rule name for Building_Type. More... | |
| const char * | api_methods_building_type_name_translation (lua_State *L, Building_Type *pbuilding) |
| Return translated name for Building_Type. More... | |
| bool | api_methods_city_has_building (lua_State *L, City *pcity, Building_Type *building) |
| Return TRUE iff city has building. More... | |
| int | api_methods_city_map_sq_radius (lua_State *L, City *pcity) |
| Return the square raduis of the city map. More... | |
| int | api_methods_city_size_get (lua_State *L, City *pcity) |
| Return the size of the city. More... | |
| Tile * | api_methods_city_tile_get (lua_State *L, City *pcity) |
| Return the tile of the city. More... | |
| int | api_methods_city_inspire_partisans (lua_State *L, City *self, Player *inspirer) |
| How much city inspires partisans for a player. More... | |
| int | api_methods_city_culture_get (lua_State *L, City *pcity) |
| How much culture city has? More... | |
| bool | api_methods_is_city_happy (lua_State *L, City *pcity) |
| Return TRUE iff city happy. More... | |
| bool | api_methods_is_city_unhappy (lua_State *L, City *pcity) |
| Return TRUE iff city is unhappy. More... | |
| bool | api_methods_is_city_celebrating (lua_State *L, City *pcity) |
| Return TRUE iff city is celebrating. More... | |
| bool | api_methods_is_gov_center (lua_State *L, City *pcity) |
| Return TRUE iff city is government center. More... | |
| bool | api_methods_is_capital (lua_State *L, City *pcity) |
| Return TRUE if city is capital. More... | |
| const char * | api_methods_government_rule_name (lua_State *L, Government *pgovernment) |
| Return rule name for Government. More... | |
| const char * | api_methods_government_name_translation (lua_State *L, Government *pgovernment) |
| Return translated name for Government. More... | |
| const char * | api_methods_nation_type_rule_name (lua_State *L, Nation_Type *pnation) |
| Return rule name for Nation_Type. More... | |
| const char * | api_methods_nation_type_name_translation (lua_State *L, Nation_Type *pnation) |
| Return translated adjective for Nation_Type. More... | |
| const char * | api_methods_nation_type_plural_translation (lua_State *L, Nation_Type *pnation) |
| Return translated plural noun for Nation_Type. More... | |
| const char * | api_methods_player_controlling_gui (lua_State *L, Player *pplayer) |
| Return gui type string of the controlling connection. More... | |
| bool | api_methods_player_has_wonder (lua_State *L, Player *pplayer, Building_Type *building) |
| Return TRUE iff player has wonder. More... | |
| int | api_methods_player_number (lua_State *L, Player *pplayer) |
| Return player number. More... | |
| int | api_methods_player_num_cities (lua_State *L, Player *pplayer) |
| Return the number of cities pplayer has. More... | |
| int | api_methods_player_num_units (lua_State *L, Player *pplayer) |
| Return the number of units pplayer has. More... | |
| int | api_methods_player_gold (lua_State *L, Player *pplayer) |
| Return gold for Player. More... | |
| bool | api_methods_player_knows_tech (lua_State *L, Player *pplayer, Tech_Type *ptech) |
| Return TRUE if Player knows advance ptech. More... | |
| int | api_methods_player_culture_get (lua_State *L, Player *pplayer) |
| How much culture player has? More... | |
| bool | api_methods_player_has_flag (lua_State *L, Player *pplayer, const char *flag) |
| Does player have flag set? More... | |
| bool | api_methods_player_shares_research (lua_State *L, Player *pplayer, Player *aplayer) |
| Return TRUE if players share research. More... | |
| const char * | api_methods_research_rule_name (lua_State *L, Player *pplayer) |
| Return name of the research group player belongs to. More... | |
| const char * | api_methods_research_name_translation (lua_State *L, Player *pplayer) |
| Return name of the research group player belongs to. More... | |
| Unit_List_Link * | api_methods_private_player_unit_list_head (lua_State *L, Player *pplayer) |
| Return list head for unit list for Player. More... | |
| City_List_Link * | api_methods_private_player_city_list_head (lua_State *L, Player *pplayer) |
| Return list head for city list for Player. More... | |
| const char * | api_methods_tech_type_rule_name (lua_State *L, Tech_Type *ptech) |
| Return rule name for Tech_Type. More... | |
| const char * | api_methods_tech_type_name_translation (lua_State *L, Tech_Type *ptech) |
| Return translated name for Tech_Type. More... | |
| const char * | api_methods_terrain_rule_name (lua_State *L, Terrain *pterrain) |
| Return rule name for Terrain. More... | |
| const char * | api_methods_terrain_name_translation (lua_State *L, Terrain *pterrain) |
| Return translated name for Terrain. More... | |
| const char * | api_methods_terrain_class_name (lua_State *L, Terrain *pterrain) |
| Return name of the terrain's class. More... | |
| const char * | api_methods_disaster_rule_name (lua_State *L, Disaster *pdis) |
| Return rule name for Disaster. More... | |
| const char * | api_methods_disaster_name_translation (lua_State *L, Disaster *pdis) |
| Return translated name for Disaster. More... | |
| const char * | api_methods_achievement_rule_name (lua_State *L, Achievement *pach) |
| Return rule name for Achievement. More... | |
| const char * | api_methods_achievement_name_translation (lua_State *L, Achievement *pach) |
| Return translated name for Achievement. More... | |
| const char * | api_methods_action_rule_name (lua_State *L, Action *pact) |
| Return rule name for Action. More... | |
| const char * | api_methods_action_name_translation (lua_State *L, Action *pact) |
| Return translated name for Action. More... | |
| int | api_methods_tile_nat_x (lua_State *L, Tile *ptile) |
| Return the native x coordinate of the tile. More... | |
| int | api_methods_tile_nat_y (lua_State *L, Tile *ptile) |
| Return the native y coordinate of the tile. More... | |
| int | api_methods_tile_map_x (lua_State *L, Tile *ptile) |
| Return the map x coordinate of the tile. More... | |
| int | api_methods_tile_map_y (lua_State *L, Tile *ptile) |
| Return the map y coordinate of the tile. More... | |
| City * | api_methods_tile_city (lua_State *L, Tile *ptile) |
| Return City on ptile, else nullptr. More... | |
| bool | api_methods_tile_city_exists_within_max_city_map (lua_State *L, Tile *ptile, bool may_be_on_center) |
| Return TRUE if there is a city inside the maximum city radius from ptile. More... | |
| bool | api_methods_tile_has_extra (lua_State *L, Tile *ptile, const char *name) |
| Return TRUE if there is a extra with rule name name on ptile. More... | |
| bool | api_methods_tile_has_base (lua_State *L, Tile *ptile, const char *name) |
| Return TRUE if there is a base with rule name name on ptile. More... | |
| bool | api_methods_tile_has_road (lua_State *L, Tile *ptile, const char *name) |
| Return TRUE if there is a road with rule name name on ptile. More... | |
| bool | api_methods_enemy_tile (lua_State *L, Tile *ptile, Player *against) |
| Is tile occupied by enemies. More... | |
| int | api_methods_tile_num_units (lua_State *L, Tile *ptile) |
| Return number of units on tile. More... | |
| Unit_List_Link * | api_methods_private_tile_unit_list_head (lua_State *L, Tile *ptile) |
| Return list head for unit list for Tile. More... | |
| int | api_methods_private_tile_next_outward_index (lua_State *L, Tile *pstart, int tindex, int max_dist) |
| Return nth tile iteration index (for internal use) Will return the next index, or an index < 0 when done. More... | |
| Tile * | api_methods_private_tile_for_outward_index (lua_State *L, Tile *pstart, int tindex) |
| Return tile for nth iteration index (for internal use) More... | |
| int | api_methods_tile_sq_distance (lua_State *L, Tile *ptile1, Tile *ptile2) |
| Return squared distance between tiles 1 and 2. More... | |
| bool | api_methods_unit_city_can_be_built_here (lua_State *L, Unit *punit) |
| Can punit found a city on its tile? More... | |
| Tile * | api_methods_unit_tile_get (lua_State *L, Unit *punit) |
| Return the tile of the unit. More... | |
| const Direction * | api_methods_unit_orientation_get (lua_State *L, Unit *punit) |
| Get unit orientation. More... | |
| Unit * | api_methods_unit_transporter (lua_State *L, Unit *punit) |
| Return Unit that transports punit, if any. More... | |
| Unit_List_Link * | api_methods_private_unit_cargo_list_head (lua_State *L, Unit *punit) |
| Return list head for cargo list for Unit. More... | |
| bool | api_methods_unit_type_has_flag (lua_State *L, Unit_Type *punit_type, const char *flag) |
| Return TRUE if punit_type has flag. More... | |
| bool | api_methods_unit_type_has_role (lua_State *L, Unit_Type *punit_type, const char *role) |
| Return TRUE if punit_type has role. More... | |
| bool | api_methods_unit_type_can_exist_at_tile (lua_State *L, Unit_Type *punit_type, Tile *ptile) |
| Return TRUE iff the unit type can exist on the tile. More... | |
| const char * | api_methods_unit_type_rule_name (lua_State *L, Unit_Type *punit_type) |
| Return rule name for Unit_Type. More... | |
| const char * | api_methods_unit_type_name_translation (lua_State *L, Unit_Type *punit_type) |
| Return translated name for Unit_Type. More... | |
| Unit * | api_methods_unit_list_link_data (lua_State *L, Unit_List_Link *ul_link) |
| Return Unit for list link. More... | |
| Unit_List_Link * | api_methods_unit_list_next_link (lua_State *L, Unit_List_Link *ul_link) |
| Return next list link or nullptr when link is the last link. More... | |
| City * | api_methods_city_list_link_data (lua_State *L, City_List_Link *cl_link) |
| Return City for list link. More... | |
| City_List_Link * | api_methods_city_list_next_link (lua_State *L, City_List_Link *cl_link) |
| Return next list link or nullptr when link is the last link. More... | |
| const char* api_methods_achievement_name_translation | ( | lua_State * | L, |
| Achievement * | pach | ||
| ) |
Return translated name for Achievement.
Definition at line 683 of file api_game_methods.cpp.
| const char* api_methods_achievement_rule_name | ( | lua_State * | L, |
| Achievement * | pach | ||
| ) |
Return rule name for Achievement.
Definition at line 671 of file api_game_methods.cpp.
| const char* api_methods_action_name_translation | ( | lua_State * | L, |
| Action * | pact | ||
| ) |
Return translated name for Action.
Definition at line 706 of file api_game_methods.cpp.
| const char* api_methods_action_rule_name | ( | lua_State * | L, |
| Action * | pact | ||
| ) |
Return rule name for Action.
Definition at line 695 of file api_game_methods.cpp.
| bool api_methods_building_type_is_great_wonder | ( | lua_State * | L, |
| Building_Type * | pbuilding | ||
| ) |
Return TRUE if pbuilding is a great wonder.
Definition at line 131 of file api_game_methods.cpp.
| bool api_methods_building_type_is_improvement | ( | lua_State * | L, |
| Building_Type * | pbuilding | ||
| ) |
Return TRUE if pbuilding is a building.
Definition at line 155 of file api_game_methods.cpp.
| bool api_methods_building_type_is_small_wonder | ( | lua_State * | L, |
| Building_Type * | pbuilding | ||
| ) |
Return TRUE if pbuilding is a small wonder.
Definition at line 143 of file api_game_methods.cpp.
| bool api_methods_building_type_is_wonder | ( | lua_State * | L, |
| Building_Type * | pbuilding | ||
| ) |
Return TRUE if pbuilding is a wonder.
Definition at line 119 of file api_game_methods.cpp.
| const char* api_methods_building_type_name_translation | ( | lua_State * | L, |
| Building_Type * | pbuilding | ||
| ) |
Return translated name for Building_Type.
Definition at line 180 of file api_game_methods.cpp.
| const char* api_methods_building_type_rule_name | ( | lua_State * | L, |
| Building_Type * | pbuilding | ||
| ) |
Return rule name for Building_Type.
Definition at line 167 of file api_game_methods.cpp.
| int api_methods_city_culture_get | ( | lua_State * | L, |
| City * | pcity | ||
| ) |
How much culture city has?
Definition at line 284 of file api_game_methods.cpp.
| bool api_methods_city_has_building | ( | lua_State * | L, |
| City * | pcity, | ||
| Building_Type * | building | ||
| ) |
Return TRUE iff city has building.
Definition at line 192 of file api_game_methods.cpp.
How much city inspires partisans for a player.
Definition at line 238 of file api_game_methods.cpp.
| City* api_methods_city_list_link_data | ( | lua_State * | L, |
| City_List_Link * | cl_link | ||
| ) |
Return City for list link.
Definition at line 1145 of file api_game_methods.cpp.
| City_List_Link* api_methods_city_list_next_link | ( | lua_State * | L, |
| City_List_Link * | cl_link | ||
| ) |
Return next list link or nullptr when link is the last link.
Definition at line 1155 of file api_game_methods.cpp.
| int api_methods_city_map_sq_radius | ( | lua_State * | L, |
| City * | pcity | ||
| ) |
Return the square raduis of the city map.
Definition at line 205 of file api_game_methods.cpp.
| int api_methods_city_size_get | ( | lua_State * | L, |
| City * | pcity | ||
| ) |
Return the size of the city.
Definition at line 216 of file api_game_methods.cpp.
Return the tile of the city.
Definition at line 227 of file api_game_methods.cpp.
| const char* api_methods_disaster_name_translation | ( | lua_State * | L, |
| Disaster * | pdis | ||
| ) |
Return translated name for Disaster.
Definition at line 659 of file api_game_methods.cpp.
| const char* api_methods_disaster_rule_name | ( | lua_State * | L, |
| Disaster * | pdis | ||
| ) |
Return rule name for Disaster.
Definition at line 648 of file api_game_methods.cpp.
Is tile occupied by enemies.
Definition at line 871 of file api_game_methods.cpp.
| const char* api_methods_game_ruleset_name | ( | lua_State * | L | ) |
Return name of the current ruleset.
Definition at line 110 of file api_game_methods.cpp.
| const char* api_methods_game_rulesetdir | ( | lua_State * | L | ) |
Return name of the current ruleset.
Definition at line 101 of file api_game_methods.cpp.
| int api_methods_game_turn | ( | lua_State * | L | ) |
Return the current turn.
Definition at line 42 of file api_game_methods.cpp.
| int api_methods_game_turn_deprecated | ( | lua_State * | L | ) |
Return the current turn, as if real turns started from 0.
Definition at line 82 of file api_game_methods.cpp.
| int api_methods_game_year | ( | lua_State * | L | ) |
Return the current year.
Definition at line 52 of file api_game_methods.cpp.
| int api_methods_game_year_fragment | ( | lua_State * | L | ) |
Return the current year fragment.
Definition at line 62 of file api_game_methods.cpp.
| const char* api_methods_game_year_text | ( | lua_State * | L | ) |
Return the current year fragment.
Definition at line 72 of file api_game_methods.cpp.
| const char* api_methods_government_name_translation | ( | lua_State * | L, |
| Government * | pgovernment | ||
| ) |
Return translated name for Government.
Definition at line 364 of file api_game_methods.cpp.
| const char* api_methods_government_rule_name | ( | lua_State * | L, |
| Government * | pgovernment | ||
| ) |
Return rule name for Government.
Definition at line 352 of file api_game_methods.cpp.
| bool api_methods_is_capital | ( | lua_State * | L, |
| City * | pcity | ||
| ) |
Return TRUE if city is capital.
Definition at line 341 of file api_game_methods.cpp.
| bool api_methods_is_city_celebrating | ( | lua_State * | L, |
| City * | pcity | ||
| ) |
Return TRUE iff city is celebrating.
Definition at line 319 of file api_game_methods.cpp.
| bool api_methods_is_city_happy | ( | lua_State * | L, |
| City * | pcity | ||
| ) |
Return TRUE iff city happy.
Definition at line 295 of file api_game_methods.cpp.
| bool api_methods_is_city_unhappy | ( | lua_State * | L, |
| City * | pcity | ||
| ) |
Return TRUE iff city is unhappy.
Definition at line 307 of file api_game_methods.cpp.
| bool api_methods_is_gov_center | ( | lua_State * | L, |
| City * | pcity | ||
| ) |
Return TRUE iff city is government center.
Definition at line 330 of file api_game_methods.cpp.
| const char* api_methods_nation_type_name_translation | ( | lua_State * | L, |
| Nation_Type * | pnation | ||
| ) |
Return translated adjective for Nation_Type.
Definition at line 388 of file api_game_methods.cpp.
| const char* api_methods_nation_type_plural_translation | ( | lua_State * | L, |
| Nation_Type * | pnation | ||
| ) |
Return translated plural noun for Nation_Type.
Definition at line 400 of file api_game_methods.cpp.
| const char* api_methods_nation_type_rule_name | ( | lua_State * | L, |
| Nation_Type * | pnation | ||
| ) |
Return rule name for Nation_Type.
Definition at line 376 of file api_game_methods.cpp.
| const char* api_methods_player_controlling_gui | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
Return gui type string of the controlling connection.
Definition at line 412 of file api_game_methods.cpp.
| int api_methods_player_culture_get | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
How much culture player has?
Definition at line 497 of file api_game_methods.cpp.
| int api_methods_player_gold | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
Return gold for Player.
Definition at line 471 of file api_game_methods.cpp.
| bool api_methods_player_has_flag | ( | lua_State * | L, |
| Player * | pplayer, | ||
| const char * | flag | ||
| ) |
Does player have flag set?
Definition at line 508 of file api_game_methods.cpp.
| bool api_methods_player_has_wonder | ( | lua_State * | L, |
| Player * | pplayer, | ||
| Building_Type * | building | ||
| ) |
Return TRUE iff player has wonder.
Definition at line 425 of file api_game_methods.cpp.
Return TRUE if Player knows advance ptech.
Definition at line 482 of file api_game_methods.cpp.
| int api_methods_player_num_cities | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
Return the number of cities pplayer has.
Definition at line 449 of file api_game_methods.cpp.
| int api_methods_player_num_units | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
Return the number of units pplayer has.
Definition at line 460 of file api_game_methods.cpp.
| int api_methods_player_number | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
Return player number.
Definition at line 438 of file api_game_methods.cpp.
Return TRUE if players share research.
Definition at line 528 of file api_game_methods.cpp.
| City_List_Link* api_methods_private_player_city_list_head | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
Return list head for city list for Player.
Definition at line 579 of file api_game_methods.cpp.
| Unit_List_Link* api_methods_private_player_unit_list_head | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
Return list head for unit list for Player.
Definition at line 568 of file api_game_methods.cpp.
Return tile for nth iteration index (for internal use)
Definition at line 952 of file api_game_methods.cpp.
| int api_methods_private_tile_next_outward_index | ( | lua_State * | L, |
| Tile * | pstart, | ||
| int | tindex, | ||
| int | max_dist | ||
| ) |
Return nth tile iteration index (for internal use) Will return the next index, or an index < 0 when done.
Definition at line 913 of file api_game_methods.cpp.
| Unit_List_Link* api_methods_private_tile_unit_list_head | ( | lua_State * | L, |
| Tile * | ptile | ||
| ) |
Return list head for unit list for Tile.
Definition at line 900 of file api_game_methods.cpp.
| Unit_List_Link* api_methods_private_unit_cargo_list_head | ( | lua_State * | L, |
| Unit * | punit | ||
| ) |
Return list head for cargo list for Unit.
Definition at line 1033 of file api_game_methods.cpp.
| const char* api_methods_research_name_translation | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
Return name of the research group player belongs to.
Definition at line 552 of file api_game_methods.cpp.
| const char* api_methods_research_rule_name | ( | lua_State * | L, |
| Player * | pplayer | ||
| ) |
Return name of the research group player belongs to.
Definition at line 541 of file api_game_methods.cpp.
| const char* api_methods_tech_type_name_translation | ( | lua_State * | L, |
| Tech_Type * | ptech | ||
| ) |
Return translated name for Tech_Type.
Definition at line 602 of file api_game_methods.cpp.
| const char* api_methods_tech_type_rule_name | ( | lua_State * | L, |
| Tech_Type * | ptech | ||
| ) |
Return rule name for Tech_Type.
Definition at line 591 of file api_game_methods.cpp.
| const char* api_methods_terrain_class_name | ( | lua_State * | L, |
| Terrain * | pterrain | ||
| ) |
Return name of the terrain's class.
Definition at line 637 of file api_game_methods.cpp.
| const char* api_methods_terrain_name_translation | ( | lua_State * | L, |
| Terrain * | pterrain | ||
| ) |
Return translated name for Terrain.
Definition at line 625 of file api_game_methods.cpp.
| const char* api_methods_terrain_rule_name | ( | lua_State * | L, |
| Terrain * | pterrain | ||
| ) |
Return rule name for Terrain.
Definition at line 614 of file api_game_methods.cpp.
Return City on ptile, else nullptr.
Definition at line 761 of file api_game_methods.cpp.
| bool api_methods_tile_city_exists_within_max_city_map | ( | lua_State * | L, |
| Tile * | ptile, | ||
| bool | may_be_on_center | ||
| ) |
Return TRUE if there is a city inside the maximum city radius from ptile.
Definition at line 772 of file api_game_methods.cpp.
| bool api_methods_tile_has_base | ( | lua_State * | L, |
| Tile * | ptile, | ||
| const char * | name | ||
| ) |
Return TRUE if there is a base with rule name name on ptile.
If no name is specified return true if there is any base on ptile.
Definition at line 814 of file api_game_methods.cpp.
| bool api_methods_tile_has_extra | ( | lua_State * | L, |
| Tile * | ptile, | ||
| const char * | name | ||
| ) |
Return TRUE if there is a extra with rule name name on ptile.
If no name is specified return true if there is a extra on ptile.
Definition at line 786 of file api_game_methods.cpp.
| bool api_methods_tile_has_road | ( | lua_State * | L, |
| Tile * | ptile, | ||
| const char * | name | ||
| ) |
Return TRUE if there is a road with rule name name on ptile.
If no name is specified return true if there is any road on ptile.
Definition at line 843 of file api_game_methods.cpp.
| int api_methods_tile_map_x | ( | lua_State * | L, |
| Tile * | ptile | ||
| ) |
Return the map x coordinate of the tile.
Definition at line 739 of file api_game_methods.cpp.
| int api_methods_tile_map_y | ( | lua_State * | L, |
| Tile * | ptile | ||
| ) |
Return the map y coordinate of the tile.
Definition at line 750 of file api_game_methods.cpp.
| int api_methods_tile_nat_x | ( | lua_State * | L, |
| Tile * | ptile | ||
| ) |
Return the native x coordinate of the tile.
Definition at line 717 of file api_game_methods.cpp.
| int api_methods_tile_nat_y | ( | lua_State * | L, |
| Tile * | ptile | ||
| ) |
Return the native y coordinate of the tile.
Definition at line 728 of file api_game_methods.cpp.
| int api_methods_tile_num_units | ( | lua_State * | L, |
| Tile * | ptile | ||
| ) |
Return number of units on tile.
Definition at line 889 of file api_game_methods.cpp.
Return squared distance between tiles 1 and 2.
Definition at line 977 of file api_game_methods.cpp.
| bool api_methods_unit_city_can_be_built_here | ( | lua_State * | L, |
| Unit * | punit | ||
| ) |
Can punit found a city on its tile?
Definition at line 989 of file api_game_methods.cpp.
| Unit* api_methods_unit_list_link_data | ( | lua_State * | L, |
| Unit_List_Link * | ul_link | ||
| ) |
Return Unit for list link.
Definition at line 1124 of file api_game_methods.cpp.
| Unit_List_Link* api_methods_unit_list_next_link | ( | lua_State * | L, |
| Unit_List_Link * | ul_link | ||
| ) |
Return next list link or nullptr when link is the last link.
Definition at line 1134 of file api_game_methods.cpp.
Get unit orientation.
Definition at line 1011 of file api_game_methods.cpp.
Return the tile of the unit.
Definition at line 1000 of file api_game_methods.cpp.
Return Unit that transports punit, if any.
Definition at line 1022 of file api_game_methods.cpp.
| bool api_methods_unit_type_can_exist_at_tile | ( | lua_State * | L, |
| Unit_Type * | punit_type, | ||
| Tile * | ptile | ||
| ) |
Return TRUE iff the unit type can exist on the tile.
Definition at line 1086 of file api_game_methods.cpp.
| bool api_methods_unit_type_has_flag | ( | lua_State * | L, |
| Unit_Type * | punit_type, | ||
| const char * | flag | ||
| ) |
Return TRUE if punit_type has flag.
Definition at line 1044 of file api_game_methods.cpp.
| bool api_methods_unit_type_has_role | ( | lua_State * | L, |
| Unit_Type * | punit_type, | ||
| const char * | role | ||
| ) |
Return TRUE if punit_type has role.
Definition at line 1065 of file api_game_methods.cpp.
| const char* api_methods_unit_type_name_translation | ( | lua_State * | L, |
| Unit_Type * | punit_type | ||
| ) |
Return translated name for Unit_Type.
Definition at line 1112 of file api_game_methods.cpp.
| const char* api_methods_unit_type_rule_name | ( | lua_State * | L, |
| Unit_Type * | punit_type | ||
| ) |
Return rule name for Unit_Type.
Definition at line 1100 of file api_game_methods.cpp.