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

Method ASGetJSON

Source/Scripting/scriptparams.cpp:291–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291SimpleJSONWrapper ScriptParams::ASGetJSON(const std::string &key) {
292 ScriptParamMap::iterator iter = parameter_map_.find(key);
293 SimpleJSONWrapper ret_val;
294 if (iter != parameter_map_.end()) {
295 ScriptParam &sp = iter->second;
296 ret_val = sp.GetJSON();
297 } else {
298 DisplayError("Error", ("No parameter \"" + key + "\" of correct type.").c_str());
299 }
300 return ret_val;
301}
302
303const ScriptParamMap &ScriptParams::GetParameterMap() const {
304 return parameter_map_;

Callers

nothing calls this directly

Calls 5

GetJSONMethod · 0.80
DisplayErrorFunction · 0.50
findMethod · 0.45
endMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected