|
| | ServerScripting (Server *server) |
| void | loadBuiltin () |
| void | saveGlobals () |
| void | initAsync () override |
| | ScriptApiBase (ScriptingType type) |
| | ScriptApiBase () |
| virtual | ~ScriptApiBase () |
| | DISABLE_CLASS_COPY (ScriptApiBase) |
| void | loadMod (const std::string &script_path, const std::string &mod_name) |
| void | loadScript (const std::string &script_path) |
| void | runCallbacksRaw (int nargs, RunCallbacksMode mode, const char *fxn) |
| void | addObjectReference (ServerActiveObject *cobj) |
| void | removeObjectReference (ServerActiveObject *cobj) |
| ScriptingType | getType () |
| IGameDef * | getGameDef () |
| Server * | getServer () |
| const std::string & | getOrigin () |
| void | setOriginDirect (const char *origin) |
| void | setOriginFromTableRaw (int index, const char *fxn) |
| void | clientOpenLibs (lua_State *L) |
| void | checkSetByBuiltin () |
| | ScriptApiAsync (Server *server) |
| void | stepAsync () |
| u32 | queueAsync (std::string &&serialized_func, PackedValue *param, const std::string &mod_origin) |
| bool | cancelAsync (u32 id) |
| unsigned int | getThreadingCapacity () const |
| int | detached_inventory_AllowMove (const MoveAction &ma, int count, ServerActiveObject *player) |
| int | detached_inventory_AllowPut (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| int | detached_inventory_AllowTake (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| void | detached_inventory_OnMove (const MoveAction &ma, int count, ServerActiveObject *player) |
| void | detached_inventory_OnPut (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| void | detached_inventory_OnTake (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| bool | luaentity_Add (u16 id, const char *name) |
| void | luaentity_Activate (u16 id, const std::string &staticdata, u32 dtime_s) |
| void | luaentity_Deactivate (u16 id, bool removal) |
| void | luaentity_Remove (u16 id) |
| std::string | luaentity_GetStaticdata (u16 id) |
| void | luaentity_GetProperties (u16 id, ServerActiveObject *self, ObjectProperties *prop, const std::string &entity_name) |
| void | luaentity_Step (u16 id, float dtime, const collisionMoveResult *moveresult) |
| bool | luaentity_Punch (u16 id, ServerActiveObject *puncher, float time_from_last_punch, const ToolCapabilities &toolcap, v3f dir, s32 damage) |
| bool | luaentity_on_death (u16 id, ServerActiveObject *killer) |
| void | luaentity_Rightclick (u16 id, ServerActiveObject *clicker) |
| void | luaentity_on_attach_child (u16 id, ServerActiveObject *child) |
| void | luaentity_on_detach_child (u16 id, ServerActiveObject *child) |
| void | luaentity_on_detach (u16 id, ServerActiveObject *parent) |
| void | environment_Step (float dtime) |
| void | environment_OnGenerated (v3s16 minp, v3s16 maxp, u32 blockseed) |
| void | player_event (ServerActiveObject *player, const std::string &type) |
| void | on_emerge_area_completion (v3s16 blockpos, int action, ScriptCallbackState *state) |
| void | check_for_falling (v3s16 p) |
| void | on_liquid_transformed (const std::vector< std::pair< v3s16, MapNode > > &list) |
| void | on_mapblocks_changed (const std::unordered_set< v3s16 > &set) |
| bool | has_on_mapblocks_changed () |
| void | initializeEnvironment (ServerEnvironment *env) |
| void | triggerABM (int id, v3s16 p, MapNode n, u32 active_object_count, u32 active_object_count_wider) |
| void | triggerLBM (int id, MapBlock *block, const std::unordered_set< v3s16 > &positions, float dtime_s) |
| void | on_modchannel_message (const std::string &channel, const std::string &sender, const std::string &message) |
| void | on_modchannel_signal (const std::string &channel, ModChannelSignal signal) |
| | ScriptApiNode ()=default |
| virtual | ~ScriptApiNode ()=default |
| bool | node_on_punch (v3s16 p, MapNode node, ServerActiveObject *puncher, const PointedThing &pointed) |
| bool | node_on_dig (v3s16 p, MapNode node, ServerActiveObject *digger) |
| void | node_on_construct (v3s16 p, MapNode node) |
| void | node_on_destruct (v3s16 p, MapNode node) |
| bool | node_on_flood (v3s16 p, MapNode node, MapNode newnode) |
| void | node_after_destruct (v3s16 p, MapNode node) |
| bool | node_on_timer (v3s16 p, MapNode node, f32 elapsed, f32 timeout) |
| void | node_on_receive_fields (v3s16 p, const std::string &formname, const StringMap &fields, ServerActiveObject *sender) |
| | ScriptApiNodemeta ()=default |
| virtual | ~ScriptApiNodemeta ()=default |
| int | nodemeta_inventory_AllowMove (const MoveAction &ma, int count, ServerActiveObject *player) |
| int | nodemeta_inventory_AllowPut (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| int | nodemeta_inventory_AllowTake (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| void | nodemeta_inventory_OnMove (const MoveAction &ma, int count, ServerActiveObject *player) |
| void | nodemeta_inventory_OnPut (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| void | nodemeta_inventory_OnTake (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| bool | item_OnDrop (ItemStack &item, ServerActiveObject *dropper, v3f pos) |
| bool | item_OnPlace (std::optional< ItemStack > &item, ServerActiveObject *placer, const PointedThing &pointed) |
| bool | item_OnUse (std::optional< ItemStack > &item, ServerActiveObject *user, const PointedThing &pointed) |
| bool | item_OnSecondaryUse (std::optional< ItemStack > &item, ServerActiveObject *user, const PointedThing &pointed) |
| bool | item_OnCraft (ItemStack &item, ServerActiveObject *user, const InventoryList *old_craft_grid, const InventoryLocation &craft_inv) |
| bool | item_CraftPredict (ItemStack &item, ServerActiveObject *user, const InventoryList *old_craft_grid, const InventoryLocation &craft_inv) |
| virtual | ~ScriptApiPlayer ()=default |
| void | on_newplayer (ServerActiveObject *player) |
| void | on_dieplayer (ServerActiveObject *player, const PlayerHPChangeReason &reason) |
| bool | on_respawnplayer (ServerActiveObject *player) |
| bool | on_prejoinplayer (const std::string &name, const std::string &ip, std::string *reason) |
| bool | can_bypass_userlimit (const std::string &name, const std::string &ip) |
| void | on_joinplayer (ServerActiveObject *player, s64 last_login) |
| void | on_leaveplayer (ServerActiveObject *player, bool timeout) |
| void | on_cheat (ServerActiveObject *player, const std::string &cheat_type) |
| bool | on_punchplayer (ServerActiveObject *player, ServerActiveObject *hitter, float time_from_last_punch, const ToolCapabilities &toolcap, v3f dir, s32 damage) |
| void | on_rightclickplayer (ServerActiveObject *player, ServerActiveObject *clicker) |
| s32 | on_player_hpchange (ServerActiveObject *player, s32 hp_change, const PlayerHPChangeReason &reason) |
| void | on_playerReceiveFields (ServerActiveObject *player, const std::string &formname, const StringMap &fields) |
| void | on_authplayer (const std::string &name, const std::string &ip, bool is_success) |
| int | player_inventory_AllowMove (const MoveAction &ma, int count, ServerActiveObject *player) |
| int | player_inventory_AllowPut (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| int | player_inventory_AllowTake (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| void | player_inventory_OnMove (const MoveAction &ma, int count, ServerActiveObject *player) |
| void | player_inventory_OnPut (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| void | player_inventory_OnTake (const MoveAction &ma, const ItemStack &stack, ServerActiveObject *player) |
| bool | on_chat_message (const std::string &name, const std::string &message) |
| void | on_mods_loaded () |
| void | on_shutdown () |
| std::string | formatChatMessage (const std::string &name, const std::string &message) |
| bool | getAuth (const std::string &playername, std::string *dst_password, std::set< std::string > *dst_privs, s64 *dst_last_login=nullptr) |
| void | createAuth (const std::string &playername, const std::string &password) |
| bool | setPassword (const std::string &playername, const std::string &password) |
| void | freeDynamicMediaCallback (u32 token) |
| void | on_dynamic_media_added (u32 token, const std::string &playername) |
| void | initializeSecurity () |
| void | initializeSecurityClient () |
| void | initializeSecuritySSCSM () |
|
| bool | checkPathInternal (const std::string &abs_path, bool write_required, bool *write_allowed) override |
| | Should check if the given path may be accessed.
|
| bool | modNamesAreTrusted () override |
| | Specify if the mod names during init time(!) can be trusted.
|
| lua_State * | getStack () |
| void | realityCheck () |
| void | scriptError (int result, const char *fxn) |
| void | stackDump (std::ostream &o) |
| void | setGameDef (IGameDef *gamedef) |
| Environment * | getEnv () |
| void | setEnv (Environment *env) |
| EmergeThread * | getEmergeThread () |
| void | setEmergeThread (EmergeThread *emerge) |
| void | objectrefGetOrCreate (lua_State *L, ServerActiveObject *cobj) |
| void | pushPlayerHPChangeReason (lua_State *L, const PlayerHPChangeReason &reason) |
| 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.
|
| bool | getItemCallback (const char *name, const char *callbackname, const v3s16 *p=nullptr) |
| void | pushPointedThing (const PointedThing &pointed, bool hitpoint=false) |
|
| static std::string | getCurrentModNameInsecure (lua_State *L) |
| | Returns the currently running mod, only during init time.
|
| static u32 | allocateDynamicMediaCallback (lua_State *L, int f_idx) |
| static bool | isSecure (lua_State *L) |
| static void | getGlobalsBackup (lua_State *L) |
| static bool | safeLoadString (lua_State *L, std::string_view code, const char *chunk_name) |
| | Loads a string as Lua code safely (doesn't allow bytecode).
|
| static bool | safeLoadFile (lua_State *L, const char *path, const char *display_name=nullptr) |
| | Loads a file as Lua code safely (doesn't allow bytecode).
|
| static std::string | getCurrentModName (lua_State *L) |
| | Returns the currently running mod, only during init time.
|
| static bool | checkWhitelisted (lua_State *L, const std::string &setting) |
| | Check if mod is whitelisted in the given setting.
|
| static bool | checkPath (lua_State *L, const char *path, bool write_required, bool *write_allowed=nullptr) |
| | Checks if mods are allowed to read (and optionally write) to the path.
|
| static struct EnumString | es_DrawType [] |
| static struct EnumString | es_ContentParamType [] |
| static struct EnumString | es_ContentParamType2 [] |
| static struct EnumString | es_LiquidType [] |
| static struct EnumString | es_NodeBoxType [] |
| static struct EnumString | es_TextureAlphaMode [] |
| 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 bool | checkPathWithGamedef (lua_State *L, const std::string &abs_path, bool write_required, bool *write_allowed) |
| std::recursive_mutex | m_luastackmutex |
| std::string | m_last_run_mod |
| int | m_lock_recursion_count {} |
| std::thread::id | m_owning_thread |
| AsyncEngine | asyncEngine |