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

Method parseTouchDamage

source/game/StarObjectDatabase.cpp:104–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104Json ObjectDatabase::parseTouchDamage(String const& path, Json const& config) {
105 auto touchDamage = config.get("touchDamage", {});
106 if (touchDamage.isType(Json::Type::String)) {
107 auto assets = Root::singleton().assets();
108 return assets->fetchJson(AssetPath::relativeTo(path, touchDamage.toString()));
109 }
110
111 return touchDamage;
112}
113
114List<ObjectOrientationPtr> ObjectDatabase::parseOrientations(String const& path, Json const& configList) {
115 auto& root = Root::singleton();

Callers

nothing calls this directly

Calls 6

singletonClass · 0.85
assetsMethod · 0.80
fetchJsonMethod · 0.80
getMethod · 0.45
isTypeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected