mirror of
https://github.com/PorktoberRevolution/ReStocked
synced 2024-09-01 17:34:42 +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":
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user