Feature - Implemented Adding eternalCarBatteryUsed flag

Much like the oscusSodaUsed flag, this would indicate whether or not you had used the car battery to gain mana once per day.
 

lostcalpolydude

Developer
Staff member
Anything that resets daily and doesn't have an underscore is old, and those don't get changed to have an underscore because scripts might stop working.
 

fronobulax

Developer
Staff member
Anything that resets daily and doesn't have an underscore is old, and those don't get changed to have an underscore because scripts might stop working.

Which raises a veer - given several other changes that broke scripts, is this one that might be worth doing? Implement _x, have the code force x and _x to have the same value and then have KoLmafia emit a message that a script is referencing x and it should reference _x instead? Then a couple weeks later, just stop setting x.
 

lostcalpolydude

Developer
Staff member
Other things that were worth breaking scripts over always resulted in the script aborting with an informative error message, right? Script authors didn't have much choice about fixing those issues, but in this case the message might go unnoticed until eventually the script suddenly stops doing anything resembling what it was meant to do. The transition could include aborting scripts that use the old names, I suppose...
 

roippi

Developer
Whenever we break backwards-compatibility there is always a cost, and that has to be weighed against the benefit of making the change.

In this case the benefit is so minute that I have to say that it's not worth it. It seems to be limited to "we no longer have to explain that a small subset of old daily-reset preferences are not prepended with an underscore. All new ones are." Weigh that benefit against the cost of subtly breaking a lot of scripts... yeah.
 

Fluxxdog

Active member
I have to say, this is an interesting development case. There are parts of the code that don't conform to current standard, but the benefit of updating them doesn't seem valuable enough to warrant it.

Gotta ask, where would the notifications (like for the locations and other fuzzy matching notices) go in the code? I'm looking through Preferences.java and not quite sure where deprecation processing would go. Would it have to be split between the various sets and gets or is there a way to centralize it?

Just to be sure, these the only ones from KoLmafia.java that lack the underscore, right?
Code:
		Preferences.setString( "barrelLayout", "?????????" );
		Preferences.setBoolean( "bootsCharged", false );
		Preferences.setBoolean( "breakfastCompleted", false );
		Preferences.setBoolean( "burrowgrubHiveUsed", false );
		Preferences.setInteger( "burrowgrubSummonsRemaining", 0 );
		Preferences.setInteger( "cocktailSummons", 0 );
		Preferences.setBoolean( "concertVisited", false );
		Preferences.setInteger( "currentMojoFilters", 0 );
		Preferences.setString( "currentPvpVictories", "" );
		Preferences.setBoolean( "dailyDungeonDone", false );
		Preferences.setBoolean( "demonSummoned", false );
		Preferences.setBoolean( "expressCardUsed", false );
		Preferences.setInteger( "extraRolloverAdventures", 0 );
		Preferences.setBoolean( "friarsBlessingReceived", false );
		Preferences.setInteger( "grimoire1Summons", 0 );
		Preferences.setInteger( "grimoire2Summons", 0 );
		Preferences.setInteger( "grimoire3Summons", 0 );
		Preferences.setInteger( "lastBarrelSmashed", 0 );
		Preferences.setInteger( "libramSummons", 0 );
		Preferences.setBoolean( "libraryCardUsed", false );
		Preferences.setInteger( "noodleSummons", 0 );
		Preferences.setInteger( "nunsVisits", 0 );
		Preferences.setBoolean( "oscusSodaUsed", false );
		Preferences.setBoolean( "outrageousSombreroUsed", false );
		Preferences.setInteger( "pastamancerGhostSummons", 0 );
		Preferences.setInteger( "prismaticSummons", 0 );
		Preferences.setBoolean( "rageGlandVented", false );
		Preferences.setInteger( "reagentSummons", 0 );
		Preferences.setString( "romanticTarget", "" );
		Preferences.setInteger( "seaodesFound", 0 );
		Preferences.setBoolean( "spiceMelangeUsed", false );
		Preferences.setInteger( "spookyPuttyCopiesMade", 0 );
		Preferences.setBoolean( "styxPixieVisited", false );
		Preferences.setBoolean( "telescopeLookedHigh", false );
		Preferences.setInteger( "tempuraSummons", 0 );
		Preferences.setInteger( "timesRested", 0 );
		Preferences.setInteger( "tomeSummons", 0 );
 

fronobulax

Developer
Staff member
I find the inconsistency disturbing but Fluxx's post of the effected preferences is much larger than I recalled so I am not going to suggest this should be done until the benefit (to me) exceeds the cost (to me) of the development effort (by me) and then only if that which will be broken can be done in a controlled manner. In other words, Not A Good Idea.
 
Top