Bug pref horseryAvailable is always true if you own it even if it's restricted by path

Malibu Stacey

Active member
Right side of the tracks in current challenge path looks like this

Screenshot 2022-08-29 134933.png
This account owns the Horsery but as you can see, it's not showing up in the Right Side of the Tracks since Fall of the Dinosaurs is currently Standard restricted. However:
Screenshot 2022-08-29 135015.png
This is changed behaviour as of r26684
 

Veracity

Developer
Staff member
That was a maximizer fix.

KoLmafia saw the horsery when you visited the Right Side of the Tracks.

It is not currently in-Standard so you cannot go there.

You might also own Airplane Charters, which have properties like "stenchAirportAlways" - which does NOT mean you can go there right now.

I guess the question is, with things like the Horsery, the Campaway Camp, Chateau Mantegna, the Snojo, Spacegate - none of which have "day passes" that can be used to visit map locations - and only some of which are removed from the map if they are out of Standard - what are the appropriate settings? On a Standard run, I can see the Spacegate and the Chateau when I visit the Mountains - but "nobody goes there any more". For the others, they actually are removed from the map - and the only way we know when they become available is if we actually go and look at them on the map.

Here is how KoLmafia handles the Chateau:

Code:
  public static boolean chateauAvailable() {
    return Preferences.getBoolean("chateauAvailable")
        && StandardRequest.isAllowed(RestrictedItemType.ITEMS, "Chateau Mantegna room key")
        && !Limitmode.limitZone("Mountain")
        && !KoLCharacter.inBadMoon()
        && !KoLCharacter.isKingdomOfExploathing();
  }

Here is the Campaway Camp:

Code:
  public static boolean campAwayTentRestUsable() {
    return Preferences.getBoolean("restUsingCampAwayTent")
        && Preferences.getBoolean("getawayCampsiteUnlocked")
        && StandardRequest.isAllowed(RestrictedItemType.ITEMS, "Distant Woods Getaway Brochure")
        && !Limitmode.limitZone("Woods")
        && !KoLCharacter.inBadMoon();
  }

And yet, there is not the equivalent for the horsery; there is just the single setting "horseryAvailable".

Note that it is not a daily setting; once it is set, it persists across ascensions.

If we want to overload this setting like this, does that imply that when you free the king, KoLmafia should go look at the Right Side of the Tracks (and the Wrong Side and the Woods and the Mountains and the Monorail and and and...) to see which IOTMs have just reappeared?
 

Ryo_Sangnoir

Developer
Staff member
To give a scripting solution, where previously you had

Code:
get_property("horseryAvailable").to_boolean()

you now want

Code:
get_property("horseryAvailable").to_boolean() && is_unrestricted($item[horsery contract])

I believe.
 

Malibu Stacey

Active member
To give a scripting solution, where previously you had

Code:
get_property("horseryAvailable").to_boolean()

you now want

Code:
get_property("horseryAvailable").to_boolean() && is_unrestricted($item[horsery contract])

I believe.
Yep that's effectively what I did to autoscend after the user who noticed this in their Standard run reported it.

I should clarify I don't necessarily see this as being a problem, this thread was more intended as a "this has changed behaviour, you may want to be aware of it in case it wasn't intended" as a pref named <something>Available being set to true when the thing isn't actually available is misleading in my opinion.
 
Top