yaml linter fix & alert sprite specifier changes (#10015)
* Sprite specifier/serializer update * Immume * Fix tests * hooray, more bad test prototypes * add some comments
This commit is contained in:
@@ -16,11 +16,13 @@ namespace Content.Tests.Shared.Alert
|
||||
const string PROTOTYPES = @"
|
||||
- type: alert
|
||||
id: LowPressure
|
||||
icon: /Textures/Interface/Alerts/Pressure/lowpressure.png
|
||||
icons:
|
||||
- /Textures/Interface/Alerts/Pressure/lowpressure.png
|
||||
|
||||
- type: alert
|
||||
id: HighPressure
|
||||
icon: /Textures/Interface/Alerts/Pressure/highpressure.png
|
||||
icons:
|
||||
- /Textures/Interface/Alerts/Pressure/highpressure.png
|
||||
";
|
||||
|
||||
[Test]
|
||||
@@ -37,14 +39,14 @@ namespace Content.Tests.Shared.Alert
|
||||
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
|
||||
|
||||
Assert.That(EntitySystem.Get<AlertsSystem>().TryGet(AlertType.LowPressure, out var lowPressure));
|
||||
Assert.That(lowPressure.Icon, Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/lowpressure.png"))));
|
||||
Assert.That(lowPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/lowpressure.png"))));
|
||||
Assert.That(EntitySystem.Get<AlertsSystem>().TryGet(AlertType.HighPressure, out var highPressure));
|
||||
Assert.That(highPressure.Icon, Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/highpressure.png"))));
|
||||
Assert.That(highPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/highpressure.png"))));
|
||||
|
||||
Assert.That(EntitySystem.Get<AlertsSystem>().TryGet(AlertType.LowPressure, out lowPressure));
|
||||
Assert.That(lowPressure.Icon, Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/lowpressure.png"))));
|
||||
Assert.That(lowPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/lowpressure.png"))));
|
||||
Assert.That(EntitySystem.Get<AlertsSystem>().TryGet(AlertType.HighPressure, out highPressure));
|
||||
Assert.That(highPressure.Icon, Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/highpressure.png"))));
|
||||
Assert.That(highPressure.Icons[0], Is.EqualTo(new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Pressure/highpressure.png"))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,35 +26,44 @@ namespace Content.Tests.Shared.Alert
|
||||
|
||||
- type: alert
|
||||
id: LowPressure
|
||||
icons: []
|
||||
category: Pressure
|
||||
|
||||
- type: alert
|
||||
id: HighPressure
|
||||
icons: []
|
||||
category: Pressure
|
||||
|
||||
- type: alert
|
||||
id: Peckish
|
||||
icons: []
|
||||
category: Hunger
|
||||
|
||||
- type: alert
|
||||
id: Stun
|
||||
icons: []
|
||||
|
||||
- type: alert
|
||||
id: Handcuffed
|
||||
icons: []
|
||||
|
||||
- type: alert
|
||||
id: Hot
|
||||
icons: []
|
||||
category: Temperature
|
||||
|
||||
- type: alert
|
||||
id: Cold
|
||||
icons: []
|
||||
category: Temperature
|
||||
|
||||
- type: alert
|
||||
id: Weightless
|
||||
icons: []
|
||||
|
||||
- type: alert
|
||||
id: PilotingShuttle
|
||||
icons: []
|
||||
";
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Content.Shared.Alert;
|
||||
using NUnit.Framework;
|
||||
@@ -17,7 +17,14 @@ namespace Content.Tests.Shared.Alert
|
||||
- type: alert
|
||||
id: HumanHealth
|
||||
category: Health
|
||||
icon: /Textures/Interface/Alerts/Human/human.rsi/human.png
|
||||
icons:
|
||||
- /Textures/Interface/Alerts/Human/human.rsi/human0.png
|
||||
- /Textures/Interface/Alerts/Human/human.rsi/human1.png
|
||||
- /Textures/Interface/Alerts/Human/human.rsi/human2.png
|
||||
- /Textures/Interface/Alerts/Human/human.rsi/human3.png
|
||||
- /Textures/Interface/Alerts/Human/human.rsi/human4.png
|
||||
- /Textures/Interface/Alerts/Human/human.rsi/human5.png
|
||||
- /Textures/Interface/Alerts/Human/human.rsi/human6.png
|
||||
name: Health
|
||||
description: ""[color=green]Green[/color] good. [color=red]Red[/color] bad.""
|
||||
minSeverity: 0
|
||||
|
||||
Reference in New Issue
Block a user