mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-30 08:27:14 +00:00
refactor(dashboard): routes name zones, objects and phrases through GameText
The routes' own zone name helpers and the CDClient's English zone and leaderboard header copies give way to GameText, so every name comes from the locale in the viewer's language; the Network page's world labels, mail, missions, leaderboards, item info (cached per language) and the settings/vanity help strings too. Reward code 4 and the plaque text name their zone from the locale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "PublicRoutes.h"
|
||||
#include "GameText.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
@@ -79,7 +80,7 @@ namespace {
|
||||
std::lock_guard lock(ServerState::g_StatusMutex);
|
||||
loginUp = ServerState::g_AuthStatus.online;
|
||||
chatUp = ServerState::g_ChatStatus.online;
|
||||
for (const auto& world : ServerState::g_WorldInstances) worlds.push_back({ world.mapID, world.zoneName, world.players });
|
||||
for (const auto& world : ServerState::g_WorldInstances) worlds.push_back({ world.mapID, GameText::ZoneName(world.mapID), world.players });
|
||||
}
|
||||
|
||||
nlohmann::json status{ {"name", ServerName()}, {"online", loginUp}, {"generated_at", now}, {"refresh_seconds", CacheSeconds()} };
|
||||
|
||||
Reference in New Issue
Block a user