Actions System + UI (#2710)

Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
chairbender
2020-12-13 14:28:20 -08:00
committed by GitHub
parent fd0df9a00a
commit 7a3c281f60
150 changed files with 7283 additions and 854 deletions

View File

@@ -37,25 +37,10 @@ namespace Content.Tests.Shared.Alert
Assert.That(alertManager.TryGet(AlertType.HighPressure, out var highPressure));
Assert.That(highPressure.IconPath, Is.EqualTo("/Textures/Interface/Alerts/Pressure/highpressure.png"));
Assert.That(alertManager.TryGetWithEncoded(AlertType.LowPressure, out lowPressure, out var encodedLowPressure));
Assert.That(alertManager.TryGet(AlertType.LowPressure, out lowPressure));
Assert.That(lowPressure.IconPath, Is.EqualTo("/Textures/Interface/Alerts/Pressure/lowpressure.png"));
Assert.That(alertManager.TryGetWithEncoded(AlertType.HighPressure, out highPressure, out var encodedHighPressure));
Assert.That(alertManager.TryGet(AlertType.HighPressure, out highPressure));
Assert.That(highPressure.IconPath, Is.EqualTo("/Textures/Interface/Alerts/Pressure/highpressure.png"));
Assert.That(alertManager.TryEncode(lowPressure, out var encodedLowPressure2));
Assert.That(encodedLowPressure2, Is.EqualTo(encodedLowPressure));
Assert.That(alertManager.TryEncode(highPressure, out var encodedHighPressure2));
Assert.That(encodedHighPressure2, Is.EqualTo(encodedHighPressure));
Assert.That(encodedLowPressure, Is.Not.EqualTo(encodedHighPressure));
Assert.That(alertManager.TryDecode(encodedLowPressure, out var decodedLowPressure));
Assert.That(decodedLowPressure, Is.EqualTo(lowPressure));
Assert.That(alertManager.TryDecode(encodedHighPressure, out var decodedHighPressure));
Assert.That(decodedHighPressure, Is.EqualTo(highPressure));
Assert.False(alertManager.TryEncode(AlertType.Debug1, out _));
Assert.False(alertManager.TryGetWithEncoded(AlertType.Debug1, out _, out _));
}
}
}

View File

@@ -1,9 +1,13 @@
using System.IO;
using Content.Server.Utility;
using Content.Shared.Alert;
using Content.Shared.Interfaces;
using NUnit.Framework;
using Robust.Shared.Interfaces.Log;
using Robust.Shared.Interfaces.Reflection;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using Robust.UnitTesting;
using YamlDotNet.RepresentationModel;
@@ -22,7 +26,6 @@ namespace Content.Tests.Shared.Alert
minSeverity: 0
maxSeverity: 6";
[Test]
public void TestAlertKey()
{