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

Method ASGetFloat

Source/Scripting/scriptparams.cpp:150–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150float ScriptParams::ASGetFloat(const std::string &key) {
151 ScriptParamMap::iterator iter = parameter_map_.find(key);
152 float ret_val = -1.0f;
153 if (iter != parameter_map_.end()) {
154 const ScriptParam &sp = iter->second;
155 ret_val = sp.GetFloat();
156 } else {
157 DisplayError("Error", ("No parameter \"" + key + "\" of correct type.").c_str());
158 }
159 return ret_val;
160}
161
162int ScriptParams::ASGetInt(const std::string &key) {
163 ScriptParamMap::iterator iter = parameter_map_.find(key);

Callers 3

ApplyPostEffectsFunction · 0.80
CreateRiggedObjectMethod · 0.80
DrawImGuiFunction · 0.80

Calls 5

DisplayErrorFunction · 0.50
findMethod · 0.45
endMethod · 0.45
GetFloatMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected