Auto-pause when switching to another phase
Entering Live World (W), and starting/stopping hydrology (H or the Start Phase 3 button), now pause the sim first instead of immediately resuming, so you can look at the world before the new stage runs (press SPACE to start). Leaving Live World already paused; the continuous forming->drift geological clock is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ee2ef3655b
commit
0638398d44
@ -21,8 +21,8 @@ void Viewer::handleInput() {
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) {
|
||||
if (phase3Prompt) { // modal: only the two buttons act
|
||||
if (CheckCollisionPointRec(mp, p3StartBtn)) {
|
||||
phase3 = true; phase3Prompt = false; paused = false;
|
||||
phase3PromptAt = elapsedMy; setStatus("Hydrology started");
|
||||
phase3 = true; phase3Prompt = false; paused = true; // switching stage auto-pauses
|
||||
phase3PromptAt = elapsedMy; setStatus("Hydrology started - paused (SPACE to run)");
|
||||
refreshView();
|
||||
} else if (CheckCollisionPointRec(mp, p3ContinueBtn)) {
|
||||
phase3Prompt = false; paused = false;
|
||||
@ -176,11 +176,10 @@ void Viewer::handleInput() {
|
||||
if (IsKeyPressed(KEY_G)) showGrat = !showGrat;
|
||||
if (IsKeyPressed(KEY_J)) showRivers = !showRivers;
|
||||
if (IsKeyPressed(KEY_H) && settled) { // toggle Phase 3 (hydrology)
|
||||
bool wasPrompt = phase3Prompt;
|
||||
phase3 = !phase3; phase3Prompt = false;
|
||||
if (wasPrompt) paused = false; // taking the choice resumes the sim
|
||||
if (phase3) { phase3PromptAt = elapsedMy; setStatus("Hydrology ON"); }
|
||||
else { phase3PromptAt = elapsedMy + planet.cfg.phase3AfterMy; rivers.clear(); bigRivers.clear(); setStatus("Hydrology OFF"); }
|
||||
paused = true; // switching stage auto-pauses (SPACE to run)
|
||||
if (phase3) { phase3PromptAt = elapsedMy; setStatus("Hydrology ON - paused (SPACE to run)"); }
|
||||
else { phase3PromptAt = elapsedMy + planet.cfg.phase3AfterMy; rivers.clear(); bigRivers.clear(); setStatus("Hydrology OFF - paused"); }
|
||||
refreshView();
|
||||
}
|
||||
if (IsKeyPressed(KEY_L) && settled) { // generate / regenerate biota population
|
||||
@ -229,11 +228,11 @@ void Viewer::handleInput() {
|
||||
if (IsKeyPressed(KEY_W) && settled) { // enter / leave Live World (slow real-time clock)
|
||||
liveWorld = !liveWorld;
|
||||
if (liveWorld) {
|
||||
phase3Prompt = false; paused = false; wxUndo.clear();
|
||||
phase3Prompt = false; paused = true; wxUndo.clear(); // enter Live World paused (SPACE to run)
|
||||
if (planet.volcanoes.empty()) planet.placeVolcanoes(liveTime); // one-time tectonic-context placement
|
||||
if (!planet.geographyBuilt()) planet.generateGeography(); // name the world's geography (the atlas)
|
||||
refreshView(); // fresh base colours; overlay builds in stepSim
|
||||
setStatus("Live World started");
|
||||
setStatus("Live World started - paused (SPACE to run)");
|
||||
} else {
|
||||
paused = true; followId = 0; wxUndo.clear(); refreshView(); // back to World Creation, paused
|
||||
setStatus("Live World stopped");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user