mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-06-09 10:06:43 +02:00
d42adbf05d
* Pass 1. * i'm FREE * Prevent hangups. * okay fine here's an attribute for settings, will polish later and prolly remove the overridable thing. * sigh. * fix singular trigger bug so LatheTest doesn't flake. * Remove SystemAttribute usage. * Poke * I used the shotgun. You know why? Cause the shot gun doesn’t miss, and unlike the shitty hybrid taser it stops a criminal in their tracks in two hits. Bang, bang, and they’re fucking done. I use four shots just to make damn sure. Because, once again, I’m not there to coddle a buncha criminal scum sucking f------, I’m there to 1) Survive the fucking round. 2) Guard the armory. So you can absolutely get fucked. If I get unbanned, which I won’t, you can guarantee I will continue to use the shotgun to apprehend criminals. Because it’s quick, clean and effective as fuck. Why in the seven hells would I fuck around with the disabler shots, which take half a clip just to bring someone down, or with the tazer bolts which are slow as balls, impossible to aim and do about next to jack shit, fuck all. The shotgun is the superior law enforcement weapon. Because it stops crime. And it stops crime by reducing the number of criminals roaming the fucking halls. * Change the faulty store test into two tests, one of which is ignored for failing.
55 lines
1.6 KiB
C#
55 lines
1.6 KiB
C#
using System.Linq;
|
|
using Content.IntegrationTests.Fixtures;
|
|
using Content.Server.GameTicking;
|
|
using Content.Shared.CCVar;
|
|
using Robust.Shared.Configuration;
|
|
using Robust.Shared.GameObjects;
|
|
|
|
namespace Content.IntegrationTests.Tests.GameRules;
|
|
|
|
[TestFixture]
|
|
public sealed class StartEndGameRulesTest : GameTest
|
|
{
|
|
public override PoolSettings PoolSettings => new PoolSettings
|
|
{
|
|
Dirty = true,
|
|
DummyTicker = false
|
|
};
|
|
|
|
/// <summary>
|
|
/// Tests that all game rules can be added/started/ended at the same time without exceptions.
|
|
/// </summary>
|
|
[Test]
|
|
public async Task TestAllConcurrent()
|
|
{
|
|
var pair = Pair;
|
|
var server = pair.Server;
|
|
await server.WaitIdleAsync();
|
|
var gameTicker = server.ResolveDependency<IEntitySystemManager>().GetEntitySystem<GameTicker>();
|
|
var cfg = server.ResolveDependency<IConfigurationManager>();
|
|
Assert.That(cfg.GetCVar(CCVars.GridFill), Is.False);
|
|
|
|
await server.WaitAssertion(() =>
|
|
{
|
|
var rules = gameTicker.GetAllGameRulePrototypes().ToList();
|
|
rules.Sort((x, y) => string.Compare(x.ID, y.ID, StringComparison.Ordinal));
|
|
|
|
// Start all rules
|
|
foreach (var rule in rules)
|
|
{
|
|
gameTicker.StartGameRule(rule.ID);
|
|
}
|
|
});
|
|
|
|
// Wait three ticks for any random update loops that might happen
|
|
await server.WaitRunTicks(3);
|
|
|
|
await server.WaitAssertion(() =>
|
|
{
|
|
// End all rules
|
|
gameTicker.ClearGameRules();
|
|
Assert.That(!gameTicker.GetAddedGameRules().Any());
|
|
});
|
|
}
|
|
}
|