From b084b0e13fd8e7b4671abee752e3261e930b5fae Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 15 Jan 2024 23:43:05 +0100 Subject: [PATCH] Add "AnyMessage" Event --- CS2GSI/CS2EventGenerator.cs | 2 ++ CS2GSI/CS2GSI.cs | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CS2GSI/CS2EventGenerator.cs b/CS2GSI/CS2EventGenerator.cs index 4616e0d..a4a9198 100644 --- a/CS2GSI/CS2EventGenerator.cs +++ b/CS2GSI/CS2EventGenerator.cs @@ -16,6 +16,8 @@ internal static class CS2EventGenerator if(events.Count > 0) events.Add(new ValueTuple(CS2Event.AnyEvent, new CS2EventArgs())); + + events.Add(new ValueTuple(CS2Event.AnyMessage, new CS2EventArgs())); return events; } diff --git a/CS2GSI/CS2GSI.cs b/CS2GSI/CS2GSI.cs index d5a8f49..42af528 100644 --- a/CS2GSI/CS2GSI.cs +++ b/CS2GSI/CS2GSI.cs @@ -134,6 +134,9 @@ public class CS2GSI case CS2Event.AnyEvent: AnyEvent?.Invoke(cs2Event.Item2); break; + case CS2Event.AnyMessage: + AnyMessage?.Invoke(cs2Event.Item2); + break; default: this.logger?.Log(LogLevel.Error, $"Unknown Event {cs2Event}"); return; @@ -164,7 +167,8 @@ public class CS2GSI OnBombPlanted, OnBombDefused, OnBombExploded, - AnyEvent + AnyEvent, + AnyMessage } public delegate void CS2EventHandler(CS2EventArgs eventArgs); @@ -192,6 +196,7 @@ public class CS2GSI OnBombPlanted, OnBombDefused, OnBombExploded, - AnyEvent; + AnyEvent, + AnyMessage; } \ No newline at end of file