Skip to content

Commit

Permalink
Fixed double update of Part fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Biotronic committed Aug 15, 2014
1 parent 43ec6df commit 2e60300
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Binary file modified Gamedata/TweakScale/plugins/Scale.dll
Binary file not shown.
14 changes: 10 additions & 4 deletions ScaleExponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ private ScaleExponents(ConfigNode node, ScaleExponents source = null)
{
_id = "";
}

if (IsExponentBlock(node))
{
if (string.IsNullOrEmpty(_id))
{
_id = "Part";
_name = "Part";
}
}

_exponents = new Dictionary<string, Tuple<string, bool>>();
_children = new Dictionary<string, ScaleExponents>();

Expand Down Expand Up @@ -295,10 +305,6 @@ private void UpdateEnumerable(IEnumerable obj, IEnumerable baseObj, ScalingFacto

public static void UpdateObject(Part part, Part basePart, Dictionary<string, ScaleExponents> exps, ScalingFactor factor)
{
if (exps.ContainsKey(""))
{
exps[""].UpdateFields(part, basePart, factor);
}
if (exps.ContainsKey("Part"))
{
exps["Part"].UpdateFields(part, basePart, factor);
Expand Down

0 comments on commit 2e60300

Please sign in to comment.