🧙‍♂️ Brought to you by Peptides.gg — Use code UO20 for 20% off — GLP-1's, 90+ Peptides and more!

EC: Stop the Organizer from running forever if none of its items are found

Started by TimSt · 2023-10-31 · 3 posts · General Discussions
#0
The EC has a bug where the Organizer will run forever if none of the items in the currently selected Organizer are found in the container being organized.  This can cause the backpack to not update later. The following code addition below will fix that.

To the function ContainerWindow.UpdatePickupTimer in the file source\ContainerWindow.lua add the following code
--start of added code
else
ContainerWindow.Organize = false
if Organizer.Organizers_CloseCont[Organizer.ActiveOrganizer] then
if DoesWindowNameExist( "ContainerWindow_" .. ContainerWindow.OrganizeParent ) then
DestroyWindow("ContainerWindow_" .. ContainerWindow.OrganizeParent)
end
end
--end of added code
end
end


if ContainerWindow.Restock and ContainerWindow.CanPickUp then
#1
Good change.  Have you looked at the infinite loop on "That container cannot hold more weight." ?  I'll check that out later if you haven't.
#2
Found an issue with my fix above when the server is slow.  The new code will be

--start of added code
elseif (moveObjects and #moveObjects == 0) then
ContainerWindow.Organize = false
if Organizer.Organizers_CloseCont[Organizer.ActiveOrganizer] then
if DoesWindowNameExist( "ContainerWindow_" .. ContainerWindow.OrganizeParent ) then
DestroyWindow("ContainerWindow_" .. ContainerWindow.OrganizeParent)
end
end
--end of added code

All that changed was the else became an elseif.

The reason is above my code is the line "if moveObjects and #moveObjects > 0 and ContainerWindow.CanPickUp then".  If any of those was false my previous fix would be triggered.  When the server is slow ContainerWindow.CanPickUp is set to false which caused my fix to cancel the organizer prematurely.

← Browse more General Discussions discussions