mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
Hyper-proof cooldown state
Kept the distinction between "argument" time and script time. I called the latter "time" instead of "milliseconds" because, well, it's just tenth of seconds. Residual timeout is always stored in "nominal" time, not adjusted by hyper. I.e. if a button has a nominal timeout of 60 seconds and half cooldown had expired on reload, residual is stored as 300. In cooldown, Engine.setInterval makes the time flow with double speed
This commit is contained in:
committed by
Blake Grotewold
parent
a923c1c0bd
commit
65d7cfd784
@@ -955,6 +955,7 @@ var Events = {
|
||||
Engine.event('game event', 'event');
|
||||
Engine.keyLock = true;
|
||||
Engine.tabNavigation = false;
|
||||
Button.saveCooldown = false;
|
||||
Events.eventStack.unshift(event);
|
||||
event.eventPanel = $('<div>').attr('id', 'event').addClass('eventPanel').css('opacity', '0');
|
||||
if(options != null && options.width != null) {
|
||||
@@ -988,6 +989,7 @@ var Events = {
|
||||
Engine.log(Events.eventStack.length + ' events remaining');
|
||||
Engine.keyLock = false;
|
||||
Engine.tabNavigation = true;
|
||||
Button.saveCooldown = true;
|
||||
if (Events.BLINK_INTERVAL) {
|
||||
Events.stopTitleBlink();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user