X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fscript%2Fcpp_api%2Fs_item.h;h=6ceb4b5598b90d14b2bba7804bd1103e1f8cdbae;hb=550c0404a8b6fbee857003c961bb802121e88f51;hp=28ac444f678b4445afcae3739f7dd20e75b60222;hpb=ab433775777c4f5055bcf4d2a1cffc506c4f9961;p=dragonfireclient.git diff --git a/src/script/cpp_api/s_item.h b/src/script/cpp_api/s_item.h index 28ac444f6..6ceb4b559 100644 --- a/src/script/cpp_api/s_item.h +++ b/src/script/cpp_api/s_item.h @@ -23,12 +23,14 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "cpp_api/s_base.h" #include "irr_v3d.h" -class PointedThing; -class ItemStack; +struct PointedThing; +struct ItemStack; class ServerActiveObject; -class ItemDefinition; +struct ItemDefinition; class LuaItemStack; class ModApiItemMod; +class InventoryList; +struct InventoryLocation; class ScriptApiItem : virtual public ScriptApiBase @@ -40,13 +42,19 @@ class ScriptApiItem ServerActiveObject *placer, const PointedThing &pointed); bool item_OnUse(ItemStack &item, ServerActiveObject *user, const PointedThing &pointed); + bool item_OnSecondaryUse(ItemStack &item, + ServerActiveObject *user); + 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); protected: friend class LuaItemStack; friend class ModApiItemMod; + friend class LuaRaycast; bool getItemCallback(const char *name, const char *callbackname); -private: void pushPointedThing(const PointedThing& pointed); };