Heli: Treibstoff kann leer werden (1★-Takeover) + Live-Score fuer Tag-Farbe + Aktuell-Status/Phase
- start.html: Sprit-Floor 0.05->0; Treibstoff-leer loest Chefpilotin-Takeover aus (stars:1) - game.html: GGS_LIVE_STATE liefert progressiven score (Routing/Start/Landung/Gesamt) -> farbige Tag-Balken - teacher.html: Phasen-Map + Status-Spalte fuer mission/briefing/unterwegs (kein leeres "...") Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -480,6 +480,19 @@ window.GGS_LIVE_STATE = function () {
|
||||
totalStars: landingDone ? (game.totalStars || 0) : null,
|
||||
failed: !!game.missionFailed,
|
||||
missionStartedAt: game.missionStartedAt || null,
|
||||
// Laufender 0–100-Score für die Ampelfarbe im Lehrer-Live (Tag-Balken).
|
||||
// Progressiv: Routing-Genauigkeit, dann Ø mit Start-/Landungssternen; am Ende
|
||||
// die Gesamtsterne. In der Auftragswahl (mission/briefing) kein Score.
|
||||
score: (function(){
|
||||
if (!phase || phase === 'mission' || phase === 'briefing') return null;
|
||||
if (landingDone && game.totalStars != null) return Math.round(Math.max(0,Math.min(5,game.totalStars))/5*100);
|
||||
var parts = [];
|
||||
if (routeLen > 1) parts.push(Math.max(0, Math.min(100, (game.planTotal?(game.planCorrect||0)/game.planTotal:0)*100 - (game.planAttempts||0)*4)));
|
||||
if (startDone && game.startScore != null) parts.push(Math.max(0,Math.min(5,game.startScore))/5*100);
|
||||
if (landingDone && game.landingScore != null) parts.push(Math.max(0,Math.min(5,game.landingScore))/5*100);
|
||||
if (!parts.length) return null;
|
||||
return Math.round(parts.reduce(function(a,b){return a+b;},0)/parts.length);
|
||||
})(),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user