Feature - Implemented charpane.php hit after item use

Veracity

Developer
Staff member
Bumping to remind myself to look at the situation where Relay Browser induced automation causes both an api.php call (from the automation) and a charpane.php call (requested by the browser as a result of the response from the automation).
 

Veracity

Developer
Staff member
Bumping again to remind myself to think carefully about funneling all calls to api.php through a single instance. Which is how it is now. Whether it is right or not.
 

Veracity

Developer
Staff member
I agree. If KoL thinks you need a charpane request, the browser will do one - and, if we are automating, we will do an api request instead.

The trick is to not ADD an api request when there will be a charpane request coming from the browser as a result of the thing we just did, not eliminate refreshes that KoL tells us we need.
Bumping again to reconsider this, since I noticed that simply looking at your Terrarium - and many other things which do not change your state in any way - come from KoL with a request to refresh the charpane.

I notice that GenericRequest has a class variable - suppressUpdate - to not request api.php. That appears to be used in exactly one place: in RelayRequest when it is submitting a command from the charpane. I think that was originally to prevent the charpane from being loaded, since the Browser will request the charpane to be loaded anyway after the command is complete. We load api.php, not the charpane, for internal requests now - but if we are going to load the charpane "soon", we can still suppress that.

Seems we could have a per-request equivalent of this. For something that we KNOW will not actually change the charpane - looking at your terrarium, or what have you - we could ignore KoL's request to load the charpane - even though I said we weren't going to do that.

That is a far cry from the original suggestion to suppress updates when we "know" that using an item will cause such-and-such an effect - and I still oppose doing that - but I'm open to investigating this, at least.

And it would be nice to "finish" and close this Feature request.
 
Top