diff --git a/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll b/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll index 386a60c5..748d65a2 100644 Binary files a/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll and b/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll differ diff --git a/Source/Restock/ModuleRestockConstraints.cs b/Source/Restock/ModuleRestockConstraints.cs index 3ea46a90..38e68816 100644 --- a/Source/Restock/ModuleRestockConstraints.cs +++ b/Source/Restock/ModuleRestockConstraints.cs @@ -35,11 +35,6 @@ namespace Restock case "COPYROTATIONCONSTRAINT": constraints.Add(new CopyRotationConstraint(cnode, this.part)); break; - - //Unknown - default: - this.LogError($"Unknown constraint type \"{cnode.name}\""); - break; } } @@ -52,13 +47,12 @@ namespace Restock { if (constraints == null || constraints.Count == 0) { - ConfigNode cfg; foreach (UrlDir.UrlConfig pNode in GameDatabase.Instance.GetConfigs("PART")) { if (pNode.name.Replace("_", ".") == part.partInfo.name) { - cfg = pNode.config; - ConfigNode node = cfg.GetNodes("MODULE").Single(n => n.GetValue("name") == moduleName); + var cfg = pNode.config; + var node = cfg.GetNodes("MODULE").Single(n => n.GetValue("name") == moduleName); OnLoad(node); } } @@ -66,7 +60,7 @@ namespace Restock } } - void LateUpdate() + private void LateUpdate() { if (constraints == null) return;