Weiter am Wettersystem gearbeitet, ordentliche Wolken und Regen etc ergänzt

This commit is contained in:
2026-07-24 11:41:05 +02:00
parent 5a7d9897e4
commit 919f70bb44
47 changed files with 1665 additions and 1073 deletions

View File

@@ -72,6 +72,7 @@ public class EditorApp extends Application {
private Label camCoordsLabel;
private boolean launchGameAfterSave = false;
private Button gamePlayBtn; // Spielen-Button im Seitenpanel
private CheckBox debugConsoleCB; // Debug-Konsole bei Spielstart anzeigen
private VBox toolPanel;
private BorderPane root;
private Stage gameConsoleStage;
@@ -621,16 +622,20 @@ public class EditorApp extends Application {
drawCompass();
// Spiel-Konsole: gepufferte Zeilen gebündelt ausgeben (max 200 auf einmal)
if (!consoleBuffer.isEmpty() && gameConsoleArea != null) {
StringBuilder sb = new StringBuilder();
int count = 0;
String ln;
while (count < 200 && (ln = consoleBuffer.poll()) != null) {
sb.append(ln).append('\n');
count++;
if (!consoleBuffer.isEmpty()) {
if (gameConsoleArea != null) {
StringBuilder sb = new StringBuilder();
int count = 0;
String ln;
while (count < 200 && (ln = consoleBuffer.poll()) != null) {
sb.append(ln).append('\n');
count++;
}
gameConsoleArea.appendText(sb.toString());
gameConsoleArea.setScrollTop(Double.MAX_VALUE);
} else {
consoleBuffer.clear();
}
gameConsoleArea.appendText(sb.toString());
gameConsoleArea.setScrollTop(Double.MAX_VALUE);
}
if (input.soundAreaSelectionChanged) {
@@ -7666,7 +7671,7 @@ public class EditorApp extends Application {
setStatus(isNewGame ? "Neues Spiel gestartet" : "Spiel gestartet");
if (gamePlayBtn != null) gamePlayBtn.setText("🎮 Läuft…");
if (gameNewBtn != null) gameNewBtn.setText("🎮 Läuft…");
openGameConsole();
if (debugConsoleCB != null && debugConsoleCB.isSelected()) openGameConsole();
});
// Stdout des Spiels in Puffer schreiben — Flush erfolgt gebündelt im UI-Timer
@@ -8501,7 +8506,11 @@ public class EditorApp extends Application {
"Startet ein neues Spiel am perm. Spawnpunkt mit Intro-Sequenz"));
newGameBtn.setOnAction(e -> launchNewGame());
inner.getChildren().addAll(playBtn, newGameBtn);
debugConsoleCB = new CheckBox("Debug-Konsole anzeigen");
debugConsoleCB.setTooltip(new javafx.scene.control.Tooltip(
"Öffnet bei Spielstart die Ausgabekonsole mit der Spielausgabe"));
inner.getChildren().addAll(playBtn, newGameBtn, debugConsoleCB);
ScrollPane scroll = new ScrollPane(inner);
scroll.setFitToWidth(true);