feat(master): the world file watch follows the override folder, and can hold a zone

For a file under maps/ master watches the file a world would read now: the override
when one is there, else the client's. An override that appears, changes or goes away
makes the instances that read another version stale, also for files from the packs.
The dashboard can hold a zone's automatic reloads (WORLD_RELOAD_HOLD, a new message
after the existing ones) until a reload of the zone is asked for. The status sent to
the dashboard counts what reloads did per zone.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 18:25:53 -06:00
parent d124372973
commit e714ff2f0a
8 changed files with 217 additions and 17 deletions

View File

@@ -1187,6 +1187,15 @@ namespace {
WorldReloader::HandleRequest(request, fromDashboard ? "the dashboard, " + by : by);
}
// The dashboard, while a set of edited zone files waits for its reload (docs/ZonePublish.md)
void OnWorldReloadHold(const WorldReloadHold& hold, const SystemAddress& sysAddr) {
if (sysAddr != dashboardServerMasterPeerSysAddr || sysAddr == UNASSIGNED_SYSTEM_ADDRESS) {
LOG("Ignoring a world reload hold from a server that is not the dashboard");
return;
}
WorldReloader::SetHold(hold.zoneId, hold.hold);
}
void OnConfigReload(const ConfigReload& reload, const SystemAddress& sysAddr) {
if (sysAddr != dashboardServerMasterPeerSysAddr) {
LOG("Ignoring config reload from a server that is not the dashboard");
@@ -1301,6 +1310,7 @@ namespace {
handlers.On<MessageCaptureControl>(Master::MESSAGE_CAPTURE_CONTROL, OnMessageCaptureControl);
handlers.On<CDClientReload>(Master::CDCLIENT_RELOAD, OnCDClientReload);
handlers.On<WorldFilesReport>(Master::WORLD_FILES, OnWorldFiles);
handlers.On<WorldReloadHold>(Master::WORLD_RELOAD_HOLD, OnWorldReloadHold);
handlers.On<WorldReloadRequest>(Master::WORLD_RELOAD, OnWorldReload);
handlers.On<MessageCaptureData>(Master::MESSAGE_CAPTURE_DATA, OnMessageCaptureData);
handlers.On<RequestServerList>(Master::REQUEST_SERVER_LIST, OnRequestServerList);