Skip to content

Commit

Permalink
Merge pull request #44 from dkavolis/fix#43
Browse files Browse the repository at this point in the history
Fix kerbal NRE spam on EVA
  • Loading branch information
dkavolis authored Apr 15, 2019
2 parents f817f91 + 159a74c commit 61181f6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
16 changes: 11 additions & 5 deletions FerramAerospaceResearch/FARPartGeometry/GeometryPartModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ public bool IgnoreForMainAxis
get { return ignoreForMainAxis; }
}

public override void OnAwake()
{
base.OnAwake();
ignoredTransforms = new List<string>();
unignoredTransforms = new List<string>();
}

void Start()
{
destroyed = false;
Expand Down Expand Up @@ -1020,8 +1027,8 @@ public override void OnLoad(ConfigNode node)
LoadBool(node, "ignoreForMainAxis", out ignoreForMainAxis);
LoadBool(node, "ignoreIfNoRenderer", out ignoreIfNoRenderer);
LoadBool(node, "rebuildOnAnimation", out rebuildOnAnimation);
ignoredTransforms = LoadList(node, "ignoreTransform");
unignoredTransforms = LoadList(node, "unignoreTransform");
LoadList(node, "ignoreTransform", ref ignoredTransforms);
LoadList(node, "unignoreTransform", ref unignoredTransforms);
}

private void LoadBool(ConfigNode node, string name, out bool value)
Expand All @@ -1037,9 +1044,9 @@ private void LoadBool(ConfigNode node, string name, out bool value)
}
}

private List<string> LoadList(ConfigNode node, string name)
private void LoadList(ConfigNode node, string name, ref List<string> list)
{
var list = new List<string>();
list.Clear();
if (node.HasValue(name))
{
foreach (string _name in node.GetValues(name))
Expand All @@ -1048,7 +1055,6 @@ private List<string> LoadList(ConfigNode node, string name)
}
_ready = false;
}
return list;
}
}
}
Binary file not shown.
Binary file modified GameData/FerramAerospaceResearch/Plugins/ferramGraph.dll
Binary file not shown.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Set all the other winglet/control surface values to zero

CHANGELOG
=======================================================
-------------------master branch-------------------------

Fix NRE spam on EVA [#43](https://github.com/dkavolis/Ferram-Aerospace-Research/issues/43) ([#44](https://github.com/dkavolis/Ferram-Aerospace-Research/pull/44))

0.15.10.0V "Lundgren"------------------------------------

**Note for Kopernicus users: DO NOT overwrite MFI that comes with Kopernicus since it is locked to that particular version**
Expand Down
Binary file modified bin/Debug/FerramAerospaceResearch.dll
Binary file not shown.
Binary file modified bin/Debug/ferramGraph.dll
Binary file not shown.

0 comments on commit 61181f6

Please sign in to comment.