Convert AgentIDCard message to use a Fluent selector (#36263)
Convert AgentIDCard message to use a selector
This commit is contained in:
@@ -42,21 +42,9 @@ namespace Content.Server.Access.Systems
|
||||
access.Tags.UnionWith(targetAccess.Tags);
|
||||
var addedLength = access.Tags.Count - beforeLength;
|
||||
|
||||
if (addedLength == 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("agent-id-no-new", ("card", args.Target)), args.Target.Value, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
Dirty(uid, access);
|
||||
|
||||
if (addedLength == 1)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("agent-id-new-1", ("card", args.Target)), args.Target.Value, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("agent-id-new", ("number", addedLength), ("card", args.Target)), args.Target.Value, args.User);
|
||||
if (addedLength > 0)
|
||||
Dirty(uid, access);
|
||||
}
|
||||
|
||||
private void AfterUIOpen(EntityUid uid, AgentIDCardComponent component, AfterActivatableUIOpenEvent args)
|
||||
|
||||
Reference in New Issue
Block a user