public override void SpawnSetup(Map map, bool respawningAfterLoad) { _energySource = EnergySourceUtility.Find(this); _shield = ShieldUtility.FindComp(this); _heatSink = HeatsinkUtility.FindComp(this); _activeLastTick = IsActive; base.SpawnSetup(map, respawningAfterLoad); }
public override void PostSpawnSetup(bool respawningAfterLoad) { base.PostSpawnSetup(respawningAfterLoad); _cellCount = GenRadial.NumCellsInRadius(_fieldRadius); _positionLast = parent.Position; _radiusLast = (int)Radius; _energySource = EnergySourceUtility.Find(parent); _heatSink = HeatsinkUtility.Find(parent); _resistance = parent.TryGetComp <Comp_ShieldResistance>(); parent.Map.GetComponent <ShieldManager>().Add(this); LessonAutoActivator.TeachOpportunity(ConceptDef.Named("FD_Shields"), OpportunityType.Critical); }