Fix mechanism events not being called properly, add test (#2279)
* Add mechanism events when added/removed to/from body/parts * Change old usages * Add TODO * Remove BodyExtensions and IHasBody * Remove unnecessary extensions and fix wrong event call in mechanism behavior component * Complete test and fix event calls
This commit is contained in:
@@ -47,7 +47,7 @@ namespace Content.Server.GameObjects.Components.Body
|
||||
PerformerCache = null;
|
||||
BodyCache = null;
|
||||
|
||||
if (eventArgs.Target.TryGetBody(out var body))
|
||||
if (eventArgs.Target.TryGetComponent(out IBody? body))
|
||||
{
|
||||
SendBodyPartListToUser(eventArgs, body);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user