Feature Need something less general than forceContinue

Darzil

Developer
I'm looking to quash some of the weird edge cases where people do stuff with unexpected results.

We use forceContinue all over the place. It has two effects. It sets MafiaState.CONTINUE, and it set StaticEntity.userAborted to false.

Most of those appear in one of two roles:
Before running a command or script
After doing something that might cause a failure and handling it

Unfortunately, we can have more than one thing happening at once, and this means unexpected results occur. For example, user aborts getting ignored and activity continuing.

I think what we need is forceContinue to no longer ignore user aborts. We want user aborts to stop everything, not just something, sometimes. And we want using a command (CLI, GCLI, Adventure Request, Relay request, Script), when nothing else (CLI, GCLI, Adventure Request, Relay request, Script) is currently running, to reset StaticEntity.userAborted to false.

It's possible this just involves more checks of !KoLmafia.refusesContinue() before using forceContinue().

But this is way further into Mafia's weeds than I've been before, so feedback welcomed!
 

Veracity

Developer
Staff member
I'll comment on this, but not before next week; I'm out of town until Tuesday and will not have time to look at code and ponder before then.
 

Darzil

Developer
Yeah, I've done the more important stuff I was trying to do to get GCLI and adventuring and relay browser not breaking each other so much.

This is more of an abort means abort thing, with no urgency around it!

But also, then, something that knows it's ok to clear abort!
 
Last edited:
Unfortunately, we can have more than one thing happening at once, and this means unexpected results occur. For example, user aborts getting ignored and activity continuing.

I was curious as to why this would happen. It was one of the reasons I added a graceful terminate in some of my scripts.

It seems like it might be as simple as no longer ignoring user aborts but those weeds are scary!
 

Darzil

Developer
It can't be quite as simple as totally not ignoring user aborts, as it is only due to ignoring them that anything happens EVER after an abort !
 
Top