Project

General

Profile

Feature #897 » 0048-Lua-Add-Player-love-method.patch

Marko Lindqvist, 09/21/2024 12:12 AM

View differences:

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)];
}
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);
}
$[
(1-1/2)