]> git.lizzy.rs Git - minetest.git/blobdiff - src/script/cpp_api/s_item.h
on_death: Fix callback number of pushed arguments (Fixes #6451)
[minetest.git] / src / script / cpp_api / s_item.h
index 88cc1909d9016491dd5ac2e38e3499b7e576a13d..561f3a55386102d34519dbffa47624b26b98f5d0 100644 (file)
@@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef S_ITEM_H_
-#define S_ITEM_H_
+#pragma once
 
 #include "cpp_api/s_base.h"
 #include "irr_v3d.h"
@@ -42,6 +41,8 @@ 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,
@@ -50,11 +51,9 @@ class ScriptApiItem
 protected:
        friend class LuaItemStack;
        friend class ModApiItemMod;
+       friend class LuaRaycast;
 
        bool getItemCallback(const char *name, const char *callbackname);
        void pushPointedThing(const PointedThing& pointed);
 
 };
-
-
-#endif /* S_ITEM_H_ */