temporary /render cmd for debugging
This commit is contained in:
parent
3205f3b283
commit
5cf11ead98
@ -52,7 +52,8 @@ ClientCommandProcessor::ClientCommandProcessor(UniverseClientPtr universeClient,
|
||||
{"enabletech", bind(&ClientCommandProcessor::enableTech, this, _1)},
|
||||
{"upgradeship", bind(&ClientCommandProcessor::upgradeShip, this, _1)},
|
||||
{"swap", bind(&ClientCommandProcessor::swap, this, _1)},
|
||||
{"respawnInWorld", bind(&ClientCommandProcessor::respawnInWorld, this, _1)}
|
||||
{"respawnInWorld", bind(&ClientCommandProcessor::respawnInWorld, this, _1)},
|
||||
{"render", bind(&ClientCommandProcessor::render, this, _1)}
|
||||
};
|
||||
}
|
||||
|
||||
@ -440,4 +441,12 @@ String ClientCommandProcessor::respawnInWorld(String const& argumentsString) {
|
||||
return strf("Respawn in this world set to {} (This is client-side!)", respawnInWorld ? "true" : "false");
|
||||
}
|
||||
|
||||
// Temporary hardcoded render command for debugging purposes, future version will write to the clipboard
|
||||
String ClientCommandProcessor::render(String const& imagePath) {
|
||||
auto image = Root::singleton().assets()->image(imagePath);
|
||||
image->writePng(File::open("render.png", IOMode::Write));
|
||||
return strf("Saved {}x{} image to render.png", image->width(), image->height());
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -59,6 +59,7 @@ private:
|
||||
String upgradeShip(String const& argumentsString);
|
||||
String swap(String const& argumentsString);
|
||||
String respawnInWorld(String const& argumentsString);
|
||||
String render(String const& imagePath);
|
||||
|
||||
UniverseClientPtr m_universeClient;
|
||||
CinematicPtr m_cinematicOverlay;
|
||||
|
Loading…
x
Reference in New Issue
Block a user