Klima: Aktuell-Linien gruen->rot (CO2/Temp/Geflutet/Budget/Bev.) + "Nochmal spielen" setzt wirklich zurueck

- teacher.html: LIVE_PRIMARY_FIELDS.klima Kennzahlen mit _liveBar-Ampel (absolute Skalen), _liveBar +Nachkomma-Param; tick-Spalte entfernt (redundant zu Jahr)
- game-2d/3d: beendete Laeufe (phase=end) werden beim Resume verworfen -> "Nochmal spielen"/erneutes Oeffnen startet frisch statt im Endbildschirm

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 17:17:33 +02:00
parent eb67cbc79f
commit 8cc48b1bc6
3 changed files with 16 additions and 9 deletions
+4 -1
View File
@@ -1009,7 +1009,7 @@
<div class="ggs-results-stats" id="end-stats"></div>
<div style="display:flex;gap:12px;justify-content:center">
<button class="ggs-btn ggs-btn-primary" onclick="location.reload()">Nochmal spielen</button>
<button class="ggs-btn ggs-btn-primary" onclick="for(var i=1;i<=3;i++)localStorage.removeItem('ggs-save-klima-'+i);location.reload()">Nochmal spielen</button>
<button class="ggs-btn ggs-btn-secondary" onclick="location.href='../../'">Zurück</button>
</div>
</div>
@@ -4148,6 +4148,9 @@ function tryResume() {
try {
const d = JSON.parse(raw);
if (!d || !d.tick || d.tick <= 0) continue;
// Beendete Läufe nie wieder aufnehmen — sonst landet „Nochmal spielen" /
// erneutes Öffnen direkt im Endbildschirm. Alten Stand verwerfen.
if (d.phase === 'end') { localStorage.removeItem(SAVE_KEY_BASE + '-' + lvl); continue; }
deserializeState(d);
hideOverlay('level-select-overlay');
state.phase = (d.phase === 'citizen' ? 'playing' : d.phase) || 'playing';