diff options
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); |