Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #45 #47

Merged
merged 3 commits into from
Apr 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ public static DebugVisualVoxelSubmesh Create(Transform parent = null, bool activ
public bool active
{
get => gameObject.activeSelf;
set => gameObject?.SetActive(value);
set
{
if (gameObject != null)
gameObject.SetActive(value);
}
}

public Mesh Mesh
Expand Down
17 changes: 6 additions & 11 deletions FerramAerospaceResearch/FARPartGeometry/GeometryPartModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1022,31 +1022,26 @@ public void Rescale(Vector3 relativeRescaleFactor)
public override void OnLoad(ConfigNode node)
{
base.OnLoad(node);
LoadBool(node, "forceUseColliders", out forceUseColliders);
LoadBool(node, "forceUseMeshes", out forceUseMeshes);
LoadBool(node, "ignoreForMainAxis", out ignoreForMainAxis);
LoadBool(node, "ignoreIfNoRenderer", out ignoreIfNoRenderer);
LoadBool(node, "rebuildOnAnimation", out rebuildOnAnimation);
LoadBool(node, "forceUseColliders", ref forceUseColliders);
LoadBool(node, "forceUseMeshes", ref forceUseMeshes);
LoadBool(node, "ignoreForMainAxis", ref ignoreForMainAxis);
LoadBool(node, "ignoreIfNoRenderer", ref ignoreIfNoRenderer);
LoadBool(node, "rebuildOnAnimation", ref rebuildOnAnimation);
LoadList(node, "ignoreTransform", ref ignoredTransforms);
LoadList(node, "unignoreTransform", ref unignoredTransforms);
}

private void LoadBool(ConfigNode node, string name, out bool value)
private void LoadBool(ConfigNode node, string name, ref bool value)
{
if (node.HasValue(name))
{
bool.TryParse(node.GetValue(name), out value);
_ready = false;
}
else
{
value = false;
}
}

private void LoadList(ConfigNode node, string name, ref List<string> list)
{
list.Clear();
if (node.HasValue(name))
{
foreach (string _name in node.GetValues(name))
Expand Down
Binary file not shown.
Binary file modified GameData/FerramAerospaceResearch/Plugins/ferramGraph.dll
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ CHANGELOG
=======================================================
-------------------master branch-------------------------

Fix config values reset on load in `GeometryPartModule` [#47](https://github.com/dkavolis/Ferram-Aerospace-Research/pull/47)
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"------------------------------------
Expand Down
Binary file modified bin/Debug/FerramAerospaceResearch.dll
Binary file not shown.
Binary file modified bin/Debug/ferramGraph.dll
Binary file not shown.