]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/script/lua_api/l_item.h
Revert "Make Lint Happy"
[dragonfireclient.git] / src / script / lua_api / l_item.h
index 21110b83a422067a8445cebf815042f08acdcd1d..98744c07162daae4f78ccb6acb9545df07a1cf00 100644 (file)
@@ -20,10 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #pragma once
 
 #include "lua_api/l_base.h"
-#include "inventory.h" // ItemStack
+#include "inventory.h"  // ItemStack
 
-class LuaItemStack : public ModApiBase
-{
+class LuaItemStack : public ModApiBase {
 private:
        ItemStack m_stack;
 
@@ -115,8 +114,8 @@ class LuaItemStack : public ModApiBase
        // Returns leftover item stack
        static int l_add_item(lua_State *L);
 
-       // item_fits(self, itemstack or itemstring or table or nil) -> true/false,
-       // itemstack First return value is true iff the new item fits fully into the stack
+       // item_fits(self, itemstack or itemstring or table or nil) -> true/false, itemstack
+       // First return value is true iff the new item fits fully into the stack
        // Second return value is the would-be-left-over item stack
        static int l_item_fits(lua_State *L);
 
@@ -130,27 +129,26 @@ class LuaItemStack : public ModApiBase
        LuaItemStack(const ItemStack &item);
        ~LuaItemStack() = default;
 
-       const ItemStack &getItem() const;
-       ItemStack &getItem();
+       const ItemStackgetItem() const;
+       ItemStackgetItem();
 
        // LuaItemStack(itemstack or itemstring or table or nil)
        // Creates an LuaItemStack and leaves it on top of stack
        static int create_object(lua_State *L);
        // Not callable from Lua
        static int create(lua_State *L, const ItemStack &item);
-       static LuaItemStack *checkobject(lua_State *L, int narg);
+       static LuaItemStackcheckobject(lua_State *L, int narg);
        static void Register(lua_State *L);
+
 };
 
-class ModApiItemMod : public ModApiBase
-{
+class ModApiItemMod : public ModApiBase {
 private:
        static int l_register_item_raw(lua_State *L);
        static int l_unregister_item_raw(lua_State *L);
        static int l_register_alias_raw(lua_State *L);
        static int l_get_content_id(lua_State *L);
        static int l_get_name_from_content_id(lua_State *L);
-
 public:
        static void Initialize(lua_State *L, int top);
 };