IHateMyKite / UnforgivingDevices

UD is framework extension for mod Devious Devices which focuses on adding more immersive and complex escape system.
https://www.loverslab.com/files/file/16938-unforgiving-devices/
GNU General Public License v3.0
4 stars 8 forks source link

Fixed couple of issues related to sorting device slots #173

Closed blu3mania closed 1 year ago

blu3mania commented 1 year ago

Fixed the problem that sortSlots exits prematurely in the rare case when consecutive slots become empty when executing removeUnusedDevices. In theory the same problem could also happen when unregisterDevice is called and multiple copies of that device exist in consecutive slots.

Also fixed the problem that sortSlots gets called many times unnecessarily when removeCopies is executed, because unregisterDevice always invokes sortSlots even if nothing is actually removed.

IHateMyKite commented 1 year ago

Great job! Thanks for your contribution.