diff --git a/RW_NodeTree/CompChildNodeProccesser.cs b/RW_NodeTree/CompChildNodeProccesser.cs index 471436b..41b1f5d 100644 --- a/RW_NodeTree/CompChildNodeProccesser.cs +++ b/RW_NodeTree/CompChildNodeProccesser.cs @@ -624,10 +624,8 @@ internal void PostFX(RenderTexture tar) /// public bool AllowNode(Thing node, string id = null) { - if(node?.Destroyed ?? false) return false; - ThingOwner targetOwner = node?.holdingOwner; - Type type = targetOwner?.GetType(); - if (type != null && type.Assembly != HarmonyInjector.coreAssembly) return false; + if (node?.holdingOwner != null) return false; + if (node?.Destroyed ?? false) return false; if (id.NullOrEmpty() || ChildNodes.IsChildOf(node)) return false; foreach (CompBasicNodeComp comp in AllNodeComp) { diff --git a/RW_NodeTree/NodeContainer.cs b/RW_NodeTree/NodeContainer.cs index 932dc58..f9144f8 100644 --- a/RW_NodeTree/NodeContainer.cs +++ b/RW_NodeTree/NodeContainer.cs @@ -101,7 +101,7 @@ public override void ExposeData() string id = innerIdList[i]; try { - if (UsedIds.Contains(thing.GetUniqueLoadID()) || (thing.holdingOwner != null && thing.holdingOwner != this)) Scribe_References.Look(ref thing, id); + if (UsedIds.Contains(thing.GetUniqueLoadID())) Scribe_References.Look(ref thing, id); else Scribe_Deep.Look(ref thing, id); } catch(Exception e) @@ -269,7 +269,7 @@ internal bool internal_UpdateNode(CompChildNodeProccesser actionNode = null) state = stateCode.r; bool reset = true; if (StopEventBubble) return StopEventBubble; - foreach (Thing node in this.Values) + foreach (Thing node in prveChilds.Values) { NodeContainer container = ((CompChildNodeProccesser)node)?.ChildNodes; if (container != null && container.NeedUpdate) @@ -438,7 +438,6 @@ public override bool TryAdd(Thing item, bool canMergeWithExistingStacks = true) innerList.Add(item); if (state == stateCode.rw) ((CompChildNodeProccesser)item)?.internal_Added(this, id, true, cachedData); - item.holdingOwner?.Remove(item); item.holdingOwner = this; //NeedUpdate = true; return true;