Per-Sim leistung_pct: alle 14 Sims senden das eine Leistungs-% (0-100)

Jede Sim liefert jetzt selbst leistung_pct in GGS_LIVE_STATE UND im Submit
(Fundament fuer das einheitliche %-System) — kein Rueckrechnen aus Sternen
mehr, keine 0-3-Sonderfaelle. Formeln je Sim wie vereinbart:
- klima/fluss/kofferdetektiv/heli: = vorhandener 0-100-score
- weltkueche: richtige/(richtige+falsche)*100 (Fehler in %)
- busfahrt/fluggesellschaft: topoPunkte/(Auftraege*3)*100
- farmer: gewichteter totalScore; energiemanager: ausgegl./gesamt -15/Blackout
- eu-werkstatt: firstTry/Schritte -5/Muelleimer; sonnensystem: Erstversuch-Quote
- tourismustal: Ziele+Zufriedenheit+Natur gewichtet; tourismusregion: gewichteter score
- logistik: Kontostand->% (sendet erstmals eine Kennzahl, auch an /api/assessment)
Teacher _leistungPct + live.php extractScore bevorzugen bereits diesen Wert.
Additive Aenderungen, bestehende Logik/Sterne unveraendert; alle 15 Dateien
syntaktisch geprueft.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-25 12:35:56 +02:00
parent 539f6b012e
commit 88e3c09e5c
15 changed files with 116 additions and 0 deletions
+2
View File
@@ -3454,6 +3454,7 @@ const Platform = {
level: S.cfg.level,
stars: Game.stars(),
score: Game.score100(),
leistung_pct: Math.max(0, Math.min(100, Math.round(Game.score100()))),
duration_ms: (window.__GGS_LIVE__ && window.__GGS_LIVE__.activeMs) || 0,
completed: true,
results: Game.results(),
@@ -3487,6 +3488,7 @@ window.GGS_LIVE_STATE = function () {
phase: phaseLabel,
progressPct: Math.round((solved + (cs && cs.found && !cs.solved ? 0.5 : 0)) / S.cases.length * 100),
score: Game.score100(),
leistung_pct: Game.score100(),
health: wrongHere >= 3 || (cs && cs.timeoutHit && !cs.solved) ? 'struggle' : wrongHere >= 1 ? 'ok' : 'good',
cases_solved: solved,
cases_total: S.cases.length,