mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch: accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes they need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.6 KiB
C++
39 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
#include "json.hpp"
|
|
#include "VanityEvents.h"
|
|
|
|
/**
|
|
* Scheduled events (the Events page): parts that switch on and off together (a feature flag in event_1..event_8
|
|
* through the Settings save path, vanity changes, a live event, announcements, a restart; EventParts.h), on once
|
|
* between two times or by recurring rules (ScheduleRules.h), off or always on. The main loop starts each part when its
|
|
* event turns on and ends it when it turns off, once each (what was done is kept with the part, so restarts in between
|
|
* don't repeat or lose anything), audits it and raises alerts. Adding or changing a part needs the permission of the
|
|
* page that does the same by hand; seeing the events needs any of them.
|
|
*/
|
|
namespace EventsCalendar {
|
|
void RegisterRoutes();
|
|
|
|
// Main loop: start and end the parts of events that turned on or off
|
|
void Update();
|
|
|
|
/**
|
|
* What the worlds would load: the vanity files with the vanity parts of the events on at {at} (unix, default now),
|
|
* or of the events {ids} instead (VanityEvents::LoadWorld, as the worlds call it)
|
|
*/
|
|
nlohmann::json VanityPreview(const nlohmann::json& body);
|
|
|
|
// The vanity parts of the events that are on at `at`, in merge order (as the worlds load them)
|
|
std::vector<VanityEvents::Changes> VanityChangesOn(int64_t at);
|
|
|
|
/**
|
|
* The events with vanity parts, in merge order ({events: [{id, name, on, priority, modeName, nextStart, nextEnd}]}),
|
|
* which use each vanity file ({files: {name: [{id, name, on, use: overlay|on|off}]}}) and which take out each NPC
|
|
* ({removes: {name: [...]}})
|
|
*/
|
|
nlohmann::json VanityUses(int64_t now);
|
|
}
|