void ProcessScriptGlobals(ProjectState state, IO.XmlStream s) { foreach (XmlNode n in s.Cursor.ChildNodes) { if (n.Name != "global") { continue; } s.SaveCursor(n); var sg = new ScriptGlobal(state, s); s.RestoreCursor(); string name_str = sg.ToString(); if (state.scriptingInterface.Globals.Contains(name_str)) { Debug.LogFile.WriteLine("Engine already contains a {0} named '{1}', ignoring...", "script global", name_str); continue; } try { ScriptGlobals.Add(name_str, sg); } catch (ArgumentException) { Debug.LogFile.WriteLine(kDuplicateErrorStr, "script global definition", name_str); } } }