1
0

Fix dead code removal, isolate panel close handlers, polish

This commit is contained in:
avi
2026-05-18 14:11:30 -05:00
parent 47cdcc8469
commit 89850cadfa
2 changed files with 4 additions and 16 deletions

View File

@@ -657,11 +657,6 @@ function cmdChoose(arg){
} }
// ── ENDING ── // ── ENDING ──
function cmdChooseConfirmed(){
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
triggerEnding(G.faction);
}
function cmdMake(arg){ function cmdMake(arg){
if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;} if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;}
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;} if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
@@ -857,9 +852,8 @@ function startSpectrum(){
specAnimId=requestAnimationFrame(drawSpec); specAnimId=requestAnimationFrame(drawSpec);
} }
drawSpec(); drawSpec();
document.querySelectorAll('.panel-close').forEach(b=>{ const specClose = document.querySelector('#specPanel .panel-close');
b.onclick=()=>{if(specAnimId)cancelAnimationFrame(specAnimId);hidePanels();}; if(specClose) specClose.onclick = ()=>{ if(specAnimId) cancelAnimationFrame(specAnimId); hidePanels(); };
});
} }
// ── FACILITY MAP ── // ── FACILITY MAP ──

View File

@@ -657,11 +657,6 @@ function cmdChoose(arg){
} }
// ── ENDING ── // ── ENDING ──
function cmdChooseConfirmed(){
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
triggerEnding(G.faction);
}
function cmdMake(arg){ function cmdMake(arg){
if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;} if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;}
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;} if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
@@ -857,9 +852,8 @@ function startSpectrum(){
specAnimId=requestAnimationFrame(drawSpec); specAnimId=requestAnimationFrame(drawSpec);
} }
drawSpec(); drawSpec();
document.querySelectorAll('.panel-close').forEach(b=>{ const specClose = document.querySelector('#specPanel .panel-close');
b.onclick=()=>{if(specAnimId)cancelAnimationFrame(specAnimId);hidePanels();}; if(specClose) specClose.onclick = ()=>{ if(specAnimId) cancelAnimationFrame(specAnimId); hidePanels(); };
});
} }
// ── FACILITY MAP ── // ── FACILITY MAP ──