public override void Remove(GameObject Object) { if (Object.IsPlayer() && WasPlayer && Popup.ShowYesNo("Your premonition is about to run out. Would you like to return to the start of your vision?") == DialogResult.Yes) { Precognition.Load(); } }
public override bool FireEvent(Event E) { if (E.ID == "BeforeDie") { if (Duration > 0) { if (ActivatedSegment == XRLCore.Core.Game.Segments) { Object.hitpoints = HitpointsAtSave; if (Object.pPhysics != null) { Object.pPhysics.Temperature = TemperatureAtSave; } return(false); } if (Object.IsPlayer()) { if (WasPlayer) { if (Popup.ShowYesNo("You sense your imminent demise, would you like to return to the start of your vision?") == DialogResult.Yes) { Precognition.Load(); ActivatedSegment = XRLCore.Core.Game.Segments; return(false); } } } else if (!Object.IsOriginalPlayerBody() && Object.FireEvent("CheckRealityDistortionUsability")) { Duration = 0; if (Object.Statistics.ContainsKey("Hitpoints")) { ActivatedSegment = XRLCore.Core.Game.Segments; Object.hitpoints = HitpointsAtSave; if (Object.pPhysics != null) { Object.pPhysics.Temperature = TemperatureAtSave; } Object.DilationSplat(); string verb = "swim"; string extra = "before your eyes"; string terminalPunctuation = "!"; GameObject @object = Object; DidX(verb, extra, terminalPunctuation, false, null, @object); return(false); } } } } else if (E.ID == "BeginTakeAction") { if (Duration > 0 && Object.CurrentCell != null) { Duration--; if (Duration <= 0) { if (Object.IsPlayer()) { Popup.Show("Your mind clouds over once again."); } } } } return(base.FireEvent(E)); }