Body code cleanup (#24946)
* Fix test * Kill float accumulators * Use entity proxy methods * DataField auto name generation where possible * Kill comp properties * Clean up server comps * Make events record structs * Clean up shared body code * Clean up server body code * Rename organ events to be same names as in med refactor
This commit is contained in:
@@ -103,11 +103,11 @@ namespace Content.Server.Body.Commands
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
|
||||
if (body.RootContainer.ContainedEntity != null)
|
||||
{
|
||||
bodySystem.AttachPartToRoot(bodyId,partUid.Value, body ,part);
|
||||
bodySystem.AttachPartToRoot(bodyId, partUid.Value, body, part);
|
||||
}
|
||||
else
|
||||
{
|
||||
var (rootPartId,rootPart) = bodySystem.GetRootPartOrNull(bodyId, body)!.Value;
|
||||
var (rootPartId, rootPart) = bodySystem.GetRootPartOrNull(bodyId, body)!.Value;
|
||||
if (!bodySystem.TryCreatePartSlotAndAttach(rootPartId, slotId, partUid.Value, part.PartType, rootPart, part))
|
||||
{
|
||||
shell.WriteError($"Could not create slot {slotId} on entity {_entManager.ToPrettyString(bodyId)}");
|
||||
|
||||
Reference in New Issue
Block a user