ThePix / QuestJS

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

Various minor errors #6

Closed Kln95130 closed 4 years ago

Kln95130 commented 4 years ago

All of these can be fixed by using custom files or updating the functions on setup, so their priority is minor.

npc.js: agenda.joining() refers to an inexistant followerName variable. Fix: replace with leaderName

 joining:function(npc, arr) {
    const **leaderName** = arr.shift();
    npc.setLeader(w[**followerName**]);
    this.text(npc, arr);
    return true;
  },

lang-en.js: verbs.use is not capitalized. This triggers an error when choosing "Use" in the sidebar UI.

io.js: io.clickToContinueLink uses a variable named click_to_continue. It should use lang.click_to_continue instead, or it triggers an error.

io.clickToContinueLink = function() {
  msg('<a class="continue" onclick="io.waitContinue()">' + click_to_continue + '</a>');
  io.continuePrintId = io.nextid - 1;
}
ThePix commented 4 years ago

Thanks for spotting them. I have updated corrected files.

By the way, relating to your third point, the wait facility is one area that I hope to improve to make it easier for authors, so may be significantly changed at some point. It is a bit rubbish if you have several together.

Kln95130 commented 4 years ago

You're welcome.

I think that one of the ways to improve wait is to listen for a key press, in addition of a click, and make the "click to continue" link more visible with CSS such as:

.continue { font-weight: bold; color: blue }
.continue:hover { cursor: pointer }