Skip to content

Commit

Permalink
Bugfix: Wielding now uses identity system. (#33134)
Browse files Browse the repository at this point in the history
Make wielding system use identity
  • Loading branch information
Plykiya authored and sleepyyapril committed Dec 19, 2024
1 parent dda66b6 commit 846f51a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Content.Shared/Wieldable/WieldableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction.Events;
using Content.Shared.Inventory.VirtualItem;
using Content.Shared.Item;
Expand Down Expand Up @@ -125,7 +126,7 @@ private void OnExamineRequires(Entity<GunRequiresWieldComponent> entity, ref Exa

private void OnExamine(EntityUid uid, GunWieldBonusComponent component, ref ExaminedEvent args)
{
if (HasComp<GunRequiresWieldComponent>(uid))
if (HasComp<GunRequiresWieldComponent>(uid))
return;

if (component.WieldBonusExamineMessage != null)
Expand Down Expand Up @@ -250,7 +251,7 @@ public bool TryWield(EntityUid used, WieldableComponent component, EntityUid use
return false;

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

var targEv = new ItemWieldedEvent();
Expand Down Expand Up @@ -295,7 +296,7 @@ private void OnItemUnwielded(EntityUid uid, WieldableComponent component, ItemUn
_audioSystem.PlayPredicted(component.UnwieldSound, uid, args.User);

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

Expand Down

0 comments on commit 846f51a

Please sign in to comment.