Refactor body component to use slots instead of an army of dictionaries (#3749)
* Refactor body component to use slots instead of an army of dictionaries * Update vox * Replace static method call with extension * Add setpart method, replace dispose with shutdown * Fix tests, fix not listening to slot events when setting a part
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#nullable enable
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.GameObjects.Components.Body.Part;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.GameObjects.Components.Body;
|
||||
using Content.Shared.GameObjects.Components.Body.Part;
|
||||
@@ -8,6 +7,7 @@ using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using static Content.Server.GameObjects.Components.Body.Part.BodyPartComponent;
|
||||
|
||||
namespace Content.Server.Commands
|
||||
{
|
||||
@@ -100,7 +100,7 @@ namespace Content.Server.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
body.TryAddPart($"{nameof(BodyPartComponent.AttachBodyPartVerb)}-{partEntity.Uid}", part, true);
|
||||
body.SetPart($"{nameof(AttachBodyPartVerb)}-{partEntity.Uid}", part);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user