Feature #844 ยป 0029-Lua-Add-City-nationality_citizens.patch
| common/scriptcore/api_game_methods.c | ||
|---|---|---|
|
return pcity->capital == CAPITAL_PRIMARY;
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
|
Return number of citizens of the given nationality in a city
|
||
|
**************************************************************************/
|
||
|
int api_methods_city_nationality_citizens(lua_State *L, City *pcity,
|
||
|
Player *nationality)
|
||
|
{
|
||
|
LUASCRIPT_CHECK_STATE(L, -1);
|
||
|
LUASCRIPT_CHECK_SELF(L, pcity, -1);
|
||
|
return citizens_nation_get(pcity, nationality->slot);
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
|
Return rule name for Government
|
||
|
**************************************************************************/
|
||
| common/scriptcore/api_game_methods.h | ||
|---|---|---|
|
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);
|
||
|
int api_methods_city_nationality_citizens(lua_State *L, City *pcity,
|
||
|
Player *nationality);
|
||
|
/* Counter */
|
||
|
const char *api_methods_counter_rule_name(lua_State *L, Counter *c);
|
||
| common/scriptcore/tolua_game.pkg | ||
|---|---|---|
|
@ link_text(lua_State *L, City *self);
|
||
|
const char *api_methods_city_tile_link
|
||
|
@ tile_link_text(lua_State *L, City *self);
|
||
|
int api_methods_city_nationality_citizens
|
||
|
@ nationality_citizens(lua_State *L, City *self, Player *nationality);
|
||
|
}
|
||
|
$[
|
||