diff --git a/.editorconfig b/.editorconfig
index f8f256f877c..bca85dd95a0 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -362,7 +362,7 @@ resharper_csharp_qualified_using_at_nested_scope = false
resharper_csharp_prefer_qualified_reference = false
resharper_csharp_allow_alias = false
-[*.{csproj,xml,yml,yaml,dll.config,msbuildproj,targets,props}]
+[*.{csproj,xml,yml,yaml,dll.config,msbuildproj,targets,props,slnx}]
indent_size = 2
[nuget.config]
diff --git a/.github/workflows/build-docfx.yml b/.github/workflows/build-docfx.yml
index 1f010b72910..dee31e9b312 100644
--- a/.github/workflows/build-docfx.yml
+++ b/.github/workflows/build-docfx.yml
@@ -21,7 +21,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4.1.0
with:
- dotnet-version: 9.0.x
+ dotnet-version: 10.0.x
- name: Install dependencies
run: dotnet restore
diff --git a/.github/workflows/build-map-renderer.yml b/.github/workflows/build-map-renderer.yml
index e6e6466d35d..61556747e41 100644
--- a/.github/workflows/build-map-renderer.yml
+++ b/.github/workflows/build-map-renderer.yml
@@ -36,7 +36,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4.1.0
with:
- dotnet-version: 9.0.x
+ dotnet-version: 10.0.x
- name: Install dependencies
run: dotnet restore
diff --git a/.github/workflows/build-test-debug.yml b/.github/workflows/build-test-debug.yml
index 6f5832d8b28..a103b08c1f6 100644
--- a/.github/workflows/build-test-debug.yml
+++ b/.github/workflows/build-test-debug.yml
@@ -36,7 +36,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4.1.0
with:
- dotnet-version: 9.0.x
+ dotnet-version: 10.0.x
- name: Install dependencies
run: dotnet restore
diff --git a/.github/workflows/publish-testing.yml b/.github/workflows/publish-testing.yml
index f56f9e75396..0b29a01428b 100644
--- a/.github/workflows/publish-testing.yml
+++ b/.github/workflows/publish-testing.yml
@@ -20,7 +20,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
- dotnet-version: 9.0.x
+ dotnet-version: 10.0.x
- name: Get Engine Tag
run: |
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index d9ba93e60a1..506156eb959 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -46,7 +46,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4.1.0
with:
- dotnet-version: 9.0.x
+ dotnet-version: 10.0.x
- name: Get Engine Tag
run: |
diff --git a/.github/workflows/test-packaging.yml b/.github/workflows/test-packaging.yml
index ed137a19d06..18e0882d07e 100644
--- a/.github/workflows/test-packaging.yml
+++ b/.github/workflows/test-packaging.yml
@@ -51,7 +51,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4.1.0
with:
- dotnet-version: 9.0.x
+ dotnet-version: 10.0.x
- name: Install dependencies
run: dotnet restore
diff --git a/.github/workflows/yaml-linter.yml b/.github/workflows/yaml-linter.yml
index e5bbc6173fc..d65e46e7cb6 100644
--- a/.github/workflows/yaml-linter.yml
+++ b/.github/workflows/yaml-linter.yml
@@ -26,7 +26,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4.1.0
with:
- dotnet-version: 9.0.x
+ dotnet-version: 10.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
diff --git a/.gitignore b/.gitignore
index 610fbb77893..b1d777314f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+# MSbuild binlog files
+*.binlog
+
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
diff --git a/BuildChecker/git_helper.py b/BuildChecker/git_helper.py
index 96a7bdae2ab..71cd8c13fa5 100644
--- a/BuildChecker/git_helper.py
+++ b/BuildChecker/git_helper.py
@@ -9,7 +9,7 @@
from pathlib import Path
from typing import List
-SOLUTION_PATH = Path("..") / "SpaceStation14.sln"
+SOLUTION_PATH = Path("..") / "SpaceStation14.slnx"
# If this doesn't match the saved version we overwrite them all.
CURRENT_HOOKS_VERSION = "2"
QUIET = len(sys.argv) == 2 and sys.argv[1] == "--quiet"
diff --git a/Content.Benchmarks/Content.Benchmarks.csproj b/Content.Benchmarks/Content.Benchmarks.csproj
index c3b60a1c69d..8d4dfa31bd6 100644
--- a/Content.Benchmarks/Content.Benchmarks.csproj
+++ b/Content.Benchmarks/Content.Benchmarks.csproj
@@ -1,17 +1,20 @@
-
- $(TargetFramework)
..\bin\Content.Benchmarks\
- false
false
Exe
true
- 12
+ false
+ disable
+
+
+
+
+
@@ -19,10 +22,12 @@
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Content.Benchmarks/DeviceNetworkingBenchmark.cs b/Content.Benchmarks/DeviceNetworkingBenchmark.cs
index bb2a22312ea..a3213e44f2d 100644
--- a/Content.Benchmarks/DeviceNetworkingBenchmark.cs
+++ b/Content.Benchmarks/DeviceNetworkingBenchmark.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using Content.IntegrationTests;
using Content.IntegrationTests.Pair;
@@ -10,6 +8,9 @@
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
+using System.Threading.Tasks;
namespace Content.Benchmarks;
diff --git a/Content.Client/Administration/UI/BanList/BanListEui.cs b/Content.Client/Administration/UI/BanList/BanListEui.cs
index 2fca1dee523..00b27cd173f 100644
--- a/Content.Client/Administration/UI/BanList/BanListEui.cs
+++ b/Content.Client/Administration/UI/BanList/BanListEui.cs
@@ -1,4 +1,5 @@
-using System.Numerics;
+using System.Linq;
+using System.Numerics;
using Content.Client.Administration.UI.BanList.Bans;
using Content.Client.Administration.UI.BanList.RoleBans;
using Content.Client.Eui;
@@ -73,7 +74,7 @@ private static string FormatDate(DateTimeOffset date)
return date.ToString("MM/dd/yyyy h:mm tt");
}
- public static void SetData(IBanListLine line, SharedServerBan ban) where T : SharedServerBan
+ public static void SetData(IBanListLine line, SharedBan ban) where T : SharedBan
{
line.Reason.Text = ban.Reason;
line.BanTime.Text = FormatDate(ban.BanTime);
@@ -94,20 +95,20 @@ public static void SetData(IBanListLine line, SharedServerBan ban) where T
line.BanningAdmin.Text = ban.BanningAdminName;
}
- private void OnLineIdsClicked(IBanListLine line) where T : SharedServerBan
+ private void OnLineIdsClicked(IBanListLine line) where T : SharedBan
{
_popup?.Close();
_popup = null;
var ban = line.Ban;
var id = ban.Id == null ? string.Empty : Loc.GetString("ban-list-id", ("id", ban.Id.Value));
- var ip = ban.Address == null
+ var ip = ban.Addresses.Length == 0
? string.Empty
- : Loc.GetString("ban-list-ip", ("ip", ban.Address.Value.address));
- var hwid = ban.HWId == null ? string.Empty : Loc.GetString("ban-list-hwid", ("hwid", ban.HWId));
- var guid = ban.UserId == null
+ : Loc.GetString("ban-list-ip", ("ip", string.Join(',', ban.Addresses.Select(a => a.address))));
+ var hwid = ban.HWIds.Length == 0 ? string.Empty : Loc.GetString("ban-list-hwid", ("hwid", string.Join(',', ban.HWIds)));
+ var guid = ban.UserIds.Length == 0
? string.Empty
- : Loc.GetString("ban-list-guid", ("guid", ban.UserId.Value.ToString()));
+ : Loc.GetString("ban-list-guid", ("guid", string.Join(',', ban.UserIds)));
_popup = new BanListIdsPopup(id, ip, hwid, guid);
diff --git a/Content.Client/Administration/UI/BanList/Bans/BanListControl.xaml.cs b/Content.Client/Administration/UI/BanList/Bans/BanListControl.xaml.cs
index 431087568a1..a79fc4a137e 100644
--- a/Content.Client/Administration/UI/BanList/Bans/BanListControl.xaml.cs
+++ b/Content.Client/Administration/UI/BanList/Bans/BanListControl.xaml.cs
@@ -16,7 +16,7 @@ public BanListControl()
RobustXamlLoader.Load(this);
}
- public void SetBans(List bans)
+ public void SetBans(List bans)
{
for (var i = Bans.ChildCount - 1; i >= 1; i--)
{
diff --git a/Content.Client/Administration/UI/BanList/Bans/BanListLine.xaml.cs b/Content.Client/Administration/UI/BanList/Bans/BanListLine.xaml.cs
index 0c4e6e60d00..f1320ef7b99 100644
--- a/Content.Client/Administration/UI/BanList/Bans/BanListLine.xaml.cs
+++ b/Content.Client/Administration/UI/BanList/Bans/BanListLine.xaml.cs
@@ -7,13 +7,13 @@
namespace Content.Client.Administration.UI.BanList.Bans;
[GenerateTypedNameReferences]
-public sealed partial class BanListLine : BoxContainer, IBanListLine
+public sealed partial class BanListLine : BoxContainer, IBanListLine
{
- public SharedServerBan Ban { get; }
+ public SharedBan Ban { get; }
public event Action? IdsClicked;
- public BanListLine(SharedServerBan ban)
+ public BanListLine(SharedBan ban)
{
RobustXamlLoader.Load(this);
diff --git a/Content.Client/Administration/UI/BanList/IBanListLine.cs b/Content.Client/Administration/UI/BanList/IBanListLine.cs
index 097bae15df7..565e7072184 100644
--- a/Content.Client/Administration/UI/BanList/IBanListLine.cs
+++ b/Content.Client/Administration/UI/BanList/IBanListLine.cs
@@ -3,7 +3,7 @@
namespace Content.Client.Administration.UI.BanList;
-public interface IBanListLine where T : SharedServerBan
+public interface IBanListLine where T : SharedBan
{
T Ban { get; }
Label Reason { get; }
diff --git a/Content.Client/Administration/UI/BanList/RoleBans/RoleBanListControl.xaml.cs b/Content.Client/Administration/UI/BanList/RoleBans/RoleBanListControl.xaml.cs
index 1ea751deb7f..f217dec5e66 100644
--- a/Content.Client/Administration/UI/BanList/RoleBans/RoleBanListControl.xaml.cs
+++ b/Content.Client/Administration/UI/BanList/RoleBans/RoleBanListControl.xaml.cs
@@ -16,7 +16,7 @@ public RoleBanListControl()
RobustXamlLoader.Load(this);
}
- public void SetRoleBans(List bans)
+ public void SetRoleBans(List bans)
{
for (var i = RoleBans.ChildCount - 1; i >= 1; i--)
{
diff --git a/Content.Client/Administration/UI/BanList/RoleBans/RoleBanListLine.xaml.cs b/Content.Client/Administration/UI/BanList/RoleBans/RoleBanListLine.xaml.cs
index 4f77d662e1f..ca0d214e31e 100644
--- a/Content.Client/Administration/UI/BanList/RoleBans/RoleBanListLine.xaml.cs
+++ b/Content.Client/Administration/UI/BanList/RoleBans/RoleBanListLine.xaml.cs
@@ -7,13 +7,13 @@
namespace Content.Client.Administration.UI.BanList.RoleBans;
[GenerateTypedNameReferences]
-public sealed partial class RoleBanListLine : BoxContainer, IBanListLine
+public sealed partial class RoleBanListLine : BoxContainer, IBanListLine
{
- public SharedServerRoleBan Ban { get; }
+ public SharedBan Ban { get; }
public event Action? IdsClicked;
- public RoleBanListLine(SharedServerRoleBan ban)
+ public RoleBanListLine(SharedBan ban)
{
RobustXamlLoader.Load(this);
@@ -21,7 +21,7 @@ public RoleBanListLine(SharedServerRoleBan ban)
IdsHidden.OnPressed += IdsPressed;
BanListEui.SetData(this, ban);
- Role.Text = ban.Role;
+ Role.Text = string.Join(", ", ban.Roles ?? []);
}
private void IdsPressed(ButtonEventArgs buttonEventArgs)
diff --git a/Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs b/Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs
index ead1d8b00e5..ccbcb3e6c18 100644
--- a/Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs
+++ b/Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs
@@ -70,7 +70,7 @@ private void Refresh()
TimeLabel.Text = Note.CreatedAt.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
ServerLabel.Text = Note.ServerName ?? "Unknown";
- RoundLabel.Text = Note.Round == null ? "Unknown round" : "Round " + Note.Round;
+ RoundLabel.Text = Note.Rounds.Length == 0 ? "Unknown round" : "Round " + string.Join(',', Note.Rounds);
AdminLabel.Text = Note.CreatedByName;
PlaytimeLabel.Text = $"{Note.PlaytimeAtNote.TotalHours: 0.0}h";
@@ -139,7 +139,12 @@ private string FormatBanMessage()
private string FormatRoleBanMessage()
{
- var banMessage = new StringBuilder($"{Loc.GetString("admin-notes-banned-from")} {string.Join(", ", Note.BannedRoles ?? new []{"unknown"})} ");
+ var rolesText = string.Join(
+ ", ",
+ // Explicit cast here to avoid sandbox violation.
+ (IEnumerable?)Note.BannedRoles ?? [new BanRoleDef("what", "unknown")]);
+
+ var banMessage = new StringBuilder($"{Loc.GetString("admin-notes-banned-from")} {rolesText} ");
return FormatBanMessageCommon(banMessage);
}
diff --git a/Content.Client/Administration/UI/Notes/AdminNotesLinePopup.xaml.cs b/Content.Client/Administration/UI/Notes/AdminNotesLinePopup.xaml.cs
index 18a50031582..e82b85acb6a 100644
--- a/Content.Client/Administration/UI/Notes/AdminNotesLinePopup.xaml.cs
+++ b/Content.Client/Administration/UI/Notes/AdminNotesLinePopup.xaml.cs
@@ -32,9 +32,9 @@ public AdminNotesLinePopup(SharedAdminNote note, string playerName, bool showDel
IdLabel.Text = Loc.GetString("admin-notes-id", ("id", note.Id));
TypeLabel.Text = Loc.GetString("admin-notes-type", ("type", note.NoteType));
SeverityLabel.Text = Loc.GetString("admin-notes-severity", ("severity", note.NoteSeverity ?? NoteSeverity.None));
- RoundIdLabel.Text = note.Round == null
+ RoundIdLabel.Text = note.Rounds.Length == 0
? Loc.GetString("admin-notes-round-id-unknown")
- : Loc.GetString("admin-notes-round-id", ("id", note.Round));
+ : Loc.GetString("admin-notes-round-id", ("id", string.Join(',', note.Rounds)));
CreatedByLabel.Text = Loc.GetString("admin-notes-created-by", ("author", note.CreatedByName));
CreatedAtLabel.Text = Loc.GetString("admin-notes-created-at", ("date", note.CreatedAt.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss")));
EditedByLabel.Text = Loc.GetString("admin-notes-last-edited-by", ("author", note.EditedByName));
diff --git a/Content.Client/Cargo/UI/BountyEntry.xaml.cs b/Content.Client/Cargo/UI/BountyEntry.xaml.cs
index acc6aa36548..541e4884157 100644
--- a/Content.Client/Cargo/UI/BountyEntry.xaml.cs
+++ b/Content.Client/Cargo/UI/BountyEntry.xaml.cs
@@ -8,7 +8,6 @@
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
-using Serilog;
namespace Content.Client.Cargo.UI;
diff --git a/Content.Client/Content.Client.csproj b/Content.Client/Content.Client.csproj
index a5e4fe71b82..049bc95c4d0 100644
--- a/Content.Client/Content.Client.csproj
+++ b/Content.Client/Content.Client.csproj
@@ -1,26 +1,24 @@
-
- $(TargetFramework)
- 12
- false
false
..\bin\Content.Client\
Exe
RA0032;nullable
- enable
- Debug;Release;Tools;DebugOpt
- AnyCPU
+
+
+
+
+
+
+
+
+
-
-
-
-
diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs
index 8395c4ce539..1c9932d6cf9 100644
--- a/Content.Client/Entry/EntryPoint.cs
+++ b/Content.Client/Entry/EntryPoint.cs
@@ -82,18 +82,21 @@ public sealed class EntryPoint : GameClient
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
[Dependency] private readonly ClientsidePlaytimeTrackingManager _clientsidePlaytimeManager = default!;
- public override void Init()
+ public override void PreInit()
{
- ClientContentIoC.Register();
+ ClientContentIoC.Register(Dependencies);
foreach (var callback in TestingCallbacks)
{
var cast = (ClientModuleTestingCallbacks) callback;
cast.ClientBeforeIoC?.Invoke();
}
+ }
- IoCManager.BuildGraph();
- IoCManager.InjectDependencies(this);
+ public override void Init()
+ {
+ Dependencies.BuildGraph();
+ Dependencies.InjectDependencies(this);
_contentLoc.Initialize();
_componentFactory.DoAutoRegistrations();
diff --git a/Content.Client/IoC/ClientContentIoC.cs b/Content.Client/IoC/ClientContentIoC.cs
index c3c51093901..4a108122e2c 100644
--- a/Content.Client/IoC/ClientContentIoC.cs
+++ b/Content.Client/IoC/ClientContentIoC.cs
@@ -25,6 +25,7 @@
using Content.Client.Players.RateLimiting;
using Content.Shared.Administration.Managers;
using Content.Shared.Chat;
+using Content.Shared.IoC;
using Content.Shared.Players.PlayTimeTracking;
using Content.Shared.Players.RateLimiting;
@@ -32,10 +33,9 @@ namespace Content.Client.IoC
{
internal static class ClientContentIoC
{
- public static void Register()
+ public static void Register(IDependencyCollection collection)
{
- var collection = IoCManager.Instance!;
-
+ SharedContentIoC.Register(collection);
collection.Register();
collection.Register();
collection.Register();
diff --git a/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs b/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs
index c03014ee9fc..b3165ea02a9 100644
--- a/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs
+++ b/Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs
@@ -1,6 +1,5 @@
using System.Numerics;
using Content.Client.UserInterface.Controls;
-using Prometheus;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
diff --git a/Content.Client/Parallax/Managers/ParallaxManager.cs b/Content.Client/Parallax/Managers/ParallaxManager.cs
index bc7d7d60d68..5b35c6aa74e 100644
--- a/Content.Client/Parallax/Managers/ParallaxManager.cs
+++ b/Content.Client/Parallax/Managers/ParallaxManager.cs
@@ -98,10 +98,13 @@ public async Task LoadParallaxByName(string name)
}
else
{
- layers = await Task.WhenAll(
+ var layerTasks = new[]
+ {
LoadParallaxLayers(parallaxPrototype.Layers, loadedLayers, cancel),
LoadParallaxLayers(parallaxPrototype.LayersLQ, loadedLayers, cancel)
- );
+ };
+
+ layers = await Task.WhenAll(layerTasks);
}
cancel.ThrowIfCancellationRequested();
diff --git a/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs b/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
index e82aae21ba6..c2c3b181f5c 100644
--- a/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
+++ b/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
@@ -26,7 +26,8 @@ public sealed partial class JobRequirementsManager : ISharedPlaytimeManager
[Dependency] private readonly IPrototypeManager _prototypes = default!;
private readonly Dictionary _roles = new();
- private readonly List _roleBans = new();
+ private readonly List> _jobBans = new();
+ private readonly List> _antagBans = new();
private readonly List _jobWhitelists = new();
private ISawmill _sawmill = default!;
@@ -53,16 +54,19 @@ private void ClientOnRunLevelChanged(object? sender, RunLevelChangedEventArgs e)
// Reset on disconnect, just in case.
_roles.Clear();
_jobWhitelists.Clear();
- _roleBans.Clear();
+ _jobBans.Clear();
+ _antagBans.Clear();
}
}
private void RxRoleBans(MsgRoleBans message)
{
- _sawmill.Debug($"Received roleban info containing {message.Bans.Count} entries.");
+ _sawmill.Debug($"Received roleban info containing {message.JobBans.Count} job bans and {message.AntagBans.Count} antag bans.");
- _roleBans.Clear();
- _roleBans.AddRange(message.Bans);
+ _jobBans.Clear();
+ _jobBans.AddRange(message.JobBans);
+ _antagBans.Clear();
+ _antagBans.AddRange(message.AntagBans);
Updated?.Invoke();
}
@@ -95,7 +99,7 @@ public bool IsAllowed(JobPrototype job, HumanoidCharacterProfile? profile, [NotN
{
reason = null;
- if (_roleBans.Contains($"Job:{job.ID}"))
+ if (_jobBans.Contains(job.ID))
{
reason = FormattedMessage.FromUnformatted(Loc.GetString("role-ban"));
return false;
diff --git a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs
index 4d2ecffbb6e..355d3012ea4 100644
--- a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs
+++ b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs
@@ -368,7 +368,11 @@ protected override void Draw(DrawingHandleScreen handle)
{ labelName = decrypt.Revealed; }
else if (decrypt.Phase == IFFDecryptPhase.Decrypting)
{
- labelName = string.Concat(decrypt.Revealed, CipherStart, decrypt.Cipher, CipherEnd);
+ labelName = string.Concat(
+ decrypt.Revealed,
+ CipherStart.ToString(),
+ decrypt.Cipher,
+ CipherEnd.ToString());
cipherName = true;
unknownShuttle = true;
}
diff --git a/Content.Client/_Mono/Audio/AudioEchoSystem.cs b/Content.Client/_Mono/Audio/AudioEchoSystem.cs
index d03cb0a21ac..a9fc0e93aac 100644
--- a/Content.Client/_Mono/Audio/AudioEchoSystem.cs
+++ b/Content.Client/_Mono/Audio/AudioEchoSystem.cs
@@ -42,7 +42,13 @@ public sealed class AreaEchoSystem : EntitySystem
/// The directions that are raycasted to determine size for echo.
/// Used relative to the grid.
///
- private Angle[] _calculatedDirections = [Direction.North.ToAngle(), Direction.West.ToAngle(), Direction.South.ToAngle(), Direction.East.ToAngle()];
+ private Angle[] _calculatedDirections = new[]
+ {
+ Direction.North.ToAngle(),
+ Direction.West.ToAngle(),
+ Direction.South.ToAngle(),
+ Direction.East.ToAngle()
+ };
///
/// Values for the minimum arbitrary size at which a certain audio preset
@@ -135,7 +141,13 @@ public static Angle[] GetEffectiveDirections(bool highResolution)
return directions;
}
- return [Direction.North.ToAngle(), Direction.West.ToAngle(), Direction.South.ToAngle(), Direction.East.ToAngle()];
+ return new[]
+ {
+ Direction.North.ToAngle(),
+ Direction.West.ToAngle(),
+ Direction.South.ToAngle(),
+ Direction.East.ToAngle()
+ };
}
///
diff --git a/Content.IntegrationTests/Content.IntegrationTests.csproj b/Content.IntegrationTests/Content.IntegrationTests.csproj
index 2e922d25093..8c62806f74d 100644
--- a/Content.IntegrationTests/Content.IntegrationTests.csproj
+++ b/Content.IntegrationTests/Content.IntegrationTests.csproj
@@ -1,12 +1,10 @@
-
- $(TargetFramework)
..\bin\Content.IntegrationTests\
- false
false
- 12
+ disable
+
@@ -17,12 +15,12 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Content.IntegrationTests/Pair/TestPair.cs b/Content.IntegrationTests/Pair/TestPair.cs
index 43b188fd327..ce76e272126 100644
--- a/Content.IntegrationTests/Pair/TestPair.cs
+++ b/Content.IntegrationTests/Pair/TestPair.cs
@@ -1,17 +1,15 @@
-#nullable enable
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
+#nullable enable
using Content.Server.GameTicking;
using Content.Shared.Players;
-using Robust.Shared.Configuration;
using Robust.Shared.GameObjects;
-using Robust.Shared.IoC;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Random;
using Robust.Shared.Timing;
using Robust.UnitTesting;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
+using System.IO;
namespace Content.IntegrationTests.Pair;
diff --git a/Content.IntegrationTests/PoolManager.Prototypes.cs b/Content.IntegrationTests/PoolManager.Prototypes.cs
index eb7518ea155..68416446e16 100644
--- a/Content.IntegrationTests/PoolManager.Prototypes.cs
+++ b/Content.IntegrationTests/PoolManager.Prototypes.cs
@@ -1,7 +1,8 @@
#nullable enable
+using Robust.Shared.Utility;
+using Robust.UnitTesting.Pool;
using System.Collections.Generic;
using System.Reflection;
-using Robust.Shared.Utility;
namespace Content.IntegrationTests;
diff --git a/Content.IntegrationTests/PoolManager.cs b/Content.IntegrationTests/PoolManager.cs
index 64aac16751c..8a9f37a94be 100644
--- a/Content.IntegrationTests/PoolManager.cs
+++ b/Content.IntegrationTests/PoolManager.cs
@@ -1,17 +1,9 @@
#nullable enable
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading;
using Content.Client.IoC;
using Content.Client.Parallax.Managers;
using Content.IntegrationTests.Pair;
-using Content.IntegrationTests.Tests;
using Content.IntegrationTests.Tests.Destructible;
using Content.IntegrationTests.Tests.DeviceNetwork;
-using Content.IntegrationTests.Tests.Interaction.Click;
using Robust.Client;
using Robust.Server;
using Robust.Shared.Configuration;
@@ -19,9 +11,15 @@
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
-using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.UnitTesting;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading;
namespace Content.IntegrationTests;
diff --git a/Content.IntegrationTests/PoolTestLogHandler.cs b/Content.IntegrationTests/PoolTestLogHandler.cs
deleted file mode 100644
index 909bee9785a..00000000000
--- a/Content.IntegrationTests/PoolTestLogHandler.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using System.IO;
-using Robust.Shared.Log;
-using Robust.Shared.Timing;
-using Serilog.Events;
-
-namespace Content.IntegrationTests;
-
-#nullable enable
-
-///
-/// Log handler intended for pooled integration tests.
-///
-///
-///
-/// This class logs to two places: an NUnit
-/// (so it nicely gets attributed to a test in your IDE),
-/// and an in-memory ring buffer for diagnostic purposes.
-/// If test pooling breaks, the ring buffer can be used to see what the broken instance has gone through.
-///
-///
-/// The active test context can be swapped out so pooled instances can correctly have their logs attributed.
-///
-///
-public sealed class PoolTestLogHandler : ILogHandler
-{
- private readonly string? _prefix;
-
- private RStopwatch _stopwatch;
-
- public TextWriter? ActiveContext { get; private set; }
-
- public LogLevel? FailureLevel { get; set; }
-
- public PoolTestLogHandler(string? prefix)
- {
- _prefix = prefix != null ? $"{prefix}: " : "";
- }
-
- public bool ShuttingDown;
-
- public void Log(string sawmillName, LogEvent message)
- {
- var level = message.Level.ToRobust();
-
- if (ShuttingDown && (FailureLevel == null || level < FailureLevel))
- return;
-
- if (ActiveContext is not { } testContext)
- {
- // If this gets hit it means something is logging to this instance while it's "between" tests.
- // This is a bug in either the game or the testing system, and must always be investigated.
- throw new InvalidOperationException("Log to pool test log handler without active test context");
- }
-
- var name = LogMessage.LogLevelToName(level);
- var seconds = _stopwatch.Elapsed.TotalSeconds;
- var rendered = message.RenderMessage();
- var line = $"{_prefix}{seconds:F3}s [{name}] {sawmillName}: {rendered}";
-
- testContext.WriteLine(line);
-
- if (FailureLevel == null || level < FailureLevel)
- return;
-
- testContext.Flush();
- Assert.Fail($"{line} Exception: {message.Exception}");
- }
-
- public void ClearContext()
- {
- ActiveContext = null;
- }
-
- public void ActivateContext(TextWriter context)
- {
- _stopwatch.Restart();
- ActiveContext = context;
- }
-}
diff --git a/Content.IntegrationTests/TestPrototypesAttribute.cs b/Content.IntegrationTests/TestPrototypesAttribute.cs
deleted file mode 100644
index a6728d6728e..00000000000
--- a/Content.IntegrationTests/TestPrototypesAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using JetBrains.Annotations;
-
-namespace Content.IntegrationTests;
-
-///
-/// Attribute that indicates that a string contains yaml prototype data that should be loaded by integration tests.
-///
-[AttributeUsage(AttributeTargets.Field)]
-[MeansImplicitUse]
-public sealed class TestPrototypesAttribute : Attribute
-{
-}
diff --git a/Content.IntegrationTests/Tests/Access/AccessReaderTest.cs b/Content.IntegrationTests/Tests/Access/AccessReaderTest.cs
index b98f030b065..eb073d0c3a9 100644
--- a/Content.IntegrationTests/Tests/Access/AccessReaderTest.cs
+++ b/Content.IntegrationTests/Tests/Access/AccessReaderTest.cs
@@ -1,10 +1,11 @@
-using System.Collections.Generic;
using Content.Shared.Access;
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
namespace Content.IntegrationTests.Tests.Access
{
diff --git a/Content.IntegrationTests/Tests/Atmos/AlarmThresholdTest.cs b/Content.IntegrationTests/Tests/Atmos/AlarmThresholdTest.cs
index b74c35ba111..a8f7e934102 100644
--- a/Content.IntegrationTests/Tests/Atmos/AlarmThresholdTest.cs
+++ b/Content.IntegrationTests/Tests/Atmos/AlarmThresholdTest.cs
@@ -1,5 +1,6 @@
using Content.Shared.Atmos.Monitor;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Atmos
{
diff --git a/Content.IntegrationTests/Tests/Body/LegTest.cs b/Content.IntegrationTests/Tests/Body/LegTest.cs
index 7b49bbe84a3..1e8eaee8b4b 100644
--- a/Content.IntegrationTests/Tests/Body/LegTest.cs
+++ b/Content.IntegrationTests/Tests/Body/LegTest.cs
@@ -1,10 +1,11 @@
-using System.Numerics;
using Content.Server.Body.Systems;
using Content.Shared.Body.Components;
using Content.Shared.Body.Part;
using Content.Shared.Rotation;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
+using Robust.UnitTesting.Pool;
+using System.Numerics;
namespace Content.IntegrationTests.Tests.Body
{
diff --git a/Content.IntegrationTests/Tests/Body/LungTest.cs b/Content.IntegrationTests/Tests/Body/LungTest.cs
index 1f10905708f..3d02d8e1515 100644
--- a/Content.IntegrationTests/Tests/Body/LungTest.cs
+++ b/Content.IntegrationTests/Tests/Body/LungTest.cs
@@ -3,16 +3,14 @@
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Shared.Body.Components;
-using Robust.Server.GameObjects;
using Robust.Shared;
using Robust.Shared.Configuration;
+using Robust.Shared.EntitySerialization.Systems;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
-using Robust.Shared.Map.Components;
-using System.Linq;
-using System.Numerics;
-using Robust.Shared.EntitySerialization.Systems;
using Robust.Shared.Utility;
+using Robust.UnitTesting.Pool;
+using System.Numerics;
namespace Content.IntegrationTests.Tests.Body
{
@@ -50,7 +48,6 @@ public sealed class LungTest
Asphyxiation: -1.5
";
- [Test, Ignore("Help me pls ;-;")]
public async Task AirConsistencyTest()
{
// --- Setup
diff --git a/Content.IntegrationTests/Tests/Body/SaveLoadReparentTest.cs b/Content.IntegrationTests/Tests/Body/SaveLoadReparentTest.cs
index 67163d07961..ccfa60895fd 100644
--- a/Content.IntegrationTests/Tests/Body/SaveLoadReparentTest.cs
+++ b/Content.IntegrationTests/Tests/Body/SaveLoadReparentTest.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-using System.Linq;
using Content.Shared.Body.Components;
using Content.Shared.Body.Systems;
using Robust.Shared.Containers;
@@ -7,6 +5,9 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Utility;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Body;
diff --git a/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs b/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs
index 205ce67a120..502d221db82 100644
--- a/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs
+++ b/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs
@@ -1,14 +1,15 @@
-using System.Numerics;
using Content.Server.Body.Systems;
-using Content.Shared.Buckle;
using Content.Shared.ActionBlocker;
using Content.Shared.Body.Components;
using Content.Shared.Body.Part;
+using Content.Shared.Buckle;
using Content.Shared.Buckle.Components;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Standing;
using Robust.Shared.GameObjects;
+using Robust.UnitTesting.Pool;
+using System.Numerics;
namespace Content.IntegrationTests.Tests.Buckle
{
diff --git a/Content.IntegrationTests/Tests/CargoTest.cs b/Content.IntegrationTests/Tests/CargoTest.cs
index b6356e43470..11a692e0d3a 100644
--- a/Content.IntegrationTests/Tests/CargoTest.cs
+++ b/Content.IntegrationTests/Tests/CargoTest.cs
@@ -1,7 +1,3 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Numerics;
-using Content.Server.Cargo.Components;
using Content.Server.Cargo.Systems;
using Content.Server.Nutrition.Components;
using Content.Server.Nutrition.EntitySystems;
@@ -13,6 +9,10 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
namespace Content.IntegrationTests.Tests;
diff --git a/Content.IntegrationTests/Tests/Chemistry/SolutionRoundingTest.cs b/Content.IntegrationTests/Tests/Chemistry/SolutionRoundingTest.cs
index 89d33186a27..3302512c75b 100644
--- a/Content.IntegrationTests/Tests/Chemistry/SolutionRoundingTest.cs
+++ b/Content.IntegrationTests/Tests/Chemistry/SolutionRoundingTest.cs
@@ -4,6 +4,7 @@
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Chemistry;
diff --git a/Content.IntegrationTests/Tests/Chemistry/SolutionSystemTests.cs b/Content.IntegrationTests/Tests/Chemistry/SolutionSystemTests.cs
index 6b71dd08be0..8eda581b73e 100644
--- a/Content.IntegrationTests/Tests/Chemistry/SolutionSystemTests.cs
+++ b/Content.IntegrationTests/Tests/Chemistry/SolutionSystemTests.cs
@@ -3,6 +3,7 @@
using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Chemistry;
diff --git a/Content.IntegrationTests/Tests/Chemistry/TryAllReactionsTest.cs b/Content.IntegrationTests/Tests/Chemistry/TryAllReactionsTest.cs
index 6d860f0ac38..07dfd72d72e 100644
--- a/Content.IntegrationTests/Tests/Chemistry/TryAllReactionsTest.cs
+++ b/Content.IntegrationTests/Tests/Chemistry/TryAllReactionsTest.cs
@@ -1,11 +1,12 @@
-using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Components;
+using Content.Shared.Chemistry.EntitySystems;
+using Content.Shared.Chemistry.Reaction;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
+using Robust.UnitTesting.Pool;
using System.Linq;
-using Content.Shared.Chemistry.EntitySystems;
namespace Content.IntegrationTests.Tests.Chemistry
{
diff --git a/Content.IntegrationTests/Tests/Commands/ForceMapTest.cs b/Content.IntegrationTests/Tests/Commands/ForceMapTest.cs
index 3fa7e64f1a4..ea1e9818679 100644
--- a/Content.IntegrationTests/Tests/Commands/ForceMapTest.cs
+++ b/Content.IntegrationTests/Tests/Commands/ForceMapTest.cs
@@ -2,6 +2,7 @@
using Content.Shared.CCVar;
using Robust.Shared.Configuration;
using Robust.Shared.Console;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Commands;
diff --git a/Content.IntegrationTests/Tests/Commands/ObjectiveCommandsTest.cs b/Content.IntegrationTests/Tests/Commands/ObjectiveCommandsTest.cs
index a77761a7d17..95ac3dfef94 100644
--- a/Content.IntegrationTests/Tests/Commands/ObjectiveCommandsTest.cs
+++ b/Content.IntegrationTests/Tests/Commands/ObjectiveCommandsTest.cs
@@ -1,9 +1,10 @@
#nullable enable
-using System.Linq;
using Content.Server.Objectives;
using Content.Shared.Mind;
using Robust.Shared.GameObjects;
using Robust.Shared.Player;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Commands;
@@ -54,7 +55,7 @@ await server.WaitPost(() =>
});
Assert.That(mindEnt, Is.Not.Null);
- var mindComp = mindEnt.Value.Comp;
+ var mindComp = mindEnt!.Value.Comp;
Assert.That(mindComp.Objectives, Is.Empty, "Dummy player started with objectives.");
await pair.WaitCommand($"addobjective {playerSession.Name} {ObjectiveProtoId}");
diff --git a/Content.IntegrationTests/Tests/Commands/PardonCommand.cs b/Content.IntegrationTests/Tests/Commands/PardonCommand.cs
index 9e57cd4b0e6..5f77af1b104 100644
--- a/Content.IntegrationTests/Tests/Commands/PardonCommand.cs
+++ b/Content.IntegrationTests/Tests/Commands/PardonCommand.cs
@@ -32,9 +32,9 @@ public async Task PardonTest()
// No bans on record
Assert.Multiple(async () =>
{
- Assert.That(await sDatabase.GetServerBanAsync(null, clientId, null, null), Is.Null);
- Assert.That(await sDatabase.GetServerBanAsync(1), Is.Null);
- Assert.That(await sDatabase.GetServerBansAsync(null, clientId, null, null), Is.Empty);
+ Assert.That(await sDatabase.GetBanAsync(null, clientId, null, null), Is.Null);
+ Assert.That(await sDatabase.GetBanAsync(1), Is.Null);
+ Assert.That(await sDatabase.GetBansAsync(null, clientId, null, null), Is.Empty);
});
// Try to pardon a ban that does not exist
@@ -43,9 +43,9 @@ public async Task PardonTest()
// Still no bans on record
Assert.Multiple(async () =>
{
- Assert.That(await sDatabase.GetServerBanAsync(null, clientId, null, null), Is.Null);
- Assert.That(await sDatabase.GetServerBanAsync(1), Is.Null);
- Assert.That(await sDatabase.GetServerBansAsync(null, clientId, null, null), Is.Empty);
+ Assert.That(await sDatabase.GetBanAsync(null, clientId, null, null), Is.Null);
+ Assert.That(await sDatabase.GetBanAsync(1), Is.Null);
+ Assert.That(await sDatabase.GetBansAsync(null, clientId, null, null), Is.Empty);
});
var banReason = "test";
@@ -57,9 +57,9 @@ public async Task PardonTest()
// Should have one ban on record now
Assert.Multiple(async () =>
{
- Assert.That(await sDatabase.GetServerBanAsync(null, clientId, null, null), Is.Not.Null);
- Assert.That(await sDatabase.GetServerBanAsync(1), Is.Not.Null);
- Assert.That(await sDatabase.GetServerBansAsync(null, clientId, null, null), Has.Count.EqualTo(1));
+ Assert.That(await sDatabase.GetBanAsync(null, clientId, null, null), Is.Not.Null);
+ Assert.That(await sDatabase.GetBanAsync(1), Is.Not.Null);
+ Assert.That(await sDatabase.GetBansAsync(null, clientId, null, null), Has.Count.EqualTo(1));
});
await pair.RunTicksSync(5);
@@ -70,17 +70,17 @@ public async Task PardonTest()
await server.WaitPost(() => sConsole.ExecuteCommand("pardon 2"));
// The existing ban is unaffected
- Assert.That(await sDatabase.GetServerBanAsync(null, clientId, null, null), Is.Not.Null);
+ Assert.That(await sDatabase.GetBanAsync(null, clientId, null, null), Is.Not.Null);
- var ban = await sDatabase.GetServerBanAsync(1);
+ var ban = await sDatabase.GetBanAsync(1);
Assert.Multiple(async () =>
{
Assert.That(ban, Is.Not.Null);
- Assert.That(await sDatabase.GetServerBansAsync(null, clientId, null, null), Has.Count.EqualTo(1));
+ Assert.That(await sDatabase.GetBansAsync(null, clientId, null, null), Has.Count.EqualTo(1));
// Check that it matches
Assert.That(ban.Id, Is.EqualTo(1));
- Assert.That(ban.UserId, Is.EqualTo(clientId));
+ Assert.That(ban.UserIds, Is.EquivalentTo([clientId]));
Assert.That(ban.BanTime.UtcDateTime - DateTime.UtcNow, Is.LessThanOrEqualTo(MarginOfError));
Assert.That(ban.ExpirationTime, Is.Not.Null);
Assert.That(ban.ExpirationTime.Value.UtcDateTime - DateTime.UtcNow.AddHours(24), Is.LessThanOrEqualTo(MarginOfError));
@@ -95,20 +95,20 @@ public async Task PardonTest()
await server.WaitPost(() => sConsole.ExecuteCommand("pardon 1"));
// No bans should be returned
- Assert.That(await sDatabase.GetServerBanAsync(null, clientId, null, null), Is.Null);
+ Assert.That(await sDatabase.GetBanAsync(null, clientId, null, null), Is.Null);
// Direct id lookup returns a pardoned ban
- var pardonedBan = await sDatabase.GetServerBanAsync(1);
+ var pardonedBan = await sDatabase.GetBanAsync(1);
Assert.Multiple(async () =>
{
// Check that it matches
Assert.That(pardonedBan, Is.Not.Null);
// The list is still returned since that ignores pardons
- Assert.That(await sDatabase.GetServerBansAsync(null, clientId, null, null), Has.Count.EqualTo(1));
+ Assert.That(await sDatabase.GetBansAsync(null, clientId, null, null), Has.Count.EqualTo(1));
Assert.That(pardonedBan.Id, Is.EqualTo(1));
- Assert.That(pardonedBan.UserId, Is.EqualTo(clientId));
+ Assert.That(pardonedBan.UserIds, Is.EquivalentTo([clientId]));
Assert.That(pardonedBan.BanTime.UtcDateTime - DateTime.UtcNow, Is.LessThanOrEqualTo(MarginOfError));
Assert.That(pardonedBan.ExpirationTime, Is.Not.Null);
Assert.That(pardonedBan.ExpirationTime.Value.UtcDateTime - DateTime.UtcNow.AddHours(24), Is.LessThanOrEqualTo(MarginOfError));
@@ -133,13 +133,13 @@ public async Task PardonTest()
Assert.Multiple(async () =>
{
// No bans should be returned
- Assert.That(await sDatabase.GetServerBanAsync(null, clientId, null, null), Is.Null);
+ Assert.That(await sDatabase.GetBanAsync(null, clientId, null, null), Is.Null);
// Direct id lookup returns a pardoned ban
- Assert.That(await sDatabase.GetServerBanAsync(1), Is.Not.Null);
+ Assert.That(await sDatabase.GetBanAsync(1), Is.Not.Null);
// The list is still returned since that ignores pardons
- Assert.That(await sDatabase.GetServerBansAsync(null, clientId, null, null), Has.Count.EqualTo(1));
+ Assert.That(await sDatabase.GetBansAsync(null, clientId, null, null), Has.Count.EqualTo(1));
});
// Reconnect client. Slightly faster than dirtying the pair.
diff --git a/Content.IntegrationTests/Tests/Commands/RejuvenateTest.cs b/Content.IntegrationTests/Tests/Commands/RejuvenateTest.cs
index e4ec7e907a4..dbc3821f4d2 100644
--- a/Content.IntegrationTests/Tests/Commands/RejuvenateTest.cs
+++ b/Content.IntegrationTests/Tests/Commands/RejuvenateTest.cs
@@ -1,4 +1,3 @@
-using Content.Server.Administration.Commands;
using Content.Server.Administration.Systems;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
@@ -8,6 +7,7 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Commands
{
diff --git a/Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs b/Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs
index 3d49fe490fa..09198aca9ba 100644
--- a/Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs
+++ b/Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs
@@ -1,4 +1,3 @@
-using System.Linq;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Execution;
@@ -15,6 +14,8 @@
using Robust.Shared.Console;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Commands;
diff --git a/Content.IntegrationTests/Tests/ContainerOcclusionTest.cs b/Content.IntegrationTests/Tests/ContainerOcclusionTest.cs
index 37c4b0c9b57..0b2bb8619a3 100644
--- a/Content.IntegrationTests/Tests/ContainerOcclusionTest.cs
+++ b/Content.IntegrationTests/Tests/ContainerOcclusionTest.cs
@@ -1,9 +1,9 @@
-using System.Numerics;
using Content.Server.Storage.EntitySystems;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
-using Robust.Shared.Maths;
+using Robust.UnitTesting.Pool;
+using System.Numerics;
namespace Content.IntegrationTests.Tests
{
diff --git a/Content.IntegrationTests/Tests/Damageable/DamageableTest.cs b/Content.IntegrationTests/Tests/Damageable/DamageableTest.cs
index f610ab732e9..3fd5bae20bd 100644
--- a/Content.IntegrationTests/Tests/Damageable/DamageableTest.cs
+++ b/Content.IntegrationTests/Tests/Damageable/DamageableTest.cs
@@ -4,6 +4,7 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Damageable
{
diff --git a/Content.IntegrationTests/Tests/Destructible/DestructibleTestPrototypes.cs b/Content.IntegrationTests/Tests/Destructible/DestructibleTestPrototypes.cs
index 872e414ac35..a04ca6543e5 100644
--- a/Content.IntegrationTests/Tests/Destructible/DestructibleTestPrototypes.cs
+++ b/Content.IntegrationTests/Tests/Destructible/DestructibleTestPrototypes.cs
@@ -1,3 +1,5 @@
+using Robust.UnitTesting.Pool;
+
namespace Content.IntegrationTests.Tests.Destructible
{
public static class DestructibleTestPrototypes
diff --git a/Content.IntegrationTests/Tests/DeviceLinking/DeviceLinkingTest.cs b/Content.IntegrationTests/Tests/DeviceLinking/DeviceLinkingTest.cs
index 6ce6d5d78e0..e4447d93946 100644
--- a/Content.IntegrationTests/Tests/DeviceLinking/DeviceLinkingTest.cs
+++ b/Content.IntegrationTests/Tests/DeviceLinking/DeviceLinkingTest.cs
@@ -1,12 +1,10 @@
-using System.Collections.Generic;
-using System.Linq;
using Content.Server.DeviceLinking.Systems;
using Content.Shared.DeviceLinking;
-using Content.Shared.Prototypes;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.DeviceLinking;
diff --git a/Content.IntegrationTests/Tests/DeviceNetwork/DeviceNetworkTest.cs b/Content.IntegrationTests/Tests/DeviceNetwork/DeviceNetworkTest.cs
index fdc0e1a4d4a..b38705c16a3 100644
--- a/Content.IntegrationTests/Tests/DeviceNetwork/DeviceNetworkTest.cs
+++ b/Content.IntegrationTests/Tests/DeviceNetwork/DeviceNetworkTest.cs
@@ -1,10 +1,11 @@
-using System.Numerics;
using Content.Server.DeviceNetwork.Components;
using Content.Server.DeviceNetwork.Systems;
using Content.Shared.DeviceNetwork;
+using Content.Shared.DeviceNetwork.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
-using Content.Shared.DeviceNetwork.Components;
+using Robust.UnitTesting.Pool;
+using System.Numerics;
namespace Content.IntegrationTests.Tests.DeviceNetwork
{
diff --git a/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs b/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs
index 52b669b09da..e7ddcff60e6 100644
--- a/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs
+++ b/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs
@@ -1,6 +1,4 @@
#nullable enable annotations
-using System.Linq;
-using System.Numerics;
using Content.Server.Disposal.Unit;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
@@ -9,6 +7,9 @@
using Content.Shared.Disposal.Unit;
using Robust.Shared.GameObjects;
using Robust.Shared.Reflection;
+using Robust.UnitTesting.Pool;
+using System.Linq;
+using System.Numerics;
namespace Content.IntegrationTests.Tests.Disposal
{
diff --git a/Content.IntegrationTests/Tests/DoAfter/DoAfterServerTest.cs b/Content.IntegrationTests/Tests/DoAfter/DoAfterServerTest.cs
index 45c384f86c7..d7fb5dcb619 100644
--- a/Content.IntegrationTests/Tests/DoAfter/DoAfterServerTest.cs
+++ b/Content.IntegrationTests/Tests/DoAfter/DoAfterServerTest.cs
@@ -5,6 +5,7 @@
using Robust.Shared.Serialization;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.DoAfter
{
diff --git a/Content.IntegrationTests/Tests/Doors/AirlockTest.cs b/Content.IntegrationTests/Tests/Doors/AirlockTest.cs
index 69fe66039b8..3806f91c840 100644
--- a/Content.IntegrationTests/Tests/Doors/AirlockTest.cs
+++ b/Content.IntegrationTests/Tests/Doors/AirlockTest.cs
@@ -1,11 +1,11 @@
-using System.Numerics;
using Content.Server.Doors.Systems;
using Content.Shared.Doors.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
-using Robust.Shared.Maths;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Systems;
+using Robust.UnitTesting.Pool;
+using System.Numerics;
namespace Content.IntegrationTests.Tests.Doors
{
diff --git a/Content.IntegrationTests/Tests/Fluids/AbsorbentTest.cs b/Content.IntegrationTests/Tests/Fluids/AbsorbentTest.cs
index 1afed38966f..fb4ab204cd5 100644
--- a/Content.IntegrationTests/Tests/Fluids/AbsorbentTest.cs
+++ b/Content.IntegrationTests/Tests/Fluids/AbsorbentTest.cs
@@ -5,6 +5,7 @@
using Content.Shared.Fluids;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
using System.Collections.Generic;
using System.Linq;
diff --git a/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs b/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs
index 2570e2246a6..f3bf1382b97 100644
--- a/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs
+++ b/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs
@@ -6,6 +6,7 @@
using Robust.Server.Console;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.GameObjects.Components.ActionBlocking
{
diff --git a/Content.IntegrationTests/Tests/GameRules/FailAndStartPresetTest.cs b/Content.IntegrationTests/Tests/GameRules/FailAndStartPresetTest.cs
index b9a02339fba..3f71aa3f45b 100644
--- a/Content.IntegrationTests/Tests/GameRules/FailAndStartPresetTest.cs
+++ b/Content.IntegrationTests/Tests/GameRules/FailAndStartPresetTest.cs
@@ -5,6 +5,7 @@
using Content.Shared.GameTicking;
using Content.Shared.GameTicking.Components;
using Robust.Shared.GameObjects;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.GameRules;
diff --git a/Content.IntegrationTests/Tests/Gravity/WeightlessStatusTests.cs b/Content.IntegrationTests/Tests/Gravity/WeightlessStatusTests.cs
index 8e22d103908..515330ead2f 100644
--- a/Content.IntegrationTests/Tests/Gravity/WeightlessStatusTests.cs
+++ b/Content.IntegrationTests/Tests/Gravity/WeightlessStatusTests.cs
@@ -2,6 +2,7 @@
using Content.Shared.Alert;
using Content.Shared.Gravity;
using Robust.Shared.GameObjects;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Gravity
{
diff --git a/Content.IntegrationTests/Tests/GravityGridTest.cs b/Content.IntegrationTests/Tests/GravityGridTest.cs
index 5fdeb352c1a..348bdfccbde 100644
--- a/Content.IntegrationTests/Tests/GravityGridTest.cs
+++ b/Content.IntegrationTests/Tests/GravityGridTest.cs
@@ -5,6 +5,7 @@
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Maths;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests
{
diff --git a/Content.IntegrationTests/Tests/Hands/HandTests.cs b/Content.IntegrationTests/Tests/Hands/HandTests.cs
index d5cf75c4634..69ad0ee92b2 100644
--- a/Content.IntegrationTests/Tests/Hands/HandTests.cs
+++ b/Content.IntegrationTests/Tests/Hands/HandTests.cs
@@ -1,4 +1,3 @@
-using System.Linq;
using Content.Server.Storage.EntitySystems;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
@@ -6,6 +5,8 @@
using Robust.Server.Player;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Hands;
diff --git a/Content.IntegrationTests/Tests/HumanInventoryUniformSlotsTest.cs b/Content.IntegrationTests/Tests/HumanInventoryUniformSlotsTest.cs
index 929a2311599..4a24af546b8 100644
--- a/Content.IntegrationTests/Tests/HumanInventoryUniformSlotsTest.cs
+++ b/Content.IntegrationTests/Tests/HumanInventoryUniformSlotsTest.cs
@@ -1,5 +1,6 @@
using Content.Shared.Inventory;
using Robust.Shared.GameObjects;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests
{
diff --git a/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs b/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs
index 6ac40e92a1e..7ac838ab490 100644
--- a/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs
+++ b/Content.IntegrationTests/Tests/Interaction/Click/InteractionSystemTests.cs
@@ -1,5 +1,4 @@
#nullable enable annotations
-using System.Numerics;
using Content.Server.Interaction;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
@@ -9,8 +8,8 @@
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
-using Robust.Shared.Maths;
-using Robust.Shared.Reflection;
+using Robust.UnitTesting.Pool;
+using System.Numerics;
namespace Content.IntegrationTests.Tests.Interaction.Click
{
diff --git a/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs b/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs
index 0ed42d34764..32c091e539d 100644
--- a/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs
+++ b/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs
@@ -1,5 +1,4 @@
#nullable enable
-using System.Numerics;
using Content.Client.Construction;
using Content.Client.Examine;
using Content.Client.Gameplay;
@@ -10,9 +9,11 @@
using Content.Shared.DoAfter;
using Content.Shared.Hands.Components;
using Content.Shared.Interaction;
+using Content.Shared.Item.ItemToggle;
using Content.Shared.Mind;
using Content.Shared.Players;
using Robust.Client.Input;
+using Robust.Client.State;
using Robust.Client.UserInterface;
using Robust.Shared.GameObjects;
using Robust.Shared.Log;
@@ -20,9 +21,11 @@
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
+using Robust.Shared.Utility;
using Robust.UnitTesting;
-using Content.Shared.Item.ItemToggle;
-using Robust.Client.State;
+using Robust.UnitTesting.Pool;
+using System.Numerics;
+using TestMapData = Content.IntegrationTests.Pair.TestMapData;
namespace Content.IntegrationTests.Tests.Interaction;
@@ -37,10 +40,20 @@ namespace Content.IntegrationTests.Tests.Interaction;
[FixtureLifeCycle(LifeCycle.InstancePerTestCase)]
public abstract partial class InteractionTest
{
+ ///
+ /// The prototype that will be spawned for the player entity at .
+ /// This is not a full humanoid and only has one hand by default.
+ ///
protected virtual string PlayerPrototype => "InteractionTestMob";
+ ///
+ /// The map path to load for the integration test.
+ /// If null an empty map with a single 1x1 plating grid will be generated.
+ ///
+ protected virtual ResPath? TestMapPath => null;
+
protected TestPair Pair = default!;
- protected TestMapData MapData => Pair.TestMap!;
+ protected TestMapData MapData = default!;
protected RobustIntegrationTest.ServerIntegrationInstance Server => Pair.Server;
protected RobustIntegrationTest.ClientIntegrationInstance Client => Pair.Client;
@@ -189,7 +202,7 @@ public virtual async Task Setup()
CUiSys = Client.System();
// Setup map.
- await Pair.CreateTestMap();
+ MapData = await Pair.CreateTestMap();
PlayerCoords = SEntMan.GetNetCoordinates(Transform.WithEntityId(MapData.GridCoords.Offset(new Vector2(0.5f, 0.5f)), MapData.MapUid));
TargetCoords = SEntMan.GetNetCoordinates(Transform.WithEntityId(MapData.GridCoords.Offset(new Vector2(1.5f, 0.5f)), MapData.MapUid));
diff --git a/Content.IntegrationTests/Tests/Internals/AutoInternalsTests.cs b/Content.IntegrationTests/Tests/Internals/AutoInternalsTests.cs
index 639928121f6..f8038b5e634 100644
--- a/Content.IntegrationTests/Tests/Internals/AutoInternalsTests.cs
+++ b/Content.IntegrationTests/Tests/Internals/AutoInternalsTests.cs
@@ -2,6 +2,7 @@
using Content.Server.Body.Systems;
using Content.Server.Station.Systems;
using Content.Shared.Preferences;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Internals;
diff --git a/Content.IntegrationTests/Tests/InventoryHelpersTest.cs b/Content.IntegrationTests/Tests/InventoryHelpersTest.cs
index 39761ad0898..174557bde32 100644
--- a/Content.IntegrationTests/Tests/InventoryHelpersTest.cs
+++ b/Content.IntegrationTests/Tests/InventoryHelpersTest.cs
@@ -3,6 +3,7 @@
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests
{
diff --git a/Content.IntegrationTests/Tests/Linter/StaticFieldValidationTest.cs b/Content.IntegrationTests/Tests/Linter/StaticFieldValidationTest.cs
index b75b81ab3ca..5f0c4d3d756 100644
--- a/Content.IntegrationTests/Tests/Linter/StaticFieldValidationTest.cs
+++ b/Content.IntegrationTests/Tests/Linter/StaticFieldValidationTest.cs
@@ -1,9 +1,10 @@
-using System.Collections.Generic;
-using System.Linq;
using Content.Shared.Tag;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
using Robust.Shared.Reflection;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Linter;
diff --git a/Content.IntegrationTests/Tests/Lobby/CharacterCreationTest.cs b/Content.IntegrationTests/Tests/Lobby/CharacterCreationTest.cs
index 4a4173eb9e4..5c6b2bc0e10 100644
--- a/Content.IntegrationTests/Tests/Lobby/CharacterCreationTest.cs
+++ b/Content.IntegrationTests/Tests/Lobby/CharacterCreationTest.cs
@@ -11,7 +11,6 @@ namespace Content.IntegrationTests.Tests.Lobby
[TestOf(typeof(ServerPreferencesManager))]
public sealed class CharacterCreationTest
{
- [Test, Ignore("Help me pls ;-;")]
public async Task CreateDeleteCreateTest()
{
await using var pair = await PoolManager.GetServerClient(new PoolSettings { InLobby = true });
diff --git a/Content.IntegrationTests/Tests/Lobby/ServerReloginTest.cs b/Content.IntegrationTests/Tests/Lobby/ServerReloginTest.cs
index d1d6910d9d3..03aa6923e7c 100644
--- a/Content.IntegrationTests/Tests/Lobby/ServerReloginTest.cs
+++ b/Content.IntegrationTests/Tests/Lobby/ServerReloginTest.cs
@@ -7,7 +7,6 @@ namespace Content.IntegrationTests.Tests.Lobby;
public sealed class ServerReloginTest
{
- [Test, Ignore("Help me pls ;-;")]
public async Task Relogin()
{
await using var pair = await PoolManager.GetServerClient(new PoolSettings
diff --git a/Content.IntegrationTests/Tests/Minds/GhostRoleTests.cs b/Content.IntegrationTests/Tests/Minds/GhostRoleTests.cs
index 32fcf9c1ade..55bc45b1b31 100644
--- a/Content.IntegrationTests/Tests/Minds/GhostRoleTests.cs
+++ b/Content.IntegrationTests/Tests/Minds/GhostRoleTests.cs
@@ -1,5 +1,4 @@
-#nullable enable
-using System.Linq;
+#nullable enable
using Content.Server.Ghost.Roles;
using Content.Server.Ghost.Roles.Components;
using Content.Shared.Ghost;
@@ -7,7 +6,8 @@
using Content.Shared.Players;
using Robust.Shared.Console;
using Robust.Shared.GameObjects;
-using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Minds;
diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs b/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs
index 6f331888138..513049bcad1 100644
--- a/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs
+++ b/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs
@@ -112,7 +112,7 @@ await server.WaitAssertion(() =>
Assert.That(entMan.EntityExists(attachedEntity), Is.True);
Assert.That(attachedEntity, Is.Not.EqualTo(playerEnt));
Assert.That(entMan.HasComponent(attachedEntity));
- var transform = entMan.GetComponent(attachedEntity.Value);
+ var transform = entMan.GetComponent(attachedEntity!.Value);
Assert.That(transform.MapID, Is.Not.EqualTo(MapId.Nullspace));
Assert.That(transform.MapID, Is.Not.EqualTo(testMap.MapId));
#pragma warning restore NUnit2045
@@ -175,7 +175,7 @@ public async Task TestOriginalDeletedWhileGhostingKeepsGhost()
Assert.That(player.AttachedEntity, Is.Not.Null);
Assert.That(entMan.EntityExists(player.AttachedEntity));
#pragma warning restore NUnit2045
- var originalEntity = player.AttachedEntity.Value;
+ var originalEntity = player.AttachedEntity!.Value;
EntityUid ghost = default!;
await server.WaitAssertion(() =>
@@ -248,7 +248,7 @@ public async Task TestGhostToAghost()
var mindId = player.ContentData()?.Mind;
Assert.That(mindId, Is.Not.Null);
- var mind = entMan.GetComponent(mindId.Value);
+ var mind = entMan.GetComponent(mindId!.Value);
Assert.That(mind.VisitingEntity, Is.Null);
await pair.CleanReturnAsync();
diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.cs b/Content.IntegrationTests/Tests/Minds/MindTests.cs
index 48e11e46480..9be09a4ae9d 100644
--- a/Content.IntegrationTests/Tests/Minds/MindTests.cs
+++ b/Content.IntegrationTests/Tests/Minds/MindTests.cs
@@ -1,5 +1,4 @@
-#nullable enable
-using System.Linq;
+#nullable enable
using Content.Server.Ghost.Roles;
using Content.Server.Ghost.Roles.Components;
using Content.Server.Mind;
@@ -18,6 +17,8 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Minds;
diff --git a/Content.IntegrationTests/Tests/Power/PowerTest.cs b/Content.IntegrationTests/Tests/Power/PowerTest.cs
index a448427d050..392989ecd19 100644
--- a/Content.IntegrationTests/Tests/Power/PowerTest.cs
+++ b/Content.IntegrationTests/Tests/Power/PowerTest.cs
@@ -1,7 +1,5 @@
#nullable enable
-using Content.Server.NodeContainer;
using Content.Server.NodeContainer.EntitySystems;
-using Content.Server.NodeContainer.Nodes;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Server.Power.Nodes;
@@ -11,6 +9,7 @@
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Timing;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Power
{
diff --git a/Content.IntegrationTests/Tests/Preferences/LoadoutTests.cs b/Content.IntegrationTests/Tests/Preferences/LoadoutTests.cs
index 267b3637e0a..f56f3f4848f 100644
--- a/Content.IntegrationTests/Tests/Preferences/LoadoutTests.cs
+++ b/Content.IntegrationTests/Tests/Preferences/LoadoutTests.cs
@@ -1,10 +1,11 @@
-using System.Collections.Generic;
using Content.Server.Station.Systems;
using Content.Shared.Inventory;
using Content.Shared.Preferences;
using Content.Shared.Preferences.Loadouts;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
namespace Content.IntegrationTests.Tests.Preferences;
diff --git a/Content.IntegrationTests/Tests/Preferences/ServerDbSqliteTests.cs b/Content.IntegrationTests/Tests/Preferences/ServerDbSqliteTests.cs
index 444b3d82748..0d360584d69 100644
--- a/Content.IntegrationTests/Tests/Preferences/ServerDbSqliteTests.cs
+++ b/Content.IntegrationTests/Tests/Preferences/ServerDbSqliteTests.cs
@@ -1,19 +1,14 @@
-using System.Collections.Generic;
-using System.Linq;
using Content.Server.Database;
-using Content.Shared.GameTicking;
-using Content.Shared.Humanoid;
using Content.Shared.Preferences;
-using Content.Shared.Preferences.Loadouts;
-using Content.Shared.Preferences.Loadouts.Effects;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Robust.Shared.Configuration;
-using Robust.Shared.Enums;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Network;
using Robust.UnitTesting;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Preferences
{
diff --git a/Content.IntegrationTests/Tests/Round/JobTest.cs b/Content.IntegrationTests/Tests/Round/JobTest.cs
index befb96c7dcf..a789d9a785b 100644
--- a/Content.IntegrationTests/Tests/Round/JobTest.cs
+++ b/Content.IntegrationTests/Tests/Round/JobTest.cs
@@ -1,6 +1,4 @@
#nullable enable
-using System.Collections.Generic;
-using System.Linq;
using Content.IntegrationTests.Pair;
using Content.Server.GameTicking;
using Content.Server.Mind;
@@ -12,6 +10,9 @@
using Content.Shared.Roles.Jobs;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Round;
diff --git a/Content.IntegrationTests/Tests/SmartFridge/SmartFridgeInteractionTest.cs b/Content.IntegrationTests/Tests/SmartFridge/SmartFridgeInteractionTest.cs
index 56a3a26a7e6..d4cbcb70e04 100644
--- a/Content.IntegrationTests/Tests/SmartFridge/SmartFridgeInteractionTest.cs
+++ b/Content.IntegrationTests/Tests/SmartFridge/SmartFridgeInteractionTest.cs
@@ -1,5 +1,6 @@
using Content.IntegrationTests.Tests.Interaction;
using Content.Shared.SmartFridge;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.SmartFridge;
diff --git a/Content.IntegrationTests/Tests/Station/StationJobsTest.cs b/Content.IntegrationTests/Tests/Station/StationJobsTest.cs
index 78e9aa99bf2..fcd1af14130 100644
--- a/Content.IntegrationTests/Tests/Station/StationJobsTest.cs
+++ b/Content.IntegrationTests/Tests/Station/StationJobsTest.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-using System.Linq;
using Content.IntegrationTests.Tests._NF;
using Content.Server.Maps;
using Content.Server.Station.Components;
@@ -11,6 +9,9 @@
using Robust.Shared.Network;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Station;
diff --git a/Content.IntegrationTests/Tests/Storage/EntityStorageTests.cs b/Content.IntegrationTests/Tests/Storage/EntityStorageTests.cs
index 45ee69a9efa..98f748f0b45 100644
--- a/Content.IntegrationTests/Tests/Storage/EntityStorageTests.cs
+++ b/Content.IntegrationTests/Tests/Storage/EntityStorageTests.cs
@@ -2,6 +2,7 @@
using Content.Shared.Damage;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Storage;
diff --git a/Content.IntegrationTests/Tests/StoreTests.cs b/Content.IntegrationTests/Tests/StoreTests.cs
index 30f6d9d96da..12d66ba02cb 100644
--- a/Content.IntegrationTests/Tests/StoreTests.cs
+++ b/Content.IntegrationTests/Tests/StoreTests.cs
@@ -1,7 +1,3 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using Content.Server.Store.Systems;
using Content.Server.Traitor.Uplink;
using Content.Shared.FixedPoint;
using Content.Shared.Inventory;
@@ -10,8 +6,9 @@
using Content.Shared.Store.Components;
using Content.Shared.StoreDiscount.Components;
using Robust.Shared.GameObjects;
-using Robust.Shared.Prototypes;
using Robust.Shared.Random;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests;
diff --git a/Content.IntegrationTests/Tests/Tag/TagTest.cs b/Content.IntegrationTests/Tests/Tag/TagTest.cs
index e6cd2accaf5..ed74f94ee11 100644
--- a/Content.IntegrationTests/Tests/Tag/TagTest.cs
+++ b/Content.IntegrationTests/Tests/Tag/TagTest.cs
@@ -1,10 +1,11 @@
#nullable enable
-using System.Collections.Generic;
using Content.Shared.Tag;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
namespace Content.IntegrationTests.Tests.Tag
{
diff --git a/Content.IntegrationTests/Tests/Toolshed/AdminTest.cs b/Content.IntegrationTests/Tests/Toolshed/AdminTest.cs
index ecb11fc1ba4..62ffb39e15f 100644
--- a/Content.IntegrationTests/Tests/Toolshed/AdminTest.cs
+++ b/Content.IntegrationTests/Tests/Toolshed/AdminTest.cs
@@ -14,7 +14,7 @@ public async Task AllCommandsHavePermissions()
var toolMan = Server.ResolveDependency();
var admin = Server.ResolveDependency();
var ignored = new HashSet()
- {typeof(LocTest).Assembly, typeof(Robust.UnitTesting.Shared.Toolshed.LocTest).Assembly};
+ {typeof(LocTest).Assembly};
await Server.WaitAssertion(() =>
{
diff --git a/Content.IntegrationTests/Tests/Toolshed/LocTest.cs b/Content.IntegrationTests/Tests/Toolshed/LocTest.cs
index fb210eba505..849f9e55d3b 100644
--- a/Content.IntegrationTests/Tests/Toolshed/LocTest.cs
+++ b/Content.IntegrationTests/Tests/Toolshed/LocTest.cs
@@ -19,7 +19,7 @@ public async Task AllCommandsHaveDescriptions()
var locStrings = new HashSet();
var ignored = new HashSet()
- {typeof(LocTest).Assembly, typeof(Robust.UnitTesting.Shared.Toolshed.LocTest).Assembly};
+ {typeof(LocTest).Assembly};
await Server.WaitAssertion(() =>
{
diff --git a/Content.IntegrationTests/Tests/Utility/EntitySystemExtensionsTest.cs b/Content.IntegrationTests/Tests/Utility/EntitySystemExtensionsTest.cs
index d460fd354f0..735bc81b1c1 100644
--- a/Content.IntegrationTests/Tests/Utility/EntitySystemExtensionsTest.cs
+++ b/Content.IntegrationTests/Tests/Utility/EntitySystemExtensionsTest.cs
@@ -1,8 +1,9 @@
-#nullable enable
+#nullable enable
using Content.Shared.Physics;
using Content.Shared.Spawning;
using Robust.Shared.GameObjects;
using Robust.Shared.Physics.Systems;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Utility
{
diff --git a/Content.IntegrationTests/Tests/Utility/EntityWhitelistTest.cs b/Content.IntegrationTests/Tests/Utility/EntityWhitelistTest.cs
index 19b25816fa3..97872ce586d 100644
--- a/Content.IntegrationTests/Tests/Utility/EntityWhitelistTest.cs
+++ b/Content.IntegrationTests/Tests/Utility/EntityWhitelistTest.cs
@@ -1,7 +1,7 @@
-using System.Linq;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Whitelist;
-using Robust.Shared.GameObjects;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Utility
{
diff --git a/Content.IntegrationTests/Tests/Utility/SandboxTest.cs b/Content.IntegrationTests/Tests/Utility/SandboxTest.cs
index 8ff2c126ea1..b1ad4f03076 100644
--- a/Content.IntegrationTests/Tests/Utility/SandboxTest.cs
+++ b/Content.IntegrationTests/Tests/Utility/SandboxTest.cs
@@ -6,6 +6,7 @@
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.UnitTesting;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Utility;
diff --git a/Content.IntegrationTests/Tests/Vending/VendingInteractionTest.cs b/Content.IntegrationTests/Tests/Vending/VendingInteractionTest.cs
index bb4f5f42319..76ce3b5b53f 100644
--- a/Content.IntegrationTests/Tests/Vending/VendingInteractionTest.cs
+++ b/Content.IntegrationTests/Tests/Vending/VendingInteractionTest.cs
@@ -1,4 +1,3 @@
-using System.Linq;
using Content.IntegrationTests.Tests.Interaction;
using Content.Server.VendingMachines;
using Content.Shared.Damage;
@@ -6,6 +5,8 @@
using Content.Shared.FixedPoint;
using Content.Shared.VendingMachines;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests.Vending;
diff --git a/Content.IntegrationTests/Tests/VendingMachineRestockTest.cs b/Content.IntegrationTests/Tests/VendingMachineRestockTest.cs
index 55545d2cf5b..9ddb141f625 100644
--- a/Content.IntegrationTests/Tests/VendingMachineRestockTest.cs
+++ b/Content.IntegrationTests/Tests/VendingMachineRestockTest.cs
@@ -1,5 +1,4 @@
#nullable enable
-using System.Collections.Generic;
using Content.Server.VendingMachines;
using Content.Server.Wires;
using Content.Shared.Cargo.Prototypes;
@@ -12,6 +11,8 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
+using Robust.UnitTesting.Pool;
+using System.Collections.Generic;
namespace Content.IntegrationTests.Tests
{
diff --git a/Content.IntegrationTests/Tests/Wires/WireLayoutTest.cs b/Content.IntegrationTests/Tests/Wires/WireLayoutTest.cs
index 920dc088186..0bad4d75263 100644
--- a/Content.IntegrationTests/Tests/Wires/WireLayoutTest.cs
+++ b/Content.IntegrationTests/Tests/Wires/WireLayoutTest.cs
@@ -1,9 +1,10 @@
-using Content.Server.Doors;
+using Content.Server.Doors;
using Content.Server.Power;
using Content.Server.Wires;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
+using Robust.UnitTesting.Pool;
namespace Content.IntegrationTests.Tests.Wires;
diff --git a/Content.IntegrationTests/Tests/XenoArtifactTest.cs b/Content.IntegrationTests/Tests/XenoArtifactTest.cs
index ac4c58c52cc..ee70133d062 100644
--- a/Content.IntegrationTests/Tests/XenoArtifactTest.cs
+++ b/Content.IntegrationTests/Tests/XenoArtifactTest.cs
@@ -1,7 +1,8 @@
-using System.Linq;
using Content.Shared.Xenoarchaeology.Artifact;
using Content.Shared.Xenoarchaeology.Artifact.Components;
using Robust.Shared.GameObjects;
+using Robust.UnitTesting.Pool;
+using System.Linq;
namespace Content.IntegrationTests.Tests;
diff --git a/Content.IntegrationTests/Tests/_Lua/SPDXHunter.cs b/Content.IntegrationTests/Tests/_Lua/SPDXHunter.cs
index e6b797affee..bb648e35e64 100644
--- a/Content.IntegrationTests/Tests/_Lua/SPDXHunter.cs
+++ b/Content.IntegrationTests/Tests/_Lua/SPDXHunter.cs
@@ -54,8 +54,12 @@ public void NoSpdxInCode()
var dir = new DirectoryInfo(currentDir);
while (dir != null)
{
- if (dir.GetFiles("*.sln").Any() || dir.GetFiles("Content.Shared.csproj", SearchOption.TopDirectoryOnly).Any())
- { return dir.FullName; }
+ if (dir.GetFiles("*.sln").Any() || dir.GetFiles("*.slnx").Any())
+ return dir.FullName;
+
+ var sharedProj = Path.Combine(dir.FullName, "Content.Shared", "Content.Shared.csproj");
+ if (File.Exists(sharedProj))
+ return dir.FullName;
dir = dir.Parent;
}
return null;
diff --git a/Content.MapRenderer/Content.MapRenderer.csproj b/Content.MapRenderer/Content.MapRenderer.csproj
index 43207177322..98fb446bd56 100644
--- a/Content.MapRenderer/Content.MapRenderer.csproj
+++ b/Content.MapRenderer/Content.MapRenderer.csproj
@@ -3,19 +3,27 @@
Exe
..\bin\Content.MapRenderer\
false
- enable
true
+ false
+
+
-
+
+
+
+
+
+
+
diff --git a/Content.Packaging/Content.Packaging.csproj b/Content.Packaging/Content.Packaging.csproj
index 9823e40b8e3..d278b487345 100644
--- a/Content.Packaging/Content.Packaging.csproj
+++ b/Content.Packaging/Content.Packaging.csproj
@@ -2,13 +2,13 @@
Exe
enable
- enable
True
-
-
-
+
+
+
+
diff --git a/Content.Packaging/DepsHandler.cs b/Content.Packaging/DepsHandler.cs
new file mode 100644
index 00000000000..9907b97ba9d
--- /dev/null
+++ b/Content.Packaging/DepsHandler.cs
@@ -0,0 +1,80 @@
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Content.Packaging;
+
+///
+/// Helper class for working with .deps.json files.
+///
+public sealed class DepsHandler
+{
+ public readonly Dictionary Libraries = new();
+
+ public DepsHandler(DepsData data)
+ {
+ if (data.Targets.Count != 1)
+ throw new Exception("Expected exactly one target");
+
+ var target = data.Targets.Single().Value;
+
+ foreach (var (libNameAndVersion, libInfo) in target)
+ {
+ var split = libNameAndVersion.Split('/', 2);
+
+ Libraries.Add(split[0], libInfo);
+ }
+ }
+
+ public static DepsHandler Load(string depsFile)
+ {
+ using var f = File.OpenRead(depsFile);
+ var depsData = JsonSerializer.Deserialize(f) ?? throw new InvalidOperationException("Deps are null!");
+
+ return new DepsHandler(depsData);
+ }
+
+ public HashSet RecursiveGetLibrariesFrom(string start)
+ {
+ var found = new HashSet();
+
+ RecursiveAddLibraries(start, found);
+
+ return found;
+ }
+
+ private void RecursiveAddLibraries(string start, HashSet set)
+ {
+ if (!set.Add(start))
+ return;
+
+ var lib = Libraries[start];
+ if (lib.Dependencies == null)
+ return;
+
+ foreach (var dep in lib.Dependencies.Keys)
+ {
+ RecursiveAddLibraries(dep, set);
+ }
+ }
+
+ public sealed class DepsData
+ {
+ [JsonInclude, JsonPropertyName("targets")]
+ public required Dictionary> Targets;
+ }
+
+ public sealed class LibraryInfo
+ {
+ [JsonInclude, JsonPropertyName("dependencies")]
+ public Dictionary? Dependencies;
+
+ [JsonInclude, JsonPropertyName("runtime")]
+ public Dictionary? Runtime;
+
+ // Paths are like lib/netstandard2.0/JetBrains.Annotations.dll
+ public IEnumerable GetDllNames()
+ {
+ return Runtime == null ? [] : Runtime.Keys.Select(p => p.Split('/')[^1]);
+ }
+ }
+}
diff --git a/Content.Packaging/ServerPackaging.cs b/Content.Packaging/ServerPackaging.cs
index 947a12601c5..f872ce4dd4a 100644
--- a/Content.Packaging/ServerPackaging.cs
+++ b/Content.Packaging/ServerPackaging.cs
@@ -34,25 +34,9 @@ public static class ServerPackaging
.Select(o => o.Rid)
.ToList();
- private static readonly List ServerContentAssemblies = new()
- {
- "Content.Server.Database",
- "Content.Server",
- "Content.Shared",
- "Content.Shared.Database",
- };
-
- private static readonly List ServerExtraAssemblies = new()
- {
- // Python script had Npgsql. though we want Npgsql.dll as well soooo
- "Npgsql",
- "Microsoft",
- "Discord",
- };
-
private static readonly List ServerNotExtraAssemblies = new()
{
- "Microsoft.CodeAnalysis",
+ "JetBrains.Annotations",
};
private static readonly HashSet BinSkipFolders = new()
@@ -178,23 +162,13 @@ private static async Task WriteServerResources(
var inputPassCore = graph.InputCore;
var inputPassResources = graph.InputResources;
- var contentAssemblies = new List(ServerContentAssemblies);
// Additional assemblies that need to be copied such as EFCore.
var sourcePath = Path.Combine(contentDir, "bin", "Content.Server");
- // Should this be an asset pass?
- // For future archaeologists I just want audio rework to work and need the audio pass so
- // just porting this as is from python.
- foreach (var fullPath in Directory.EnumerateFiles(sourcePath, "*.*", SearchOption.AllDirectories))
- {
- var fileName = Path.GetFileNameWithoutExtension(fullPath);
+ var deps = DepsHandler.Load(Path.Combine(sourcePath, "Content.Server.deps.json"));
- if (!ServerNotExtraAssemblies.Any(o => fileName.StartsWith(o)) && ServerExtraAssemblies.Any(o => fileName.StartsWith(o)))
- {
- contentAssemblies.Add(fileName);
- }
- }
+ var contentAssemblies = GetContentAssemblyNamesToCopy(deps);
await RobustSharedPackaging.DoResourceCopy(
Path.Combine("RobustToolbox", "bin", "Server",
@@ -222,5 +196,21 @@ await RobustSharedPackaging.WriteContentAssemblies(
inputPassResources.InjectFinished();
}
+ // This returns both content assemblies (e.g. Content.Server.dll) and dependencies (e.g. Npgsql)
+ private static IEnumerable GetContentAssemblyNamesToCopy(DepsHandler deps)
+ {
+ var depsContent = deps.RecursiveGetLibrariesFrom("Content.Server").SelectMany(GetLibraryNames);
+ var depsRobust = deps.RecursiveGetLibrariesFrom("Robust.Server").SelectMany(GetLibraryNames);
+
+ var depsContentExclusive = depsContent.Except(depsRobust).ToHashSet();
+
+ // Remove .dll suffix and apply filtering.
+ var names = depsContentExclusive.Select(p => p[..^4]).Where(p => !ServerNotExtraAssemblies.Any(p.StartsWith));
+
+ return names;
+
+ IEnumerable GetLibraryNames(string library) => deps.Libraries[library].GetDllNames();
+ }
+
private readonly record struct PlatformReg(string Rid, string TargetOs, bool BuildByDefault);
}
diff --git a/Content.PatreonParser/Content.PatreonParser.csproj b/Content.PatreonParser/Content.PatreonParser.csproj
index 1724ec0cea2..bba47a062d0 100644
--- a/Content.PatreonParser/Content.PatreonParser.csproj
+++ b/Content.PatreonParser/Content.PatreonParser.csproj
@@ -2,7 +2,7 @@
Exe
- net9.0
+ net10.0
enable
enable
true
diff --git a/Content.Replay/Content.Replay.csproj b/Content.Replay/Content.Replay.csproj
index 28cfc7f6666..5008214522a 100644
--- a/Content.Replay/Content.Replay.csproj
+++ b/Content.Replay/Content.Replay.csproj
@@ -1,26 +1,23 @@
- $(TargetFramework)
- 12
- false
false
..\bin\Content.Replay\
Exe
RA0032;nullable
- enable
+
+
-
-
-
-
+
+
+
diff --git a/Content.Server.Database/Content.Server.Database.csproj b/Content.Server.Database/Content.Server.Database.csproj
index d98d0642db0..22b718b3636 100644
--- a/Content.Server.Database/Content.Server.Database.csproj
+++ b/Content.Server.Database/Content.Server.Database.csproj
@@ -1,16 +1,13 @@
-
- $(TargetFramework)
- 12
- false
false
..\bin\Content.Server.Database\
true
- enable
RA0003
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Content.Server.Database/Migrations/Postgres/20260204104024_BanRefactor.Designer.cs b/Content.Server.Database/Migrations/Postgres/20260204104024_BanRefactor.Designer.cs
new file mode 100644
index 00000000000..31a03edfd09
--- /dev/null
+++ b/Content.Server.Database/Migrations/Postgres/20260204104024_BanRefactor.Designer.cs
@@ -0,0 +1,2236 @@
+//
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text.Json;
+using Content.Server.Database;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using NpgsqlTypes;
+
+#nullable disable
+
+namespace Content.Server.Database.Migrations.Postgres
+{
+ [DbContext(typeof(PostgresServerDbContext))]
+ [Migration("20260204104024_BanRefactor")]
+ partial class BanRefactor
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "10.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("Content.Server.Database.Admin", b =>
+ {
+ b.Property("UserId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.Property("AdminRankId")
+ .HasColumnType("integer")
+ .HasColumnName("admin_rank_id");
+
+ b.Property("Deadminned")
+ .HasColumnType("boolean")
+ .HasColumnName("deadminned");
+
+ b.Property("Suspended")
+ .HasColumnType("boolean")
+ .HasColumnName("suspended");
+
+ b.Property("Title")
+ .HasColumnType("text")
+ .HasColumnName("title");
+
+ b.HasKey("UserId")
+ .HasName("PK_admin");
+
+ b.HasIndex("AdminRankId")
+ .HasDatabaseName("IX_admin_admin_rank_id");
+
+ b.ToTable("admin", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.AdminFlag", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("admin_flag_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AdminId")
+ .HasColumnType("uuid")
+ .HasColumnName("admin_id");
+
+ b.Property("Flag")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("flag");
+
+ b.Property("Negative")
+ .HasColumnType("boolean")
+ .HasColumnName("negative");
+
+ b.HasKey("Id")
+ .HasName("PK_admin_flag");
+
+ b.HasIndex("AdminId")
+ .HasDatabaseName("IX_admin_flag_admin_id");
+
+ b.HasIndex("Flag", "AdminId")
+ .IsUnique();
+
+ b.ToTable("admin_flag", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
+ {
+ b.Property("RoundId")
+ .HasColumnType("integer")
+ .HasColumnName("round_id");
+
+ b.Property("Id")
+ .HasColumnType("integer")
+ .HasColumnName("admin_log_id");
+
+ b.Property("Date")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("date");
+
+ b.Property("Impact")
+ .HasColumnType("smallint")
+ .HasColumnName("impact");
+
+ b.Property("Json")
+ .IsRequired()
+ .HasColumnType("jsonb")
+ .HasColumnName("json");
+
+ b.Property("Message")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("message");
+
+ b.Property("Type")
+ .HasColumnType("integer")
+ .HasColumnName("type");
+
+ b.HasKey("RoundId", "Id")
+ .HasName("PK_admin_log");
+
+ b.HasIndex("Date");
+
+ b.HasIndex("Message")
+ .HasAnnotation("Npgsql:TsVectorConfig", "english");
+
+ NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("Message"), "GIN");
+
+ b.HasIndex("Type")
+ .HasDatabaseName("IX_admin_log_type");
+
+ b.ToTable("admin_log", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
+ {
+ b.Property("RoundId")
+ .HasColumnType("integer")
+ .HasColumnName("round_id");
+
+ b.Property("LogId")
+ .HasColumnType("integer")
+ .HasColumnName("log_id");
+
+ b.Property("PlayerUserId")
+ .HasColumnType("uuid")
+ .HasColumnName("player_user_id");
+
+ b.HasKey("RoundId", "LogId", "PlayerUserId")
+ .HasName("PK_admin_log_player");
+
+ b.HasIndex("PlayerUserId")
+ .HasDatabaseName("IX_admin_log_player_player_user_id");
+
+ b.ToTable("admin_log_player", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.AdminMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("admin_messages_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedById")
+ .HasColumnType("uuid")
+ .HasColumnName("created_by_id");
+
+ b.Property("Deleted")
+ .HasColumnType("boolean")
+ .HasColumnName("deleted");
+
+ b.Property("DeletedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("deleted_at");
+
+ b.Property("DeletedById")
+ .HasColumnType("uuid")
+ .HasColumnName("deleted_by_id");
+
+ b.Property("Dismissed")
+ .HasColumnType("boolean")
+ .HasColumnName("dismissed");
+
+ b.Property("ExpirationTime")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("expiration_time");
+
+ b.Property("LastEditedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_edited_at");
+
+ b.Property("LastEditedById")
+ .HasColumnType("uuid")
+ .HasColumnName("last_edited_by_id");
+
+ b.Property("Message")
+ .IsRequired()
+ .HasMaxLength(4096)
+ .HasColumnType("character varying(4096)")
+ .HasColumnName("message");
+
+ b.Property("PlayerUserId")
+ .HasColumnType("uuid")
+ .HasColumnName("player_user_id");
+
+ b.Property("PlaytimeAtNote")
+ .HasColumnType("interval")
+ .HasColumnName("playtime_at_note");
+
+ b.Property("RoundId")
+ .HasColumnType("integer")
+ .HasColumnName("round_id");
+
+ b.Property("Seen")
+ .HasColumnType("boolean")
+ .HasColumnName("seen");
+
+ b.HasKey("Id")
+ .HasName("PK_admin_messages");
+
+ b.HasIndex("CreatedById");
+
+ b.HasIndex("DeletedById");
+
+ b.HasIndex("LastEditedById");
+
+ b.HasIndex("PlayerUserId")
+ .HasDatabaseName("IX_admin_messages_player_user_id");
+
+ b.HasIndex("RoundId")
+ .HasDatabaseName("IX_admin_messages_round_id");
+
+ b.ToTable("admin_messages", null, t =>
+ {
+ t.HasCheckConstraint("NotDismissedAndSeen", "NOT dismissed OR seen");
+ });
+ });
+
+ modelBuilder.Entity("Content.Server.Database.AdminNote", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("admin_notes_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedById")
+ .HasColumnType("uuid")
+ .HasColumnName("created_by_id");
+
+ b.Property("Deleted")
+ .HasColumnType("boolean")
+ .HasColumnName("deleted");
+
+ b.Property("DeletedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("deleted_at");
+
+ b.Property("DeletedById")
+ .HasColumnType("uuid")
+ .HasColumnName("deleted_by_id");
+
+ b.Property("ExpirationTime")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("expiration_time");
+
+ b.Property("LastEditedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_edited_at");
+
+ b.Property("LastEditedById")
+ .HasColumnType("uuid")
+ .HasColumnName("last_edited_by_id");
+
+ b.Property("Message")
+ .IsRequired()
+ .HasMaxLength(4096)
+ .HasColumnType("character varying(4096)")
+ .HasColumnName("message");
+
+ b.Property("PlayerUserId")
+ .HasColumnType("uuid")
+ .HasColumnName("player_user_id");
+
+ b.Property("PlaytimeAtNote")
+ .HasColumnType("interval")
+ .HasColumnName("playtime_at_note");
+
+ b.Property("RoundId")
+ .HasColumnType("integer")
+ .HasColumnName("round_id");
+
+ b.Property("Secret")
+ .HasColumnType("boolean")
+ .HasColumnName("secret");
+
+ b.Property("Severity")
+ .HasColumnType("integer")
+ .HasColumnName("severity");
+
+ b.HasKey("Id")
+ .HasName("PK_admin_notes");
+
+ b.HasIndex("CreatedById");
+
+ b.HasIndex("DeletedById");
+
+ b.HasIndex("LastEditedById");
+
+ b.HasIndex("PlayerUserId")
+ .HasDatabaseName("IX_admin_notes_player_user_id");
+
+ b.HasIndex("RoundId")
+ .HasDatabaseName("IX_admin_notes_round_id");
+
+ b.ToTable("admin_notes", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.AdminRank", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("admin_rank_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("name");
+
+ b.HasKey("Id")
+ .HasName("PK_admin_rank");
+
+ b.ToTable("admin_rank", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.AdminRankFlag", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("admin_rank_flag_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AdminRankId")
+ .HasColumnType("integer")
+ .HasColumnName("admin_rank_id");
+
+ b.Property("Flag")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("flag");
+
+ b.HasKey("Id")
+ .HasName("PK_admin_rank_flag");
+
+ b.HasIndex("AdminRankId");
+
+ b.HasIndex("Flag", "AdminRankId")
+ .IsUnique();
+
+ b.ToTable("admin_rank_flag", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.AdminWatchlist", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("admin_watchlists_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedById")
+ .HasColumnType("uuid")
+ .HasColumnName("created_by_id");
+
+ b.Property("Deleted")
+ .HasColumnType("boolean")
+ .HasColumnName("deleted");
+
+ b.Property("DeletedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("deleted_at");
+
+ b.Property("DeletedById")
+ .HasColumnType("uuid")
+ .HasColumnName("deleted_by_id");
+
+ b.Property("ExpirationTime")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("expiration_time");
+
+ b.Property("LastEditedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_edited_at");
+
+ b.Property("LastEditedById")
+ .HasColumnType("uuid")
+ .HasColumnName("last_edited_by_id");
+
+ b.Property("Message")
+ .IsRequired()
+ .HasMaxLength(4096)
+ .HasColumnType("character varying(4096)")
+ .HasColumnName("message");
+
+ b.Property("PlayerUserId")
+ .HasColumnType("uuid")
+ .HasColumnName("player_user_id");
+
+ b.Property("PlaytimeAtNote")
+ .HasColumnType("interval")
+ .HasColumnName("playtime_at_note");
+
+ b.Property("RoundId")
+ .HasColumnType("integer")
+ .HasColumnName("round_id");
+
+ b.HasKey("Id")
+ .HasName("PK_admin_watchlists");
+
+ b.HasIndex("CreatedById");
+
+ b.HasIndex("DeletedById");
+
+ b.HasIndex("LastEditedById");
+
+ b.HasIndex("PlayerUserId")
+ .HasDatabaseName("IX_admin_watchlists_player_user_id");
+
+ b.HasIndex("RoundId")
+ .HasDatabaseName("IX_admin_watchlists_round_id");
+
+ b.ToTable("admin_watchlists", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.Antag", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("antag_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AntagName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("antag_name");
+
+ b.Property("ProfileId")
+ .HasColumnType("integer")
+ .HasColumnName("profile_id");
+
+ b.HasKey("Id")
+ .HasName("PK_antag");
+
+ b.HasIndex("ProfileId", "AntagName")
+ .IsUnique();
+
+ b.ToTable("antag", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.AssignedUserId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("assigned_user_id_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("UserId")
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("user_name");
+
+ b.HasKey("Id")
+ .HasName("PK_assigned_user_id");
+
+ b.HasIndex("UserId")
+ .IsUnique();
+
+ b.HasIndex("UserName")
+ .IsUnique();
+
+ b.ToTable("assigned_user_id", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.Ban", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ban_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AutoDelete")
+ .HasColumnType("boolean")
+ .HasColumnName("auto_delete");
+
+ b.Property("BanTime")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("ban_time");
+
+ b.Property("BanningAdmin")
+ .HasColumnType("uuid")
+ .HasColumnName("banning_admin");
+
+ b.Property("ExemptFlags")
+ .HasColumnType("integer")
+ .HasColumnName("exempt_flags");
+
+ b.Property("ExpirationTime")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("expiration_time");
+
+ b.Property("Hidden")
+ .HasColumnType("boolean")
+ .HasColumnName("hidden");
+
+ b.Property("LastEditedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_edited_at");
+
+ b.Property("LastEditedById")
+ .HasColumnType("uuid")
+ .HasColumnName("last_edited_by_id");
+
+ b.Property("PlaytimeAtNote")
+ .HasColumnType("interval")
+ .HasColumnName("playtime_at_note");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("reason");
+
+ b.Property("Severity")
+ .HasColumnType("integer")
+ .HasColumnName("severity");
+
+ b.Property("Type")
+ .HasColumnType("smallint")
+ .HasColumnName("type");
+
+ b.HasKey("Id")
+ .HasName("PK_ban");
+
+ b.HasIndex("BanningAdmin");
+
+ b.HasIndex("LastEditedById");
+
+ b.ToTable("ban", null, t =>
+ {
+ t.HasCheckConstraint("NoExemptOnRoleBan", "type = 0 OR exempt_flags = 0");
+ });
+ });
+
+ modelBuilder.Entity("Content.Server.Database.BanAddress", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ban_address_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Address")
+ .HasColumnType("inet")
+ .HasColumnName("address");
+
+ b.Property("BanId")
+ .HasColumnType("integer")
+ .HasColumnName("ban_id");
+
+ b.HasKey("Id")
+ .HasName("PK_ban_address");
+
+ b.HasIndex("BanId")
+ .HasDatabaseName("IX_ban_address_ban_id");
+
+ b.ToTable("ban_address", null, t =>
+ {
+ t.HasCheckConstraint("AddressNotIPv6MappedIPv4", "NOT inet '::ffff:0.0.0.0/96' >>= address");
+ });
+ });
+
+ modelBuilder.Entity("Content.Server.Database.BanHwid", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ban_hwid_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BanId")
+ .HasColumnType("integer")
+ .HasColumnName("ban_id");
+
+ b.HasKey("Id")
+ .HasName("PK_ban_hwid");
+
+ b.HasIndex("BanId")
+ .HasDatabaseName("IX_ban_hwid_ban_id");
+
+ b.ToTable("ban_hwid", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.BanPlayer", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ban_player_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BanId")
+ .HasColumnType("integer")
+ .HasColumnName("ban_id");
+
+ b.Property("UserId")
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("PK_ban_player");
+
+ b.HasIndex("BanId")
+ .HasDatabaseName("IX_ban_player_ban_id");
+
+ b.HasIndex("UserId", "BanId")
+ .IsUnique();
+
+ b.ToTable("ban_player", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.BanRole", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ban_role_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BanId")
+ .HasColumnType("integer")
+ .HasColumnName("ban_id");
+
+ b.Property("RoleId")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("role_id");
+
+ b.Property("RoleType")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("role_type");
+
+ b.HasKey("Id")
+ .HasName("PK_ban_role");
+
+ b.HasIndex("BanId")
+ .HasDatabaseName("IX_ban_role_ban_id");
+
+ b.HasIndex("RoleType", "RoleId", "BanId")
+ .IsUnique();
+
+ b.ToTable("ban_role", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.BanRound", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ban_round_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BanId")
+ .HasColumnType("integer")
+ .HasColumnName("ban_id");
+
+ b.Property("RoundId")
+ .HasColumnType("integer")
+ .HasColumnName("round_id");
+
+ b.HasKey("Id")
+ .HasName("PK_ban_round");
+
+ b.HasIndex("BanId")
+ .HasDatabaseName("IX_ban_round_ban_id");
+
+ b.HasIndex("RoundId", "BanId")
+ .IsUnique();
+
+ b.ToTable("ban_round", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.BanTemplate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ban_template_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AutoDelete")
+ .HasColumnType("boolean")
+ .HasColumnName("auto_delete");
+
+ b.Property("ExemptFlags")
+ .HasColumnType("integer")
+ .HasColumnName("exempt_flags");
+
+ b.Property("Hidden")
+ .HasColumnType("boolean")
+ .HasColumnName("hidden");
+
+ b.Property("Length")
+ .HasColumnType("interval")
+ .HasColumnName("length");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("reason");
+
+ b.Property("Severity")
+ .HasColumnType("integer")
+ .HasColumnName("severity");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("title");
+
+ b.HasKey("Id")
+ .HasName("PK_ban_template");
+
+ b.ToTable("ban_template", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.Blacklist", b =>
+ {
+ b.Property("UserId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.HasKey("UserId")
+ .HasName("PK_blacklist");
+
+ b.ToTable("blacklist", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.ConnectionLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("connection_log_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Address")
+ .IsRequired()
+ .HasColumnType("inet")
+ .HasColumnName("address");
+
+ b.Property("Denied")
+ .HasColumnType("smallint")
+ .HasColumnName("denied");
+
+ b.Property("ServerId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasDefaultValue(0)
+ .HasColumnName("server_id");
+
+ b.Property("Time")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("time");
+
+ b.Property("Trust")
+ .HasColumnType("real")
+ .HasColumnName("trust");
+
+ b.Property("UserId")
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("user_name");
+
+ b.HasKey("Id")
+ .HasName("PK_connection_log");
+
+ b.HasIndex("ServerId")
+ .HasDatabaseName("IX_connection_log_server_id");
+
+ b.HasIndex("Time");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("connection_log", null, t =>
+ {
+ t.HasCheckConstraint("AddressNotIPv6MappedIPv4", "NOT inet '::ffff:0.0.0.0/96' >>= address");
+ });
+ });
+
+ modelBuilder.Entity("Content.Server.Database.DynamicMarketEntry", b =>
+ {
+ b.Property("ProtoId")
+ .HasColumnType("text")
+ .HasColumnName("protoid");
+
+ b.Property("BasePrice")
+ .HasColumnType("double precision")
+ .HasColumnName("baseprice");
+
+ b.Property("BoughtUnits")
+ .HasColumnType("bigint")
+ .HasColumnName("bought_units");
+
+ b.Property("LastUpdate")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_update");
+
+ b.Property("ModPrice")
+ .HasColumnType("double precision")
+ .HasColumnName("modprice");
+
+ b.Property("SoldUnits")
+ .HasColumnType("bigint")
+ .HasColumnName("sold_units");
+
+ b.HasKey("ProtoId")
+ .HasName("PK_dynamic_market");
+
+ b.ToTable("dynamic_market", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.IPIntelCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ipintel_cache_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Address")
+ .IsRequired()
+ .HasColumnType("inet")
+ .HasColumnName("address");
+
+ b.Property("Score")
+ .HasColumnType("real")
+ .HasColumnName("score");
+
+ b.Property("Time")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("time");
+
+ b.HasKey("Id")
+ .HasName("PK_ipintel_cache");
+
+ b.ToTable("ipintel_cache", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.Job", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("job_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("JobName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("job_name");
+
+ b.Property("Priority")
+ .HasColumnType("integer")
+ .HasColumnName("priority");
+
+ b.Property("ProfileId")
+ .HasColumnType("integer")
+ .HasColumnName("profile_id");
+
+ b.HasKey("Id")
+ .HasName("PK_job");
+
+ b.HasIndex("ProfileId");
+
+ b.HasIndex("ProfileId", "JobName")
+ .IsUnique();
+
+ b.HasIndex(new[] { "ProfileId" }, "IX_job_one_high_priority")
+ .IsUnique()
+ .HasFilter("priority = 3");
+
+ b.ToTable("job", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.PlayTime", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("play_time_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("PlayerId")
+ .HasColumnType("uuid")
+ .HasColumnName("player_id");
+
+ b.Property("TimeSpent")
+ .HasColumnType("interval")
+ .HasColumnName("time_spent");
+
+ b.Property("Tracker")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("tracker");
+
+ b.HasKey("Id")
+ .HasName("PK_play_time");
+
+ b.HasIndex("PlayerId", "Tracker")
+ .IsUnique();
+
+ b.ToTable("play_time", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.Player", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("player_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("FirstSeenTime")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("first_seen_time");
+
+ b.Property("LastReadRules")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_read_rules");
+
+ b.Property("LastSeenAddress")
+ .IsRequired()
+ .HasColumnType("inet")
+ .HasColumnName("last_seen_address");
+
+ b.Property("LastSeenTime")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_seen_time");
+
+ b.Property("LastSeenUserName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("last_seen_user_name");
+
+ b.Property("UserId")
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("PK_player");
+
+ b.HasAlternateKey("UserId")
+ .HasName("ak_player_user_id");
+
+ b.HasIndex("LastSeenUserName");
+
+ b.HasIndex("UserId")
+ .IsUnique();
+
+ b.ToTable("player", null, t =>
+ {
+ t.HasCheckConstraint("LastSeenAddressNotIPv6MappedIPv4", "NOT inet '::ffff:0.0.0.0/96' >>= last_seen_address");
+ });
+ });
+
+ modelBuilder.Entity("Content.Server.Database.Preference", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("preference_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AdminOOCColor")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("admin_ooc_color");
+
+ b.PrimitiveCollection>("ConstructionFavorites")
+ .IsRequired()
+ .HasColumnType("text[]")
+ .HasColumnName("construction_favorites");
+
+ b.Property("SelectedCharacterSlot")
+ .HasColumnType("integer")
+ .HasColumnName("selected_character_slot");
+
+ b.Property("UserId")
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("PK_preference");
+
+ b.HasIndex("UserId")
+ .IsUnique();
+
+ b.ToTable("preference", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.Profile", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("profile_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Age")
+ .HasColumnType("integer")
+ .HasColumnName("age");
+
+ b.Property("BankBalance")
+ .HasColumnType("integer")
+ .HasColumnName("bank_balance");
+
+ b.Property("CharacterName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("char_name");
+
+ b.Property("Company")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("company");
+
+ b.Property("ERPStatus")
+ .HasColumnType("integer")
+ .HasColumnName("erpstatus");
+
+ b.Property("EyeColor")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("eye_color");
+
+ b.Property("FacialHairColor")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("facial_hair_color");
+
+ b.Property("FacialHairName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("facial_hair_name");
+
+ b.Property("FlavorText")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("flavor_text");
+
+ b.Property("Gender")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("gender");
+
+ b.Property("HairColor")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("hair_color");
+
+ b.Property("HairName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("hair_name");
+
+ b.Property("Markings")
+ .HasColumnType("jsonb")
+ .HasColumnName("markings");
+
+ b.Property("PreferenceId")
+ .HasColumnType("integer")
+ .HasColumnName("preference_id");
+
+ b.Property("PreferenceUnavailable")
+ .HasColumnType("integer")
+ .HasColumnName("pref_unavailable");
+
+ b.Property("Sex")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("sex");
+
+ b.Property("SkinColor")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("skin_color");
+
+ b.Property("Slot")
+ .HasColumnType("integer")
+ .HasColumnName("slot");
+
+ b.Property("SpawnPriority")
+ .HasColumnType("integer")
+ .HasColumnName("spawn_priority");
+
+ b.Property("Species")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("species");
+
+ b.Property("Voice")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("voice");
+
+ b.HasKey("Id")
+ .HasName("PK_profile");
+
+ b.HasIndex("PreferenceId")
+ .HasDatabaseName("IX_profile_preference_id");
+
+ b.HasIndex("Slot", "PreferenceId")
+ .IsUnique();
+
+ b.ToTable("profile", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.ProfileLoadout", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("profile_loadout_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("LoadoutName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("loadout_name");
+
+ b.Property("ProfileLoadoutGroupId")
+ .HasColumnType("integer")
+ .HasColumnName("profile_loadout_group_id");
+
+ b.HasKey("Id")
+ .HasName("PK_profile_loadout");
+
+ b.HasIndex("ProfileLoadoutGroupId");
+
+ b.ToTable("profile_loadout", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("profile_loadout_group_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("GroupName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("group_name");
+
+ b.Property("ProfileRoleLoadoutId")
+ .HasColumnType("integer")
+ .HasColumnName("profile_role_loadout_id");
+
+ b.HasKey("Id")
+ .HasName("PK_profile_loadout_group");
+
+ b.HasIndex("ProfileRoleLoadoutId");
+
+ b.ToTable("profile_loadout_group", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("profile_role_loadout_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("EntityName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasColumnName("entity_name");
+
+ b.Property("ProfileId")
+ .HasColumnType("integer")
+ .HasColumnName("profile_id");
+
+ b.Property("RoleName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("role_name");
+
+ b.HasKey("Id")
+ .HasName("PK_profile_role_loadout");
+
+ b.HasIndex("ProfileId");
+
+ b.ToTable("profile_role_loadout", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
+ {
+ b.Property("PlayerUserId")
+ .HasColumnType("uuid")
+ .HasColumnName("player_user_id");
+
+ b.Property("RoleId")
+ .HasColumnType("text")
+ .HasColumnName("role_id");
+
+ b.HasKey("PlayerUserId", "RoleId")
+ .HasName("PK_role_whitelists");
+
+ b.ToTable("role_whitelists", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.Round", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("round_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("ServerId")
+ .HasColumnType("integer")
+ .HasColumnName("server_id");
+
+ b.Property("StartDate")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("start_date");
+
+ b.HasKey("Id")
+ .HasName("PK_round");
+
+ b.HasIndex("ServerId")
+ .HasDatabaseName("IX_round_server_id");
+
+ b.HasIndex("StartDate");
+
+ b.ToTable("round", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.Server", b =>
+ {
+ b.Property