Partial hand ECS (#5634)
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com> Co-authored-by: Paul <ritter.paul1@googlemail.com>
This commit is contained in:
@@ -162,7 +162,7 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
if (!EntityManager.TryGetComponent(args.User, out SharedHandsComponent? hands))
|
||||
if (!EntityManager.TryGetComponent(args.User, out SharedHandsComponent hands))
|
||||
return;
|
||||
|
||||
foreach (var slot in itemSlots.Slots.Values)
|
||||
@@ -370,7 +370,7 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
return false;
|
||||
|
||||
if (user != null && EntityManager.TryGetComponent(user.Value, out SharedHandsComponent? hands))
|
||||
hands.TryPutInActiveHandOrAny(item.Value);
|
||||
hands.PutInHand(item.Value);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -458,7 +458,7 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
|
||||
var verbSubject = slot.Name != string.Empty
|
||||
? Loc.GetString(slot.Name)
|
||||
: EntityManager.GetComponent<MetaDataComponent>(args.Using.Value).EntityName ?? string.Empty;
|
||||
: Name(args.Using.Value) ?? string.Empty;
|
||||
|
||||
Verb insertVerb = new();
|
||||
insertVerb.Act = () => Insert(uid, slot, args.Using.Value, args.User, excludeUserAudio: true);
|
||||
|
||||
Reference in New Issue
Block a user