Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Items are not consumed after use #4
Tested with latest cooking and hunger on PR#3:
By a short look, the
Likely that this can be fixed easily by removing the
@oniatus, thank you for doing the investigation into this. It looks like I did this pattern only half correctly when I implemented drinkable and fillable cups in JS. The complexity that I needed to overcome, and why I mistakenly added the event consuming, was to allow only one interaction happen when activating a cup. With a cup, you could: drink the contents, dump the liquid into a tank, fill the cup from a water source, or fill the cup from a tank. Without cancelling the event (with consume), all the actions could happen one after another, and depending on the order you could end up: filling the cup, drinking the cup, and emptying the cup all in the same ActivationEvent leaving you with the same empty cup that you started with.
(thinking out loud) I suppose the solution to this could be one of:
Any other thoughts?
So interestingly this now works - for Cooking module items in multiplayer. Oddly the Joshaberry from JS still does not disappear. Both are fine in single player.
Also oddly the apple pie fails to improve the player's thirst level, it just works for the hunger level.
In single player JS the Joshaberry is consumed but only fills up hunger, not thirst. In multiplayer JS it fills thirst but not hunger - that is mildly amusing in some bewildering fashion :D
Maybe something somewhere is consuming an event that had other stuff to do as well, and single vs. multi happens to be switching the order around or not triggering the first so only the second happens.
Maybe consuming a food item (or even drinking from a wooden cup) should re-trigger hunger and thirst specific events depending on which if any module is active, but not be consumed itself so any action can be attached?
Probably some of this works already. Mostly thinking out loud hoping it'll be useful.