APC & SMES appearances. (#78)

* CEV-Eris SMES sprite as RSI.

Has been modified so that the light overlay states use alpha blending.

* Add tiny glow to SMES display sprite.

* Appearances work v2

* More WiP

* RoundToLevels works correctly on even level counts now.

* SMES -> Smes because MS guidelines.

* CEV-Eris APC sprite.

* APC visuals.

* Reduce SMES scale again to normal levels.

* Update submodule
This commit is contained in:
Pieter-Jan Briers
2018-07-17 11:39:55 +02:00
committed by GitHub
parent 7629d447aa
commit ad5c82fec9
69 changed files with 1253 additions and 29 deletions

View File

@@ -0,0 +1,60 @@
using Content.Shared.Utility;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Content.Tests.Shared.Utility
{
[Parallelizable]
[TestFixture]
[TestOf(typeof(ContentHelpers))]
public class ContentHelpers_Test
{
public static readonly IEnumerable<(double val, double max, int levels, int expected)> TestData = new(double, double, int, int)[]
{
// Testing odd level counts. These are easy.
(-1, 10, 5, 0),
( 0, 10, 5, 0),
( 0.01f, 10, 5, 1),
( 1, 10, 5, 1),
( 2, 10, 5, 1),
( 2.5f, 10, 5, 1),
( 2.51f, 10, 5, 2),
( 3, 10, 5, 2),
( 4, 10, 5, 2),
( 5, 10, 5, 2),
( 6, 10, 5, 2),
( 7, 10, 5, 2),
( 7.49f, 10, 5, 2),
( 7.5f, 10, 5, 3),
( 8, 10, 5, 3),
( 9, 10, 5, 3),
(10, 10, 5, 4),
(11, 10, 5, 4),
// Even level counts though..
( 1, 10, 6, 1),
( 2, 10, 6, 1),
( 3, 10, 6, 2),
( 4, 10, 6, 2),
( 5, 10, 6, 2),
( 6, 10, 6, 3),
( 7, 10, 6, 3),
( 8, 10, 6, 4),
( 9, 10, 6, 4),
(10, 10, 6, 5),
};
[Parallelizable]
[Test]
public void Test([ValueSource(nameof(TestData))] (double val, double max, int levels, int expected) data)
{
(double val, double max, int levels, int expected) = data;
Assert.That(ContentHelpers.RoundToLevels(val, max, levels), Is.EqualTo(expected));
}
}
}