aboutsummaryrefslogtreecommitdiff
path: root/lib/lua/src/ltm.h
diff options
context:
space:
mode:
authorCoderForTheBetter <marcumjp@gmail.com>2018-11-28 03:38:50 -0500
committerLoïc Blot <nerzhul@users.noreply.github.com>2018-11-28 09:38:50 +0100
commitfaa358e797128ab07bb5644ce305a832d59e5596 (patch)
treedcf05ef0611b839503c4845fd89ad9519ee1c4bb /lib/lua/src/ltm.h
parent9519d57017cfa28eb4f2fbf3c780f826017bbb00 (diff)
downloadminetest-faa358e797128ab07bb5644ce305a832d59e5596.tar.gz
minetest-faa358e797128ab07bb5644ce305a832d59e5596.tar.bz2
minetest-faa358e797128ab07bb5644ce305a832d59e5596.zip
Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
Diffstat (limited to 'lib/lua/src/ltm.h')
0 files changed, 0 insertions, 0 deletions
pc">#pragma once #include "irrlichttypes_bloated.h" #include "lua_api/l_base.h" class Metadata; /* NodeMetaRef */ class MetaDataRef : public ModApiBase { public: virtual ~MetaDataRef() = default; protected: static MetaDataRef *checkobject(lua_State *L, int narg); virtual void reportMetadataChange(const std::string *name = nullptr) {} virtual Metadata *getmeta(bool auto_create) = 0; virtual void clearMeta() = 0; virtual void handleToTable(lua_State *L, Metadata *meta); virtual bool handleFromTable(lua_State *L, int table, Metadata *meta); // Exported functions // contains(self, name) static int l_contains(lua_State *L); // get(self, name) static int l_get(lua_State *L); // get_string(self, name) static int l_get_string(lua_State *L); // set_string(self, name, var) static int l_set_string(lua_State *L); // get_int(self, name) static int l_get_int(lua_State *L); // set_int(self, name, var) static int l_set_int(lua_State *L); // get_float(self, name) static int l_get_float(lua_State *L); // set_float(self, name, var) static int l_set_float(lua_State *L); // to_table(self) static int l_to_table(lua_State *L); // from_table(self, table) static int l_from_table(lua_State *L); // equals(self, other) static int l_equals(lua_State *L); };