Created
August 12, 2025 14:24
-
-
Save John-K/2b2663244e0dd1c4498d15c1708839d2 to your computer and use it in GitHub Desktop.
Planet Crafter Item Dumper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static bool haveDumpedItems = false; | |
| static void logItems() | |
| { | |
| IEnumerable<string> objectNames = GroupsHandler.GetAllGroups().Select(g => g.GetId()); | |
| logger.LogInfo($"Dumping {objectNames.Count()} objects"); | |
| List<string> list = new List<string>(); | |
| haveDumpedItems = true; | |
| foreach (var group in GroupsHandler.GetAllGroups()) | |
| { | |
| list.Add($"{Readable.GetGroupName(group)}: {group.GetId()}, Category: {GetCategory(group)}, Desc: {Readable.GetGroupDescription(group)}"); | |
| } | |
| list.Sort(); | |
| Assembly me = Assembly.GetExecutingAssembly(); | |
| string dir = Path.GetDirectoryName(me.Location); | |
| File.WriteAllLines(Path.Combine(dir, "items.txt"), list); | |
| File.Close(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment