1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-06-03 22:03:37 +02:00

code cleanup

This commit is contained in:
Ell 2022-10-27 10:22:25 +02:00
parent 8745a3237e
commit 791c66b098
15 changed files with 799 additions and 801 deletions

View file

@ -13,9 +13,6 @@ namespace MLEM.Data {
/// A dynamic enum uses <see cref="BigInteger"/> as its underlying type, allowing for an arbitrary number of enum values to be created, even when a <see cref="FlagsAttribute"/>-like structure is used that would only allow for up to 64 values in a regular enum.
/// All enum operations including <see cref="And{T}"/>, <see cref="Or{T}"/>, <see cref="Xor{T}"/> and <see cref="Neg{T}"/> are supported and can be implemented in derived classes using operator overloads.
/// To create a custom dynamic enum, simply create a class that extends <see cref="DynamicEnum"/>. New values can then be added using <see cref="Add{T}"/>, <see cref="AddValue{T}"/> or <see cref="AddFlag{T}"/>.
///
/// This class, and its entire concept, are extremely terrible. If you intend on using this, there's probably at least one better solution available.
/// Though if, for some weird reason, you need a way to have more than 64 distinct flags, this is a pretty good solution.
/// </summary>
/// <remarks>
/// To include enum-like operator overloads in a dynamic enum named MyEnum, the following code can be used:

View file

@ -11,6 +11,7 @@ using MLEM.Ui.Style;
#if NETSTANDARD2_0_OR_GREATER || NET6_0_OR_GREATER
using System.Net.Http;
#else
using System.Net;
#endif

View file

@ -2,7 +2,8 @@
using MLEM.Cameras;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class CameraTests {
private TestGame game;
@ -27,4 +28,3 @@ namespace Tests {
}
}
}

View file

@ -1,7 +1,8 @@
using MLEM.Extensions;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class CollectionTests {
[Test]
@ -28,4 +29,3 @@ namespace Tests {
}
}
}

View file

@ -9,7 +9,8 @@ using Newtonsoft.Json;
using NUnit.Framework;
using Vector2 = Microsoft.Xna.Framework.Vector2;
namespace Tests {
namespace Tests;
public class DataTests {
private readonly TestObject testObject = new() {
@ -83,4 +84,3 @@ namespace Tests {
}
}
}

View file

@ -5,7 +5,8 @@ using MLEM.Data;
using MLEM.Textures;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class TestDataTextureAtlas {
[Test]
@ -57,4 +58,3 @@ namespace Tests {
}
}
}

View file

@ -2,7 +2,8 @@ using Microsoft.Xna.Framework;
using MLEM.Misc;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class DirectionTests {
[Test]
@ -61,4 +62,3 @@ namespace Tests {
}
}
}

View file

@ -8,7 +8,8 @@ using MLEM.Formatting.Codes;
using MLEM.Textures;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class FontTests {
private TestGame game;
@ -154,4 +155,3 @@ namespace Tests {
}
}
}

View file

@ -2,7 +2,8 @@
using MLEM.Input;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class KeybindTests {
[Test]
@ -36,4 +37,3 @@ namespace Tests {
}
}
}

View file

@ -3,7 +3,8 @@ using MLEM.Extensions;
using MLEM.Misc;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class NumberTests {
[Test]
@ -68,4 +69,3 @@ namespace Tests {
}
}
}

View file

@ -4,7 +4,8 @@ using Microsoft.Xna.Framework;
using MLEM.Pathfinding;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class PathfindingTests {
[Test]
@ -124,4 +125,3 @@ namespace Tests {
}
}
}

View file

@ -3,7 +3,8 @@ using MLEM.Data.Content;
using MLEM.Font;
using MLEM.Startup;
namespace Tests {
namespace Tests;
public class TestGame : MlemGame {
public RawContentManager RawContent { get; private set; }
@ -23,4 +24,3 @@ namespace Tests {
}
}
}

View file

@ -4,7 +4,8 @@ using MLEM.Data;
using MLEM.Textures;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class TexturePackerTests {
private Texture2D testTexture;
@ -106,4 +107,3 @@ namespace Tests {
private static void StubResult(TextureRegion region) {}
}
}

View file

@ -8,7 +8,8 @@ using MLEM.Ui.Elements;
using MLEM.Ui.Style;
using NUnit.Framework;
namespace Tests {
namespace Tests;
public class UiTests {
private TestGame game;
@ -147,4 +148,3 @@ namespace Tests {
}
}
}