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:
@@ -42,7 +42,8 @@ namespace Content.Server.Commands.Body
|
||||
return;
|
||||
}
|
||||
|
||||
var (_, hand) = body.Parts.FirstOrDefault(x => x.Value.PartType == BodyPartType.Hand);
|
||||
var hand = body.GetPartsOfType(BodyPartType.Hand).FirstOrDefault();
|
||||
|
||||
if (hand == null)
|
||||
{
|
||||
shell.WriteLine("You have no hands.");
|
||||
|
||||
Reference in New Issue
Block a user