Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
LuaMinimap Class Reference

#include <l_minimap.h>

+ Inheritance diagram for LuaMinimap:
+ Collaboration diagram for LuaMinimap:

Public Member Functions

 LuaMinimap (Minimap *m)
 
 ~LuaMinimap ()=default
 

Static Public Member Functions

static void create (lua_State *L, Minimap *object)
 
static Minimapgetobject (LuaMinimap *ref)
 
static void Register (lua_State *L)
 
- Static Public Member Functions inherited from ModApiBase
static ScriptApiBasegetScriptApiBase (lua_State *L)
 
static ServergetServer (lua_State *L)
 
static ServerInventoryManagergetServerInventoryMgr (lua_State *L)
 
static EmergeThreadgetEmergeThread (lua_State *L)
 
static IGameDefgetGameDef (lua_State *L)
 
static EnvironmentgetEnv (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)
 
static void registerClass (lua_State *L, const char *name, 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 [] = "Minimap"
 

Static Private Member Functions

static int gc_object (lua_State *L)
 
static int l_get_pos (lua_State *L)
 
static int l_set_pos (lua_State *L)
 
static int l_get_angle (lua_State *L)
 
static int l_set_angle (lua_State *L)
 
static int l_get_mode (lua_State *L)
 
static int l_set_mode (lua_State *L)
 
static int l_show (lua_State *L)
 
static int l_hide (lua_State *L)
 
static int l_set_shape (lua_State *L)
 
static int l_get_shape (lua_State *L)
 

Private Attributes

Minimapm_minimap = 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.
 

Constructor & Destructor Documentation

◆ LuaMinimap()

LuaMinimap::LuaMinimap ( Minimap * m)

Referenced by create().

+ Here is the caller graph for this function:

◆ ~LuaMinimap()

LuaMinimap::~LuaMinimap ( )
default

Member Function Documentation

◆ create()

void LuaMinimap::create ( lua_State * L,
Minimap * object )
static

References LuaMinimap(), and className.

Referenced by ClientScripting::on_minimap_ready().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gc_object()

int LuaMinimap::gc_object ( lua_State * L)
staticprivate

Referenced by Register().

+ Here is the caller graph for this function:

◆ getobject()

Minimap * LuaMinimap::getobject ( LuaMinimap * ref)
static

References m_minimap.

Referenced by l_get_angle(), l_get_mode(), l_get_pos(), l_get_shape(), l_hide(), l_set_angle(), l_set_mode(), l_set_pos(), l_set_shape(), and l_show().

+ Here is the caller graph for this function:

◆ l_get_angle()

int LuaMinimap::l_get_angle ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), Minimap::getAngle(), and getobject().

+ Here is the call graph for this function:

◆ l_get_mode()

int LuaMinimap::l_get_mode ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), Minimap::getModeIndex(), and getobject().

+ Here is the call graph for this function:

◆ l_get_pos()

int LuaMinimap::l_get_pos ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), getobject(), Minimap::getPos(), and push_v3s16().

+ Here is the call graph for this function:

◆ l_get_shape()

int LuaMinimap::l_get_shape ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), Minimap::getMinimapShape(), and getobject().

+ Here is the call graph for this function:

◆ l_hide()

int LuaMinimap::l_hide ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), Minimap::getModeIndex(), getobject(), and Minimap::setModeIndex().

+ Here is the call graph for this function:

◆ l_set_angle()

int LuaMinimap::l_set_angle ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), getobject(), and Minimap::setAngle().

+ Here is the call graph for this function:

◆ l_set_mode()

int LuaMinimap::l_set_mode ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), Minimap::getMaxModeIndex(), getobject(), and Minimap::setModeIndex().

+ Here is the call graph for this function:

◆ l_set_pos()

int LuaMinimap::l_set_pos ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), getobject(), read_v3s16(), and Minimap::setPos().

+ Here is the call graph for this function:

◆ l_set_shape()

int LuaMinimap::l_set_shape ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), getobject(), and Minimap::setMinimapShape().

+ Here is the call graph for this function:

◆ l_show()

int LuaMinimap::l_show ( lua_State * L)
staticprivate

References ModApiBase::checkObject(), g_settings, Settings::getBool(), Minimap::getMaxModeIndex(), Minimap::getModeIndex(), getobject(), and Minimap::setModeIndex().

+ Here is the call graph for this function:

◆ Register()

void LuaMinimap::Register ( lua_State * L)
static

References className, gc_object(), methods, and ModApiBase::registerClass().

Referenced by ClientScripting::InitializeModApi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ className

const char LuaMinimap::className = "Minimap"
static

Referenced by create(), and Register().

◆ m_minimap

Minimap* LuaMinimap::m_minimap = nullptr
private

Referenced by getobject().

◆ methods

const luaL_Reg LuaMinimap::methods
staticprivate
Initial value:
= {
luamethod(LuaMinimap, get_pos),
luamethod(LuaMinimap, set_pos),
luamethod(LuaMinimap, get_angle),
luamethod(LuaMinimap, set_angle),
luamethod(LuaMinimap, get_mode),
luamethod(LuaMinimap, set_mode),
luamethod(LuaMinimap, set_shape),
luamethod(LuaMinimap, get_shape),
{0,0}
}
Definition l_minimap.h:12
#define luamethod(class, name)
Definition l_internal.h:16

Referenced by Register().


The documentation for this class was generated from the following files: