почти важно (#135)

* Add data field for id card microwave behaviour (#28087)

* Move replacement chance from ReplacementAccentComponent to ReplacementAccentPrototype (#28049)

Move replacement chance to ReplacementAccentPrototype

* Resolves Bible summon message being sent to all users (#28104)

* Changed PopupEntity overload used to ensure message is only sent to user

* Updated uid for PopupEntity call

* Updating _popupSystem.PopupEntity call in AttemptSummon

* Random book story generator refactor (#28082)

* Randomized book overhaul

* Fix prototype names

* Improved setting paper content

* Praise Ratvar

* Fix activatable UI popup message spam (#28123)

Fixed activatable UI popup message spam

* Modify battery assert to avoid floating point errors (#28007)

* Update component query benchmarks (#27967)

* Add more component query benchmarks.

* Rename benchmark

* Use non-generic `TryComp()` for metadata & transform (#28133)

* sleeper agent appear later into the round and only once (#28160)

---------

Co-authored-by: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Co-authored-by: lzk <124214523+lzk228@users.noreply.github.com>
Co-authored-by: double_b <40827162+benjamin-burges@users.noreply.github.com>
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Co-authored-by: Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
This commit is contained in:
Jabak
2024-10-04 11:27:12 +03:00
committed by GitHub
parent 4c14eb3d3c
commit 381d904d4b
66 changed files with 652 additions and 418 deletions

View File

@@ -15,11 +15,8 @@ public static partial class PoolManager
| BindingFlags.Public
| BindingFlags.DeclaredOnly;
private static void DiscoverTestPrototypes(Assembly? assembly = null)
private static void DiscoverTestPrototypes(Assembly assembly)
{
assembly ??= typeof(PoolManager).Assembly;
_testPrototypes.Clear();
foreach (var type in assembly.GetTypes())
{
foreach (var field in type.GetFields(Flags))

View File

@@ -42,6 +42,8 @@ public static partial class PoolManager
private static bool _dead;
private static Exception? _poolFailureReason;
private static HashSet<Assembly> _contentAssemblies = default!;
public static async Task<(RobustIntegrationTest.ServerIntegrationInstance, PoolTestLogHandler)> GenerateServer(
PoolSettings poolSettings,
TextWriter testOut)
@@ -54,12 +56,7 @@ public static partial class PoolManager
LoadConfigAndUserData = false,
LoadContentResources = !poolSettings.NoLoadContent,
},
ContentAssemblies = new[]
{
typeof(Shared.Entry.EntryPoint).Assembly,
typeof(Server.Entry.EntryPoint).Assembly,
typeof(PoolManager).Assembly
}
ContentAssemblies = _contentAssemblies.ToArray()
};
var logHandler = new PoolTestLogHandler("SERVER");
@@ -140,7 +137,7 @@ public static partial class PoolManager
{
typeof(Shared.Entry.EntryPoint).Assembly,
typeof(Client.Entry.EntryPoint).Assembly,
typeof(PoolManager).Assembly
typeof(PoolManager).Assembly,
}
};
@@ -422,13 +419,26 @@ we are just going to end this here to save a lot of time. This is the exception
/// <summary>
/// Initialize the pool manager.
/// </summary>
/// <param name="assembly">Assembly to search for to discover extra test prototypes.</param>
public static void Startup(Assembly? assembly)
/// <param name="extraAssemblies">Assemblies to search for to discover extra prototypes and systems.</param>
public static void Startup(params Assembly[] extraAssemblies)
{
if (_initialized)
throw new InvalidOperationException("Already initialized");
_initialized = true;
DiscoverTestPrototypes(assembly);
_contentAssemblies =
[
typeof(Shared.Entry.EntryPoint).Assembly,
typeof(Server.Entry.EntryPoint).Assembly,
typeof(PoolManager).Assembly
];
_contentAssemblies.UnionWith(extraAssemblies);
_testPrototypes.Clear();
DiscoverTestPrototypes(typeof(PoolManager).Assembly);
foreach (var assembly in extraAssemblies)
{
DiscoverTestPrototypes(assembly);
}
}
}

View File

@@ -13,7 +13,7 @@ public sealed class PoolManagerTestEventHandler
[OneTimeSetUp]
public void Setup()
{
PoolManager.Startup(typeof(PoolManagerTestEventHandler).Assembly);
PoolManager.Startup();
// If the tests seem to be stuck, we try to end it semi-nicely
_ = Task.Delay(MaximumTotalTestingTimeLimit).ContinueWith(_ =>
{