MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ASAddJSONFromString

Method ASAddJSONFromString

Source/Scripting/scriptparams.cpp:273–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273void ScriptParams::ASAddJSONFromString(const std::string &key, const std::string &default_val) {
274 if (parameter_map_.find(key) != parameter_map_.end()) {
275 return;
276 }
277 ScriptParam sp;
278 sp.SetJSONFromString(default_val);
279 parameter_map_.insert(std::pair<std::string, ScriptParam>(key, sp));
280}
281
282void ScriptParams::ASAddJSON(const std::string &key, SimpleJSONWrapper &details) {
283 if (parameter_map_.find(key) != parameter_map_.end()) {

Callers

nothing calls this directly

Calls 4

SetJSONFromStringMethod · 0.80
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected