EC: Stop the Organizer from running forever if none of its items are found
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
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
Comments
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.