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

Method ASGetInt

Source/Scripting/scriptparams.cpp:162–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162int ScriptParams::ASGetInt(const std::string &key) {
163 ScriptParamMap::iterator iter = parameter_map_.find(key);
164 int ret_val = -1;
165 if (iter != parameter_map_.end()) {
166 const ScriptParam &sp = iter->second;
167 ret_val = sp.GetInt();
168 } else {
169 DisplayError("Error", ("No parameter \"" + key + "\" of correct type.").c_str());
170 }
171 return ret_val;
172}
173
174void ScriptParams::ASRemove(const std::string &key) {
175 parameter_map_.erase(key);

Callers 7

GetPlayerLimitMethod · 0.80
DrawMethod · 0.80
InitializeMethod · 0.80
SetScriptParamsMethod · 0.80
GetLevelBoundariesFunction · 0.80
DrawImGuiFunction · 0.80

Calls 5

DisplayErrorFunction · 0.50
findMethod · 0.45
endMethod · 0.45
GetIntMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected