Closed juhana closed 12 years ago
It didn't occur to me that would be needed!
Internally, we distinguish between the two with the functions processLink
and processClick
(neither are available from outside the undum module). doLink
is then a thin wrapper around processLink
, so we should probably add a similar wrapper around processClick
(which is at https://github.com/idmillington/undum/blob/master/games/media/js/undum.js#L1106)
I'm on my iPad so I can't change it tonight, but I'll add it tomorrow, or feel free to put it in yourself if you're in a rush.
Fixed in commit 3a3f2287
If I have on the UI itself a button that calls
system.doLink()
, Undum doesn't remember that click when loading the game. For example:The button works fine but the click isn't saved in the turn sequence so when the game is loaded the system forgets that we've clicked on the button and skips that turn.
I can see why this is (if you have doLinks inside situations/actions they'd be executed twice), but is there a workaround? Would it be reasonable to have a separate function that both executes the link and saves it into the turn sequence?