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

Method processEvent

source/game/StarStatistics.cpp:115–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void Statistics::processEvent(String const& name, Json const& fields) {
116 if (m_service)
117 m_service->reportEvent(name, fields);
118 Logger::debug("Event {} {}", name, fields);
119
120 auto statisticsDatabase = Root::singleton().statisticsDatabase();
121 if (auto const& event = statisticsDatabase->event(name)) {
122 runStatScript(event->scripts, event->config, "event", name, fields);
123 }
124}
125
126void Statistics::setStat(String const& name, String const& type, Json const& value) {
127 Logger::debug("Stat {} ({}) : {}", name, type, value);

Callers

nothing calls this directly

Calls 4

singletonClass · 0.85
reportEventMethod · 0.80
statisticsDatabaseMethod · 0.80
eventMethod · 0.80

Tested by

no test coverage detected