]> git.lizzy.rs Git - minetest.git/blobdiff - src/script/cpp_api/s_item.h
[CSM] Add core.get_timeofday & core.get_day_count env calls (#5401)
[minetest.git] / src / script / cpp_api / s_item.h
index 0f2b160429d1ec432d4914f3b22b696fa49e90f8..7350a71c5e3d19d6e0d901d447e40d4b17dc193d 100644 (file)
@@ -29,6 +29,8 @@ class ServerActiveObject;
 struct ItemDefinition;
 class LuaItemStack;
 class ModApiItemMod;
+class InventoryList;
+struct InventoryLocation;
 
 class ScriptApiItem
 : virtual public ScriptApiBase
@@ -40,13 +42,18 @@ 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;
 
        bool getItemCallback(const char *name, const char *callbackname);
-private:
        void pushPointedThing(const PointedThing& pointed);
 
 };