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:
@@ -2022,6 +2022,11 @@
|
||||
totalGap: Math.round(totalGap * 10) / 10,
|
||||
totalSurplus: Math.round(totalSurplus * 10) / 10,
|
||||
blackouts: blackouts,
|
||||
// Einheitliche Leistungskennzahl (0–100): Quote ausgeglichener Blöcke minus
|
||||
// 15 Punkte je Blackout. Nenner 0 (kein Tag gespielt) → 0.
|
||||
leistung_pct: blocksTotal > 0
|
||||
? Math.max(0, Math.min(100, Math.round(blocksBalanced / blocksTotal * 100) - 15 * blackouts))
|
||||
: 0,
|
||||
stars: stars,
|
||||
perDay: perDay
|
||||
};
|
||||
@@ -2757,6 +2762,15 @@
|
||||
try { achCount = Object.keys((emLsLoad().achievements)||{}).length; } catch (_) {}
|
||||
|
||||
var lastSet = (currentDayIdx + 1 >= setTotal && phase === 'done');
|
||||
|
||||
// Einheitliche Leistungskennzahl (0–100): Quote ausgeglichener Blöcke über die
|
||||
// bisher gespielten Tage minus 15 Punkte je Blackout. Nenner 0 (noch kein Tag
|
||||
// abgeschlossen) → 0.
|
||||
var emLmDenom = daysCompleted * DAY.blocks.length;
|
||||
var emLeistungPct = emLmDenom > 0
|
||||
? Math.max(0, Math.min(100, Math.round(setBalancedSoFar / emLmDenom * 100) - 15 * (setRun.blackouts || 0)))
|
||||
: 0;
|
||||
|
||||
return {
|
||||
// Sim-Identität + Fortschritt
|
||||
setId: SETS[currentSetIdx].id,
|
||||
@@ -2780,6 +2794,7 @@
|
||||
setDaysDone: daysCompleted,
|
||||
setBlocksBalanced: setBalancedSoFar,
|
||||
blackouts: setRun.blackouts || 0,
|
||||
leistung_pct: emLeistungPct,
|
||||
// Cross-app Konvention
|
||||
health: health,
|
||||
healthLabel: label,
|
||||
|
||||
Reference in New Issue
Block a user