PopupSystem public methods rejig (#12830)

This commit is contained in:
Leon Friedrich
2022-12-19 10:41:47 +13:00
committed by GitHub
parent e459452333
commit 881a2b2ece
164 changed files with 721 additions and 631 deletions

View File

@@ -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);