Minetest  5.4.0
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 LuaMinimapcheckobject (lua_State *L, int narg)
 
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 ClientgetClient (lua_State *L)
 
static GUIEnginegetGuiEngine (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 int l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func)
 A wrapper for deprecated functions. More...
 

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 char className [] = "Minimap"
 
static const luaL_Reg methods []
 

Additional Inherited Members

- Protected Member Functions inherited from LuaHelper
template<>
bool readParam (lua_State *L, int index)
 
- Static Protected Member Functions inherited from LuaHelper
static bool isNaN (lua_State *L, int idx)
 
template<typename T >
static T readParam (lua_State *L, int index)
 Read a value using a template type T from Lua State L and index. More...
 
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 and index. More...
 

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

◆ checkobject()

LuaMinimap * LuaMinimap::checkobject ( lua_State *  L,
int  narg 
)
static

References className, and NO_MAP_LOCK_REQUIRED.

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:

◆ 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 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 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 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 checkobject(), Minimap::getMinimapShape(), and getobject().

+ Here is the call graph for this function:

◆ l_hide()

int LuaMinimap::l_hide ( lua_State *  L)
staticprivate

References checkobject(), ModApiBase::getClient(), 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 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 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 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 checkobject(), getobject(), and Minimap::setMinimapShape().

+ Here is the call graph for this function:

◆ l_show()

int LuaMinimap::l_show ( lua_State *  L)
staticprivate

References checkobject(), g_settings, Settings::getBool(), ModApiBase::getClient(), 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(), and methods.

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"
staticprivate

Referenced by checkobject(), 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:27
#define luamethod(class, name)
Definition: l_internal.h:31

Referenced by Register().


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