Skip to content

Instantly share code, notes, and snippets.

@John-K
Created August 12, 2025 14:24
Show Gist options
  • Select an option

  • Save John-K/2b2663244e0dd1c4498d15c1708839d2 to your computer and use it in GitHub Desktop.

Select an option

Save John-K/2b2663244e0dd1c4498d15c1708839d2 to your computer and use it in GitHub Desktop.
Planet Crafter Item Dumper
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