Skip to content
Discussion options

You must be logged in to vote

Hrrrm, it's tricky.

So in theory, you can have a paymentInventory() method just return the underlying IItemHandler, and that will have all the right methods.

However, this object will stick around even if the peripheral is detached (e.g. the stock ticker being broken), which means you could extract items from an inventory which no exists, which is obviously no good!

Honestly, I'm afraid I probably would recommend sticking with what you've got now. Or rename the list() method to be stock().

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by BirbIrl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants