ThePix / QuestJS

A major re-write of Quest that is written in JavaScript and will run in the browser.
MIT License
66 stars 12 forks source link

Fixes to code in "Destinations, not directions" #77

Closed oersted closed 1 year ago

oersted commented 1 year ago

Currently, the code snippets in this wiki page don't work: https://github.com/ThePix/QuestJS/wiki/Destinations,-not-directions

The main problem is with the GoTo command, which is not able to find rooms in its scope. {scope: parser.isRoom} needs to be changed to {scope: parser.isRoom, extendedScope: true}.

There's also a smaller issue in createAdditionalPane which causes a crash if dests is not defined in a room. I would recommend adding a if (currentLocation.dests) {} around the for loop.

I'd to a pull request, but it doesn't seem to be possible within the wiki.

ThePix commented 1 year ago

Thanks, updated

ThePix commented 1 year ago

I found another issue - it was saying you head to the room you just left. The page has been updated, hopefully this message will mean you get notified!