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

Method statistic

source/frontend/StarClientCommandProcessor.cpp:350–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350String ClientCommandProcessor::statistic(String const& argumentsString) {
351 auto arguments = m_parser.tokenizeToStringList(argumentsString);
352 if (!adminCommandAllowed())
353 return "You must be an admin to use this command.";
354
355 StringList values;
356 for (String const& statName : arguments) {
357 values.append(strf("{} = {}", statName, m_universeClient->statistics()->stat(statName)));
358 }
359 return values.join("\n");
360}
361
362String ClientCommandProcessor::giveEssentialItem(String const& argumentsString) {
363 auto arguments = m_parser.tokenizeToStringList(argumentsString);

Callers

nothing calls this directly

Calls 6

strfFunction · 0.85
tokenizeToStringListMethod · 0.80
appendMethod · 0.45
statMethod · 0.45
statisticsMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected