diff --git a/QuickStackToBag/Lua/Autorun/init.lua b/QuickStackToBag/Lua/Autorun/init.lua index 47e0281..1cc000d 100644 --- a/QuickStackToBag/Lua/Autorun/init.lua +++ b/QuickStackToBag/Lua/Autorun/init.lua @@ -1,3 +1,4 @@ +-- luacheck: globals MyModGlobal Character SERVER Keys LuaUserData Hook Descriptors if SERVER then return end -- Docs: https://evilfactory.github.io/LuaCsForBarotrauma/lua-docs/manual/common-questions/ diff --git a/QuickStackToBag/Lua/Cyka/cursormacroer.lua b/QuickStackToBag/Lua/Cyka/cursormacroer.lua index 1635ad9..27be6ad 100644 --- a/QuickStackToBag/Lua/Cyka/cursormacroer.lua +++ b/QuickStackToBag/Lua/Cyka/cursormacroer.lua @@ -1,3 +1,4 @@ +-- luacheck: globals Character MyModGlobal local quickstack = require("Cyka.quickstack") local utils = require("Cyka.utils") @@ -153,7 +154,8 @@ local function tryStackCursorItem() -- -- MyModGlobal.debugPrint(string.format("Enqueued %d items from the inventory slot", #itemsToMove)) -- MyModGlobal.DumpTable(itemTree) - local errors = quickstack.tryMoveItems(itemsToMove, itemTree, true) + quickstack.tryMoveItems(itemsToMove, itemTree, true) + -- local errors = quickstack.tryMoveItems(itemsToMove, itemTree, true) -- for _, error in ipairs(errors) do -- MyModGlobal.debugPrint(string.format("Error moving item: %s", error)) -- end diff --git a/QuickStackToBag/Lua/Cyka/fabricatorstack.lua b/QuickStackToBag/Lua/Cyka/fabricatorstack.lua index 9981f0c..095aa73 100644 --- a/QuickStackToBag/Lua/Cyka/fabricatorstack.lua +++ b/QuickStackToBag/Lua/Cyka/fabricatorstack.lua @@ -1,3 +1,4 @@ +-- luacheck: globals Character Game MyModGlobal local utils = require("Cyka.utils") ---@return {item: Barotrauma.Item, fabricator: Barotrauma.FabricatorComponent}, string? diff --git a/QuickStackToBag/Lua/Cyka/hotkeyrepair.lua b/QuickStackToBag/Lua/Cyka/hotkeyrepair.lua index 7bbd7d0..be6a6c0 100644 --- a/QuickStackToBag/Lua/Cyka/hotkeyrepair.lua +++ b/QuickStackToBag/Lua/Cyka/hotkeyrepair.lua @@ -1,3 +1,4 @@ +-- luacheck: globals Character ---@return Barotrauma.Item|nil, Barotrauma.Items.Components.Repairable|nil local function getRepairableObjectInFocus() -- Make sure we have a controlled character @@ -52,12 +53,13 @@ local function clickRepairButton() end local function tryRepair() - local success = clickRepairButton() - if success then - -- MyModGlobal.debugPrint("Successfully clicked repair button") - else - -- MyModGlobal.debugPrint("Failed to click repair button") - end + clickRepairButton() + -- local success = clickRepairButton() + -- if success then + -- -- MyModGlobal.debugPrint("Successfully clicked repair button") + -- else + -- -- MyModGlobal.debugPrint("Failed to click repair button") + -- end end return { diff --git a/QuickStackToBag/Lua/Cyka/quickbuy.lua b/QuickStackToBag/Lua/Cyka/quickbuy.lua index a487389..d7481dd 100644 --- a/QuickStackToBag/Lua/Cyka/quickbuy.lua +++ b/QuickStackToBag/Lua/Cyka/quickbuy.lua @@ -1,3 +1,4 @@ +-- luacheck: globals Game MyModGlobal ---@return Barotrauma.Location.StoreInfo[], string? local function getCurrentStore() if not Game or not Game.GameSession or not Game.GameSession.Campaign then diff --git a/QuickStackToBag/Lua/Cyka/quickstack.lua b/QuickStackToBag/Lua/Cyka/quickstack.lua index a34a2b2..8419bf0 100644 --- a/QuickStackToBag/Lua/Cyka/quickstack.lua +++ b/QuickStackToBag/Lua/Cyka/quickstack.lua @@ -1,3 +1,4 @@ +-- luacheck: globals MyModGlobal Character local utils = require("Cyka.utils") ---@class ItemLocation diff --git a/QuickStackToBag/Lua/Cyka/xpticker.lua b/QuickStackToBag/Lua/Cyka/xpticker.lua index d298a60..c1ab28d 100644 --- a/QuickStackToBag/Lua/Cyka/xpticker.lua +++ b/QuickStackToBag/Lua/Cyka/xpticker.lua @@ -1,3 +1,4 @@ +-- luacheck: globals Character Timer Hook local amountExperience = 6000 local passiveExperienceDelay = 20 local passiveExperienceTimer = 0 @@ -5,7 +6,7 @@ local passiveExperienceTimer = 0 Hook.Add("think", "examples.passiveExperience", function() if Timer.GetTime() < passiveExperienceTimer then return end - for k, v in pairs(Character.CharacterList) do + for _, v in pairs(Character.CharacterList) do if not v.IsDead and v.Info ~= nil then v.Info.GiveExperience(amountExperience) end