Fix salvage gib attempt 2 (#9444)
This commit is contained in:
parent
4766638413
commit
f9589f82cc
|
|
@ -390,9 +390,16 @@ namespace Content.Shared.Body.Components
|
|||
|
||||
public virtual HashSet<EntityUid> Gib(bool gibParts = false)
|
||||
{
|
||||
var entMgr = IoCManager.Resolve<IEntityManager>();
|
||||
var metaQuery = entMgr.GetEntityQuery<MetaDataComponent>();
|
||||
var gibs = new HashSet<EntityUid>();
|
||||
foreach (var part in SlotParts.Keys)
|
||||
{
|
||||
if (!metaQuery.HasComponent(part.Owner))
|
||||
{
|
||||
SlotParts.Remove(part);
|
||||
continue;
|
||||
}
|
||||
gibs.Add(part.Owner);
|
||||
RemovePart(part);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue