Bug - Fixed Incorrect location's "turn spent" increased when volcano mining

fredg1

Member
When mining, the $location[xxx].turns_spent that gets incremented is the one from your previous adventuring location, not the gold mine (mining)'s


Code:
> ash $location[The Nemesis' Lair]

Returned: The Nemesis' Lair
[...]
combat_queue => security slime
noncombat_queue =>
turns_spent => 1
[...]

Preference nextAdventure changed from The Nemesis' Lair to The Velvet / Gold Mine (Mining)
Preference lastAdventure changed from The Nemesis' Lair to The Velvet / Gold Mine (Mining)

[424] The Velvet / Gold Mine (Mining)

[424] The Velvet / Gold Mine (Mining)
You gain 10 Strengthliness
Preference lastAdventure changed from The Velvet / Gold Mine (Mining) to The Nemesis' Lair
Preference lastAdventure changed from The Nemesis' Lair to The Velvet / Gold Mine (Mining)

[...mining for a few turns...]

[438] The Velvet / Gold Mine (Mining)
You lose 23 hit points
Preference mineLayout6 changed from #46 to #46#38
Preference lastAdventure changed from The Velvet / Gold Mine (Mining) to The Nemesis' Lair

> ash $location[The Nemesis' Lair]

Returned: The Nemesis' Lair
[...]
combat_queue => security slime
noncombat_queue =>
turns_spent => 16
[...]

> ash $location[The Velvet / Gold Mine (Mining)]

Returned: The Velvet / Gold Mine (Mining)
[...]
combat_queue =>
noncombat_queue =>
turns_spent => 0
[...]
 
I assume this is from automated adventuring? Going to the mine in the relay browser does not update the wrong turns_spent, from my testing now, but the timing difference in loading charpane.php versus api.php could be relevant.

I'm not too motivated to look into this further, since the times when one is likely to automate mining don't correspond with the times when one is likely to be interested in turns_spent anywhere, as far as I can tell.
 
19980. KoL doesn't update your last adventure in charpane/api for that mine specifically, and we rely on that value to know where to count your last turn, so now the turn is simply not counted at all at that mine.

Also, it's been so long since I took advantage of Unaccompanied Miner that I was initially confused by the results of not spending turns.
 
Back
Top