Skip to content
  • Leon Arnott's avatar
    Implemented (link-reveal-goto:), which functions as a combination of (link-reveal:) and (goto:). · 4813e279b3a8
    Leon Arnott authored
    I'd previously been unwilling to implement the old Twine 1 [[Link|Passage][x = 1]] link syntax for a few reasons, most notably that using = for assignment, while technically supported in Harlowe, is nonetheless heavily frowned upon, and there's no comfortably way to incorporate "to" or "into" in it without "set" or "put". Additionally, I felt adding another feature to the link syntax which didn't naturally arise from other syntactic structures was adding unpleasant complexity. I'd toyed with adding this as the macro (link-set-goto:), but I was uncomfortably with the syntax of a lone VariableToValue "$a to 2" in the middle of unrelated params, and additionally disliked how this looked like an "emergent concatenation" of (link:), (set:) and (goto:) by themselves, comparable to (mouseover-replace:) and its ilk, and had no model for explaining how this would make sense.
    
    What changed? I decided that it does make sense for (link-reveal:) to be concatenated with (goto:) to make (link-reveal-goto:), because the (set:) could be included in the attached hook, rather than crudely incorporated into the call itself. Moreover, by using a hook, any other arbitrary instant-effect macro could be used with it, like (alert:), or a hypothetical audio macro. Since this is only the concatenation of two macros - (link-reveal:) and (goto:) - rather than three, it's in keeping with (mouseover-replace:)'s example.
    
    I intend to add link syntax sugar for this, but am currently debating its exact form. Certainly it won't just resemble the Twine 1 form.
    4813e279b3a8