Skip to content

Commit

Permalink
Fix formatting and misplaced usings
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPurple6411 committed Dec 10, 2023
1 parent 4ac7dde commit 7b96ee9
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Nautilus/Handlers/CraftTreeHandler.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
namespace Nautilus.Handlers;

using System.Linq;
using Nautilus.Crafting;
using Nautilus.Patchers;
using Nautilus.Utility;

namespace Nautilus.Handlers;

/// <summary>
/// A handler class for creating and modifying crafting trees.
/// </summary>
public static class CraftTreeHandler
public static class CraftTreeHandler
{
/// <summary>
/// Adds a new crafting node to the root of the specified crafting tree, at the provided tab location.
Expand All @@ -23,7 +22,7 @@ public static class CraftTreeHandler
/// </param>
public static void AddCraftingNode(CraftTree.Type craftTree, TechType craftingItem, params string[] stepsToTab)
{
if(CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
if (CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
{
root.AddCraftNode(craftingItem, stepsToTab.LastOrDefault());
return;
Expand All @@ -40,7 +39,7 @@ public static void AddCraftingNode(CraftTree.Type craftTree, TechType craftingIt

public static void AddCraftingNode(CraftTree.Type craftTree, TechType craftingItem)
{
if(CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
if (CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
{
root.AddCraftNode(craftingItem);
return;
Expand All @@ -58,7 +57,7 @@ public static void AddCraftingNode(CraftTree.Type craftTree, TechType craftingIt
/// <param name="sprite">The sprite of the tab.</param>
public static void AddTabNode(CraftTree.Type craftTree, string name, string displayName, Atlas.Sprite sprite)
{
if(CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
if (CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
{
root.AddTabNode(name, displayName, sprite);
return;
Expand All @@ -76,7 +75,7 @@ public static void AddTabNode(CraftTree.Type craftTree, string name, string disp

public static void AddTabNode(CraftTree.Type craftTree, string name, string displayName, UnityEngine.Sprite sprite)
{
if(CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
if (CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
{
root.AddTabNode(name, displayName, sprite);
return;
Expand All @@ -99,7 +98,7 @@ public static void AddTabNode(CraftTree.Type craftTree, string name, string disp
/// </param>
public static void AddTabNode(CraftTree.Type craftTree, string name, string displayName, Atlas.Sprite sprite, params string[] stepsToTab)
{
if(CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
if (CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
{
root.AddTabNode(name, displayName, sprite, "English", stepsToTab.LastOrDefault());
return;
Expand All @@ -122,7 +121,7 @@ public static void AddTabNode(CraftTree.Type craftTree, string name, string disp
/// </param>
public static void AddTabNode(CraftTree.Type craftTree, string name, string displayName, UnityEngine.Sprite sprite, params string[] stepsToTab)
{
if(CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
if (CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
{
root.AddTabNode(name, displayName, sprite, "English", stepsToTab.LastOrDefault());
return;
Expand Down Expand Up @@ -188,7 +187,7 @@ public static void AddTabNode(CraftTree.Type craftTree, string name, string disp

public static void RemoveNode(CraftTree.Type craftTree, params string[] stepsToNode)
{
if(CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
if (CraftTreePatcher.CustomTrees.TryGetValue(craftTree, out var root))
{
root.GetNode(stepsToNode)?.RemoveNode();
return;
Expand Down

0 comments on commit 7b96ee9

Please sign in to comment.