Try fix organ networking (#23034)
This commit is contained in:
@@ -9,6 +9,7 @@ using Content.Shared.Inventory;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Shared.Body.Systems;
|
||||
|
||||
@@ -58,10 +59,6 @@ public partial class SharedBodySystem
|
||||
|
||||
private void OnBodyRemoved(EntityUid uid, BodyComponent component, EntRemovedFromContainerMessage args)
|
||||
{
|
||||
// TODO: lifestage shenanigans
|
||||
if (TerminatingOrDeleted(uid))
|
||||
return;
|
||||
|
||||
// Root body part?
|
||||
var slotId = args.Container.ID;
|
||||
|
||||
@@ -69,6 +66,8 @@ public partial class SharedBodySystem
|
||||
return;
|
||||
|
||||
var entity = args.Entity;
|
||||
DebugTools.Assert(!TryComp(entity, out BodyPartComponent? b) || b.Body == uid);
|
||||
DebugTools.Assert(!TryComp(entity, out OrganComponent? o) || o.Body == uid);
|
||||
|
||||
if (TryComp(entity, out BodyPartComponent? childPart))
|
||||
{
|
||||
@@ -77,9 +76,7 @@ public partial class SharedBodySystem
|
||||
}
|
||||
|
||||
if (TryComp(entity, out OrganComponent? organ))
|
||||
{
|
||||
RemoveOrgan(entity, uid, organ);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBodyInit(EntityUid bodyId, BodyComponent body, ComponentInit args)
|
||||
|
||||
Reference in New Issue
Block a user