public override void PostLoad() { LongEventHandler.ExecuteWhenFinished(() => { if (parent != null) { parent.AddChildCategoryDef(this); } }); base.PostLoad(); }
private void CreateRootCategoryDef() { EntityCategoryDef result = new EntityCategoryDef(nodeDef); if (this.categoryPriset != null && !this.categoryPriset.categories.NullOrEmpty()) { foreach (var a in this.categoryPriset.categories) { result.AddChildCategoryDef(a); } } else if (!this.canDisplayCategorys.NullOrEmpty()) { foreach (var a in this.canDisplayCategorys) { result.AddChildCategoryDef(a); } } OtherThingDefs(result); this.categoryRootDefInt = result; }