Project

General

Profile

Feature #557 ยป 0065-Lua-Add-Player-primary_capital-method.patch

Marko Lindqvist, 05/06/2024 04:08 AM

View differences:

common/scriptcore/api_game_methods.c
return can_player_build_improvement_direct(pplayer, itype);
}
/**********************************************************************//**
Find player's primary capital, if known
**************************************************************************/
City *api_methods_player_primary_capital(lua_State *L, Player *pplayer)
{
LUASCRIPT_CHECK_STATE(L, NULL);
LUASCRIPT_CHECK_SELF(L, pplayer, NULL);
return player_primary_capital(pplayer);
}
/**********************************************************************//**
Return if a unit can upgrade considering where it is now.
common/scriptcore/api_game_methods.h
bool api_methods_player_can_build_impr_direct(lua_State *L, Player *pplayer,
Building_Type *itype);
City *api_methods_player_primary_capital(lua_State *L, Player *pplayer);
/* 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
Unit_Type *api_methods_player_can_upgrade
@ can_upgrade(lua_State *L, Player *pplayer, Unit_Type *utype);
bool api_methods_player_can_build_impr_direct
@ can_build_direct (lua_State *L, Player *pplayer, Building_Type *itype);
@ can_build_direct(lua_State *L, Player *pplayer, Building_Type *itype);
bool api_methods_player_can_build_unit_direct
@ can_build_direct (lua_State *L, Player *pplayer, Unit_Type *utype);
@ can_build_direct(lua_State *L, Player *pplayer, Unit_Type *utype);
City *api_methods_player_primary_capital
@ primary_capital(lua_State *L, Player *pplayer);
}
module methods_private {
    (1-1/1)