public void LoadUsersAndGroups(ImportSettings settings) { string nameChangesFile = ExportCommand.siminfoDir + "../nameChanges.txt"; if (File.Exists(nameChangesFile)) { string[] nameChanges = File.ReadAllLines(nameChangesFile); foreach (var entry in nameChanges) { string[] entrySplit = entry.Split(','); string n1 = entrySplit[0]; string n2 = n1; if (entrySplit.Length > 1) { n2 = entrySplit[1]; } RenamedWhosit[n1] = n2; } } string found; if (RenamedWhosit.TryGetValue("LINDENZERO", out found)) { LINDENZERO = WorldSystem.FindUUIDForName(found); } if (RenamedWhosit.TryGetValue("MISSINGPERSON", out found)) { MISSINGPERSON = WorldSystem.FindUUIDForName(found); } foreach (string file in Directory.GetFiles(ExportCommand.siminfoDir, "*.avatar")) { string[] content = File.ReadAllText(file).Split(','); UUID key = UUID.Parse(Path.GetFileNameWithoutExtension(file)); UserOrGroupMapping mapping = new UserOrGroupMapping(key, content[0], false); UUID2OBJECT[key] = mapping; if (content.Length > 1) { mapping.NewName = content[1]; } else { mapping.NewName = "MISSINGPERSON"; } if (IsLocalScene) { LocalScene.Users.Add(mapping); } } foreach (string file in Directory.GetFiles(ExportCommand.siminfoDir, "*.group")) { string[] content = File.ReadAllText(file).Split(','); UUID key = UUID.Parse(Path.GetFileNameWithoutExtension(file)); UserOrGroupMapping mapping = new UserOrGroupMapping(key, content[0], true); UUID2OBJECT[key] = mapping; if (content.Length > 1) { mapping.NewName = content[1]; } else { mapping.NewName = content[0]; } if (IsLocalScene) { LocalScene.Groups.Add(mapping); } } }