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:
@@ -810,6 +810,7 @@ window.GGS_LIVE_STATE = function() {
|
||||
score: state.score || 0,
|
||||
correctClicks: state.totalCorrect || 0,
|
||||
wrongClicks: state.totalWrong || 0,
|
||||
leistung_pct: ((state.totalCorrect||0)+(state.totalWrong||0))===0 ? null : Math.max(0,Math.min(100,Math.round((state.totalCorrect||0)/((state.totalCorrect||0)+(state.totalWrong||0))*100))),
|
||||
completed: completedDish,
|
||||
completedTotal: totalDish,
|
||||
badgesEarned: (state.badges||[]).length,
|
||||
@@ -849,6 +850,7 @@ function wkSubmitProgress(dish, perfect){
|
||||
completed: state.completed.length, total: DISHES.length,
|
||||
score: state.score, dishScore: (current && current.dishScore) || 0,
|
||||
correctClicks: state.totalCorrect || 0, wrongClicks: state.totalWrong || 0,
|
||||
leistung_pct: ((state.totalCorrect||0)+(state.totalWrong||0))===0 ? null : Math.max(0,Math.min(100,Math.round((state.totalCorrect||0)/((state.totalCorrect||0)+(state.totalWrong||0))*100))),
|
||||
mistakesInDish: mis, perfect: !!perfect
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user