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
[...]