Closed JJM152 closed 6 years ago
Might be a sugarcube related bug with the state history.
I compile with Tweego 1.3.0/Sugarcube 2.27.0 and have never encountered anything like that.
I've seen it a couple of times, even recently, using sugarcube 2.24.0 but I haven't figured out how to reliably trigger it.
Literally the worst kind of bug.
User still reporting this as a problem in test release.
I'm going to assume this is a bug in the SugarCube state engine and therefor I'm going to write some custom code in the window namespace to handle this.
That's the only thing I can think of at this point.
@ezsh before I go and rewrite all this, could you quickly cast your eyes over it and see if anything jumps out at you?
I can neither find anything suspicious nor reproduce this. Tried various browsers, downloading official release, building the file myself.
My suggestion is to add logging to the GameBookmark
manipulations before rewriting and try to get logs from those who can make the bug happen.
My suggestion is to add logging to the GameBookmark manipulations
They do that by themselves already, huh?
The sequence to reproduce the bug:
This helps:
diff --git a/src/201-UI/Rest.twee b/src/201-UI/Rest.twee
index cffafb5..212b023 100644
--- a/src/201-UI/Rest.twee
+++ b/src/201-UI/Rest.twee
@@ -1,4 +1,5 @@
:: Rest [custom-menu]
+<<set $GameBookmark = passage();>>
<<run setup.player.Rest();>>You recline leisurely in your room. There isn't much to do so you after a few minutes you find yourself napping and trying to escape into your fantasies...
You wake up not long after, feeling slightly more energetic.
Yup, sometimes two pairs of eyes really help.
I think the correct way to do this is to replace the tokens [[Rest]] and [[Sleep]] in the Cabin description with the customMenuLink widget.
Thanks for that.
My pleasure.
Erratic bug - eating food will occasionally send you to the wrong bookmark location, which should be impossible.
Might be a sugarcube related bug with the state history.
another report Just replicated the position thing on first attempt: bought food from Cookie, went to cabin, rested until night (twice I think), went to food, ate one or two stew, click exit, wind up back at Cookie. Nutrition was below three, I ate to get it up to 3.