mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Added ScriptVariableList::VariableExists
This commit is contained in:
parent
22ff072b54
commit
9933612607
2 changed files with 10 additions and 4 deletions
|
@ -2359,16 +2359,21 @@ ScriptVariable *ScriptVariableList::GetOrCreateVariable(unsigned int name)
|
|||
return &list.addKeyValue(name);
|
||||
}
|
||||
|
||||
ScriptVariable *ScriptVariableList::GetVariable(str name)
|
||||
ScriptVariable *ScriptVariableList::GetVariable(str name) const
|
||||
{
|
||||
return GetVariable(Director.AddString(name));
|
||||
}
|
||||
|
||||
ScriptVariable *ScriptVariableList::GetVariable(unsigned int name)
|
||||
ScriptVariable *ScriptVariableList::GetVariable(unsigned int name) const
|
||||
{
|
||||
return list.findKeyValue(name);
|
||||
}
|
||||
|
||||
bool ScriptVariableList::VariableExists(str name) const
|
||||
{
|
||||
return GetVariable(name) != NULL;
|
||||
}
|
||||
|
||||
ScriptVariable *ScriptVariableList::SetVariable(const char *name, int value)
|
||||
{
|
||||
ScriptVariable *variable = GetOrCreateVariable(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue