Add "AnyMessage" Event

This commit is contained in:
glax 2024-01-15 23:43:05 +01:00
parent 4b66a7147a
commit b084b0e13f
2 changed files with 9 additions and 2 deletions

View File

@ -16,6 +16,8 @@ internal static class CS2EventGenerator
if(events.Count > 0)
events.Add(new ValueTuple<CS2Event, CS2EventArgs>(CS2Event.AnyEvent, new CS2EventArgs()));
events.Add(new ValueTuple<CS2Event, CS2EventArgs>(CS2Event.AnyMessage, new CS2EventArgs()));
return events;
}

View File

@ -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;
}