Fix item/clothing visual & networking bugs (#10116)

This commit is contained in:
Leon Friedrich
2022-07-29 13:02:09 +12:00
committed by GitHub
parent e22679501c
commit d279f6172a
16 changed files with 278 additions and 239 deletions

View File

@@ -1,4 +1,4 @@
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Shared.Inventory.Events;
using Content.Shared.Verbs;
@@ -38,7 +38,10 @@ public abstract class SharedItemSystem : EntitySystem
public void SetHeldPrefix(EntityUid uid, string? heldPrefix, ItemComponent? component = null)
{
if (!Resolve(uid, ref component))
if (!Resolve(uid, ref component, false))
return;
if (component.HeldPrefix == heldPrefix)
return;
component.HeldPrefix = heldPrefix;
@@ -62,7 +65,7 @@ public abstract class SharedItemSystem : EntitySystem
return;
component.Size = state.Size;
component.HeldPrefix = state.HeldPrefix;
SetHeldPrefix(uid, state.HeldPrefix, component);
}
private void OnGetState(EntityUid uid, ItemComponent component, ref ComponentGetState args)