tmedwards / sugarcube-3

SugarCube is a free (gratis and libre) story format for Twine/Twee.
17 stars 1 forks source link

History functions/methods should not consider the current moment #21

Open tmedwards opened 4 years ago

tmedwards commented 4 years ago

Idea: The various history functions/methods should not consider the current moment.

Reasoning

Currently, the various history functions/methods—e.g., the visited family of functions and State.hasPlayed()—include the current moment in their tests/collations. This has the effect that testing for the existence of a moment based on the current passage is impossible with most of them, as it'll will be topmost moment that they check. This requires the use of visited() in many case where you simply want to know if the player had been there before, which is less than ideal as it looks at every single moment in the past+expired history.

Uzume commented 3 years ago

It should be noted that even if current state history goes away with #20, this functionality would still be useful across an effectively expired state only history.