From ad4e10d3630350f2fab3d3a2bde5495d5895639e Mon Sep 17 00:00:00 2001 From: jwinterm Date: Sun, 12 Jul 2026 20:14:11 -0400 Subject: [PATCH] revert(render): waiting screen back to the ROT treasure-hunt animation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The render-kit "waiting room" replaced the beloved scripted drama (player races for a pulsating treasure, grabs it, escapes or is devoured by a monster pack, death shockwave + ESCAPED! celebration, randomized variants) with a static lit room — a big downgrade. Restore BOTH ROT waiting animations (block-wait AND awaiting-payment, selected via Game._awaitingPayment) by hiding the render-kit host and letting the ROT display own the waiting screen. Remove the now-unused SP.showWaiting/hideWaiting/waitingScene bridge code. The pack/mode still applies in actual gameplay, which is what matters. --- html/js/display/screenManager.js | 13 ++------ html/js/render/spGameRenderer.js | 51 -------------------------------- 2 files changed, 2 insertions(+), 62 deletions(-) diff --git a/html/js/display/screenManager.js b/html/js/display/screenManager.js index 4b9bf7b..8e9d096 100644 --- a/html/js/display/screenManager.js +++ b/html/js/display/screenManager.js @@ -331,17 +331,8 @@ var ScreenManager = { }, drawWaitingScreen: function(_internalLoopCall = false) { - // Render the waiting "mining room" through the render kit (active pack/mode) when available, - // so the wait inherits your tiles/iso/3D. Falls back to the ROT animation below. - if (window.RK && RK.SPGame && RK.SPGame.showWaiting && RK.SPGame.available()) { - this._isShowingWaitingScreen = true; - var _appr = (window.SinglePlayerAvatar && SinglePlayerAvatar.currentAppearance) ? SinglePlayerAvatar.currentAppearance() : null; - var _crypto = this._cryptoType || undefined; - if (RK.SPGame.showWaiting('⛏ Mining the next block…', 'You drop in when it lands — then escape before the one after.', _crypto, _appr)) { - this.showAnimationButton(); - return; - } - } + // The waiting screen is the beloved ROT "treasure hunt" scripted animation (chase / grab / + // escape-or-devoured drama). Hide the render-kit host so the ROT display owns the screen. if (window.RK && RK.SPGame) RK.SPGame.hide(); if (!DisplayManager.ensureDisplay()) return; diff --git a/html/js/render/spGameRenderer.js b/html/js/render/spGameRenderer.js index 723089d..0b54b61 100644 --- a/html/js/render/spGameRenderer.js +++ b/html/js/render/spGameRenderer.js @@ -42,56 +42,6 @@ return !!(RK.createRenderer && RK.sceneFromGameState && gameDisplay()); }; - // A small lit "waiting room" Scene, drawn through the active renderer so the wait inherits the - // player's pack/mode. The tile renderer's FX loop flickers the torches; the camera centres it. - function waitingScene(opts) { - opts = opts || {}; - var W = 11, H = 8, grid = []; - for (var y = 0; y < H; y++) { - var row = []; - for (var x = 0; x < W; x++) row.push((x === 0 || y === 0 || x === W - 1 || y === H - 1) ? 'wall' : 'floor'); - grid.push(row); - } - grid[3][1] = 'torch'; grid[3][W - 2] = 'torch'; // wall torches (fire FX) - var px = (W - 1) >> 1; - var entities = [ - { id: 'exit', x: px, y: 2, kind: 'feature', char: '>', color: '#d29922', label: null }, - { id: 'player', x: px, y: H - 3, kind: 'player', you: true, facing: 'up', label: null, - avatar: (opts.playerAppearance && opts.playerAppearance.avatar) || 'default', - appearance: opts.playerAppearance || { avatar: 'default' } } - ]; - return { cols: W, rows: H, grid: grid, entities: entities, - legend: (RK.scene && RK.scene.DUNGEON_LEGEND) || null, isDungeon: true, background: '#0a0c0f' }; - } - - // Render the waiting-room scene + a text overlay (mining / payment). Returns true if it took over. - SP.showWaiting = function (title, sub, cryptoType, appearance) { - if (!SP.available()) return false; - SP.show(); - SP._camX = null; - var r = SP._ensureRenderer(); - if (!r) return false; - try { r.render(waitingScene({ playerAppearance: appearance, cryptoType: cryptoType })); SP._applyCamera(); } - catch (e) { return false; } - var host = rkHost(); - var ov = doc().getElementById('rk-wait-overlay'); - if (!ov) { - ov = doc().createElement('div'); - ov.id = 'rk-wait-overlay'; - ov.style.cssText = 'position:absolute;left:0;right:0;bottom:0;padding:0 12px 7%;text-align:center;' + - 'pointer-events:none;font-family:ui-monospace,monospace;text-shadow:0 2px 8px #000;z-index:4;'; - host.appendChild(ov); - } - ov.innerHTML = '
' + title + '
' + - '
' + (sub || '') + '
'; - ov.style.display = 'block'; - return true; - }; - SP.hideWaiting = function () { - var ov = doc() && doc().getElementById('rk-wait-overlay'); - if (ov) ov.style.display = 'none'; - }; - SP.mode = function () { if (!SP._mode) { var m = (RK.loadMode && RK.loadMode('tiles')) || 'tiles'; @@ -216,7 +166,6 @@ // (caller then skips the legacy renderer). Non-destructive on failure. SP.render = function (clientState, opts) { if (!SP._live || !SP.available()) return false; - SP.hideWaiting(); // the real game is rendering — drop the waiting-room overlay var r = SP._ensureRenderer(); if (!r) return false; opts = opts || {};