diff --git a/Dynamic Lighting Animation/Dynamic Lighting Animation.js b/Dynamic Lighting Animation/Dynamic Lighting Animation.js index 5c77a29c9f..ae2c481a15 100644 --- a/Dynamic Lighting Animation/Dynamic Lighting Animation.js +++ b/Dynamic Lighting Animation/Dynamic Lighting Animation.js @@ -10,7 +10,7 @@ var bshields = bshields || {}; bshields.animation = (function() { 'use strict'; - var version = 2.1, + var version = 2.2, running = false, commands = { snapshot: function(args, msg) { @@ -46,7 +46,12 @@ bshields.animation = (function() { state.bshields.animation.frames = []; }, run: function(args, msg) { running = true; }, - stop: function(args, msg) { running = false; } + stop: function(args, msg) { running = false; }, + help: function(command, args, msg) { + if (_.isFunction(commands['help_' + command])) { + commands['help_' + command](args, msg); + } + } }; function handleInput(msg) { @@ -58,11 +63,11 @@ bshields.animation = (function() { if (isApi) { command = args.shift().substring(1).toLowerCase(); - arg0 = args.shift(); + arg0 = args.shift() || ''; isHelp = arg0.toLowerCase() === 'help' || arg0.toLowerCase() === 'h'; if (!isHelp) { - if (arg0 && arg0.length > 0) { + if (arg0) { args.unshift(arg0); } diff --git a/Dynamic Lighting Animation/package.json b/Dynamic Lighting Animation/package.json index 5707b2273d..8f722c5c3d 100644 --- a/Dynamic Lighting Animation/package.json +++ b/Dynamic Lighting Animation/package.json @@ -1,6 +1,6 @@ { "name": "Dynamic Lighting Animation", - "version": "2.1", + "version": "2.2", "description": "Animates paths on the Dynamic Lighting layer.", "authors": "Brian Shields", "roll20userid": "235259", diff --git a/Flip Tokens/Flip Tokens.js b/Flip Tokens/Flip Tokens.js index 575fd4efde..d93cd5f112 100644 --- a/Flip Tokens/Flip Tokens.js +++ b/Flip Tokens/Flip Tokens.js @@ -11,7 +11,7 @@ var bshields = bshields || {}; bshields.flip = (function() { 'use strict'; - var version = 2.1, + var version = 2.2, commands = { flip: function(args, msg) { var selected = msg.selected; @@ -35,6 +35,11 @@ bshields.flip = (function() { } } }); + }, + help: function(command, args, msg) { + if (_.isFunction(commands['help_' + command])) { + commands['help_' + command](args, msg); + } } }; @@ -45,11 +50,11 @@ bshields.flip = (function() { if (isApi) { command = args.shift().substring(1).toLowerCase(); - arg0 = args.shift(); + arg0 = args.shift() || ''; isHelp = arg0.toLowerCase() === 'help' || arg0.toLowerCase() === 'h'; if (!isHelp) { - if (arg0 && arg0.length > 0) { + if (arg0) { args.unshift(arg0); } diff --git a/Flip Tokens/package.json b/Flip Tokens/package.json index 4cfbcb8d13..d33e6c1eed 100644 --- a/Flip Tokens/package.json +++ b/Flip Tokens/package.json @@ -1,6 +1,6 @@ { "name": "Flip Tokens", - "version": "2.1", + "version": "2.2", "description": "Flips selected graphics horizontally and/or vertically. Especially useful for games with side-view tokens, and for players who do not have access to the same context menu as GMs.", "authors": "Brian Shields", "roll20userid": "235259", diff --git a/Marking Conditions/Marking Conditions.js b/Marking Conditions/Marking Conditions.js index 3bc4ee5a32..80152a37cc 100644 --- a/Marking Conditions/Marking Conditions.js +++ b/Marking Conditions/Marking Conditions.js @@ -12,7 +12,7 @@ var bshields = bshields || {}; bshields.conditions = (function() { 'use strict'; - var version = 3.1, + var version = 3.2, commands = { mark: function(args, msg) { var tok = getTokenMark(args[0], args[1], args[2]); @@ -37,6 +37,11 @@ bshields.conditions = (function() { if (tok) { tok.target.set('status_' + tok.marker, false); } + }, + help: function(command, args, msg) { + if (_.isFunction(commands['help_' + command])) { + commands['help_' + command](args, msg); + } } }; @@ -51,11 +56,11 @@ bshields.conditions = (function() { if (isApi) { command = args.shift().substring(1).toLowerCase(); - arg0 = args.shift(); + arg0 = args.shift() || ''; isHelp = arg0.toLowerCase() === 'help' || arg0.toLowerCase() === 'h'; if (!isHelp) { - if (arg0 && arg0.length > 0) { + if (arg0) { args.unshift(arg0); } diff --git a/Marking Conditions/package.json b/Marking Conditions/package.json index 522c49842e..6f44b250ae 100644 --- a/Marking Conditions/package.json +++ b/Marking Conditions/package.json @@ -1,6 +1,6 @@ { "name": "Marking Conditions", - "version": "3.1", + "version": "3.2", "description": "Sets and removes statusmarkers on tokens.", "authors": "Brian Shields", "roll20userid": "235259", diff --git a/Raise Count/Raise Count.js b/Raise Count/Raise Count.js index 1ce6d26e05..94249d0ba1 100644 --- a/Raise Count/Raise Count.js +++ b/Raise Count/Raise Count.js @@ -7,7 +7,7 @@ var bshields = bshields || {}; bshields.raiseCount = (function() { 'use strict'; - var version = 2.1, + var version = 2.2, config = { raiseSize: 4, outputFormat: 'Roll: {0}, Target: {1}, Raises: {2}' @@ -46,6 +46,11 @@ bshields.raiseCount = (function() { bshields.sendChat(msg, '/direct ' + format(config.outputFormat, rollOut, target, raises)); }); + }, + help: function(command, args, msg) { + if (_.isFunction(commands['help_' + command])) { + commands['help_' + command](args, msg); + } } }; @@ -64,11 +69,11 @@ bshields.raiseCount = (function() { if (isApi) { command = args.shift().substring(1).toLowerCase(); - arg0 = args.shift(); + arg0 = args.shift() || ''; isHelp = arg0.toLowerCase() === 'help' || arg0.toLowerCase() === 'h'; if (!isHelp) { - if (arg0 && arg0.length > 0) { + if (arg0) { args.unshift(arg0); } diff --git a/Raise Count/package.json b/Raise Count/package.json index ea73ab4fe7..557f5525bd 100644 --- a/Raise Count/package.json +++ b/Raise Count/package.json @@ -1,6 +1,6 @@ { "name": "Raise Count", - "version": "2.1", + "version": "2.2", "description": "Counts raises for the Savage Worlds system.", "authors": "Brian Shields", "roll20userid": "235259", diff --git a/Store Commands/Store Commands.js b/Store Commands/Store Commands.js index 4b5c3c6439..6624d217a2 100644 --- a/Store Commands/Store Commands.js +++ b/Store Commands/Store Commands.js @@ -11,7 +11,7 @@ var bshields = bshields || {}; bshields.storeCommands = (function() { 'use strict'; - var version = 2.1, + var version = 2.2, list = {}, commands = { delay: function(args, msg) { @@ -42,6 +42,11 @@ bshields.storeCommands = (function() { echo(msg.playerid, cmd.text, count + cmd.delay); count += cmd.delay; }) + }, + help: function(command, args, msg) { + if (_.isFunction(commands['help_' + command])) { + commands['help_' + command](args, msg); + } } }; @@ -60,11 +65,11 @@ bshields.storeCommands = (function() { if (isApi) { command = args.shift().substring(1).toLowerCase(); - arg0 = args.shift(); + arg0 = args.shift() || ''; isHelp = arg0.toLowerCase() === 'help' || arg0.toLowerCase() === 'h'; if (!isHelp) { - if (arg0 && arg0.length > 0) { + if (arg0) { args.unshift(arg0); } diff --git a/Store Commands/package.json b/Store Commands/package.json index 237de977bc..57f1bbb6ca 100644 --- a/Store Commands/package.json +++ b/Store Commands/package.json @@ -1,6 +1,6 @@ { "name": "Store Commands", - "version": "2.1", + "version": "2.2", "description": "Stores a series of commands (potentially with delays between them) to be executed in sequence later. Opens up GM-only commands such as /direct and /emas to players.", "authors": "Brian Shields", "roll20userid": "235259",