public override bool FireEvent(Event E) { if (E.ID == "ZoneActivated" || E.ID == "ObjectCreated") { this.MagnetMutation = this.ParentObject.GetPart <MagneticPulse>(); if (this.MagnetMutation != null) { this.Depolarize(); } } else if (E.ID == "ZoneDeactivated") { if (this.MagnetMutation != null) { this.Repolarize(); } this.MagnetMutation = null; } else if (E.ID == "EndTurn") { if (this.MagnetMutation == null) { this.MagnetMutation = this.ParentObject.GetPart <MagneticPulse>(); } if (this.MagnetMutation != null) { this.Depolarize(); } } return(base.FireEvent(E)); }
public Egcb_Demagnetizer() { this.MagnetMutation = null; }