Feature #876 » 0038-Lua-Add-Player-diplstate.patch
| common/scriptcore/api_game_methods.c | ||
|---|---|---|
|   return player_primary_capital(pplayer); | ||
| } | ||
| /**********************************************************************//** | ||
|   Return diplomatic state between the players. | ||
| **************************************************************************/ | ||
| const char *api_methods_get_diplstate(lua_State *L, Player *pplayer1, | ||
|                                       Player *pplayer2) | ||
| { | ||
|   LUASCRIPT_CHECK_STATE(L, NULL); | ||
|   LUASCRIPT_CHECK_SELF(L, pplayer1, NULL); | ||
|   LUASCRIPT_CHECK_ARG_NIL(L, pplayer2, 3, Player, NULL); | ||
|   return Qn_(diplstate_type_name(player_diplstate_get(pplayer1, pplayer2)->type)); | ||
| } | ||
| /**********************************************************************//** | ||
|   Return if a unit can upgrade considering where it is now. | ||
|   If is_free is FALSE, considers local city and the owner's treasury. | ||
| common/scriptcore/api_game_methods.h | ||
|---|---|---|
| City *api_methods_player_primary_capital(lua_State *L, Player *pplayer); | ||
| const char *api_methods_get_diplstate(lua_State *L, Player *pplayer1, Player *pplayer2); | ||
| /* Tech Type */ | ||
| const char *api_methods_tech_type_rule_name(lua_State *L, Tech_Type *ptech); | ||
| const char *api_methods_tech_type_name_translation(lua_State *L, Tech_Type *ptech); | ||
| common/scriptcore/tolua_game.pkg | ||
|---|---|---|
|   City *api_methods_player_primary_capital | ||
|     @ primary_capital(lua_State *L, Player *pplayer); | ||
|   const char *api_methods_get_diplstate | ||
|     @ diplstate(lua_State *L, Player *pplayer1, Player *pplayer2); | ||
| } | ||
| module methods_private { | ||