Missing backpack full notification

ForeverFunForeverFun Posts: 908
In at least EC, there is code to generate a warning graphic if the player backpack is full.

script CenterScreenText.SendCenterScreenTexture("backpackfull")
However, the logic to trigger that may not be complete "see TODO: " in textparsing.lua.


Here's some logic to add to containerwindow.lua, function ContainerWindow.UpdateContents()

		ContainerWindow.BackpackItemsCheck()

-- new code

if(#Interface.BackPackItems >= ContainerWindow.MAX_INVENTORY_SLOTS) then -- can exceed 125 in certain situations.
CenterScreenText.SendCenterScreenTexture("backpackfull")
-- could also periodically check this in another callback, and display the message every 30 seconds.
end

-- end of new code


You can change the warning quantity to something lower if you want.

For the ToT artifact drops, there's some intriguing logic currently - if your backpack is full, those drops get queued up to deliver once your backpack frees up space...  Drum roll for Covefefe.

Comments

  • Can also take overweight into account

    		-- new code
    if(#Interface.BackPackItems >= ContainerWindow.MAX_INVENTORY_SLOTS) then -- can exceed 125 in certain situations.
    CenterScreenText.SendCenterScreenTexture("backpackfull")
    -- could also periodically check this in another callback, and display the message every 30 seconds.
    else
    local current = WindowData.PlayerStatus["Weight"]
    local maximum = WindowData.PlayerStatus["MaxWeight"]

    if(current ~= nil and maximum ~= nil) then
    if(current > maximum) then -- maximum
    CenterScreenText.SendCenterScreenTexture("backpackfull")
    -- could also periodically check this in another callback, and display the message every 30 seconds.
    end
    end
    end
    -- end of new code

  • Lord_FrodoLord_Frodo Posts: 2,426
    Do you really need this?  How many drops are you getting in an hour.  IMHO this reeks of an alarm for someone that is running AFK so they can go unload, sorry
Sign In or Register to comment.