From 8ff8f3c349f2f2d4fee202dc9d570d00158b186e Mon Sep 17 00:00:00 2001 From: oc Date: Sat, 4 May 2019 23:30:05 +0800 Subject: [PATCH] space exit shop --- libs/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/actions.js b/libs/actions.js index 75a43b8b..b3885841 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -1253,7 +1253,7 @@ actions.prototype._clickShop = function (x, y) { actions.prototype._keyDownShop = function (keycode) { // 商店界面长按空格连续购买 - if (keycode == 32) { + if (keycode == 32 && core.status.event.selection != core.status.event.data.shop.choices.length) { this._selectChoices(core.status.event.data.shop.choices.length + 1, keycode, this._clickShop); return; } @@ -1266,7 +1266,7 @@ actions.prototype._keyUpShop = function (keycode) { core.events._exitShop(); return; } - if (keycode != 32) { + if (keycode != 32 || core.status.event.selection == core.status.event.data.shop.choices.length) { this._selectChoices(core.status.event.data.shop.choices.length + 1, keycode, this._clickShop); return; }