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:
@@ -131,7 +131,7 @@ namespace Content.IntegrationTests.Tests.Body
|
||||
Assert.That(human.TryGetComponent(out IBody? body));
|
||||
Assert.NotNull(body);
|
||||
|
||||
var centerPart = body!.CenterPart();
|
||||
var centerPart = body!.CenterPart;
|
||||
Assert.NotNull(centerPart);
|
||||
|
||||
Assert.That(body.TryGetSlot(centerPart!, out var centerSlot));
|
||||
@@ -196,7 +196,7 @@ namespace Content.IntegrationTests.Tests.Body
|
||||
|
||||
behavior.ResetAll();
|
||||
|
||||
body.TryAddPart(centerSlot!, centerPart, true);
|
||||
body.SetPart(centerSlot!.Id, centerPart);
|
||||
|
||||
Assert.That(behavior.WasAddedToBody);
|
||||
Assert.False(behavior.WasAddedToPart);
|
||||
|
||||
Reference in New Issue
Block a user