diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-02-03 09:26:37 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-02-03 09:26:37 +1100 |
commit | b53b8ecca0e7690d8ddffbcad21d229851d5205d (patch) | |
tree | 5f1a8fd6d65b77870aaea78dd8fb5995611f72b3 /source/frontend | |
parent | 56f384a2acef619f287db700f48e8f1a3ec71e61 (diff) |
add /hotreload
Diffstat (limited to 'source/frontend')
-rw-r--r-- | source/frontend/StarClientCommandProcessor.cpp | 6 | ||||
-rw-r--r-- | source/frontend/StarClientCommandProcessor.hpp | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/frontend/StarClientCommandProcessor.cpp b/source/frontend/StarClientCommandProcessor.cpp index 7671a00..c19c68f 100644 --- a/source/frontend/StarClientCommandProcessor.cpp +++ b/source/frontend/StarClientCommandProcessor.cpp @@ -20,6 +20,7 @@ ClientCommandProcessor::ClientCommandProcessor(UniverseClientPtr universeClient, m_paneManager(paneManager), m_macroCommands(std::move(macroCommands)) { m_builtinCommands = { {"reload", bind(&ClientCommandProcessor::reload, this)}, + {"hotReload", bind(&ClientCommandProcessor::hotReload, this)}, {"whoami", bind(&ClientCommandProcessor::whoami, this)}, {"gravity", bind(&ClientCommandProcessor::gravity, this)}, {"debug", bind(&ClientCommandProcessor::debug, this, _1)}, @@ -128,6 +129,11 @@ String ClientCommandProcessor::reload() { return "Client Star::Root reloaded"; } +String ClientCommandProcessor::hotReload() { + Root::singleton().hotReload(); + return "Hot-reloaded assets"; +} + String ClientCommandProcessor::whoami() { return strf("Client: You are {}. You are {}an Admin.", m_universeClient->mainPlayer()->name(), m_universeClient->mainPlayer()->isAdmin() ? "" : "not "); diff --git a/source/frontend/StarClientCommandProcessor.hpp b/source/frontend/StarClientCommandProcessor.hpp index c3978a4..df60b96 100644 --- a/source/frontend/StarClientCommandProcessor.hpp +++ b/source/frontend/StarClientCommandProcessor.hpp @@ -26,6 +26,7 @@ private: String previewQuestPane(StringList const& arguments, function<PanePtr(QuestPtr)> createPane); String reload(); + String hotReload(); String whoami(); String gravity(); String debug(String const& argumentsString); |