Refactors stunnable to be ECS. (#4819)

Also cleans up StandingStatesystem.
This commit is contained in:
Vera Aguilera Puerto
2021-10-10 12:47:26 +02:00
committed by GitHub
parent 19a588a70a
commit 6eee256b11
34 changed files with 776 additions and 633 deletions

View File

@@ -1,8 +1,11 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Content.Server.Inventory;
using Content.Server.Inventory.Components;
using Content.Server.Items;
using Content.Server.Stunnable;
using Content.Server.Stunnable.Components;
using Content.Shared.Stunnable;
using NUnit.Framework;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
@@ -73,7 +76,7 @@ namespace Content.IntegrationTests.Tests
Assert.That(inventory.TryGetSlotItem(Slots.INNERCLOTHING, out ItemComponent uniform));
Assert.That(uniform.Owner.Prototype != null && uniform.Owner.Prototype.ID == "InventoryJumpsuitJanitorDummy");
stun.Stun(1f);
EntitySystem.Get<StunSystem>().Stun(human.Uid, TimeSpan.FromSeconds(1f), stun);
// Since the mob is stunned, they can't equip this.
Assert.That(inventory.SpawnItemInSlot(Slots.IDCARD, "InventoryIDCardDummy", true), Is.False);