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,11 +3,9 @@ using Content.Server.GameObjects.Components.Buckle;
|
||||
using Content.Server.GameObjects.Components.GUI;
|
||||
using Content.Server.GameObjects.Components.Items.Storage;
|
||||
using Content.Server.GameObjects.Components.Strap;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.GameObjects.Components.Body;
|
||||
using Content.Shared.GameObjects.Components.Body.Part;
|
||||
using Content.Shared.GameObjects.Components.Buckle;
|
||||
using Content.Shared.GameObjects.Components.Damage;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.Utility;
|
||||
using NUnit.Framework;
|
||||
@@ -210,7 +208,7 @@ namespace Content.IntegrationTests.Tests
|
||||
Assert.True(human.TryGetComponent(out buckle));
|
||||
Assert.True(chair.TryGetComponent(out strap));
|
||||
Assert.True(human.TryGetComponent(out hands));
|
||||
Assert.True(human.TryGetBody(out body));
|
||||
Assert.True(human.TryGetComponent(out body));
|
||||
|
||||
// Buckle
|
||||
Assert.True(buckle.TryBuckle(human, chair));
|
||||
|
||||
Reference in New Issue
Block a user