From 8891f3fa0a2b9399bef69c19d7cc23df56ebfb60 Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Thu, 3 Apr 2025 02:58:20 +0200 Subject: [PATCH] Make EntitySystem.Subscriptions.SubscribeLocalEvent not require EntityEventArgs This means it can be used with struct events. --- Robust.Shared/GameObjects/EntitySystem.Subscriptions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Robust.Shared/GameObjects/EntitySystem.Subscriptions.cs b/Robust.Shared/GameObjects/EntitySystem.Subscriptions.cs index 2a865a83b..35764cb80 100644 --- a/Robust.Shared/GameObjects/EntitySystem.Subscriptions.cs +++ b/Robust.Shared/GameObjects/EntitySystem.Subscriptions.cs @@ -193,7 +193,7 @@ namespace Robust.Shared.GameObjects ComponentEventHandler handler, Type[]? before = null, Type[]? after = null) where TComp : IComponent - where TEvent : EntityEventArgs + where TEvent : notnull { System.SubscribeLocalEvent(handler, before, after); } @@ -206,7 +206,7 @@ namespace Robust.Shared.GameObjects ComponentEventRefHandler handler, Type[]? before = null, Type[]? after = null) where TComp : IComponent - where TEvent : EntityEventArgs + where TEvent : notnull { System.SubscribeLocalEvent(handler, before, after); } @@ -219,7 +219,7 @@ namespace Robust.Shared.GameObjects EntityEventRefHandler handler, Type[]? before = null, Type[]? after = null) where TComp : IComponent - where TEvent : EntityEventArgs + where TEvent : notnull { System.SubscribeLocalEvent(handler, before, after); } @@ -229,7 +229,7 @@ namespace Robust.Shared.GameObjects /// /// /// This can be used by extension methods for - /// to unsubscribe from from external sources such as CVars. + /// to unsubscribe from external sources such as CVars. /// /// An action to be ran when the entity system is shut down. public void RegisterUnsubscription(Action action)