protected void UpdateList() { WaitingScreen.Wait(); Application.DoEvents(); try { lv.Items.Clear(); ilist.Images.Clear(); ExpansionItem.NeighborhoodPaths paths = PathProvider.Global.GetNeighborhoodsForGroup(PathProvider.Global.CurrentGroup); foreach (ExpansionItem.NeighborhoodPath path in paths) { string sourcepath = path.Path; string[] dirs = System.IO.Directory.GetDirectories(sourcepath, "????"); foreach (string dir in dirs) { AddNeighborhood(path, dir); } } } finally { WaitingScreen.Stop(this); } }
/*public ExpansionItem.NeighborhoodPaths GetNeighborhoodsForGroup() * { * return GetNeighborhoodsForGroup(AvailableGroups); * }*/ public ExpansionItem.NeighborhoodPaths GetNeighborhoodsForGroup(long grp) { ExpansionItem.NeighborhoodPaths hoods = new ExpansionItem.NeighborhoodPaths(); if ((GetExpansion(SimPe.Expansions.BaseGame).Group & grp) != 0) { ExpansionItem.NeighborhoodPath def = new ExpansionItem.NeighborhoodPath("", NeighborhoodFolder, this[SimPe.Expansions.BaseGame], true); hoods.Add(def); } foreach (ExpansionItem ei in Expansions) { if ((ei.Group & grp) == 0) { continue; } ei.AddNeighborhoodPaths(hoods); } return(hoods); }
void Rufio(string output, string hood, int group) { if (output.Length == 0) { output = Path.Combine(Path.Combine(SimPe.PathProvider.SimSavegameFolder, "Rufio"), "ExportedSims.txt"); } else { output = Path.Combine(Path.Combine(output, "Rufio"), "ExportedSims.txt"); } string outPath = Path.GetDirectoryName(output); if (!Directory.Exists(outPath)) { Directory.CreateDirectory(outPath); } if (group < 1) { group = PathProvider.Global.CurrentGroup; } StreamWriter w1 = new StreamWriter(output); w1.AutoFlush = true; StreamWriter w2 = new StreamWriter(Path.Combine(outPath, "ExportedLots.txt")); w2.AutoFlush = true; splash(L.Get("pjCHoodTool")); try { #region ExportedSims header w1.WriteLine("hood" + ",HoodName" + ",NID,FirstName,LastName,SimDescription" + ",FamilyInstance,HouseholdName" + ",HouseNumber" + ",AvailableCharacterData,Unlinked" + ",ParentA,ParentB,Spouse" + //",Ghost(Objects,Walls,People,Freely)" + ",BodyType" + //",AutonomyLevel"+ ",NPCType" + //",MotivesStatic,VoiceType"+ ",SchoolType,Grade,CareerPerformance,Career,CareerLevel,ZodiacSign,Aspiration,Gender" + ",LifeSection,AgeDaysLeft,PrevAgeDays,AgeDuration" + ",BlizLifelinePoints,LifelinePoints,LifelineScore" + ",GenActive,GenNeat,GenNice,GenOutgoing,GenPlayful" + // GeneticCharacter ",Active,Neat,Nice,Outgoing,Playful" + // Character ",Animals,Crime,Culture,Entertainment,Environment,Fashion,FemalePreference,Food,Health" + //Interests ",MalePreference,Money,Paranormal,Politics,School,Scifi,Sports,Toys,Travel,Weather,Work" + //Interests ",Body,Charisma,Cleaning,Cooking,Creativity,Fatness,Logic,Mechanical,Romance" + //Skills ",IsAtUniversity,UniEffort,UniGrade,UniTime,UniSemester,UniInfluence,UniMajor" + // University ",Species" + // Nightlife ",Salary" + // Business ",PrimaryAspiration,SecondaryAspiration,HobbyPredestined,LifetimeWant" + // FreeTime //",Reputation" + // Aparments... not found it yet "" ); #endregion #region ExportedLots header w2.WriteLine("hood" + ",HoodName" + ",LotInstance" + ",HouseNumber,HouseName" + "" ); #endregion ExpansionItem.NeighborhoodPaths paths = PathProvider.Global.GetNeighborhoodsForGroup(group); foreach (ExpansionItem.NeighborhoodPath path in paths) { string sourcepath = path.Path; string[] dirs = System.IO.Directory.GetDirectories(sourcepath, hood.Length > 0 ? hood : "????"); foreach (string dir in dirs) { AddHood(outPath, dir, w1, w2); } } } finally { w1.Close(); w2.Close(); } }