mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-18 10:00:21 +02:00
Implement remaining ScriptVariableList methods
This commit is contained in:
2 files changed
+16
No files matched your search
@@ -2630,6 +2630,10 @@ ScriptVariable *ScriptVariableList::SetVariable(unsigned int name, ScriptVariabl
|
||||
return variable;
|
||||
}
|
||||
|
||||
int ScriptVariableList::size() const {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
void ScriptVariableList::Archive(Archiver& arc)
|
||||
{
|
||||
Class::Archive(arc);
|
||||
@@ -2645,6 +2649,16 @@ void ScriptVariableList::MakePrimitive()
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptVariableList::Print (void (*PrintFn) (const char* format, ...)) {
|
||||
con_set_enum<short3, ScriptVariable> en = list;
|
||||
|
||||
for (con_set_enum<short3, ScriptVariable>::Entry *entry = en.NextElement(); entry; entry = en.NextElement()) {
|
||||
(*PrintFn)("%s = %s\n", entry->value.getName().c_str(), entry->value.stringValue().c_str());
|
||||
}
|
||||
|
||||
gi.Printf("%d variables\n", list.size());
|
||||
}
|
||||
|
||||
CLASS_DECLARATION(Class, ScriptVariableList, NULL) {
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user