Minetest 5.10.0-dev
 
Loading...
Searching...
No Matches
ModApiEnvVM Class Reference

#include <l_env.h>

+ Inheritance diagram for ModApiEnvVM:
+ Collaboration diagram for ModApiEnvVM:

Static Public Member Functions

static void InitializeEmerge (lua_State *L, int top)
 
- 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 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 Private Member Functions

static int l_get_node_or_nil (lua_State *L)
 
static int l_get_node_max_level (lua_State *L)
 
static int l_get_node_level (lua_State *L)
 
static int l_set_node_level (lua_State *L)
 
static int l_add_node_level (lua_State *L)
 
static int l_find_node_near (lua_State *L)
 
static int l_find_nodes_in_area (lua_State *L)
 
static int l_find_nodes_in_area_under_air (lua_State *L)
 
static int l_spawn_tree (lua_State *L)
 
static MMVManipgetVManip (lua_State *L)
 

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 ModApiEnvBase
static void collectNodeIds (lua_State *L, int idx, const NodeDefManager *ndef, std::vector< content_t > &filter)
 
static void checkArea (v3s16 &minp, v3s16 &maxp)
 
template<typename F >
static int findNodeNear (lua_State *L, v3s16 pos, int radius, const std::vector< content_t > &filter, int start_radius, F &&getNode)
 
template<typename F >
static int findNodesInArea (lua_State *L, const NodeDefManager *ndef, const std::vector< content_t > &filter, bool grouped, F &&iterate)
 
template<typename F >
static int findNodesInAreaUnderAir (lua_State *L, v3s16 minp, v3s16 maxp, const std::vector< content_t > &filter, F &&getNode)
 
- 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 Protected Attributes inherited from ModApiEnvBase
static const EnumString es_ClearObjectsMode []
 
static const EnumString es_BlockStatusType []
 

Member Function Documentation

◆ getVManip()

MMVManip * ModApiEnvVM::getVManip ( lua_State * L)
staticprivate

References ModApiBase::getEmergeThread().

+ Here is the call graph for this function:

◆ InitializeEmerge()

void ModApiEnvVM::InitializeEmerge ( lua_State * L,
int top )
static

References API_FCT.

Referenced by EmergeScripting::InitializeModApi().

+ Here is the caller graph for this function:

◆ l_add_node_level()

int ModApiEnvVM::l_add_node_level ( lua_State * L)
staticprivate

References MapNode::addLevel(), GET_VM_PTR, ModApiBase::getGameDef(), and read_v3s16().

+ Here is the call graph for this function:

◆ l_find_node_near()

int ModApiEnvVM::l_find_node_near ( lua_State * L)
staticprivate

References ModApiEnvBase::collectNodeIds(), ModApiEnvBase::findNodeNear(), GET_VM_PTR, ModApiBase::getGameDef(), IGameDef::ndef(), p(), read_v3s16(), and LuaHelper::readParam().

+ Here is the call graph for this function:

◆ l_find_nodes_in_area()

int ModApiEnvVM::l_find_nodes_in_area ( lua_State * L)
staticprivate

References ModApiEnvBase::checkArea(), ModApiEnvBase::collectNodeIds(), ModApiEnvBase::findNodesInArea(), GET_VM_PTR, ModApiBase::getGameDef(), VoxelArea::intersect(), VoxelArea::MaxEdge, VoxelArea::MinEdge, IGameDef::ndef(), read_v3s16(), LuaHelper::readParam(), and sortBoxVerticies().

+ Here is the call graph for this function:

◆ l_find_nodes_in_area_under_air()

int ModApiEnvVM::l_find_nodes_in_area_under_air ( lua_State * L)
staticprivate

References ModApiEnvBase::checkArea(), ModApiEnvBase::collectNodeIds(), ModApiEnvBase::findNodesInAreaUnderAir(), GET_VM_PTR, ModApiBase::getGameDef(), IGameDef::ndef(), p(), read_v3s16(), and sortBoxVerticies().

+ Here is the call graph for this function:

◆ l_get_node_level()

int ModApiEnvVM::l_get_node_level ( lua_State * L)
staticprivate

References GET_VM_PTR, ModApiBase::getGameDef(), MapNode::getLevel(), and read_v3s16().

+ Here is the call graph for this function:

◆ l_get_node_max_level()

int ModApiEnvVM::l_get_node_max_level ( lua_State * L)
staticprivate

References GET_VM_PTR, ModApiBase::getGameDef(), MapNode::getMaxLevel(), and read_v3s16().

+ Here is the call graph for this function:

◆ l_get_node_or_nil()

int ModApiEnvVM::l_get_node_or_nil ( lua_State * L)
staticprivate

References GET_VM_PTR, pushnode(), and read_v3s16().

+ Here is the call graph for this function:

◆ l_set_node_level()

int ModApiEnvVM::l_set_node_level ( lua_State * L)
staticprivate

References GET_VM_PTR, ModApiBase::getGameDef(), read_v3s16(), and MapNode::setLevel().

+ Here is the call graph for this function:

◆ l_spawn_tree()

int ModApiEnvVM::l_spawn_tree ( lua_State * L)
staticprivate

References GET_VM_PTR, ModApiBase::getGameDef(), treegen::make_ltree(), IGameDef::ndef(), read_tree_def(), read_v3s16(), treegen::SUCCESS, and treegen::UNBALANCED_BRACKETS.

+ Here is the call graph for this function:

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