Feature #897 » 0040-Lua-Add-Player-love-method.patch
server/scripting/api_server_game_methods.c | ||
---|---|---|
return get_tag_score(tag, pplayer);
|
||
}
|
||
/**********************************************************************//**
|
||
Return player's love towards another.
|
||
**************************************************************************/
|
||
int api_methods_love(lua_State *L, Player *pplayer, Player *towards)
|
||
{
|
||
LUASCRIPT_CHECK_STATE(L, 0);
|
||
LUASCRIPT_CHECK_SELF(L, pplayer, 0);
|
||
LUASCRIPT_CHECK_ARG_NIL(L, towards, 3, Player, 0);
|
||
return pplayer->ai_common.love[player_number(towards)] * 1000 / MAX_AI_LOVE;
|
||
}
|
server/scripting/api_server_game_methods.h | ||
---|---|---|
int api_methods_player_free_bulbs(lua_State *L, Player *pplayer);
|
||
int api_methods_tag_score(lua_State *L, Player *pplayer, const char *tag);
|
||
int api_methods_love(lua_State *L, Player *pplayer, Player *towards);
|
||
#endif /* FC__API_SERVER_GAME_METHODS_H */
|
server/scripting/tolua_server.pkg | ||
---|---|---|
int api_methods_tag_score
|
||
@ tag_score (lua_State *L, Player *pplayer, const char *tag);
|
||
int api_methods_love
|
||
@ love (lua_State *L, Player *pplayer, Player *towards);
|
||
}
|
||
$[
|
- « Previous
- 1
- 2
- Next »