#include <l_localplayer.h>
Public Member Functions | |
| LuaLocalPlayer (LocalPlayer *m) | |
| ~LuaLocalPlayer ()=default | |
Static Public Member Functions | |
| static void | create (lua_State *L, LocalPlayer *m) |
| static void | Register (lua_State *L) |
| Static Public Member Functions inherited from ModApiBase | |
| static ScriptApiBase * | getScriptApiBase (lua_State *L) |
| static Server * | getServer (lua_State *L) |
| static ServerInventoryManager * | getServerInventoryMgr (lua_State *L) |
| static EmergeThread * | getEmergeThread (lua_State *L) |
| static IGameDef * | getGameDef (lua_State *L) |
| static Environment * | getEnv (lua_State *L) |
| static std::string | getCurrentModPath (lua_State *L) |
| template<typename T> | |
| static T * | getScriptApi (lua_State *L) |
| static bool | registerFunction (lua_State *L, const char *name, lua_CFunction func, int top) |
| template<typename T> | |
| static void | registerClass (lua_State *L, const luaL_Reg *methods, const luaL_Reg *metamethods) |
| template<typename T> | |
| static T * | checkObject (lua_State *L, int narg) |
| static int | l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func) |
| A wrapper for deprecated functions. | |
Static Public Attributes | |
| static const char | className [] = "LocalPlayer" |
Static Private Member Functions | |
| static int | gc_object (lua_State *L) |
| static int | l_get_velocity (lua_State *L) |
| static int | l_get_hp (lua_State *L) |
| static int | l_get_name (lua_State *L) |
| static int | l_get_wield_index (lua_State *L) |
| static int | l_get_wielded_item (lua_State *L) |
| static int | l_is_attached (lua_State *L) |
| static int | l_is_touching_ground (lua_State *L) |
| static int | l_is_in_liquid (lua_State *L) |
| static int | l_is_in_liquid_stable (lua_State *L) |
| static int | l_is_climbing (lua_State *L) |
| static int | l_swimming_vertical (lua_State *L) |
| static int | l_get_physics_override (lua_State *L) |
| static int | l_get_override_pos (lua_State *L) |
| static int | l_get_last_pos (lua_State *L) |
| static int | l_get_last_velocity (lua_State *L) |
| static int | l_get_last_look_vertical (lua_State *L) |
| static int | l_get_last_look_horizontal (lua_State *L) |
| static int | l_get_control (lua_State *L) |
| static int | l_get_breath (lua_State *L) |
| static int | l_get_pos (lua_State *L) |
| static int | l_get_movement_acceleration (lua_State *L) |
| static int | l_get_movement_speed (lua_State *L) |
| static int | l_get_movement (lua_State *L) |
| static int | l_get_armor_groups (lua_State *L) |
| static int | l_hud_add (lua_State *L) |
| static int | l_hud_remove (lua_State *L) |
| static int | l_hud_change (lua_State *L) |
| static int | l_hud_get (lua_State *L) |
| static int | l_hud_get_all (lua_State *L) |
| static int | l_get_move_resistance (lua_State *L) |
| static LocalPlayer * | getobject (LuaLocalPlayer *ref) |
| static LocalPlayer * | getobject (lua_State *L, int narg) |
Private Attributes | |
| LocalPlayer * | m_localplayer = nullptr |
Static Private Attributes | |
| static const luaL_Reg | methods [] |
Additional Inherited Members | |
| Protected Member Functions inherited from LuaHelper | |
| template<> | |
| bool | readParam (lua_State *L, int index) |
| template<> | |
| s16 | readParam (lua_State *L, int index) |
| template<> | |
| int | readParam (lua_State *L, int index) |
| template<> | |
| float | readParam (lua_State *L, int index) |
| template<> | |
| v2s16 | readParam (lua_State *L, int index) |
| template<> | |
| v2f | readParam (lua_State *L, int index) |
| template<> | |
| v3f | readParam (lua_State *L, int index) |
| template<> | |
| std::string_view | readParam (lua_State *L, int index) |
| template<> | |
| std::string | readParam (lua_State *L, int index) |
| template<> | |
| std::string_view | readParam (lua_State *L, int index) |
| Read a string from Lua state L at index without copying it. | |
| Static Protected Member Functions inherited from LuaHelper | |
| template<typename T> | |
| static T | readParam (lua_State *L, int index) |
| Read a value using a template type T from Lua state L at index. | |
| template<typename T> | |
| static T | readParam (lua_State *L, int index, const T &default_value) |
| Read a value using a template type T from Lua state L at index. | |
| static bool | geti (lua_State *L, int table, int i) |
| Utility for list iteration. | |
| template<typename F> | |
| static void | for_ipairs (lua_State *L, int table, const F &f) |
| Iterate values t[1], t[2], ... of the given table in order. | |
| LuaLocalPlayer::LuaLocalPlayer | ( | LocalPlayer * | m | ) |
References m_localplayer.
Referenced by create(), gc_object(), getobject(), getobject(), and l_get_override_pos().
|
default |
|
static |
References LuaLocalPlayer(), and className.
Referenced by ClientScripting::on_client_ready().
|
staticprivate |
References LuaLocalPlayer().
Referenced by Register().
|
staticprivate |
References LuaLocalPlayer(), ModApiBase::checkObject(), and getobject().
|
staticprivate |
References LuaLocalPlayer(), and m_localplayer.
Referenced by getobject(), l_get_armor_groups(), l_get_breath(), l_get_control(), l_get_hp(), l_get_last_look_horizontal(), l_get_last_look_vertical(), l_get_last_pos(), l_get_last_velocity(), l_get_move_resistance(), l_get_movement(), l_get_movement_acceleration(), l_get_movement_speed(), l_get_name(), l_get_physics_override(), l_get_pos(), l_get_velocity(), l_get_wield_index(), l_get_wielded_item(), l_hud_add(), l_hud_change(), l_hud_get(), l_hud_get_all(), l_hud_remove(), l_is_attached(), l_is_climbing(), l_is_in_liquid(), l_is_in_liquid_stable(), l_is_touching_ground(), and l_swimming_vertical().
|
staticprivate |
References LocalPlayer::getCAO(), GenericCAO::getGroups(), getobject(), and push_groups().
|
staticprivate |
|
staticprivate |
References PlayerControl::aux1, PlayerControl::dig, PlayerControl::direction_keys, PlayerControl::getMovement(), getobject(), Player::getPlayerControl(), PlayerControl::jump, PlayerControl::place, PlayerControl::sneak, and PlayerControl::zoom.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
References BS, getobject(), LocalPlayer::last_position, and push_v3f().
|
staticprivate |
References getobject(), LocalPlayer::last_speed, and push_v3f().
|
staticprivate |
|
staticprivate |
References getobject(), Player::movement_gravity, Player::movement_liquid_fluidity, Player::movement_liquid_fluidity_smooth, and Player::movement_liquid_sink.
|
staticprivate |
References getobject(), Player::movement_acceleration_air, Player::movement_acceleration_default, and Player::movement_acceleration_fast.
|
staticprivate |
References getobject(), Player::movement_speed_climb, Player::movement_speed_crouch, Player::movement_speed_fast, Player::movement_speed_jump, and Player::movement_speed_walk.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
References BS, getobject(), LocalPlayer::getPosition(), and push_v3f().
|
staticprivate |
References BS, getobject(), Player::getSpeed(), and push_v3f().
|
staticprivate |
|
staticprivate |
References LuaItemStack::create(), getobject(), and Player::getWieldedItem().
|
staticprivate |
References Player::addHud(), getobject(), read_hud_element(), and U32_MAX.
|
staticprivate |
References Player::getHud(), getobject(), and read_hud_change().
|
staticprivate |
References Player::getHud(), getobject(), and push_hud_element().
|
staticprivate |
References Player::getHudElements(), getobject(), and push_hud_element().
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
References getobject(), and LocalPlayer::in_liquid_stable.
|
staticprivate |
|
staticprivate |
References getobject(), and LocalPlayer::swimming_vertical.
|
static |
References gc_object(), methods, and ModApiBase::registerClass().
Referenced by ClientScripting::InitializeModApi().
|
static |
Referenced by create().
|
private |
Referenced by LuaLocalPlayer(), and getobject().
|
staticprivate |
Referenced by Register().