Enhancement: Make lock slots allow all items to be removed, but limit what goes in.
N1ghthauq opened this issue ยท 2 comments
So, the lock slots check to see if an an item stack is zero before giving the stack to the user from the dank, then subtracting one or however it works. What is left in the end is one item left in the slot to "lock" the slot. What I propose is instead of leaving one item in the slot. When locking any slot create a populated array that essentially keeps the slot id and the item that is locked in the slot together. This would allow you to check the event that puts an item in the slot, if the item that is being put in equals the locked item code, then allow the item to be put in. this would look something like:
OnLock {
lockedSlot[slotID] = itemThatIsInSlot;
}
OnItemDeposit {
if (lockedSlot[slotID] != itemToDeposit || lockedSlot[slotID] != Null) {
return from event;
}
}
This would replace all of the checking and fixing that trying to keep one item in the locked slot creates. Also this would fundamentally be better because then I can hook up the danks to a single ME system instead of 2 ME Systems (and still have errors) AND get all of the items from the dank without worrying about having incorrect items put into the dank from the ME System.