only add emag component if the event was handled (#14627)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas 2023-03-16 02:19:08 +00:00 committed by GitHub
parent 3b5354c2f2
commit e0cfc42360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ namespace Content.Shared.Emag.Systems
var emaggedEvent = new GotEmaggedEvent(user);
RaiseLocalEvent(target, ref emaggedEvent);
if (!emaggedEvent.Repeatable)
if (emaggedEvent.Handled && !emaggedEvent.Repeatable)
EnsureComp<EmaggedComponent>(target);
return emaggedEvent.Handled;
}