You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an odd issue earlier, which finally boiled down to AdaptorPlayerInventory.isItemValidForSlot always returning true. Is there a reason for this, and not calling src.isItemValidForSlot instead?
I'm aware that this isn't usually an issue, because normally all slots of a player's inventory (except armor slots, which aren't part of the mainInventory) accept all items. However, certain fake players (in my case, OC robots) may have slots in their inventory that don't. I've worked around this by adding a validity check in my setInventorySlotContents method for now, dropping the stack into the world in case of an invalid insertion, but it'd be nice if this could be avoided.
The specific use-case where this was the problem? Robots activating conversion monitors to extract items. Which is really borderline, I know. So I'd understand if you'd just close this. But I'd just like to know if there's a reason for this (performance?), or if it might have been an oversight?
The text was updated successfully, but these errors were encountered:
It might be a way to make it harder for fake players to use it.
Or just an oversight based on the assumption that only real player would use it.
If it is an oversight, than getSizeInventory is probably one and also affecting the WrapperChainedInventory.
All I can say is that I remember Player not really providing a usable isItemvalidForSlot implementation ( this might be false ) - Other then that I doubt there's a reason, if using that that method fixes it sounds reasonable to me.
Most of the inventory adapators are ports from AE1 to an extent, since I didn't feel like re-testing them and most of them works reasonably well, so they are ancient.
I ran into an odd issue earlier, which finally boiled down to AdaptorPlayerInventory.isItemValidForSlot always returning
true
. Is there a reason for this, and not callingsrc.isItemValidForSlot
instead?I'm aware that this isn't usually an issue, because normally all slots of a player's inventory (except armor slots, which aren't part of the mainInventory) accept all items. However, certain fake players (in my case, OC robots) may have slots in their inventory that don't. I've worked around this by adding a validity check in my
setInventorySlotContents
method for now, dropping the stack into the world in case of an invalid insertion, but it'd be nice if this could be avoided.The specific use-case where this was the problem? Robots activating conversion monitors to extract items. Which is really borderline, I know. So I'd understand if you'd just close this. But I'd just like to know if there's a reason for this (performance?), or if it might have been an oversight?
The text was updated successfully, but these errors were encountered: