Skip to content

Commit

Permalink
Revert "fix: Use Fallback Node if targeted node not found. (Subnautic…
Browse files Browse the repository at this point in the history
…aModding#527)"

This reverts commit 48d9b00.
  • Loading branch information
Metious committed Sep 3, 2024
1 parent bb95bed commit d63d17d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Nautilus/Patchers/CraftTreePatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,8 @@ private static void PatchNodes(ref CraftTree tree, CraftTree.Type type)
{
if (!TraverseTree(tree.nodes, customNode.Path, out var currentNode))
{
InternalLogger.Warn($"Cannot add Crafting node: {customNode.TechType.AsString()} to {customNode.Scheme} at {string.Join("/", customNode.Path)} as the parent node could not be found.");

if (!TraverseTree(tree.nodes, new[] { FallbackTabNode + customNode.Scheme }, out currentNode))
{
InternalLogger.Error($"Cannot add Crafting node: {customNode.TechType.AsString()} to {customNode.Scheme} at {string.Join("/", customNode.Path)} as the fallback node could not be found.");
continue;
}
InternalLogger.Error($"Cannot add Crafting node: {customNode.TechType.AsString()} to {customNode.Scheme} at {string.Join("/", customNode.Path)} as the parent node could not be found.");
continue;
}

if (currentNode.nodes.Any(x => x is CraftNode craftNode && craftNode.action == TreeAction.Expand))
Expand Down

0 comments on commit d63d17d

Please sign in to comment.