I was wondering why I had a large debug log created when I ascended as Jarlsberg this morning. It appeared to open the debug log, print the text from a choice.php, and close it for every time it encountered an unknown choice.
Sure enough, the following code in ChoiceManager.processChoiceAdventure() does this:
Note how similar it is to what happens when you select "Manual Control" for a choice:
The difference (other than the ABORT message) is the call to StaticEntity.printRequestData( request ) - which does exactly what I observed: opens the debug log, logs the request, and closes the debug log.
Why is this useful? How about if we don't call (and delete from the code) StaticEntity.printRequestData()?
Sure enough, the following code in ChoiceManager.processChoiceAdventure() does this:
Code:
// Bail if no setting determines the decision
if ( decision.equals( "" ) )
{
KoLmafia.updateDisplay( MafiaState.ABORT, "Unsupported choice adventure #" + whichchoice );
StaticEntity.printRequestData( request );
request.showInBrowser( true );
ChoiceCommand.printChoices();
return;
}
Code:
// Let user handle the choice manually, if requested
if ( decision.equals( "0" ) )
{
KoLmafia.updateDisplay( MafiaState.ABORT, "Manual control requested for choice #" + choice );
request.showInBrowser( true );
ChoiceCommand.printChoices();
return;
}
Why is this useful? How about if we don't call (and delete from the code) StaticEntity.printRequestData()?