Separate part management from the rest of body manager component (#2017)
* Separate part management from the rest of body manager component * Component reference * Move more methods over * Fix docs and move over BodyPreset * Fix up body preset * Create initialize method and remove constructor for BodyPreset * Do the same for BodyTemplate and add Initialized properties * Fix BodyTemplate HashCode test * BodyTemplate test PLS
This commit is contained in:
@@ -91,7 +91,7 @@ namespace Content.Server.GameObjects.Components.Body
|
||||
{
|
||||
if (!bodyManager.TryGetSlotType(slot, out var typeResult) ||
|
||||
typeResult != ContainedBodyPart?.PartType ||
|
||||
!bodyManager.TryGetBodyPartConnections(slot, out var parts))
|
||||
!bodyManager.TryGetPartConnections(slot, out var parts))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ namespace Content.Server.GameObjects.Components.Body
|
||||
var target = (string) targetObject!;
|
||||
string message;
|
||||
|
||||
if (_bodyManagerComponentCache.InstallDroppedBodyPart(this, target))
|
||||
if (_bodyManagerComponentCache.TryAddPart(target, this))
|
||||
{
|
||||
message = Loc.GetString("You attach {0:theName}.", ContainedBodyPart);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user