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

Method setGravity

source/frontend/StarClientCommandProcessor.cpp:186–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186String ClientCommandProcessor::setGravity(String const& argumentsString) {
187 auto arguments = m_parser.tokenizeToStringList(argumentsString);
188 if (!adminCommandAllowed())
189 return "You must be an admin to use this command.";
190
191 m_universeClient->worldClient()->overrideGravity(lexicalCast<float>(arguments.at(0)));
192 return strf("Gravity set to {} (This is client-side!)", arguments.at(0));
193}
194
195String ClientCommandProcessor::resetGravity() {
196 if (!adminCommandAllowed())

Callers

nothing calls this directly

Calls 5

strfFunction · 0.85
tokenizeToStringListMethod · 0.80
overrideGravityMethod · 0.80
worldClientMethod · 0.80
atMethod · 0.45

Tested by

no test coverage detected