From b53b8ecca0e7690d8ddffbcad21d229851d5205d Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 3 Feb 2025 09:26:37 +1100 Subject: add /hotreload --- source/frontend/StarClientCommandProcessor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/frontend/StarClientCommandProcessor.cpp') 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 "); -- cgit v1.2.3