diff --git a/Content.Client/CriminalRecords/CriminalRecordsConsoleBoundUserInterface.cs b/Content.Client/CriminalRecords/CriminalRecordsConsoleBoundUserInterface.cs
index d5cc4ecfa9a..e8db8c77a10 100644
--- a/Content.Client/CriminalRecords/CriminalRecordsConsoleBoundUserInterface.cs
+++ b/Content.Client/CriminalRecords/CriminalRecordsConsoleBoundUserInterface.cs
@@ -1,3 +1,4 @@
+using Content.Shared._WL.Records; // WL-Records
using Content.Shared.Access.Systems;
using Content.Shared.CriminalRecords;
using Content.Shared.CriminalRecords.Components;
@@ -44,6 +45,10 @@ protected override void Open()
_window.OnHistoryUpdated += UpdateHistory;
_window.OnHistoryClosed += () => _historyWindow?.Close();
_window.OnClose += Close;
+ // WL-Records-start
+ _window.OnPrinted += key =>
+ SendMessage(new PrintStationRecord(key));
+ // WL-Records-end
_historyWindow = new(comp.MaxStringLength);
_historyWindow.OnAddHistory += line => SendMessage(new CriminalRecordAddHistory(line));
diff --git a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml
index fc8fe2573d5..e4b90aa7cb1 100644
--- a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml
+++ b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml
@@ -62,7 +62,7 @@
StyleClasses="LabelBig" />
-
-
+
+
diff --git a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml.cs b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml.cs
index 97071964165..79dbab47b1a 100644
--- a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml.cs
+++ b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml.cs
@@ -1,12 +1,17 @@
using Content.Client.UserInterface.Controls;
+using Content.Shared._WL.Languages;
+using Content.Shared._WL.Records; // WL-Records-Start
using Content.Shared.Access.Systems;
using Content.Shared.Administration;
using Content.Shared.CriminalRecords;
using Content.Shared.Dataset;
+using Content.Shared.Humanoid.Prototypes; // WL-Records
using Content.Shared.Random.Helpers;
using Content.Shared.Security;
using Content.Shared.StationRecords;
+using Content.Shared.StatusIcon;
using Robust.Client.AutoGenerated;
+using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
@@ -15,8 +20,6 @@
using Robust.Shared.Utility;
using System.Linq;
using System.Numerics;
-using Content.Shared.StatusIcon;
-using Robust.Client.GameObjects;
namespace Content.Client.CriminalRecords;
@@ -42,6 +45,7 @@ public sealed partial class CriminalRecordsConsoleWindow : FancyWindow
public Action? OnHistoryUpdated;
public Action? OnHistoryClosed;
public Action? OnDialogConfirmed;
+ public Action? OnPrinted; // WL-Records
public Action? OnStatusFilterPressed;
private uint _maxLength;
@@ -148,6 +152,15 @@ public CriminalRecordsConsoleWindow(EntityUid console, uint maxLength, IPlayerMa
if (_selectedRecord is { } record)
OnHistoryUpdated?.Invoke(record, _access, true);
};
+
+ // WL-Records-start
+ PrintButton.OnPressed += _ =>
+ {
+ PrintButton.Disabled = true;
+ if (_selectedKey != null)
+ OnPrinted?.Invoke(_selectedKey.Value);
+ };
+ // WL-Records-end
}
public void StatusFilterPressed(SecurityStatus statusSelected)
@@ -175,6 +188,8 @@ public void UpdateState(CriminalRecordsConsoleState state)
_currentCrewListFilter = state.FilterStatus;
}
+ PrintButton.Disabled = !state.CanPrintRecords; // WL-Records
+
_selectedKey = state.SelectedKey;
FilterType.SelectId((int)_currentFilterType);
CrewListFilter.SelectId((int)_currentCrewListFilter);
@@ -266,9 +281,26 @@ private void PopulateRecordContainer(GeneralStationRecord stationRecord, Crimina
}
// WL-Records-Start
- SecurityRecord.Text = !string.IsNullOrEmpty(stationRecord.SecurityRecord)
- ? stationRecord.SecurityRecord
- : Loc.GetString("criminal-records-console-no-security-record");
+ var confederation = string.Empty;
+
+ if (_proto.TryIndex(stationRecord.Confederation, out var protoConf))
+ confederation = Loc.GetString(protoConf.Name);
+ else
+ confederation = Loc.GetString("generic-not-available-shorthand");
+
+ SecurityRecord.Text = $"""
+ {Loc.GetString("records-full-name-edit")} {(!string.IsNullOrEmpty(stationRecord.Fullname)
+ ? stationRecord.Fullname : stationRecord.Name)}
+ {Loc.GetString("records-date-of-birth-edit")} {(!string.IsNullOrEmpty(stationRecord.DateOfBirth)
+ ? stationRecord.DateOfBirth : Loc.GetString("generic-not-available-shorthand"))}
+ {Loc.GetString("records-confederation-edit")} {confederation}
+ {Loc.GetString("records-country-edit")} {(!string.IsNullOrEmpty(stationRecord.Country)
+ ? stationRecord.Country : Loc.GetString("generic-not-available-shorthand"))}
+ {Loc.GetString("records-species")} {Loc.GetString(_proto.Index(stationRecord.Species).Name)}
+ {Loc.GetString("records-height", ("height", stationRecord.Height))}
+ {(!string.IsNullOrEmpty(stationRecord.SecurityRecord) ? stationRecord.SecurityRecord
+ : Loc.GetString("criminal-records-console-no-security-record"))}
+ """;
// WL-Records-End
}
diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
index abb19649554..ab05257364f 100644
--- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
+++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
@@ -14,6 +14,7 @@
using Content.Client.Sprite;
using Content.Client.UserInterface.Systems.Guidebook;
using Content.Shared._WL.Skills; // WL-Skills
+using Content.Shared._WL.Records; // WL-Records
using Content.Shared.CCVar;
using Content.Shared.Clothing;
using Content.Shared.Corvax.CCCVars;
@@ -41,7 +42,8 @@
using Robust.Shared.Utility;
using Direction = Robust.Shared.Maths.Direction;
using static Content.Client.Corvax.SponsorOnlyHelpers; // Corvax-Sponsors
-using Content.Client.Corvax.TTS; // Corvax-TTS
+using Content.Client.Corvax.TTS;
+using Content.Client.Lathe.UI; // Corvax-TTS
namespace Content.Client.Lobby.UI
{
@@ -195,6 +197,15 @@ public sealed partial class HumanoidProfileEditor : BoxContainer
private TextEdit? _securityRecordEdit; // WL-Records
private TextEdit? _employmentRecordEdit; // WL-Records
+ private LineEdit? _generalRecordNameEdit; // WL-Records
+ private LineEdit? _generalRecordAgeEdit; // WL-Records
+ private LineEdit? _generalRecordCountryEdit; // WL-Records
+
+ private OptionButton? _confederationButton; // WL-Records
+
+
+ private List _confederations = new(); // WL-Recordss
+
private SingleMarkingPicker _underwearPicker => CUnderwearPicker; // WL-Underwear
private SingleMarkingPicker _undershirtPicker => CUndershirtPicker; // WL-Underwear
private SingleMarkingPicker _socksPicker => CSocksPicker; // WL-Underwear
@@ -743,6 +754,12 @@ public HumanoidProfileEditor(
RefreshFlavorText();
RefreshRecords(); // WL-Records
+
+ //_confederationButton.OnItemSelected += args =>
+ //{
+
+ //};
+
RefreshVoiceTab(); // Corvax-TTS
#region Dummy
@@ -822,9 +839,37 @@ public void RefreshRecords()
_securityRecordEdit = _recordsTab.SecurityRecordInput;
_employmentRecordEdit = _recordsTab.EmploymentRecordInput;
+ _generalRecordNameEdit = _recordsTab.NameEdit;
+ _generalRecordAgeEdit = _recordsTab.AgeEdit;
+ _generalRecordCountryEdit = _recordsTab.CountryEdit;
+
+ _confederationButton = _recordsTab.ConfederationButton;
+
_recordsTab.OnMedicalRecordChanged += OnMedicalRecordChange;
_recordsTab.OnSecurityRecordChanged += OnSecurityRecordChange;
_recordsTab.OnEmploymentRecordChanged += OnEmploymentRecordChange;
+
+ _recordsTab.OnGeneralRecordNameChanged += OnGeneralRecordNameChanged;
+ _recordsTab.OnGeneralRecordAgeChanged += OnGeneralRecordDateOfBirthChanged;
+ _recordsTab.OnGeneralRecordCountryChanged += OnGeneralRecordCountryChanged;
+
+ _recordsTab.OnGeneralRecordConfederationChanged += SetConfederation;
+
+ _confederations.AddRange(_prototypeManager.EnumeratePrototypes());
+
+ _confederations.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.CurrentCultureIgnoreCase));
+
+ for (var i = 0; i < _confederations.Count; i++)
+ {
+ var name = Loc.GetString(_confederations[i].Name);
+
+ _recordsTab.ConfederationButton.AddItem(name, i);
+
+ if (_confederations[i].ID == "NoConfederation")
+ {
+ _recordsTab.ConfederationButton.SelectId(i);
+ }
+ }
}
private void OnMedicalRecordChange(string content)
@@ -853,6 +898,44 @@ private void OnEmploymentRecordChange(string content)
Profile = Profile.WithEmploymentRecord(content);
SetDirty();
}
+
+ private void OnGeneralRecordNameChanged(string content)
+ {
+ if (Profile is null)
+ return;
+
+ Profile = Profile.WithFullName(content);
+ SetDirty();
+ }
+ private void OnGeneralRecordDateOfBirthChanged(string content)
+ {
+ if (Profile is null)
+ return;
+
+ Profile = Profile.WithDateOfBirth(content);
+ SetDirty();
+ }
+ private void OnGeneralRecordCountryChanged(string content)
+ {
+ if (Profile is null)
+ return;
+
+ Profile = Profile.WithCountry(content);
+ SetDirty();
+ }
+ private void SetConfederation(OptionButton.ItemSelectedEventArgs args)
+ {
+ if (_confederationButton is null)
+ return;
+
+ if (Profile is null)
+ return;
+
+ _confederationButton.SelectId(args.Id);
+ Profile = Profile.WithConfederation(_confederations[args.Id].ID);
+ SetDirty();
+ }
+
// WL-Records-End
// Corvax-TTS-Start
#region Voice
@@ -1909,6 +1992,24 @@ private void UpdateRecordsEdit()
if (_employmentRecordEdit != null)
_employmentRecordEdit.TextRope = new Rope.Leaf(Profile?.EmploymentRecord ?? "");
+
+ if (_generalRecordNameEdit != null)
+ _generalRecordNameEdit.Text = Profile?.FullName ?? "";
+
+ if (_generalRecordAgeEdit != null)
+ _generalRecordAgeEdit.Text = Profile?.DateOfBirth ?? "";
+
+ if (_generalRecordCountryEdit != null)
+ _generalRecordCountryEdit.Text = Profile?.Country ?? "";
+
+ if (_confederationButton != null)
+ for (var i = 0; i < _confederations.Count; i++)
+ {
+ if (Profile?.Confederation.Equals(_confederations[i].ID) == true)
+ {
+ _confederationButton.SelectId(i);
+ }
+ }
}
// WL-Records-End
diff --git a/Content.Client/StationRecords/GeneralRecord.xaml b/Content.Client/StationRecords/GeneralRecord.xaml
index 179dc2577a7..8561f88bc9d 100644
--- a/Content.Client/StationRecords/GeneralRecord.xaml
+++ b/Content.Client/StationRecords/GeneralRecord.xaml
@@ -8,7 +8,7 @@
-->
-
+
(record.Confederation, out var proto))
+ confederation = Loc.GetString(proto.Name);
+ else
+ confederation = Loc.GetString("generic-not-available-shorthand");
+
+ string languages = string.Empty;
+
+ for (int i = 0; i < record.Languages.Count; i++)
+ {
+ languages += Loc.GetString(prototypeManager.Index(record.Languages[i]).Name);
+
+ if (i != record.Languages.Count - 1)
+ languages += ", ";
+ else
+ languages += ".";
+ }
+
+ Record.Text = $"""
+ {Loc.GetString("records-full-name-edit")} {(!string.IsNullOrEmpty(record.Fullname)
+ ? record.Fullname : record.Name)}
+ {Loc.GetString("records-date-of-birth-edit")} {(!string.IsNullOrEmpty(record.DateOfBirth)
+ ? record.DateOfBirth : Loc.GetString("generic-not-available-shorthand"))}
+ {Loc.GetString("records-confederation-edit")} {confederation}
+ {Loc.GetString("records-country-edit")} {(!string.IsNullOrEmpty(record.Country)
+ ? record.Country : Loc.GetString("generic-not-available-shorthand"))}
+ {Loc.GetString("records-species")} {Loc.GetString(prototypeManager.Index(record.Species).Name)}
+ {Loc.GetString("records-language")} {languages}
+ {(!string.IsNullOrEmpty(record.EmploymentRecord) ? record.EmploymentRecord
+ : Loc.GetString("general-station-console-no-employment-record"))}
+ """;
// WL-Records-Edit-End
Fingerprint.Text = Loc.GetString("general-station-record-console-record-fingerprint",
("fingerprint", record.Fingerprint ?? Loc.GetString("generic-not-available-shorthand")));
diff --git a/Content.Client/StationRecords/GeneralStationRecordConsoleBoundUserInterface.cs b/Content.Client/StationRecords/GeneralStationRecordConsoleBoundUserInterface.cs
index e7bab71e38e..dc97d16b5b6 100644
--- a/Content.Client/StationRecords/GeneralStationRecordConsoleBoundUserInterface.cs
+++ b/Content.Client/StationRecords/GeneralStationRecordConsoleBoundUserInterface.cs
@@ -1,4 +1,5 @@
using Content.Shared.StationRecords;
+using Content.Shared._WL.Records;
using Robust.Client.UserInterface;
namespace Content.Client.StationRecords;
@@ -22,6 +23,7 @@ protected override void Open()
_window.OnFiltersChanged += (type, filterValue) =>
SendMessage(new SetStationRecordFilter(type, filterValue));
_window.OnDeleted += id => SendMessage(new DeleteStationRecord(id));
+ _window.OnPrint += id => SendMessage(new PrintStationRecord(id));
}
protected override void UpdateState(BoundUserInterfaceState state)
diff --git a/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml b/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml
index 3615eb8e008..bb3f389b532 100644
--- a/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml
+++ b/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml
@@ -1,6 +1,6 @@
+ MinSize="750 520">
@@ -17,9 +17,12 @@
-
+
-
+
+
+
+
diff --git a/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs b/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs
index 951928325d5..19dc59cff40 100644
--- a/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs
+++ b/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs
@@ -15,6 +15,11 @@ public sealed partial class GeneralStationRecordConsoleWindow : DefaultWindow
public Action? OnFiltersChanged;
public Action? OnDeleted;
+ // WL-Records-start
+ public Action? OnPrint;
+
+ private uint? _activatedId;
+ // WL-Records-end
private bool _isPopulating;
@@ -72,6 +77,15 @@ public GeneralStationRecordConsoleWindow()
StationRecordsFiltersValue.Text = "";
FilterListingOfRecords();
};
+
+ // WL-Records-start
+ PrintButton.OnPressed += _ =>
+ {
+ PrintButton.Disabled = true;
+ if (_activatedId != null)
+ OnPrint?.Invoke(_activatedId.Value);
+ };
+ // WL-Records-end
}
public void UpdateState(GeneralStationRecordConsoleState state)
@@ -91,6 +105,8 @@ public void UpdateState(GeneralStationRecordConsoleState state)
StationRecordsFilterType.SelectId((int)_currentFilterType);
+ PrintButton.Disabled = !state.CanPrintRecords; // WL-Records
+
if (state.RecordListing == null)
{
RecordListingStatus.Visible = true;
@@ -146,6 +162,8 @@ private void PopulateRecordContainer(GeneralStationRecord record, bool enableDel
var newRecord = new GeneralRecord(record, enableDelete, id, _prototypeManager);
newRecord.OnDeletePressed = OnDeleted;
+ _activatedId = id; // WL-Records
+
RecordContainer.AddChild(newRecord);
}
diff --git a/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleBoundUserInterface.cs b/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleBoundUserInterface.cs
index 66c1d5ea3a8..4539f85032c 100644
--- a/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleBoundUserInterface.cs
+++ b/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleBoundUserInterface.cs
@@ -1,5 +1,5 @@
using Content.Shared._WL.MedicalRecords;
-using Content.Shared.StationRecords;
+using Content.Shared._WL.Records;
using Robust.Client.UserInterface;
namespace Content.Client._WL.MedicalRecords;
@@ -18,6 +18,8 @@ protected override void Open()
_window.OnKeySelected += key => SendMessage(new MedicalRecordsSelectStationRecord(key));
_window.OnFiltersChanged += (type, filterValue) =>
SendMessage(new MedicalRecordsSetStationRecordFilter(type, filterValue));
+ _window.OnPrinted += id =>
+ SendMessage(new PrintStationRecord(id));
_window.OnClose += Close;
_window.OpenCentered();
diff --git a/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleWindow.xaml b/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleWindow.xaml
index f2380bc5017..59711b46931 100644
--- a/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleWindow.xaml
+++ b/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleWindow.xaml
@@ -56,7 +56,7 @@
StyleClasses="LabelBig" />
-
@@ -80,11 +80,12 @@
-
+
+
diff --git a/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleWindow.xaml.cs b/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleWindow.xaml.cs
index f5634d23d18..455c1b53742 100644
--- a/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleWindow.xaml.cs
+++ b/Content.Client/_WL/MedicalRecords/MedicalRecordsConsoleWindow.xaml.cs
@@ -1,18 +1,25 @@
-using System.Linq;
using Content.Client.UserInterface.Controls;
+using Content.Shared._WL.Languages;
using Content.Shared._WL.MedicalRecords;
+using Content.Shared._WL.Records;
+using Content.Shared.Humanoid.Prototypes;
using Content.Shared.StationRecords;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
+using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
+using System.Linq;
namespace Content.Client._WL.MedicalRecords;
[GenerateTypedNameReferences]
public sealed partial class MedicalRecordsConsoleWindow : FancyWindow
{
+ [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
+
public Action? OnKeySelected;
+ public Action? OnPrinted;
public Action? OnFiltersChanged;
private uint? _selectedKey;
@@ -48,6 +55,13 @@ public MedicalRecordsConsoleWindow()
{
FilterListingOfRecords(args.Text);
};
+
+ PrintButton.OnPressed += _ =>
+ {
+ PrintButton.Disabled = true;
+ if (_selectedKey != null)
+ OnPrinted?.Invoke(_selectedKey.Value);
+ };
}
public void UpdateState(MedicalRecordsConsoleState state)
@@ -70,6 +84,8 @@ public void UpdateState(MedicalRecordsConsoleState state)
{
PopulateRecordContainer(state.StationRecord);
}
+
+ PrintButton.Disabled = !state.CanPrintRecords;
}
private void PopulateRecordListing(Dictionary? listing)
@@ -99,7 +115,36 @@ private void PopulateRecordContainer(GeneralStationRecord stationRecord)
PersonDna.Text = stationRecord.DNA ?? na;
MedicalRecordText.SetMessage(FormattedMessage.FromMarkupOrThrow(
- stationRecord.MedicalRecord ?? Loc.GetString("medical-records-console-no-record")));
+ GenerateMedicalRecord(stationRecord)));
+ }
+
+ private string GenerateMedicalRecord(GeneralStationRecord stationRecord)
+ {
+ string languages = string.Empty;
+
+ for (int i = 0; i < stationRecord.Languages.Count; i++)
+ {
+ languages += Loc.GetString(_prototypeManager.Index(stationRecord.Languages[i]).Name);
+
+ if (i != stationRecord.Languages.Count - 1)
+ languages += ", ";
+ else
+ languages += ".";
+ }
+
+ var medicalRecord = $"""
+ {Loc.GetString("records-full-name-edit")} {(!string.IsNullOrEmpty(stationRecord.Fullname)
+ ? stationRecord.Fullname : stationRecord.Name)}
+ {Loc.GetString("records-date-of-birth-edit")} {(!string.IsNullOrEmpty(stationRecord.DateOfBirth)
+ ? stationRecord.DateOfBirth : Loc.GetString("generic-not-available-shorthand"))}
+ {Loc.GetString("records-species")} {Loc.GetString(_prototypeManager.Index(stationRecord.Species).Name)}
+ {Loc.GetString("records-height", ("height", stationRecord.Height))}
+ {Loc.GetString("records-language")} {languages}
+ {(!string.IsNullOrEmpty(stationRecord.MedicalRecord) ? stationRecord.MedicalRecord
+ : Loc.GetString("medical-records-console-no-record"))}
+ """;
+
+ return medicalRecord;
}
private void FilterListingOfRecords(string text = "")
diff --git a/Content.Client/_WL/Records/RecordsTab.xaml b/Content.Client/_WL/Records/RecordsTab.xaml
index 032e742ea36..79b1c11baca 100644
--- a/Content.Client/_WL/Records/RecordsTab.xaml
+++ b/Content.Client/_WL/Records/RecordsTab.xaml
@@ -4,6 +4,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Content.Client/_WL/Records/RecordsTab.xaml.cs b/Content.Client/_WL/Records/RecordsTab.xaml.cs
index 3f93133bd63..fb8ca9fa847 100644
--- a/Content.Client/_WL/Records/RecordsTab.xaml.cs
+++ b/Content.Client/_WL/Records/RecordsTab.xaml.cs
@@ -1,5 +1,6 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Localization;
using Robust.Shared.Utility;
@@ -12,6 +13,10 @@ public sealed partial class RecordsTab : Control
public Action? OnMedicalRecordChanged;
public Action? OnSecurityRecordChanged;
public Action? OnEmploymentRecordChanged;
+ public Action? OnGeneralRecordNameChanged;
+ public Action? OnGeneralRecordAgeChanged;
+ public Action? OnGeneralRecordConfederationChanged;
+ public Action? OnGeneralRecordCountryChanged;
public RecordsTab()
{
@@ -26,6 +31,12 @@ public RecordsTab()
SecurityRecordInput.OnTextChanged += _ => OnSecurityRecordChanged?.Invoke(Rope.Collapse(SecurityRecordInput.TextRope).Trim());
EmploymentRecordInput.OnTextChanged += _ => OnEmploymentRecordChanged?.Invoke(Rope.Collapse(EmploymentRecordInput.TextRope).Trim());
+ NameEdit.OnTextChanged += _ => OnGeneralRecordNameChanged?.Invoke(NameEdit.Text.Trim());
+ AgeEdit.OnTextChanged += _ => OnGeneralRecordAgeChanged?.Invoke(AgeEdit.Text.Trim());
+ CountryEdit.OnTextChanged += _ => OnGeneralRecordCountryChanged?.Invoke(CountryEdit.Text.Trim());
+
+ ConfederationButton.OnItemSelected += obj => OnGeneralRecordConfederationChanged?.Invoke(obj);
+
MedicalTemplateButton.OnPressed += _ => LoadMedicalTemplate();
SecurityTemplateButton.OnPressed += _ => LoadSecurityTemplate();
EmploymentTemplateButton.OnPressed += _ => LoadEmploymentTemplate();
diff --git a/Content.Server.Database/Migrations/Postgres/20260115180446_UpdateRecords.Designer.cs b/Content.Server.Database/Migrations/Postgres/20260115180446_UpdateRecords.Designer.cs
new file mode 100644
index 00000000000..9aa51cb4f1d
--- /dev/null
+++ b/Content.Server.Database/Migrations/Postgres/20260115180446_UpdateRecords.Designer.cs
@@ -0,0 +1,2337 @@
+//
+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("20260115180446_UpdateRecords")]
+ partial class UpdateRecords
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.1")
+ .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.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.DiscordConnection", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("discord_connections_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("DiscordId")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("discord_id");
+
+ b.Property("UserGuid")
+ .HasColumnType("uuid")
+ .HasColumnName("user_guid");
+
+ b.HasKey("Id")
+ .HasName("PK_discord_connections");
+
+ b.HasIndex("DiscordId")
+ .IsUnique();
+
+ b.HasIndex("UserGuid")
+ .IsUnique();
+
+ b.ToTable("discord_connections", (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.JobSubname", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("job_subname_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("JobName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("job_name");
+
+ b.Property("ProfileId")
+ .HasColumnType("integer")
+ .HasColumnName("profile_id");
+
+ b.Property("Subname")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("subname");
+
+ b.HasKey("Id")
+ .HasName("PK_job_subname");
+
+ b.HasIndex("ProfileId", "JobName")
+ .IsUnique();
+
+ b.ToTable("job_subname", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.JobUnblocking", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("job_unblocking_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("ForceUnblocked")
+ .HasColumnType("boolean")
+ .HasColumnName("force_unblocked");
+
+ b.Property("JobName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("job_name");
+
+ b.Property("ProfileId")
+ .HasColumnType("integer")
+ .HasColumnName("profile_id");
+
+ b.HasKey("Id")
+ .HasName("PK_job_unblocking");
+
+ b.HasIndex("ProfileId", "JobName")
+ .IsUnique();
+
+ b.ToTable("job_unblocking", (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("CharacterName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("char_name");
+
+ b.Property("Confederation")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("confederation");
+
+ b.Property("Country")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("country");
+
+ b.Property("DateOfBirth")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("date_of_birth");
+
+ b.Property("EmploymentRecord")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("employment_record");
+
+ 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("FullName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("full_name");
+
+ 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("Height")
+ .HasColumnType("integer")
+ .HasColumnName("height");
+
+ b.Property("Markings")
+ .HasColumnType("jsonb")
+ .HasColumnName("markings");
+
+ b.Property("MedicalRecord")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("medical_record");
+
+ b.Property("OocText")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("ooc_text");
+
+ b.Property("PreferenceId")
+ .HasColumnType("integer")
+ .HasColumnName("preference_id");
+
+ b.Property("PreferenceUnavailable")
+ .HasColumnType("integer")
+ .HasColumnName("pref_unavailable");
+
+ b.Property("SecurityRecord")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("security_record");
+
+ 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.ProfileJobSkills", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("profile_job_skills_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("JobName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("job_name");
+
+ b.Property("ProfileId")
+ .HasColumnType("integer")
+ .HasColumnName("profile_id");
+
+ b.Property("Skills")
+ .IsRequired()
+ .HasColumnType("jsonb")
+ .HasColumnName("skills");
+
+ b.HasKey("Id")
+ .HasName("PK_profile_job_skills");
+
+ b.HasIndex("ProfileId", "JobName")
+ .IsUnique();
+
+ b.ToTable("profile_job_skills", (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("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("server_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("name");
+
+ b.HasKey("Id")
+ .HasName("PK_server");
+
+ b.ToTable("server", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.ServerBan", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("server_ban_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Address")
+ .HasColumnType("inet")
+ .HasColumnName("address");
+
+ 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("PlayerUserId")
+ .HasColumnType("uuid")
+ .HasColumnName("player_user_id");
+
+ b.Property("PlaytimeAtNote")
+ .HasColumnType("interval")
+ .HasColumnName("playtime_at_note");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("reason");
+
+ b.Property("RoundId")
+ .HasColumnType("integer")
+ .HasColumnName("round_id");
+
+ b.Property("Severity")
+ .HasColumnType("integer")
+ .HasColumnName("severity");
+
+ b.HasKey("Id")
+ .HasName("PK_server_ban");
+
+ b.HasIndex("Address");
+
+ b.HasIndex("BanningAdmin");
+
+ b.HasIndex("LastEditedById");
+
+ b.HasIndex("PlayerUserId")
+ .HasDatabaseName("IX_server_ban_player_user_id");
+
+ b.HasIndex("RoundId")
+ .HasDatabaseName("IX_server_ban_round_id");
+
+ b.ToTable("server_ban", null, t =>
+ {
+ t.HasCheckConstraint("AddressNotIPv6MappedIPv4", "NOT inet '::ffff:0.0.0.0/96' >>= address");
+
+ t.HasCheckConstraint("HaveEitherAddressOrUserIdOrHWId", "address IS NOT NULL OR player_user_id IS NOT NULL OR hwid IS NOT NULL");
+ });
+ });
+
+ modelBuilder.Entity("Content.Server.Database.ServerBanExemption", b =>
+ {
+ b.Property("UserId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.Property("Flags")
+ .HasColumnType("integer")
+ .HasColumnName("flags");
+
+ b.HasKey("UserId")
+ .HasName("PK_server_ban_exemption");
+
+ b.ToTable("server_ban_exemption", null, t =>
+ {
+ t.HasCheckConstraint("FlagsNotZero", "flags != 0");
+ });
+ });
+
+ modelBuilder.Entity("Content.Server.Database.ServerBanHit", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("server_ban_hit_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BanId")
+ .HasColumnType("integer")
+ .HasColumnName("ban_id");
+
+ b.Property("ConnectionId")
+ .HasColumnType("integer")
+ .HasColumnName("connection_id");
+
+ b.HasKey("Id")
+ .HasName("PK_server_ban_hit");
+
+ b.HasIndex("BanId")
+ .HasDatabaseName("IX_server_ban_hit_ban_id");
+
+ b.HasIndex("ConnectionId")
+ .HasDatabaseName("IX_server_ban_hit_connection_id");
+
+ b.ToTable("server_ban_hit", (string)null);
+ });
+
+ modelBuilder.Entity("Content.Server.Database.ServerRoleBan", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("server_role_ban_id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Address")
+ .HasColumnType("inet")
+ .HasColumnName("address");
+
+ b.Property