From 1a81a68bd2b16a426d574774a33ab869b5657ee2 Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Tue, 2 Sep 2014 22:04:31 -0400 Subject: [PATCH] Formatting and unused using directives --- Plugin/KethaneData.cs | 13 ++++++------- Plugin/ResourceData.cs | 1 - Plugin/ResourceDefinition.cs | 6 +----- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Plugin/KethaneData.cs b/Plugin/KethaneData.cs index c333679..d15a27c 100644 --- a/Plugin/KethaneData.cs +++ b/Plugin/KethaneData.cs @@ -28,7 +28,7 @@ public static KethaneData Current } } - private Dictionary resources = new Dictionary(); + private Dictionary resources = new Dictionary(); public ResourceData this[string resourceName] { @@ -38,10 +38,14 @@ public static KethaneData Current public ICellResource GetCellDeposit(string resourceName, CelestialBody body, Cell cell) { if (resourceName == null || body == null || !resources.ContainsKey(resourceName)) { return null; } - return resources[resourceName][body].GetCellDeposit(cell); } + public void ResetGeneratorConfig(ResourceDefinition resource) + { + resources[resource.Resource] = Kethane.ResourceData.Load(resource, new ConfigNode()); + } + public override void OnLoad(ConfigNode config) { var timer = System.Diagnostics.Stopwatch.StartNew(); @@ -61,11 +65,6 @@ public override void OnLoad(ConfigNode config) Debug.LogWarning(String.Format("Kethane deposits loaded ({0}ms)", timer.ElapsedMilliseconds)); } - public void ResetGeneratorConfig(ResourceDefinition resource) - { - resources[resource.Resource] = Kethane.ResourceData.Load(resource, new ConfigNode()); - } - public override void OnSave(ConfigNode configNode) { var timer = System.Diagnostics.Stopwatch.StartNew(); diff --git a/Plugin/ResourceData.cs b/Plugin/ResourceData.cs index d29b462..3d2e5e0 100644 --- a/Plugin/ResourceData.cs +++ b/Plugin/ResourceData.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using UnityEngine; namespace Kethane diff --git a/Plugin/ResourceDefinition.cs b/Plugin/ResourceDefinition.cs index 20f6d66..c356c82 100644 --- a/Plugin/ResourceDefinition.cs +++ b/Plugin/ResourceDefinition.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using UnityEngine; +using UnityEngine; namespace Kethane {