Bug - Fixed requireBoxServants setting seems to be ignored

th3y

Member
using r8604. In Item Manager -> Creatable, have "require in-a-boxes" unchecked. Checked this, and unchecked again to make sure this was unset. In CLI:
Code:
> create cran cord

You have chosen not to cook fancy food without a chef-in-the-box.

> create hell ramen

You have chosen not to cook fancy food without a chef-in-the-box.

> get requireBoxServants

false

> inv reag

scrumptious reagent (8)

> inv nood

dry noodles (6)

> inv hell

coconut shell
hellion cube

> inv cran

cranberries (8)
 

Winterbay

Active member
Do you have two characters? I had that problem for a while and solved it by turning the option on and off in quick succession.
 

Theraze

Active member
Also, I believe the same error comes up if you don't have a range, though it claims that the problem is the box... have you verified it's installed?
 

Veracity

Developer
Staff member
Also, I believe the same error comes up if you don't have a range, though it claims that the problem is the box...
You "believe" that, or you "know" that?

The code tells me that the message in that case is "You cannot cook fancy foods without a range."

I'll look at this, by and by. The code was copied from the original check for having a chef-in-the-box, so it's not obvious why it would break...
 

th3y

Member
Thanks for the debugging tips; here are the results.

Using r8606 now. I do have two characters (the multi has a chef-in-the-box, and all works for him as expected). I did check and uncheck "require in-a-boxes" in the multi and verified that "get requireBoxServants" returns false for him. Back in the main, same behavior.

I do have a range installed:
Code:
Your campsite includes a handsome and functional outdoor kitchen, which is to say that there's a patch of battered linoleum on the ground.

	Dramatic™ range

You've got a Dramatic™ range installed in your kitchen. [Cook something fancy!]
 

Theraze

Active member
What I was meaning is that the "no range" error is set in lines 1415-1416 (persistence/ConcoctionDatabase) and then immediately wiped out in 1427-1428... though from looking, it'll only get wiped out if you do have a range, since that's what the 1410-1411 does... but that leads to the whole problem where this mess comes.

From looking, it appears that it runs off a combination of autoRepairBoxServants and either autoSatisfyWithMall or autoSatisfyWithStash, not actually the requireBoxServants... since that's what's set from lines 1243-1246 in persistence/ConcoctionDatabase, where it sets willBuyServant.

If I'm reading 1421-1429 correctly there (which I admit, I may not be... I'm not at my most aware right now; stupid headache from dental work earlier in the week) what it does is, if you have a range, it sets whether or not fancy cooking is allowed based on if you're supposed to buy a servant (willBuyServant), if you already have a chef using KoLCharacter.hasChef(), and if you have a chef using isAvailable (which also checks autoRepairBoxServants, then looks if you currently have that servant in regular or clockwork).

If it fails to evaluate true, you get the fail message... whether or not you actually wanted to use the chef.

So I suppose the current suggestion is to turn off autoRepairBoxServants, and eventually whatever part is supposed to check if you wanted it to build them in the first place will be updated properly? Or am I reading this improperly? I allow it's a major possibility at this point.
 
Top