From da4f6dc1022cfb6b372c67df3124adf9b771302e Mon Sep 17 00:00:00 2001 From: Spiel-Generator Workshop Date: Sat, 14 Mar 2026 22:47:43 +0000 Subject: [PATCH] fix: remove duplicate codegen.js inline block, add missing unlockSection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - codegen.js war doppelt: einmal im Haupt-Script (korrekt) und einmal nochmals inline eingebettet → 'const unlocked already declared' Fehler - Doppelten Inline-Block entfernt - unlockSection() fehlte (beim Refactoring verloren gegangen): als Wrapper für setCodeFocus/unlocked.add wiederhergestellt - s3init() läuft jetzt korrekt: Board + Palette erscheinen sofort --- editor.html | 320 +--------------------------------------------------- 1 file changed, 6 insertions(+), 314 deletions(-) diff --git a/editor.html b/editor.html index 1da6618..c408a00 100644 --- a/editor.html +++ b/editor.html @@ -1078,6 +1078,12 @@ function s2update(){ let selGame=null,dragging=null,epFor=null; const STORY_MAX=5,MULTI_MAX=3; +// unlockSection: Markiert eine Sektion als "gesehen" für den Live-Code-Preview +function unlockSection(key){ + if(typeof unlocked !== 'undefined') unlocked.add(key); + if(typeof setCodeFocus === 'function') setCodeFocus(key); +} + function s3init(){ unlockSection('movement'); unlockSection('failmode'); unlockSection('fieldcount'); unlockSection('fields'); document.getElementById('cntVal').textContent=ST.fieldCount; @@ -2574,320 +2580,6 @@ setTimeout(updateCodePane, 200);