PopupSystem public methods rejig (#12830)
This commit is contained in:
@@ -85,7 +85,7 @@ namespace Content.Server.Wieldable
|
||||
if (!EntityManager.TryGetComponent<HandsComponent>(user, out var hands))
|
||||
{
|
||||
if(!quiet)
|
||||
_popupSystem.PopupEntity(Loc.GetString("wieldable-component-no-hands"), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("wieldable-component-no-hands"), user, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Content.Server.Wieldable
|
||||
if (!_handsSystem.IsHolding(user, uid, out _, hands))
|
||||
{
|
||||
if (!quiet)
|
||||
_popupSystem.PopupEntity(Loc.GetString("wieldable-component-not-in-hands", ("item", uid)), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("wieldable-component-not-in-hands", ("item", uid)), user, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Content.Server.Wieldable
|
||||
{
|
||||
var message = Loc.GetString("wieldable-component-not-enough-free-hands",
|
||||
("number", component.FreeHandsRequired), ("item", uid));
|
||||
_popupSystem.PopupEntity(message, user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(message, user, user);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -187,9 +187,9 @@ namespace Content.Server.Wieldable
|
||||
}
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("wieldable-component-successful-wield",
|
||||
("item", uid)), args.User.Value, Filter.Entities(args.User.Value));
|
||||
("item", uid)), args.User.Value, args.User.Value);
|
||||
_popupSystem.PopupEntity(Loc.GetString("wieldable-component-successful-wield-other",
|
||||
("user", args.User.Value),("item", uid)), args.User.Value, Filter.PvsExcept(args.User.Value));
|
||||
("user", args.User.Value),("item", uid)), args.User.Value, Filter.PvsExcept(args.User.Value), true);
|
||||
}
|
||||
|
||||
private void OnItemUnwielded(EntityUid uid, WieldableComponent component, ItemUnwieldedEvent args)
|
||||
@@ -212,9 +212,9 @@ namespace Content.Server.Wieldable
|
||||
_audioSystem.PlayPvs(component.UnwieldSound, uid);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("wieldable-component-failed-wield",
|
||||
("item", uid)), args.User.Value, Filter.Entities(args.User.Value));
|
||||
("item", uid)), args.User.Value, args.User.Value);
|
||||
_popupSystem.PopupEntity(Loc.GetString("wieldable-component-failed-wield-other",
|
||||
("user", args.User.Value), ("item", uid)), args.User.Value, Filter.PvsExcept(args.User.Value));
|
||||
("user", args.User.Value), ("item", uid)), args.User.Value, Filter.PvsExcept(args.User.Value), true);
|
||||
}
|
||||
|
||||
_virtualItemSystem.DeleteInHandsMatching(args.User.Value, uid);
|
||||
|
||||
Reference in New Issue
Block a user