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:
@@ -3,10 +3,8 @@ using Content.Server.GameObjects.Components.Body;
|
||||
using Content.Shared.GameObjects.Components.Body;
|
||||
using Content.Shared.GameObjects.Components.Body.Part;
|
||||
using Content.Shared.GameObjects.Components.Rotation;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using NUnit.Framework;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -36,7 +34,7 @@ namespace Content.IntegrationTests.Tests.Body
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
var human = entityManager.SpawnEntity("HumanMob_Content", MapCoordinates.Nullspace);
|
||||
|
||||
Assert.That(human.TryGetBody(out var body));
|
||||
Assert.That(human.TryGetComponent(out IBody body));
|
||||
Assert.That(human.TryGetComponent(out appearance));
|
||||
|
||||
Assert.That(!appearance.TryGetData(RotationVisuals.RotationState, out RotationState _));
|
||||
|
||||
Reference in New Issue
Block a user