Dank Storage

Dank Storage

15M Downloads

Enhancement: Make lock slots allow all items to be removed, but limit what goes in.

N1ghthauq opened this issue ยท 2 comments

commented

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.

commented

no

commented

So, should I try to make this change myself and present the code that accomplished this, or can I help you make this change?