Bugfix: Wielding now uses identity system. (#33134)
Make wielding system use identity
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Shared.Examine;
|
||||
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;
|
||||
@@ -125,7 +126,7 @@ public sealed class WieldableSystem : EntitySystem
|
||||
|
||||
private void OnExamine(EntityUid uid, GunWieldBonusComponent component, ref ExaminedEvent args)
|
||||
{
|
||||
if (HasComp<GunRequiresWieldComponent>(uid))
|
||||
if (HasComp<GunRequiresWieldComponent>(uid))
|
||||
return;
|
||||
|
||||
if (component.WieldBonusExamineMessage != null)
|
||||
@@ -253,7 +254,7 @@ public sealed class WieldableSystem : EntitySystem
|
||||
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();
|
||||
@@ -298,7 +299,7 @@ public sealed class WieldableSystem : EntitySystem
|
||||
_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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user