SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix LaufbauState
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-07-16 21:25:43 +02:00
Ursprung 65e425ebdb
Commit 9062bc698e

Datei anzeigen

@ -36,13 +36,13 @@ public interface LaufbauState {
default String eta(Player p, long start, int done, int total) {
if (total == 0) return "";
long elapsed = System.currentTimeMillis() - start;
long eta = (long) (elapsed / (done / (double) total) - elapsed);
long eta = ((long) (elapsed / (done / (double) total) - elapsed)) * 1000000;
if (eta > 86399999999999L) {
return LocalTime.ofNanoOfDay(86399999999999L).format(DateTimeFormatter.ofPattern(BauSystem.MESSAGE.parse("TIME", p)));
}
if (eta < 0) {
return LocalTime.ofNanoOfDay(0).format(DateTimeFormatter.ofPattern(BauSystem.MESSAGE.parse("TIME", p)));
}
return LocalTime.ofNanoOfDay(eta * 1000000).format(DateTimeFormatter.ofPattern(BauSystem.MESSAGE.parse("TIME", p)));
return LocalTime.ofNanoOfDay(eta).format(DateTimeFormatter.ofPattern(BauSystem.MESSAGE.parse("TIME", p)));
}
}