replace apc panel with wires panel (#14832)

This commit is contained in:
Slava0135
2023-04-20 09:42:22 +03:00
committed by GitHub
parent 32a3ee945c
commit adb12676c6
16 changed files with 47 additions and 257 deletions

View File

@@ -1,41 +1,12 @@
using System.Threading.Tasks;
using Content.IntegrationTests.Tests.Interaction;
using Content.Server.Power.Components;
using Content.Shared.Wires;
using NUnit.Framework;
using Robust.Shared.GameObjects;
namespace Content.IntegrationTests.Tests.Construction.Interaction;
public sealed class PanelScrewing : InteractionTest
{
[Test]
public async Task ApcPanel()
{
await SpawnTarget("APCBasic");
var comp = Comp<ApcComponent>();
// Open & close panel
Assert.That(comp.IsApcOpen, Is.False);
await Interact(Screw);
Assert.That(comp.IsApcOpen, Is.True);
await Interact(Screw);
Assert.That(comp.IsApcOpen, Is.False);
// Interrupted DoAfters
await Interact(Screw, awaitDoAfters: false);
await CancelDoAfters();
Assert.That(comp.IsApcOpen, Is.False);
await Interact(Screw);
Assert.That(comp.IsApcOpen, Is.True);
await Interact(Screw, awaitDoAfters: false);
await CancelDoAfters();
Assert.That(comp.IsApcOpen, Is.True);
await Interact(Screw);
Assert.That(comp.IsApcOpen, Is.False);
}
// Test wires panel on both airlocks & tcomms servers. These both use the same component, but comms may have
// conflicting interactions due to encryption key removal interactions.
[Test]