CanAdv -- check whether you can adventure at a given location

Heh. Okay, merging changes back in, and some new issues come up.

1) Back when I'd checked, Mysticality was still a part of the Canadia. Apparently back when you checked, Moxie was still part of the MoxSign zone. I've put both into their relevant sign checks.
2) I'd missed the url-change in the Oasis and basement checks, thanks.
3) I'd accidentally left the file with Windows line endings, which I had done to make it compare more easily to CanGo. Converted back to *nix endings to make it both smaller and better whitespace comparison.
 
These checks for the Mothership zones work correctly. Checking !integer fails because:

"unlocked": you have collected enough biodata but haven't unlocked that level of the ship yet.
"open": you can adventure there
"cleared": you are done with this zone and can't adventure there

In this script we only need to check for "open".

PHP:
  // mothership
   case $location[Medbay]: return get_property("statusMedbay") == "open";
   case $location[Sonar]: return get_property("statusSonar") == "open";
   case $location[Waste Processing]: return get_property("statusWasteProcessing") == "open";
   case $location[Morgue]: return get_property("mothershipProgress") == "1" && get_property("statusMorgue") == "open";
   case $location[Science Lab]: return get_property("mothershipProgress") == "1" && get_property("statusScienceLab") == "open";
   case $location[Special Ops]: return get_property("mothershipProgress") == "1" && get_property("statusSpecialOps") == "open";
   case $location[Engineering]: return get_property("mothershipProgress") == "2" && get_property("statusEngineering") == "open";
   case $location[Galley]: return get_property("mothershipProgress") == "2" && get_property("statusGalley") == "open";
   case $location[Navigation]: return get_property("mothershipProgress") == "2" && get_property("statusNavigation") == "open";
 
Ah. Yeah, BCA doesn't check status, just that it isn't integer, so... not the right check. :) Couldn't we technically simply check for open, since unlocked means that the ship level isn't available yet? Or is there a reason to check both, besides redundancy if the user is manually damaging their preferences?
 
Yeah we can just check "open". I just added the mothership bit for extra safety, and because it was there. :)
 
Well, I see that as two separate values which the user can set wrong, either of which would stop their automated adventuring from working properly. :) If someone has a good reason as to why it should be used, I'll have it check both then. Until then, it makes it harder for people to screw up to only have one there. :D
 
MakeMeatFast gave me this:
Code:
Considering The SMOOCH Army HQ: 
zlib reports that The SMOOCH Army HQ is unsafe to adventure in based on your 'threshold' setting.
Considering The Velvet / Gold Mine: 
Unknown location: The Velvet / Gold Mine (zone: That 70s Volcano)
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
can_adv reports that The Velvet / Gold Mine is unadventure-able.
Considering LavaCo™ Lamp Factory: 
Unknown location: LavaCo™ Lamp Factory (zone: That 70s Volcano)
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
can_adv reports that LavaCo™ Lamp Factory is unadventure-able.
Considering The Bubblin' Caldera: 
Unknown location: The Bubblin' Caldera (zone: That 70s Volcano)
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
can_adv reports that The Bubblin' Caldera is unadventure-able.
Considering The Velvet / Gold Mine (Mining): 
Unknown location: The Velvet / Gold Mine (Mining) (zone: That 70s Volcano)
Please report this missing location here: http://kolmafia.us/showthread.php?t=2027
can_adv reports that The Velvet / Gold Mine (Mining) is unadventure-able.
I do have permanent access to these locations and spent most of todays adventures there.
 
Code:
> ash get_property( "hotAirportAlways" );

Returned: true
This still happens in Mafia r16357, by the way. My version of both scripts and zlib are up-to-date too.
 
Lost's note was to Theraze to add support for those zones, not debugging as to why the script isn't working for you.
 
Change committed, though without the nonstandard spacing. Also changed == "true" to boolean checks, both for this airport and several other zones.
 
Unknown location: Madness Bakery (zone: Town)
Unknown location: The Ice Hotel (zone: The Glaciest)
Unknown location: VYKEA (zone: The Glaciest)
Unknown location: The Ice Hole (zone: The Glaciest)

AFAIK I am running r68 from SourceForge. I know the last three are new content :-)
 
What are the detection points for the zones? Are the Glaciest just based on coldAirportAlways? Does the Madness Bakery have an unlocked or quest preference?
 
What are the detection points for the zones? Are the Glaciest just based on coldAirportAlways? Does the Madness Bakery have an unlocked or quest preference?

Dunno about the Glaciest. I am 99 & 44/100 sure that the Bakery is opened after accepting the quest or finishing it. I suppose I should check.
 
Well, once we know the preference that Madness needs, I can trigger on that. If we know the preference for Glaciest, we can trigger on that as well. But we need specifics.
 
Well, once we know the preference that Madness needs, I can trigger on that. If we know the preference for Glaciest, we can trigger on that as well. But we need specifics.

Glaciest is coldAirportAlways == "true" or _coldAirportToday == "true" (I think; similar format to other charters). Madness is questMwhatever != "unstarted".
 
Last edited:
Oh, this script may need updating after the recent change to correct a zone number. I do not know for sure, but I thought I'd throw that out there just in case it matters.
 
Well, the Glaciest was confirmed to match my guess, but no specifics on which quest properties to track for Madness, so... that one isn't in yet. Unlike Glaciest.
 
Back
Top