Document who can use /autosaver

This commit is contained in:
RallyBlock committed 2026-10-26 13:17:49 -04:00
1 parent e08059d324
commit c18aa81f88
1 file changed
+5 -6
+5 -6
View File
@@ -56,13 +56,11 @@ Up to 75000 bricks, bricks are sorted by height like the stock save. Over 75000,
`/as` is short for `/autosaver` and works with every command below, for example `/as save` or `/as load 08-55-15`.
Anyone can use:
Only staff can use `/autosaver` at all, including `help` and `status`. By default that is admins and super admins. With `$Pref::Server::AutoSave::SuperAdminOnly = 1` it is super admins only. The host is always a super admin. Anyone else is told who can use it, and nothing runs.
- `/autosaver help`
- `/autosaver status`
Admins can use:
- `/autosaver access admins` or `/autosaver access superadmins`: who can use `/autosaver`. Only a super admin can change this.
- `/autosaver on` and `/autosaver off`
- `/autosaver save` (or `now`): save right away
- `/autosaver load` (or `reload`): clear all bricks, then load the newest file in `saves/autosave/`
@@ -97,12 +95,13 @@ $Pref::Server::AutoSave::Chunk = 4000;
$Pref::Server::AutoSave::Enabled = 1;
$Pref::Server::AutoSave::Interval = 300;
$Pref::Server::AutoSave::Preview = 1;
$Pref::Server::AutoSave::SuperAdminOnly = 0;
$Pref::Server::AutoSave::Tick = 1;
```
They are read each time a server starts. AutoSave checks every 5 seconds for a new server, which it tells apart by the mission's `MissionGroup`, so stopping one server and starting another is noticed even within one save interval. The save timer restarts with each new server. If a pref is missing, the default is used and added to the file the next time the game writes its prefs.
Every `/autosaver on`, `off`, `interval`, `chunk`, `tick`, `screenshot` and `autoload` writes `prefs.cs` right away, using the same export the game runs when custom game settings change. AutoSave only writes the file while a server is running, after the game has loaded it, so other prefs are kept. You can also edit the lines while the game is closed. Values out of range are clamped the same way as in chat.
Every `/autosaver on`, `off`, `interval`, `chunk`, `tick`, `screenshot`, `autoload` and `access` writes `prefs.cs` right away, using the same export the game runs when custom game settings change. AutoSave only writes the file while a server is running, after the game has loaded it, so other prefs are kept. You can also edit the lines while the game is closed. Values out of range are clamped the same way as in chat.
## Console
@@ -110,7 +109,7 @@ Every `/autosaver on`, `off`, `interval`, `chunk`, `tick`, `screenshot` and `aut
- `autoSaveNewest()` returns the newest autosave path
- `autoSaveFind(name)` returns the autosave path for a name, `*N` if N files match, or nothing
- `autoSaveApply()` clamps the settings, copies them to `$Pref::Server::AutoSave::*`, writes `config/server/prefs.cs` while hosting, and restarts the timer
- `$AutoSave::Enabled`, `$AutoSave::Interval`, `$AutoSave::Chunk`, `$AutoSave::Tick`, `$AutoSave::Preview`, `$AutoSave::AutoLoad` are the live values
- `$AutoSave::Enabled`, `$AutoSave::Interval`, `$AutoSave::Chunk`, `$AutoSave::Tick`, `$AutoSave::Preview`, `$AutoSave::AutoLoad`, `$AutoSave::SuperAdminOnly` are the live values
A value set on `$AutoSave::*` in the console is not saved, and a new interval does not take effect, until `autoSaveApply()` is called.