env._G = GLOBAL _G.setmetatable(env,{__index=function(t,k) return _G.rawget(_G,k) end}) _G.CHEATS_ENABLED = true require("debugkeys") Assets = { Asset( "ANIM", "anim/ui_oneslot_1x1.zip" ), Asset( "ANIM", "anim/quagmire_ui_pot_1x3.zip" ), Asset( "ANIM", "anim/ui_krampus_1x3.zip" ), Asset( "ANIM", "anim/ui_chest_4x1.zip" ), } local containers = require("containers") local params = containers.params -------------------------------------------------------------------------- local function small_backpack() local smallbackpack = { widget = { slotpos = {Vector3(0, 0, 0)}, animbank = "ui_oneslot_1x1", animbuild = "ui_oneslot_1x1", pos = Vector3(-162, -75, 0), }, issidewidget = true, type = "pack", openlimit = 1, } return smallbackpack end local function small_piggyback() local smallpiggyback = { widget = { slotpos = {}, animbank = "ui_cookpot_1x2", animbuild = "ui_cookpot_1x2", pos = Vector3(-162, -75, 0), }, issidewidget = true, type = "pack", openlimit = 1, } for y = 0, 1 do table.insert(smallpiggyback.widget.slotpos, Vector3(0, -75 * y + 20, 0)) end return smallpiggyback end local function small_krampusbag() local smallkrampusbag = { widget = { slotpos = {}, animbank = "quagmire_ui_pot_1x3", animbuild = "ui_krampus_1x3", pos = Vector3(-162, -75, 0), }, issidewidget = true, type = "pack", openlimit = 1, } for y = 0, 2 do table.insert(smallkrampusbag.widget.slotpos, Vector3(0, -75 * y + 70, 0)) end return smallkrampusbag end local function small_chester() local smallchester = { widget = { slotpos = {}, animbank = "ui_chest_3x1", animbuild = "ui_chest_3x1", pos = Vector3(0, 200, 0), side_align_tip = 160, }, type = "chest", } for x = 0, 2 do table.insert(smallchester.widget.slotpos, Vector3(-75 * x + 70, 0, 0)) end return smallchester end local function small_shadowchester() local smallshadowchester = { widget = { slotpos = {}, animbank = "ui_construction_4x1", animbuild = "ui_chest_4x1", pos = Vector3(0, 200, 0), side_align_tip = 160, }, type = "chest", } for x = 0, 3 do table.insert(smallshadowchester.widget.slotpos, Vector3(-75 * x + 120, -10, 0)) end return smallshadowchester end params.backpack = small_backpack() params.piggyback = small_piggyback() params.krampus_sack = small_krampusbag() params.chester = small_chester() params.dragonflychest = params.shadowchester --before overriding params.shadowchester = small_shadowchester() local MaxSlots = 1 AddComponentPostInit("inventory", function(self) self.maxslots = MaxSlots end) AddClassPostConstruct("components/inventory_replica", function(self) local _GetNumSlots = self.GetNumSlots function self:GetNumSlots(...) if self.inst.components.inventory ~= nil then return self.inst.components.inventory:GetNumSlots() else return MaxSlots or _GetNumSlots(self, ...) end end end) local Inv = require "widgets/inventorybar" AddGlobalClassPostConstruct("widgets/inventorybar", "Inv", function() local Inv_Refresh_base = Inv.Refresh or function() return "" end local Inv_Rebuild_base = Inv.Rebuild or function() return "" end function Inv:SmallerInv(self) self.bg:SetScale(0.35,1,1.25) self.bgcover:SetScale(0.35,1,1.25) end function Inv:Refresh() Inv_Refresh_base(self) Inv:SmallerInv(self) end function Inv:Rebuild() Inv_Rebuild_base(self) Inv:SmallerInv(self) end end) local _makereadonly = GLOBAL.makereadonly function GLOBAL.makereadonly(t, k) if k == "maxslots" then return end _makereadonly(t, k) end RemoveDefaultCharacter("walter") RemoveDefaultCharacter("warly")