only add emag component if the event was handled (#14627)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -164,7 +164,7 @@ namespace Content.Shared.Emag.Systems
|
|||||||
var emaggedEvent = new GotEmaggedEvent(user);
|
var emaggedEvent = new GotEmaggedEvent(user);
|
||||||
RaiseLocalEvent(target, ref emaggedEvent);
|
RaiseLocalEvent(target, ref emaggedEvent);
|
||||||
|
|
||||||
if (!emaggedEvent.Repeatable)
|
if (emaggedEvent.Handled && !emaggedEvent.Repeatable)
|
||||||
EnsureComp<EmaggedComponent>(target);
|
EnsureComp<EmaggedComponent>(target);
|
||||||
return emaggedEvent.Handled;
|
return emaggedEvent.Handled;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user