The goal is to get the hero npc to the other side of the map. If the player moves too far from them, they will lose money, when they run out they will return to the start.
Ok, this makes more sense now!
(That needs to be made a lot clearer though, somehow, I think.)
I tried again. This time I got the guy his coffee at the first place he stopped, and he moved on to a second spot, but no matter how much coffee I gave him at the second spot he just kept asking for more and wouldn't move on again.
It felt like there was a bit of an exploit, in that I could just keep mining gold, and give him a bunch of this, as well as buying upgrades, indefinitely, so I actually bought him quite a lot of coffee in the end, but since he just wouldn't move on I eventually just had to give up.
One other minor issue: Escape key is supposed to exit you from the shop, but if you are in full screen then the first press on escape actually just exits full screen, and then you have to press again (in windowed mode) to actually exit. (Then go back to full screen if you were wanting to play in full screen.)
Another UI issue is that the explanation boxes above character heads tend to go off the screen where you can't read them.