New version of QuestJS; changes to how to add commands

I have just released version 1.3 of QuestJS.

Some big updates to the RPG library, but one change in particular to be aware of is that creating a Command will now automatically add it to the list.

Previously ypu had to add a command to the "commands" list yourself, so the code might look like this (you might have used "push" instead of "shift"):

commands.unshift(new Cmd('Charge', {
  regex:/^(?:charge|power) (.+)$/,
  defmsg:"{nv:item:be:true} not something you can charge.",

Now you just do this:

new Cmd('Charge', {
  regex:/^(?:charge|recharge|power) (.+)$/,
  defmsg:"{pv:item:'be:true} not something you can charge.",

If you do it the old way, you will have your command in the list twice, which is not ideal, but will still work fine, so this is not game-breaking!

This topic is now closed. Topics are closed after 60 days of inactivity.