From 3a4ed8893e03870acfbb85c40d7e0b9519822e38 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 17 Jul 2021 01:14:52 +0200 Subject: Allow passing '0' as action argument. --- public/common/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/common/client.js b/public/common/client.js index d7faa3c..a6b3453 100644 --- a/public/common/client.js +++ b/public/common/client.js @@ -436,7 +436,7 @@ function confirm_resign() { function send_action(verb, noun) { // Reset action list here so we don't send more than one action per server prompt! - if (noun) { + if (noun !== undefined) { if (game.actions && game.actions[verb] && game.actions[verb].includes(noun)) { game.actions = null; console.log("SEND ACTION", verb, noun); @@ -446,7 +446,7 @@ function send_action(verb, noun) { } else { if (game.actions && game.actions[verb]) { game.actions = null; - console.log("SEND ACTION", verb, noun); + console.log("SEND ACTION", verb); socket.emit('action', verb); return true; } -- cgit v1.2.3