mirror of
https://github.com/PorktoberRevolution/ReStocked
synced 2024-06-11 05:54:07 +00:00
Fix error with nodes added by the game
This commit is contained in:
parent
473eca57af
commit
52a0030b5e
Binary file not shown.
|
@ -35,11 +35,6 @@ namespace Restock
|
||||||
case "COPYROTATIONCONSTRAINT":
|
case "COPYROTATIONCONSTRAINT":
|
||||||
constraints.Add(new CopyRotationConstraint(cnode, this.part));
|
constraints.Add(new CopyRotationConstraint(cnode, this.part));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//Unknown
|
|
||||||
default:
|
|
||||||
this.LogError($"Unknown constraint type \"{cnode.name}\"");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,13 +47,12 @@ namespace Restock
|
||||||
{
|
{
|
||||||
if (constraints == null || constraints.Count == 0)
|
if (constraints == null || constraints.Count == 0)
|
||||||
{
|
{
|
||||||
ConfigNode cfg;
|
|
||||||
foreach (UrlDir.UrlConfig pNode in GameDatabase.Instance.GetConfigs("PART"))
|
foreach (UrlDir.UrlConfig pNode in GameDatabase.Instance.GetConfigs("PART"))
|
||||||
{
|
{
|
||||||
if (pNode.name.Replace("_", ".") == part.partInfo.name)
|
if (pNode.name.Replace("_", ".") == part.partInfo.name)
|
||||||
{
|
{
|
||||||
cfg = pNode.config;
|
var cfg = pNode.config;
|
||||||
ConfigNode node = cfg.GetNodes("MODULE").Single(n => n.GetValue("name") == moduleName);
|
var node = cfg.GetNodes("MODULE").Single(n => n.GetValue("name") == moduleName);
|
||||||
OnLoad(node);
|
OnLoad(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +60,7 @@ namespace Restock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LateUpdate()
|
private void LateUpdate()
|
||||||
{
|
{
|
||||||
if (constraints == null) return;
|
if (constraints == null) return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user