public override void PostDeSpawn(Map map) { base.PostDeSpawn(map); CompMapRefuelable component = map.GetComponent <CompMapRefuelable>(); if (component == null) { return; } component.comps.Remove(this); }
public override void PostSpawnSetup(bool respawningAfterLoad) { base.PostSpawnSetup(respawningAfterLoad); flickComp = parent.GetComp <CompFlickable>(); if (inputSettings == null) { inputSettings = new StorageSettings(this); if (parent.def.building.defaultStorageSettings != null) { inputSettings.CopyFrom(parent.def.building.defaultStorageSettings); } } bioReactor = (Building_BioReactor)parent; CompMapRefuelable component = parent.Map.GetComponent <CompMapRefuelable>(); if (component == null) { return; } component.comps.Add(this); }