From d295ca9aa533691d101b4bee7fe79b5ab22856d2 Mon Sep 17 00:00:00 2001 From: Andrea Rendine Date: Sun, 14 Feb 2016 21:00:04 +0100 Subject: [PATCH] Take all and what? The change is somehow linguistic, rather than anything else. "Take everything and leave" changes name and becomes "Take everything and X", where X is the verb of the command it impersonates. This way after completing mines e.g. it is "Take everything and continue", acting like "continue" button. It now also cools down if it impersonates a "leave" button (leave buttons cool down. IDK why). --- script/events.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script/events.js b/script/events.js index 11d077d..8848858 100644 --- a/script/events.js +++ b/script/events.js @@ -589,6 +589,7 @@ var Events = { var takeET = new Button.Button({ id: 'loot_takeEverything', text: '', + cooldown: Events._LEAVE_COOLDOWN, click: Events.takeEverything }).appendTo(takeETrow); $('').insertBefore(takeET.children('.cooldown')); @@ -650,8 +651,10 @@ var Events = { var textbox = btn.children('span'); var takeAndLeave = (btn.data('leaveBtn')) ? btn.data('canTakeEverything') : false; if(takeAndLeave){ - textbox.text( basetext + _(' and ') + _('leave') ); + var verb = btn.data('leaveBtn').text() || _('leave'); + textbox.text( basetext + _(' and ') + verb); btn.data('canLeave', true); + Button.cooldown(btn); } else { textbox.text( basetext ); btn.data('canLeave', false)