Make empty-server restarts configurable in the mission menu

Add persistent last-disconnect and idle-interval controls with enabled/five-hour defaults. Apply saved settings immediately, reset idle time while occupied, and cover migration, routing, layout and restart behavior.
This commit is contained in:
2026-10-14 14:05:46 +02:00
parent 0048527fe2
commit e4ca37dfc1
13 changed files with 242 additions and 61 deletions
+19
View File
@@ -60,6 +60,25 @@ requested totals instead of preventing mission startup. The admin Status page
also shows these totals. This is an interim checkpoint system, independent of the
existing HQ-directed road interceptions.
## Mission restarts
The admin menu **Mission** page includes two independent settings:
- **Restart after last disconnect**: Enabled or Disabled, default Enabled.
- **Restart while empty (hours)**: 0 disables the idle timer; 1–168 sets the
number of real hours continuously empty. Default 5. Press **Apply** to save.
Both apply immediately and persist in `$profile:Escapists.json` as
`mission.restartOnEmpty` and `mission.emptyRestartHours`. Older configurations
receive the enabled/five-hour defaults. The idle interval starts with a new
mission or the last disconnect and resets whenever players connect. Connected
spectators and players loading in also prevent an empty-server restart.
Changing the interval uses the time already spent empty. Normal victory/defeat
and no-survivor endings still apply when these options are disabled.
Chat equivalents are `/esc mission restartempty set on|off` and
`/esc mission emptyhours set N`; both also support `show` and `help`.
## One server configuration
All mission preferences now live in **`$profile:Escapists.json`** on the server.