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

Method particles

source/game/StarEffectSourceDatabase.cpp:86–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86List<String> EffectSource::particles() {
87 auto pickParticleSources = [](Json const& config, List<String>& particles) {
88 particles.appendAll(jsonToStringList(Random::randValueFrom(config.toArray(), JsonArray())));
89 };
90 List<String> result;
91 if (m_initialTick)
92 pickParticleSources(m_config.get("start", JsonObject()).get("particles", JsonArray()), result);
93 if (m_loopTick)
94 pickParticleSources(m_config.get("particles", JsonArray()), result);
95 if (m_finalTick)
96 pickParticleSources(m_config.get("stop", JsonObject()).get("particles", JsonArray()), result);
97 return result;
98}
99
100List<AudioInstancePtr> EffectSource::sounds(Vec2F offset) {
101 List<AudioInstancePtr> result;

Callers

nothing calls this directly

Calls 4

jsonToStringListFunction · 0.85
appendAllMethod · 0.80
toArrayMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected