Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #904702 ยป 0033-Lua-Add-city-is_primary_capital.patch

Marko Lindqvist, 2020-12-09 08:37 PM

View differences:

common/scriptcore/api_game_methods.c
return is_capital(pcity);
}
/*************************************************************************//**
Return TRUE if city is primary capital
*****************************************************************************/
bool api_methods_is_primary_capital(lua_State *L, City *pcity)
{
LUASCRIPT_CHECK_STATE(L, FALSE);
LUASCRIPT_CHECK_SELF(L, pcity, FALSE);
return pcity->capital == CAPITAL_PRIMARY;
}
/*************************************************************************//**
Return rule name for Government
*****************************************************************************/
common/scriptcore/api_game_methods.h
bool api_methods_is_city_celebrating(lua_State *L, City *pcity);
bool api_methods_is_gov_center(lua_State *L, City *pcity);
bool api_methods_is_capital(lua_State *L, City *pcity);
bool api_methods_is_primary_capital(lua_State *L, City *pcity);
/* Government */
const char *api_methods_government_rule_name(lua_State *L,
common/scriptcore/tolua_game.pkg
@ is_gov_center(lua_State *L, City *self);
bool api_methods_is_capital
@ is_capital(lua_State *L, City *self);
bool api_methods_is_primary_capital
@ is_primary_capital(lua_State *L, City *self);
}
$[
    (1-1/1)