Bug - Not A Bug Pyramid Middle Chamber Fails

HelpfulOne

New member
Farm.ash reports "You can't get to that area yet." but on relay browser I can adventure there just fine... release 16.3 KolMafia
 

lostcalpolydude

Developer
Staff member
What is middleChamberUnlock set to for you?

On another note (unrelated to this bug report), I see an inconsistent use of AdventurePool in QuestManager, which is going to make that harder to maintain down the line.
 

Darzil

Developer
Yeah, I'd sort of like to rip out every use of AdventurePools that are strings, and make them all integers, for clarity, simplicity and so we can use case statements. I don't want it enough to actually do it yet, though.
 

Veracity

Developer
Staff member
The convention is that AdventurePool.XXX is and integer and AdventurePool.XXX_ID is a String. Unless you (lost) are claiming that that naming convention is violated somewhere, I'm not sure how that is "harder to maintain". (If it IS violated, and sometimes XXX is an integer and sometimes it is a String, say, then yes - that is a problem right now, in my opinion.)

The former (XXX) is useful in switch statements, when you have extracted an integer from the "snarfplat" or "mining" field of a URL.
The latter (XXX_ID) is useful when manipulating AdventureRequest objects, since they have an "adventureId" field which is a String. That is why it is XXX_ID - it is for use as an adventure ID.

If you look at how AdventureRequest uses that, the adventureId is NOT always used for a snarfblat - an integer - but is sometimes an action, say.

Before you "rip out every use of AdventurePools that are strings" - which is to say, the XXX_ID constants - I suggest you look at where each one is actually used in the code. Do you really want to replace AdventurePool.GOATLET_ID with String.valueOf( AdventurePool.GOATLET ), for example? Or, more to the point, do you REALLY want to replace this.adventureId.equals( AdventurePool.SHROUDED_PEAK_ID ) with this.adventureId.equals( "cloudypeak2" ) in KoLAdventure?
 

HelpfulOne

New member
I ran a relay browser test , it ran ok... I went back to KolMafia started debug log, invoked farm.ash, and lo and behold it is running stuck on adventure 1 of 312 looping gathering debug log
 

Attachments

  • DEBUG_20140615.txt
    764.4 KB · Views: 1,572

lostcalpolydude

Developer
Staff member
Veracity, I meant things like
Code:
if ( location.contains( "395" ) )
and my comment actually meant that AdventurePool is not being used at all. Unrelated to what I was talking about (but since you brought it up), there are indeed times where I think using String.valueOf() in some places might be preferable to the ints and Strings mixed up in AdventurePool, though cloudypeak2 makes that different. I've never been really motivated to make changes there, though.

HelpfulOne, please go to the CLI, enter "get middleChamberUnlock", and post the result of that here.
 
Last edited:

Veracity

Developer
Staff member
AdventurePool was created years after the KoLAdventure and AdventureRequest classes were implemented. As you observe, there are many places that have not yet been converted to use it. Heck, it took years after ItemPool was implemented to find all the hardcoded itemIds in the source and convert them - and I am probably being presumptuous in thinking that "all" of them have been found and converted. :)

I am all for converting any remaining hardcoded adventure id constants into AdventurePool constants.

As to whether you want to get rid of XXX_ID constants that are integers, that's probably a pretty big refactoring, and I couldn't say if it would always result in better clarity. XXX_ID -> String.valueOf( XXX ) would result in extra run time and memory usage. For crafting AdventureRequest objects, it's probably an "eh", but for comparing an existing adventureId field to a constant, it seems like it would lose clarity. Just my opinion, of course. If somebody else feels motivated to look carefully at all such usages and assess, go for it.
 

HelpfulOne

New member
Veracity, I meant things like
Code:
if ( location.contains( "395" ) )
and my comment actually meant that AdventurePool is not being used at all. Unrelated to what I was talking about (but since you brought it up), there are indeed times where I think using String.valueOf() in some places might be preferable to the ints and Strings mixed up in AdventurePool, though cloudypeak2 makes that different. I've never been really motivated to make changes there, though.

HelpfulOne, please go to the CLI, enter "get middleChamberUnlock", and post the result of that here.

while farm.ash was running it said nothing visible...
after abort reissued command nothing visible...
 

Theraze

Active member
Also in the 'bug related to this' category, Farm uses CanAdv. Nobody had actually pointed out that the pyramid zones are not always available anymore, so it was telling users incorrect information about unlocks. That may or may not have been the case here, but CanAdv has been updated.
 

Winterbay

Active member
Due to the current fast change of KoL the stable releases is most likely out of date pretty fast. Updating daily is probably a better idea.
 

Bale

Minion
Should I update kolmafia daily? I thought the exe current stable link was enough...

Every single time KoL changes or adds something the "stable" build becomes a bad idea. That generally happens at least once a month, often more.
 
Top