Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
AdaptorPlayerInventory.isItemValidForSlot is always true? #572
I ran into an odd issue earlier, which finally boiled down to AdaptorPlayerInventory.isItemValidForSlot always returning
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
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?
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.
Probably a question for @AlgorithmX2
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.