]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/script/cpp_api/s_item.h
Add LuaEntity on_death callback (#6177)
[dragonfireclient.git] / src / script / cpp_api / s_item.h
index 28ac444f678b4445afcae3739f7dd20e75b60222..6ceb4b5598b90d14b2bba7804bd1103e1f8cdbae 100644 (file)
@@ -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);
 
 };