Make starting gear automatically find hands for inhand items (#20861)

This commit is contained in:
DrSmugleaf
2023-10-14 10:28:52 -07:00
committed by GitHub
parent 9e1ecdea76
commit ed15b93926
48 changed files with 105 additions and 107 deletions

View File

@@ -121,10 +121,10 @@ namespace Content.Server.Administration.Commands
{
var handsSystem = entityManager.System<HandsSystem>();
var coords = entityManager.GetComponent<TransformComponent>(target).Coordinates;
foreach (var (hand, prototype) in startingGear.Inhand)
foreach (var prototype in startingGear.Inhand)
{
var inhandEntity = entityManager.SpawnEntity(prototype, coords);
handsSystem.TryPickup(target, inhandEntity, hand, checkActionBlocker: false, handsComp: handsComponent);
handsSystem.TryPickup(target, inhandEntity, checkActionBlocker: false, handsComp: handsComponent);
}
}