From ef1ad6e7b6de7869bbca35f6cf804625bac76117 Mon Sep 17 00:00:00 2001 From: Mateusz Date: Mon, 26 Apr 2021 11:08:51 +0200 Subject: [PATCH] Cassie Messages can be noiseless --- MoreHazards/MoreHazards/Elevators.cs | 2 +- MoreHazards/MoreHazards/utils.cs | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MoreHazards/MoreHazards/Elevators.cs b/MoreHazards/MoreHazards/Elevators.cs index 2a80cb9..c82eeaa 100644 --- a/MoreHazards/MoreHazards/Elevators.cs +++ b/MoreHazards/MoreHazards/Elevators.cs @@ -37,8 +37,8 @@ public ElevatorLogicManager() public override void Dispose() { - base.Dispose(); Warhead.Detonated -= OnDetonated; + base.Dispose(); } public override void OnRoundStart() diff --git a/MoreHazards/MoreHazards/utils.cs b/MoreHazards/MoreHazards/utils.cs index 61887dc..e808117 100644 --- a/MoreHazards/MoreHazards/utils.cs +++ b/MoreHazards/MoreHazards/utils.cs @@ -85,9 +85,15 @@ public class CassieAnnouncement [Description("Cassie Message Jam Chance (0-100)")] public int Jams { get; set; } = 10; + [Description("If false, disables glitches, jams and other noises")] + public bool Noise { get; set; } = true; + public void Speak() { - Cassie.GlitchyMessage(Text, Glitches, Jams); + if (Noise) + Cassie.GlitchyMessage(Text, Glitches, Jams); + else + Cassie.Message(Text,false,false); } } public class CollectionUtils