Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
l_localplayer.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2017 Dumbeldor, Vincent Glize <vincent.glize@live.fr>
4
5#pragma once
6
7#include "l_base.h"
8
9class LocalPlayer;
10
12{
13private:
14 static const luaL_Reg methods[];
15
16 // garbage collector
17 static int gc_object(lua_State *L);
18
19 // get_velocity(self)
20 static int l_get_velocity(lua_State *L);
21
22 // get_hp(self)
23 static int l_get_hp(lua_State *L);
24
25 // get_name(self)
26 static int l_get_name(lua_State *L);
27
28 // get_wield_index(self)
29 static int l_get_wield_index(lua_State *L);
30
31 // get_wielded_item(self)
32 static int l_get_wielded_item(lua_State *L);
33
34 static int l_is_attached(lua_State *L);
35 static int l_is_touching_ground(lua_State *L);
36 static int l_is_in_liquid(lua_State *L);
37 static int l_is_in_liquid_stable(lua_State *L);
38 static int l_is_climbing(lua_State *L);
39 static int l_swimming_vertical(lua_State *L);
40
41 static int l_get_physics_override(lua_State *L);
42
43 static int l_get_override_pos(lua_State *L);
44
45 static int l_get_last_pos(lua_State *L);
46 static int l_get_last_velocity(lua_State *L);
47 static int l_get_last_look_vertical(lua_State *L);
48 static int l_get_last_look_horizontal(lua_State *L);
49
50 // get_control(self)
51 static int l_get_control(lua_State *L);
52
53 // get_breath(self)
54 static int l_get_breath(lua_State *L);
55
56 // get_pos(self)
57 static int l_get_pos(lua_State *L);
58
59 // get_movement_acceleration(self)
60 static int l_get_movement_acceleration(lua_State *L);
61
62 // get_movement_speed(self)
63 static int l_get_movement_speed(lua_State *L);
64
65 // get_movement(self)
66 static int l_get_movement(lua_State *L);
67
68 // get_armor_groups(self)
69 static int l_get_armor_groups(lua_State *L);
70
71 // hud_add(self, id, form)
72 static int l_hud_add(lua_State *L);
73
74 // hud_rm(self, id)
75 static int l_hud_remove(lua_State *L);
76
77 // hud_change(self, id, stat, data)
78 static int l_hud_change(lua_State *L);
79 // hud_get(self, id)
80 static int l_hud_get(lua_State *L);
81 // hud_get_all(self)
82 static int l_hud_get_all(lua_State *L);
83
84 static int l_get_move_resistance(lua_State *L);
85
87 static LocalPlayer *getobject(lua_State *L, int narg);
88
90
91public:
93 ~LuaLocalPlayer() = default;
94
95 static void create(lua_State *L, LocalPlayer *m);
96
97 static void Register(lua_State *L);
98
99 static const char className[];
100};
Definition localplayer.h:49
Definition l_localplayer.h:12
static int l_get_move_resistance(lua_State *L)
Definition l_localplayer.cpp:116
LuaLocalPlayer(LocalPlayer *m)
Definition l_localplayer.cpp:14
static int l_get_physics_override(lua_State *L)
Definition l_localplayer.cpp:141
static int l_is_touching_ground(lua_State *L)
Definition l_localplayer.cpp:92
static int l_get_velocity(lua_State *L)
Definition l_localplayer.cpp:40
static int l_get_last_look_vertical(lua_State *L)
Definition l_localplayer.cpp:214
static int l_get_control(lua_State *L)
Definition l_localplayer.cpp:231
static int l_get_last_pos(lua_State *L)
Definition l_localplayer.cpp:198
static int l_hud_change(lua_State *L)
Definition l_localplayer.cpp:385
static const luaL_Reg methods[]
Definition l_localplayer.h:471
static int l_is_in_liquid(lua_State *L)
Definition l_localplayer.cpp:100
static int l_get_name(lua_State *L)
Definition l_localplayer.cpp:56
static int gc_object(lua_State *L)
Definition l_localplayer.cpp:454
static int l_get_pos(lua_State *L)
Definition l_localplayer.cpp:273
static int l_is_attached(lua_State *L)
Definition l_localplayer.cpp:84
static int l_get_armor_groups(lua_State *L)
Definition l_localplayer.cpp:346
static int l_hud_get(lua_State *L)
Definition l_localplayer.cpp:404
static int l_is_in_liquid_stable(lua_State *L)
Definition l_localplayer.cpp:108
static int l_get_last_velocity(lua_State *L)
Definition l_localplayer.cpp:206
static const char className[]
Definition l_localplayer.h:99
static int l_get_breath(lua_State *L)
Definition l_localplayer.cpp:264
static int l_swimming_vertical(lua_State *L)
Definition l_localplayer.cpp:132
~LuaLocalPlayer()=default
static int l_get_movement_speed(lua_State *L)
Definition l_localplayer.cpp:300
static int l_hud_remove(lua_State *L)
Definition l_localplayer.cpp:371
static int l_get_movement(lua_State *L)
Definition l_localplayer.cpp:324
static int l_is_climbing(lua_State *L)
Definition l_localplayer.cpp:124
static int l_get_wield_index(lua_State *L)
Definition l_localplayer.cpp:65
static int l_get_movement_acceleration(lua_State *L)
Definition l_localplayer.cpp:282
static LocalPlayer * getobject(LuaLocalPlayer *ref)
Definition l_localplayer.cpp:440
static int l_get_last_look_horizontal(lua_State *L)
Definition l_localplayer.cpp:222
static int l_hud_add(lua_State *L)
Definition l_localplayer.cpp:354
static void create(lua_State *L, LocalPlayer *m)
Definition l_localplayer.cpp:18
static int l_get_hp(lua_State *L)
Definition l_localplayer.cpp:48
static int l_hud_get_all(lua_State *L)
Definition l_localplayer.cpp:421
static int l_get_wielded_item(lua_State *L)
Definition l_localplayer.cpp:74
static int l_get_override_pos(lua_State *L)
LocalPlayer * m_localplayer
Definition l_localplayer.h:89
Definition l_base.h:28