#include <l_env.h>
Static Public Member Functions | |
static void | Initialize (lua_State *L, int top) |
static void | InitializeClient (lua_State *L, int top) |
Static Public Member Functions inherited from ModApiBase | |
static ScriptApiBase * | getScriptApiBase (lua_State *L) |
static Server * | getServer (lua_State *L) |
static ServerInventoryManager * | getServerInventoryMgr (lua_State *L) |
static Client * | getClient (lua_State *L) |
static GUIEngine * | getGuiEngine (lua_State *L) |
static EmergeThread * | getEmergeThread (lua_State *L) |
static IGameDef * | getGameDef (lua_State *L) |
static Environment * | getEnv (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_set_node (lua_State *L) |
static int | l_bulk_set_node (lua_State *L) |
static int | l_bulk_swap_node (lua_State *L) |
static int | l_add_node (lua_State *L) |
static int | l_remove_node (lua_State *L) |
static int | l_swap_node (lua_State *L) |
static int | l_get_node_raw (lua_State *L) |
static int | l_get_node_light (lua_State *L) |
static int | l_get_natural_light (lua_State *L) |
static int | l_place_node (lua_State *L) |
static int | l_dig_node (lua_State *L) |
static int | l_punch_node (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_get_node_boxes (lua_State *L) |
static int | l_find_nodes_with_meta (lua_State *L) |
static int | l_get_meta (lua_State *L) |
static int | l_get_node_timer (lua_State *L) |
static int | l_add_entity (lua_State *L) |
static int | l_add_item (lua_State *L) |
static int | l_get_connected_players (lua_State *L) |
static int | l_get_player_by_name (lua_State *L) |
static int | l_get_objects_inside_radius (lua_State *L) |
static int | l_get_objects_in_area (lua_State *L) |
static int | l_set_timeofday (lua_State *L) |
static int | l_get_timeofday (lua_State *L) |
static int | l_get_gametime (lua_State *L) |
static int | l_get_day_count (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_fix_light (lua_State *L) |
static int | l_load_area (lua_State *L) |
static int | l_emerge_area (lua_State *L) |
static int | l_delete_area (lua_State *L) |
static int | l_get_perlin (lua_State *L) |
static int | l_get_perlin_map (lua_State *L) |
static int | l_get_voxel_manip (lua_State *L) |
static int | l_clear_objects (lua_State *L) |
static int | l_spawn_tree (lua_State *L) |
static int | l_line_of_sight (lua_State *L) |
static int | l_raycast (lua_State *L) |
static int | l_find_path (lua_State *L) |
static int | l_transforming_liquid_add (lua_State *L) |
static int | l_forceload_block (lua_State *L) |
static int | l_forceload_free_block (lua_State *L) |
static int | l_compare_block_status (lua_State *L) |
static int | l_get_translated_string (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 [] |
|
static |
References add_entity(), and API_FCT.
Referenced by ServerScripting::InitializeModApi().
|
static |
References API_FCT.
Referenced by ClientScripting::InitializeModApi().
|
staticprivate |
References checkFloatPos(), GET_ENV_PTR, ModApiBase::getScriptApiBase(), ScriptApiBase::objectrefGetOrCreate(), and LuaHelper::readParam().
|
staticprivate |
References ItemStack::empty(), GET_ENV_PTR, ItemStack::getItemString(), ModApiBase::getServer(), ItemStack::isKnown(), PCALL_RESL, PUSH_ERROR_HANDLER, and read_item().
|
staticprivate |
|
staticprivate |
References MapNode::addLevel(), GET_ENV_PTR, and read_v3s16().
|
staticprivate |
|
staticprivate |
|
staticprivate |
References CLEAR_OBJECTS_MODE_QUICK, ModApiEnvBase::es_ClearObjectsMode, GET_ENV_PTR, and getenumfield().
|
staticprivate |
References check_v3s16(), ModApiEnvBase::es_BlockStatusType, GET_ENV_PTR, getNodeBlockPos(), and string_to_enum().
|
staticprivate |
References ServerMap::deleteBlock(), Map::dispatchEvent(), GET_ENV_PTR, getNodeBlockPos(), MEET_OTHER, read_v3s16(), sortBoxVerticies(), and MapEditEvent::type.
|
staticprivate |
References ModApiBase::checkObject(), CONTENT_IGNORE, GET_ENV_PTR, MapNode::getContent(), ObjectRef::getobject(), ModApiBase::getScriptApi(), ScriptApiNode::node_on_dig(), and read_v3s16().
|
staticprivate |
References ScriptCallbackState::args_ref, BLOCK_EMERGE_ALLOW_GEN, BLOCK_EMERGE_FORCE_QUEUE, ScriptCallbackState::callback_ref, EmergeManager::enqueueBlockEmergeEx(), GET_ENV_PTR, Server::getEmergeManager(), getNodeBlockPos(), ScriptApiBase::getOrigin(), ModApiBase::getScriptApiBase(), Server::getScriptIface(), ModApiBase::getServer(), VoxelArea::getVolume(), LuaEmergeAreaCallback(), ScriptCallbackState::origin, PEER_ID_INEXISTENT, read_v3s16(), ScriptCallbackState::refcount, ScriptCallbackState::script, and sortBoxVerticies().
|
staticprivate |
References ModApiEnvBase::collectNodeIds(), ModApiEnvBase::findNodeNear(), GET_PLAIN_ENV_PTR, ModApiBase::getClient(), Map::getNode(), p(), read_v3s16(), and LuaHelper::readParam().
|
staticprivate |
References ModApiEnvBase::checkArea(), ModApiEnvBase::collectNodeIds(), ModApiEnvBase::findNodesInArea(), Map::forEachNodeInArea(), GET_PLAIN_ENV_PTR, ModApiBase::getClient(), read_v3s16(), LuaHelper::readParam(), and sortBoxVerticies().
|
staticprivate |
References ModApiEnvBase::checkArea(), ModApiEnvBase::collectNodeIds(), ModApiEnvBase::findNodesInAreaUnderAir(), GET_PLAIN_ENV_PTR, ModApiBase::getClient(), Map::getNode(), p(), read_v3s16(), and sortBoxVerticies().
|
staticprivate |
References check_v3s16(), GET_PLAIN_ENV_PTR, and push_v3s16().
|
staticprivate |
References GET_ENV_PTR, get_path(), PA_DIJKSTRA, PA_PLAIN, PA_PLAIN_NP, push_v3s16(), and read_v3s16().
|
staticprivate |
References Map::dispatchEvent(), GET_ENV_PTR, getContainerPos(), MAP_BLOCKSIZE, MEET_OTHER, read_v3s16(), ServerMap::repairBlockLight(), and MapEditEvent::type.
|
staticprivate |
|
staticprivate |
|
staticprivate |
References ModApiBase::getEnv(), ServerEnvironment::getPlayerCount(), ServerEnvironment::getPlayers(), ModApiBase::getScriptApiBase(), ServerActiveObject::isGone(), log_deprecated(), and ScriptApiBase::objectrefGetOrCreate().
|
staticprivate |
References GET_PLAIN_ENV_PTR.
|
staticprivate |
References GET_ENV_PTR.
|
staticprivate |
References NodeMetaRef::create(), GET_ENV_PTR, p(), and read_v3s16().
|
staticprivate |
References GET_ENV_PTR, MapNode::param1, read_v3s16(), and time_to_daynight_ratio().
|
staticprivate |
References BS, GET_ENV_PTR, MapNode::getCollisionBoxes(), MapNode::getNeighbors(), MapNode::getNodeBoxes(), MapNode::getSelectionBoxes(), push_aabb3f_vector(), read_v3s16(), and readnode().
|
staticprivate |
References GET_PLAIN_ENV_PTR, MapNode::getLevel(), and read_v3s16().
|
staticprivate |
References GET_PLAIN_ENV_PTR, MapNode::getLightBlend(), NodeDefManager::getLightingFlags(), read_v3s16(), and time_to_daynight_ratio().
|
staticprivate |
References GET_PLAIN_ENV_PTR, MapNode::getMaxLevel(), and read_v3s16().
|
staticprivate |
References doubleToInt(), GET_ENV_PTR, MapNode::getContent(), MapNode::getParam1(), and MapNode::getParam2().
|
staticprivate |
References NodeTimerRef::create(), GET_ENV_PTR, p(), and read_v3s16().
|
staticprivate |
References BS, GET_ENV_PTR, ModApiBase::getScriptApiBase(), ScriptApiBase::objectrefGetOrCreate(), and read_v3f().
|
staticprivate |
References BS, checkFloatPos(), GET_ENV_PTR, ModApiBase::getScriptApiBase(), ScriptApiBase::objectrefGetOrCreate(), and LuaHelper::readParam().
|
staticprivate |
References GET_ENV_PTR_NO_MAP_LOCK, params, read_noiseparams(), and LuaHelper::readParam().
|
staticprivate |
References GET_ENV_PTR_NO_MAP_LOCK, read_noiseparams(), and read_v3s16().
|
staticprivate |
References GET_ENV_PTR, RemotePlayer::getPlayerSAO(), ModApiBase::getScriptApiBase(), ServerActiveObject::isGone(), and ScriptApiBase::objectrefGetOrCreate().
|
staticprivate |
References GET_PLAIN_ENV_PTR.
|
staticprivate |
References GET_ENV_PTR, ModApiBase::getServer(), Server::getTranslationLanguage(), translate_string(), utf8_to_wide(), and wide_to_utf8().
|
staticprivate |
|
staticprivate |
References checkFloatPos(), GET_PLAIN_ENV_PTR, p(), and push_v3s16().
|
staticprivate |
References check_v3s16(), Map::emergeBlock(), GET_ENV_PTR, getNodeBlockPos(), MAP_LOCK_REQUIRED, and sortBoxVerticies().
|
staticprivate |
References ModApiBase::checkObject(), CONTENT_IGNORE, NodeDefManager::get(), GET_ENV_PTR, MapNode::getContent(), ObjectRef::getobject(), ModApiBase::getScriptApi(), ModApiBase::getServer(), ScriptApiItem::item_OnPlace(), ContentFeatures::name, PointedThing::node_abovesurface, PointedThing::node_undersurface, POINTEDTHING_NODE, read_v3s16(), readnode(), and PointedThing::type.
|
staticprivate |
References ModApiBase::checkObject(), CONTENT_IGNORE, GET_ENV_PTR, MapNode::getContent(), ObjectRef::getobject(), ModApiBase::getScriptApi(), ScriptApiNode::node_on_punch(), and read_v3s16().
|
staticprivate |
|
staticprivate |
|
staticprivate |
References GET_ENV_PTR, read_v3s16(), and readnode().
Referenced by l_add_node().
|
staticprivate |
References GET_ENV_PTR, read_v3s16(), and MapNode::setLevel().
|
staticprivate |
References GET_ENV_PTR, ModApiBase::getServer(), LuaHelper::readParam(), and Server::setTimeOfDay().
|
staticprivate |
References GET_ENV_PTR, read_tree_def(), read_v3s16(), treegen::spawn_ltree(), treegen::SUCCESS, and treegen::UNBALANCED_BRACKETS.
|
staticprivate |
|
staticprivate |