Feature autoSatisfyWithStash as a per character setting, not global

fronobulax

Developer
Staff member
I was running characters in two separate instances of mafia which means there were two different GLOBAL_prefs.txt files. I got tired of keeping the scripts directories synchronized so I moved all my play to one instance. I then got an infinite loop in EatDrink. The moved character had been in a clan that for most practical purposes did not allow the character to actually take something from the stash. In the old directory autoSatisfyWithStash was false and there were no problems. However, in the new directory it was true. EatDrink did not recognize that it could not pull a bottle of vodka from the stash and kept trying. While, on the surface this might be an EatDrink problem it turns out that the Maximizer and various portions of Item Manager tell me I can do something that I cannot because they too, think if something is in the clan stash then I can actually use it.

My knee jerk reaction would be to move the preference from GLOBALS to per character but I have not figured out how to do that in a way that is transparent to users.

I could make a case that there are several other preferences (Login/Logout scripts and Breakfast for starters) that are really best tracked on a per user basis but again, I don't see an easy way to get there from here.

I could solve the problem by ANDing the preference with a "canIReallyPull" Boolean function every place it is used but I'm not sure I could write canIReallyPull so that it handled all the variations clans can impose on stash access.

Ideas? Since the current state effects more than EatDrink my workaround will have to be to set and reset the preference for the one character.
 
Back
Top