consume() called on manipulator with bound introspection module sometimes errors.
Wojbie opened this issue ยท 5 comments
I have noticed that in some cases (was not able to determine exact cause for this but i think it might be related to death or teleportation) when user tried to call consume on slot in inventory using bound introspection module in manipulator it errors with this message:
All other methods work correctly and transfer items around to and from inventory, only consume seems to be broken and it persist on quit/reconnect. Only way to fix this i found was removing and re-placing introspection module onto manipulator.
EDIT: Some additional testing leads me to believe that indeed teleprting might is one of ways to trigger this issue.
EDIT2: I have did some more testing and it regullary triggers when i come back after not playing for some time. Considering that it is in offline chunkloaded chunk my current guess is that its caused by manipulator and bound introspection module getting loaded after server restart without bound player on server.
I think those are 2 separate issues? They might be related code wise but one involves item movement and other involves just .consume failing.
I have a hunch that this needs to subtarget an EntityIdentifier instead, much like getPlayerContext does for getInventory itself:
But would need to be able to consistently reproduce it to know for sure if that's the problem
But would need to be able to consistently reproduce it to know for sure if that's the problem
I knew i was forgetting something sorry! I could swear i posted reproduction steps.
Reproduction steps on singleplayer:
- bind introspection module and place it in manipulator.
- place computer next to it in world.
- quit world
- rejoin world
- run
man = peripheral.find("manipulator")
inv = man.getInventory()
inv.consume(1)