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:
@@ -138,11 +138,9 @@ namespace Content.Server.Commands.Body
|
||||
}
|
||||
|
||||
var slot = part.GetHashCode().ToString();
|
||||
var response = body.TryAddPart(slot, part, true)
|
||||
? $"Added hand to entity {entity.Name}"
|
||||
: $"Error occurred trying to add a hand to entity {entity.Name}";
|
||||
body.SetPart(slot, part);
|
||||
|
||||
shell.WriteLine(response);
|
||||
shell.WriteLine($"Added hand to entity {entity.Name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user