Feature #904 » 0058-Lua-Add-Player-add_love.patch
server/scripting/api_server_game_methods.c | ||
---|---|---|
return pplayer->ai_common.love[player_number(towards)];
|
||
}
|
||
/**********************************************************************//**
|
||
Add player love towards another.
|
||
**************************************************************************/
|
||
void api_methods_add_love(lua_State *L, Player *pplayer, Player *towards,
|
||
int amount)
|
||
{
|
||
LUASCRIPT_CHECK_STATE(L);
|
||
LUASCRIPT_CHECK_SELF(L, pplayer);
|
||
LUASCRIPT_CHECK_ARG_NIL(L, towards, 3, Player);
|
||
pplayer->ai_common.love[player_number(towards)]
|
||
+= amount * MAX_AI_LOVE / 1000;
|
||
}
|
server/scripting/api_server_game_methods.h | ||
---|---|---|
int api_methods_tag_score(lua_State *L, Player *pplayer, const char *tag);
|
||
int api_methods_love(lua_State *L, Player *pplayer, Player *towards);
|
||
void api_methods_add_love(lua_State *L, Player *pplayer, Player *towards, int amount);
|
||
#endif /* FC__API_SERVER_GAME_METHODS_H */
|
server/scripting/tolua_server.pkg | ||
---|---|---|
int api_methods_love
|
||
@ love (lua_State *L, Player *pplayer, Player *towards);
|
||
void api_methods_add_love
|
||
@ add_love (lua_State *L, Player *pplayer, Player *towards, int amount);
|
||
}
|
||
$[
|
- « Previous
- 1
- 2
- Next »