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

Function jsonToPersistentStatusEffect

source/game/StarStatusTypes.cpp:80–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80PersistentStatusEffect jsonToPersistentStatusEffect(Json const& config) {
81 if (config.isType(Json::Type::String)) {
82 return UniqueStatusEffect(config.toString());
83 } else if (config.isType(Json::Type::Object)) {
84 return jsonToStatModifier(config);
85 } else {
86 throw JsonException("Json is wrong type for persistent stat effect config");
87 }
88}
89
90Json jsonFromPersistentStatusEffect(PersistentStatusEffect const& effect) {
91 if (auto uniqueStatusEffect = effect.ptr<UniqueStatusEffect>())

Callers

nothing calls this directly

Calls 3

jsonToStatModifierFunction · 0.85
isTypeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected