Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up repetitive code in CraftTreePatcher.cs #526

Merged
merged 2 commits into from
Jan 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixes to the prior commit
  • Loading branch information
RamuneNeptune committed Jan 7, 2024
commit 29cb8593f7069dde2aff423d99345fd1d4a8576f
7 changes: 4 additions & 3 deletions Nautilus/Patchers/CraftTreePatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ internal class CraftTreePatcher
#region Internal Fields

internal static Dictionary<CraftTree.Type, ModCraftTreeRoot> CustomTrees = new();
internal static Dictionary<CraftTree.Type, List<Node>> NodesToRemove = new();
internal static Dictionary<CraftTree.Type, List<CraftingNode>> CraftingNodes = new();
internal static Dictionary<CraftTree.Type, List<TabNode>> TabNodes = new();
internal static Dictionary<CraftTree.Type, CraftTree> CachedTrees = new();
internal static Dictionary<CraftTree.Type, TechType> Fallbacks = new()
{
{ CraftTree.Type.Workbench, TechType.Workbench },
Expand All @@ -24,9 +28,6 @@ internal class CraftTreePatcher
{ CraftTree.Type.MapRoom, TechType.BaseMapRoom },
{ CraftTree.Type.Workbench, TechType.Workbench },
};
internal static List<Node> NodesToRemove = new();
internal static List<CraftingNode> CraftingNodes = new();
internal static List<TabNode> TabNodes = new();
private const string FallbackTabNode = "Modded";
private const string VanillaRoot = "Vanilla";

Expand Down