UseItemRequest.parseConsumption(String responseText, boolean showHTML)
That second argument determines whether "message" things will pop up a window for you.
As coded, UseItemRequest.processResults - which is called only if it's actually a UseItemRequest, as opposed to a GenericRequest or a RelayRequest, say - calls that with "true". Since InventoryManager calls a request of that type, you get the popup window. A "use" command - called by scripts - also uses such a request.
I can see why a script doesn't need a popup window.
Let's see:
- DrinkItemRequest, EatItemRequest, and SpleenItemRequest - called by UseItemRequest - do not get the showHTML argument.
If we implement "message" for those - like the cocktails with a fly - they should get that argument.
- gift packages ignore showHTML and always assume true. Considering we log the sender - which we SHOULD do before parsing the results, since it would be nicer to log the sender before the gift - it is not clear that showHTML should be non-optional.
We could jigger things so that showHTML defaults to false, but can be overridden by UseItemRequests from the ItemManager, but not from scripts.
See, this is what we should have discussed in 2009 (or earlier) when this functionality was first implemented.
