#include <s_item.h>
|
bool | item_OnDrop (ItemStack &item, ServerActiveObject *dropper, v3f pos) |
|
bool | item_OnPlace (ItemStack &item, ServerActiveObject *placer, const PointedThing &pointed) |
|
bool | item_OnUse (ItemStack &item, ServerActiveObject *user, const PointedThing &pointed) |
|
bool | item_OnSecondaryUse (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) |
|
| 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 | loadModFromMemory (const std::string &mod_name) |
|
void | runCallbacksRaw (int nargs, RunCallbacksMode mode, const char *fxn) |
|
void | addObjectReference (ServerActiveObject *cobj) |
|
void | removeObjectReference (ServerActiveObject *cobj) |
|
IGameDef * | getGameDef () |
|
Server * | getServer () |
|
ScriptingType | getType () |
|
Client * | getClient () |
|
std::string | getOrigin () |
|
void | setOriginDirect (const char *origin) |
|
void | setOriginFromTableRaw (int index, const char *fxn) |
|
void | clientOpenLibs (lua_State *L) |
|
◆ getItemCallback()
bool ScriptApiItem::getItemCallback |
( |
const char * |
name, |
|
|
const char * |
callbackname, |
|
|
const v3s16 * |
p = nullptr |
|
) |
| |
|
protected |
References errorstream, ScriptApiBase::getStack(), p(), PP, and setOriginFromTable.
Referenced by item_OnDrop(), item_OnPlace(), item_OnSecondaryUse(), item_OnUse(), ScriptApiNode::node_after_destruct(), ScriptApiNode::node_on_construct(), ScriptApiNode::node_on_destruct(), ScriptApiNode::node_on_dig(), ScriptApiNode::node_on_flood(), ScriptApiNode::node_on_punch(), ScriptApiNode::node_on_receive_fields(), ScriptApiNode::node_on_timer(), ScriptApiNodemeta::nodemeta_inventory_AllowMove(), ScriptApiNodemeta::nodemeta_inventory_AllowPut(), ScriptApiNodemeta::nodemeta_inventory_AllowTake(), ScriptApiNodemeta::nodemeta_inventory_OnMove(), ScriptApiNodemeta::nodemeta_inventory_OnPut(), and ScriptApiNodemeta::nodemeta_inventory_OnTake().
◆ item_CraftPredict()
References InvRef::create(), LuaItemStack::create(), InventoryList::getItem(), ScriptApiBase::getServer(), InventoryList::getSize(), ItemStack::name, ScriptApiBase::objectrefGetOrCreate(), PCALL_RES, PUSH_ERROR_HANDLER, push_items(), read_item(), sanity_check, SCRIPTAPI_PRECHECKHEADER, and BaseException::what().
Referenced by Server::UpdateCrafting().
◆ item_OnCraft()
References InvRef::create(), LuaItemStack::create(), InventoryList::getItem(), ScriptApiBase::getServer(), InventoryList::getSize(), ItemStack::name, ScriptApiBase::objectrefGetOrCreate(), PCALL_RES, PUSH_ERROR_HANDLER, push_items(), read_item(), SCRIPTAPI_PRECHECKHEADER, and BaseException::what().
◆ item_OnDrop()
References LuaItemStack::create(), getItemCallback(), ScriptApiBase::getServer(), ItemStack::name, ScriptApiBase::objectrefGetOrCreate(), PCALL_RES, PUSH_ERROR_HANDLER, pushFloatPos(), read_item(), SCRIPTAPI_PRECHECKHEADER, and BaseException::what().
◆ item_OnPlace()
References LuaItemStack::create(), getItemCallback(), ScriptApiBase::getServer(), ItemStack::name, ScriptApiBase::objectrefGetOrCreate(), PCALL_RES, PUSH_ERROR_HANDLER, pushPointedThing(), read_item(), SCRIPTAPI_PRECHECKHEADER, and BaseException::what().
Referenced by Server::handleCommand_Interact(), and ModApiEnvMod::l_place_node().
◆ item_OnSecondaryUse()
References LuaItemStack::create(), getItemCallback(), ScriptApiBase::getServer(), ItemStack::name, ScriptApiBase::objectrefGetOrCreate(), PCALL_RES, PUSH_ERROR_HANDLER, pushPointedThing(), read_item(), SCRIPTAPI_PRECHECKHEADER, and BaseException::what().
Referenced by Server::handleCommand_Interact().
◆ item_OnUse()
References LuaItemStack::create(), getItemCallback(), ScriptApiBase::getServer(), ItemStack::name, ScriptApiBase::objectrefGetOrCreate(), PCALL_RES, PUSH_ERROR_HANDLER, pushPointedThing(), read_item(), SCRIPTAPI_PRECHECKHEADER, and BaseException::what().
Referenced by Server::handleCommand_Interact().
◆ pushPointedThing()
void ScriptApiItem::pushPointedThing |
( |
const PointedThing & |
pointed, |
|
|
bool |
hitpoint = false |
|
) |
| |
|
protected |
◆ LuaItemStack
◆ ModApiItemMod
The documentation for this class was generated from the following files: