Feature - Implemented mojo filters used when there's no spleen to empty

lostcalpolydude

Developer
Staff member
I keep using mojo filters when I haven't filled any spleen yet because I'm spamming CLI commands faster than mafia can follow them, and the spleen section looks something like:
> use 3 coffee pixie stick
you don't have 3 of those (or whatever it says)
> use mojo filter
(item used)
use coffee pixie stick

The attached patch limits mojo filter uses to the amount of spleen already filled in addition to the 3 uses per day.
 

Attachments

Your way is best since it prevents an unneeded server hit, but shouldn't kolmafia detect the kol response when a mojo filter is used and not needed, to prevent (internal) consumption?

edit:

Looking at the code, mafia does handle the usage of an uneeded mojo filter... so i'm not 100% sure what my point is anymore!?

Code:
			if ( responseText.indexOf( "now-grodulated" ) == -1 )
			{
				ResultProcessor.processResult( item );
				return;
			}
 
Apparently it isn't actually used up when my spleen isn't empty, thanks to KoL's handling of it (might have lowered my motivation to make the patch if I had known that to begin with). Might as well save the server hit though, right?
 
Back
Top