MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / cinema

Method cinema

source/frontend/StarClientCommandProcessor.cpp:317–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317String ClientCommandProcessor::cinema(String const& argumentsString) {
318 auto arguments = m_parser.tokenizeToStringList(argumentsString);
319 if (!adminCommandAllowed())
320 return "You must be an admin to use this command.";
321
322 m_cinematicOverlay->load(Root::singleton().assets()->json(arguments.at(0)));
323 if (arguments.size() > 1)
324 m_cinematicOverlay->setTime(lexicalCast<float>(arguments.at(1)));
325 return strf("Started cinematic {} at {}", arguments.at(0), arguments.size() > 1 ? arguments.at(1) : "beginning");
326}
327
328String ClientCommandProcessor::suicide() {
329 m_universeClient->mainPlayer()->kill();

Callers

nothing calls this directly

Calls 9

singletonClass · 0.85
strfFunction · 0.85
tokenizeToStringListMethod · 0.80
jsonMethod · 0.80
assetsMethod · 0.80
loadMethod · 0.45
atMethod · 0.45
sizeMethod · 0.45
setTimeMethod · 0.45

Tested by

no test coverage detected