Skip to content

Commit 912ac2c

Browse files
authored
Bugfix: Wielding now uses identity system. (space-wizards#33134)
Make wielding system use identity
1 parent d2a487d commit 912ac2c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Content.Shared/Wieldable/WieldableSystem.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Content.Shared.Hands;
44
using Content.Shared.Hands.Components;
55
using Content.Shared.Hands.EntitySystems;
6+
using Content.Shared.IdentityManagement;
67
using Content.Shared.Interaction.Events;
78
using Content.Shared.Inventory.VirtualItem;
89
using Content.Shared.Item;
@@ -125,7 +126,7 @@ private void OnExamineRequires(Entity<GunRequiresWieldComponent> entity, ref Exa
125126

126127
private void OnExamine(EntityUid uid, GunWieldBonusComponent component, ref ExaminedEvent args)
127128
{
128-
if (HasComp<GunRequiresWieldComponent>(uid))
129+
if (HasComp<GunRequiresWieldComponent>(uid))
129130
return;
130131

131132
if (component.WieldBonusExamineMessage != null)
@@ -253,7 +254,7 @@ public bool TryWield(EntityUid used, WieldableComponent component, EntityUid use
253254
return false;
254255

255256
var selfMessage = Loc.GetString("wieldable-component-successful-wield", ("item", used));
256-
var othersMessage = Loc.GetString("wieldable-component-successful-wield-other", ("user", user), ("item", used));
257+
var othersMessage = Loc.GetString("wieldable-component-successful-wield-other", ("user", Identity.Entity(user, EntityManager)), ("item", used));
257258
_popupSystem.PopupPredicted(selfMessage, othersMessage, user, user);
258259

259260
var targEv = new ItemWieldedEvent();
@@ -298,7 +299,7 @@ private void OnItemUnwielded(EntityUid uid, WieldableComponent component, ItemUn
298299
_audioSystem.PlayPredicted(component.UnwieldSound, uid, args.User);
299300

300301
var selfMessage = Loc.GetString("wieldable-component-failed-wield", ("item", uid));
301-
var othersMessage = Loc.GetString("wieldable-component-failed-wield-other", ("user", args.User.Value), ("item", uid));
302+
var othersMessage = Loc.GetString("wieldable-component-failed-wield-other", ("user", Identity.Entity(args.User.Value, EntityManager)), ("item", uid));
302303
_popupSystem.PopupPredicted(selfMessage, othersMessage, args.User.Value, args.User.Value);
303304
}
304305

0 commit comments

Comments
 (0)