diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs
index ddd66623bd..89ac0c1485 100644
--- a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs
+++ b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs
@@ -57,6 +57,11 @@ namespace Content.Client.Administration.UI.Bwoink
{
var sb = new StringBuilder();
+ // Alteros-Sponsors-start
+ if (info.IsSponsor)
+ sb.Append("★");
+ // Alteros-Sponsors-end
+
if (info.Connected)
sb.Append('●');
else
diff --git a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs
index 2187c40ce9..024672a025 100644
--- a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs
+++ b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs
@@ -196,6 +196,7 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
Header.Username => Compare(x.Username, y.Username),
Header.Character => Compare(x.CharacterName, y.CharacterName),
Header.Job => Compare(x.StartingJob, y.StartingJob),
+ Header.Sponsor => string.Compare(x.SponsorTitle!, y.SponsorTitle, StringComparison.Ordinal),
Header.Antagonist => x.Antag.CompareTo(y.Antag),
Header.Playtime => TimeSpan.Compare(x.OverallPlaytime ?? default, y.OverallPlaytime ?? default),
_ => 1
diff --git a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml
index e1371ec6f7..565c33198a 100644
--- a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml
+++ b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml
@@ -1,32 +1,37 @@
-
+
+
+
+
-
+
diff --git a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml.cs b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml.cs
index 89c5808afc..874f9eb042 100644
--- a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml.cs
+++ b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml.cs
@@ -1,5 +1,4 @@
-using Content.Shared.Administration;
-using Robust.Client.AutoGenerated;
+using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
@@ -7,24 +6,24 @@ using Robust.Client.UserInterface.XAML;
namespace Content.Client.Administration.UI.Tabs.PlayerTab;
[GenerateTypedNameReferences]
-public sealed partial class PlayerTabEntry : PanelContainer
+public sealed partial class PlayerTabEntry : ContainerButton
{
public NetEntity? PlayerEntity;
- public PlayerTabEntry(PlayerInfo player, StyleBoxFlat styleBoxFlat)
+ public PlayerTabEntry(string username, string character, string identity, string job, string sponsor, string antagonist, StyleBox styleBox, bool connected, string overallPlaytime)
{
RobustXamlLoader.Load(this);
- UsernameLabel.Text = player.Username;
- if (!player.Connected)
+ UsernameLabel.Text = username;
+ if (!connected)
UsernameLabel.StyleClasses.Add("Disabled");
- JobLabel.Text = player.StartingJob;
- CharacterLabel.Text = player.CharacterName;
- if (player.IdentityName != player.CharacterName)
- CharacterLabel.Text += $" [{player.IdentityName}]";
- AntagonistLabel.Text = Loc.GetString(player.Antag ? "player-tab-is-antag-yes" : "player-tab-is-antag-no");
- BackgroundColorPanel.PanelOverride = styleBoxFlat;
- OverallPlaytimeLabel.Text = player.PlaytimeString;
- PlayerEntity = player.NetEntity;
+ JobLabel.Text = job;
+ CharacterLabel.Text = character;
+ if (identity != character)
+ CharacterLabel.Text += $" [{identity}]";
+ SponsorLabel.Text = sponsor;
+ AntagonistLabel.Text = antagonist;
+ BackgroundColorPanel.PanelOverride = styleBox;
+ OverallPlaytimeLabel.Text = overallPlaytime;
}
}
diff --git a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabHeader.xaml b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabHeader.xaml
index 05007b0fea..12943dfd46 100644
--- a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabHeader.xaml
+++ b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabHeader.xaml
@@ -1,43 +1,49 @@
+ xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls">
+
+
+ MouseFilter="Pass"/>
diff --git a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabHeader.xaml.cs b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabHeader.xaml.cs
index cf7ceff23c..93f62a5903 100644
--- a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabHeader.xaml.cs
+++ b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabHeader.xaml.cs
@@ -18,6 +18,7 @@ public sealed partial class PlayerTabHeader : Control
UsernameLabel.OnKeyBindDown += UsernameClicked;
CharacterLabel.OnKeyBindDown += CharacterClicked;
JobLabel.OnKeyBindDown += JobClicked;
+ SponsorLabel.OnKeyBindDown += SponsorClicked;
AntagonistLabel.OnKeyBindDown += AntagonistClicked;
PlaytimeLabel.OnKeyBindDown += PlaytimeClicked;
}
@@ -28,7 +29,8 @@ public sealed partial class PlayerTabHeader : Control
{
Header.Username => UsernameLabel,
Header.Character => CharacterLabel,
- Header.Job => JobLabel,
+ Header.Job => JobLabel, // Sunrise-Sponsors
+ Header.Sponsor => SponsorLabel,
Header.Antagonist => AntagonistLabel,
Header.Playtime => PlaytimeLabel,
_ => throw new ArgumentOutOfRangeException(nameof(header), header, null)
@@ -40,6 +42,7 @@ public sealed partial class PlayerTabHeader : Control
UsernameLabel.Text = Loc.GetString("player-tab-username");
CharacterLabel.Text = Loc.GetString("player-tab-character");
JobLabel.Text = Loc.GetString("player-tab-job");
+ SponsorLabel.Text = Loc.GetString("player-tab-sponsor"); // Sunrise-Sponsors
AntagonistLabel.Text = Loc.GetString("player-tab-antagonist");
PlaytimeLabel.Text = Loc.GetString("player-tab-playtime");
}
@@ -70,6 +73,13 @@ public sealed partial class PlayerTabHeader : Control
HeaderClicked(args, Header.Job);
}
+ // Sunrise-Sponsors-Start
+ private void SponsorClicked(GUIBoundKeyEventArgs args)
+ {
+ HeaderClicked(args, Header.Sponsor);
+ }
+ // Sunrise-Sponsors-End
+
private void AntagonistClicked(GUIBoundKeyEventArgs args)
{
HeaderClicked(args, Header.Antagonist);
@@ -99,6 +109,7 @@ public sealed partial class PlayerTabHeader : Control
Username,
Character,
Job,
+ Sponsor, // Sunrise-Sponsors
Antagonist,
Playtime
}
diff --git a/Content.Client/Humanoid/MarkingPicker.xaml.cs b/Content.Client/Humanoid/MarkingPicker.xaml.cs
index 0fd81ecd4d..73e1068acc 100644
--- a/Content.Client/Humanoid/MarkingPicker.xaml.cs
+++ b/Content.Client/Humanoid/MarkingPicker.xaml.cs
@@ -2,7 +2,6 @@ using System.Linq;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Markings;
using Content.Shared.Humanoid.Prototypes;
-using Content.Sunrise.Interfaces.Shared;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
@@ -11,6 +10,7 @@ using Robust.Client.Utility;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Client.Humanoid;
diff --git a/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs b/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs
index 193191df85..57f2c59b5d 100644
--- a/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs
+++ b/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs
@@ -1,10 +1,10 @@
using System.Linq;
using Content.Shared.Humanoid.Markings;
-using Content.Sunrise.Interfaces.Shared;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Client.Utility;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Client.Humanoid;
diff --git a/Content.Client/Lobby/ClientPreferencesManager.cs b/Content.Client/Lobby/ClientPreferencesManager.cs
index b694a6f785..5ed27fd199 100644
--- a/Content.Client/Lobby/ClientPreferencesManager.cs
+++ b/Content.Client/Lobby/ClientPreferencesManager.cs
@@ -1,10 +1,10 @@
using System.Linq;
using Content.Shared.Preferences;
-using Content.Sunrise.Interfaces.Shared;
using Robust.Client;
using Robust.Client.Player;
using Robust.Shared.Network;
using Robust.Shared.Utility;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Client.Lobby
{
diff --git a/Content.Client/Lobby/LobbyUIController.cs b/Content.Client/Lobby/LobbyUIController.cs
index 4958304960..4a3350d401 100644
--- a/Content.Client/Lobby/LobbyUIController.cs
+++ b/Content.Client/Lobby/LobbyUIController.cs
@@ -15,7 +15,6 @@ using Content.Shared.Preferences;
using Content.Shared.Preferences.Loadouts;
using Content.Shared.Roles;
using Content.Shared.Traits;
-using Content.Sunrise.Interfaces.Client;
using Robust.Client.Player;
using Robust.Client.ResourceManagement;
using Robust.Client.State;
@@ -25,6 +24,7 @@ using Robust.Shared.Configuration;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Client.Lobby;
@@ -47,7 +47,7 @@ public sealed partial class LobbyUIController : UIController, IOnStateEntered
/// This is the characher preview panel in the chat. This should only update if their character updates.
diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
index 33a88930da..4d6f173efe 100644
--- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
+++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
@@ -20,7 +20,6 @@ using Content.Shared.Preferences;
using Content.Shared.Preferences.Loadouts;
using Content.Shared.Roles;
using Content.Shared.Traits;
-using Content.Sunrise.Interfaces.Client;
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.Player;
@@ -33,6 +32,7 @@ using Robust.Shared.Enums;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
using Direction = Robust.Shared.Maths.Direction;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Client.Lobby.UI
{
@@ -101,7 +101,7 @@ namespace Content.Client.Lobby.UI
private ISawmill _sawmill;
- private IClientSponsorsManager? _sponsorsMgr; // Sunrise-Sponsors
+ private ISharedSponsorsManager? _sponsorsMgr; // Sunrise-Sponsors
public HumanoidProfileEditor(
IClientPreferencesManager preferencesManager,
diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs
index 8d0f8c9335..7e455f648e 100644
--- a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs
+++ b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs
@@ -2,12 +2,12 @@ using System.Linq;
using Content.Shared.Clothing;
using Content.Shared.Preferences;
using Content.Shared.Preferences.Loadouts;
-using Content.Sunrise.Interfaces.Client;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Client.Lobby.UI.Loadouts;
@@ -15,12 +15,12 @@ namespace Content.Client.Lobby.UI.Loadouts;
public sealed partial class LoadoutGroupContainer : BoxContainer
{
private readonly LoadoutGroupPrototype _groupProto;
- private readonly IClientSponsorsManager? _sponsors; // Sunrise-Sponsors
+ private readonly ISharedSponsorsManager? _sponsors; // Sunrise-Sponsors
public event Action>? OnLoadoutPressed;
public event Action>? OnLoadoutUnpressed;
- public LoadoutGroupContainer(HumanoidCharacterProfile profile, RoleLoadout loadout, LoadoutGroupPrototype groupProto, ICommonSession session, IDependencyCollection collection, IClientSponsorsManager? sponsorsManager) // Sunrise-Sponsors
+ public LoadoutGroupContainer(HumanoidCharacterProfile profile, RoleLoadout loadout, LoadoutGroupPrototype groupProto, ICommonSession session, IDependencyCollection collection, ISharedSponsorsManager? sponsorsManager) // Sunrise-Sponsors
{
RobustXamlLoader.Load(this);
_groupProto = groupProto;
diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs b/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs
index f01cb4a71b..f6354ca536 100644
--- a/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs
+++ b/Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs
@@ -1,11 +1,11 @@
using Content.Client.UserInterface.Controls;
using Content.Shared.Preferences;
using Content.Shared.Preferences.Loadouts;
-using Content.Sunrise.Interfaces.Client;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Client.Lobby.UI.Loadouts;
@@ -19,7 +19,7 @@ public sealed partial class LoadoutWindow : FancyWindow
public HumanoidCharacterProfile Profile;
- public LoadoutWindow(HumanoidCharacterProfile profile, RoleLoadout loadout, RoleLoadoutPrototype proto, ICommonSession session, IDependencyCollection collection, IClientSponsorsManager? sponsorsManager) // Sunrise-Sponsors
+ public LoadoutWindow(HumanoidCharacterProfile profile, RoleLoadout loadout, RoleLoadoutPrototype proto, ICommonSession session, IDependencyCollection collection, ISharedSponsorsManager? sponsorsManager) // Sunrise-Sponsors
{
RobustXamlLoader.Load(this);
Profile = profile;
diff --git a/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs b/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
index 2e8fa7027e..56c677d7e3 100644
--- a/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
+++ b/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
@@ -13,6 +13,7 @@ using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
using Content.Shared.Preferences;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Client.Players.PlayTimeTracking;
diff --git a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRolesEui.cs b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRolesEui.cs
index 33358a68a4..c8561fc04d 100644
--- a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRolesEui.cs
+++ b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRolesEui.cs
@@ -6,6 +6,7 @@ using Content.Shared.Ghost.Roles;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Shared.Utility;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles
{
diff --git a/Content.Server/Administration/Systems/AdminSystem.cs b/Content.Server/Administration/Systems/AdminSystem.cs
index 16c079e4ba..d489494180 100644
--- a/Content.Server/Administration/Systems/AdminSystem.cs
+++ b/Content.Server/Administration/Systems/AdminSystem.cs
@@ -30,6 +30,7 @@ using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Network;
using Robust.Shared.Player;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Server.Administration.Systems
{
@@ -63,6 +64,8 @@ namespace Content.Server.Administration.Systems
public readonly PanicBunkerStatus PanicBunker = new();
public readonly BabyJailStatus BabyJail = new();
+ private ISharedSponsorsManager? _sponsorsManager; // Sunrise-Sponsors
+
public override void Initialize()
{
base.Initialize();
@@ -96,6 +99,8 @@ namespace Content.Server.Administration.Systems
SubscribeLocalEvent(OnRoleEvent);
SubscribeLocalEvent(OnRoleEvent);
SubscribeLocalEvent(OnRoundRestartCleanup);
+
+ IoCManager.Instance!.TryResolveType(out _sponsorsManager); // Sunrise-Sponsors
}
private void OnRoundRestartCleanup(RoundRestartCleanupEvent ev)
@@ -247,8 +252,16 @@ namespace Content.Server.Administration.Systems
overallPlaytime = playTime;
}
+ var isSponsor = false;
+ var sponsorTitle = "";
+ if (_sponsorsManager != null)
+ {
+ isSponsor = _sponsorsManager.IsSponsor(data.UserId);
+ _sponsorsManager.TryGetOocTitle(data.UserId, out sponsorTitle);
+ }
+
return new PlayerInfo(name, entityName, identityName, startingRole, antag, GetNetEntity(session?.AttachedEntity), data.UserId,
- connected, _roundActivePlayers.Contains(data.UserId), overallPlaytime);
+ connected, _roundActivePlayers.Contains(data.UserId), overallPlaytime, isSponsor, sponsorTitle);
}
private void OnPanicBunkerChanged(bool enabled)
diff --git a/Content.Server/Chat/Managers/ChatManager.cs b/Content.Server/Chat/Managers/ChatManager.cs
index 1c4113be5b..10e166c57e 100644
--- a/Content.Server/Chat/Managers/ChatManager.cs
+++ b/Content.Server/Chat/Managers/ChatManager.cs
@@ -12,14 +12,13 @@ using Content.Shared.CCVar;
using Content.Shared.Chat;
using Content.Shared.Database;
using Content.Shared.Mind;
-using Content.Sunrise.Interfaces.Server;
-using Content.Sunrise.Interfaces.Shared;
using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Replays;
using Robust.Shared.Utility;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Server.Chat.Managers
{
@@ -46,7 +45,7 @@ namespace Content.Server.Chat.Managers
[Dependency] private readonly INetConfigurationManager _netConfigManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly PlayerRateLimitManager _rateLimitManager = default!;
- private IServerSponsorsManager? _sponsorsManager; // Sunrise-Sponsors
+ private ISharedSponsorsManager? _sponsorsManager; // Sunrise-Sponsors
///
/// The maximum length a player-sent message can be sent
diff --git a/Content.Server/Connection/ConnectionManager.cs b/Content.Server/Connection/ConnectionManager.cs
index ffd3a0e175..02b9fb1b60 100644
--- a/Content.Server/Connection/ConnectionManager.cs
+++ b/Content.Server/Connection/ConnectionManager.cs
@@ -10,13 +10,13 @@ using Content.Shared.CCVar;
using Content.Shared.GameTicking;
using Content.Shared.Players.PlayTimeTracking;
using Content.Sunrise.Interfaces.Server;
-using Content.Sunrise.Interfaces.Shared;
using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Timing;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
/*
* TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
@@ -57,7 +57,7 @@ namespace Content.Server.Connection
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly ILogManager _logManager = default!;
[Dependency] private readonly IChatManager _chatManager = default!;
- private IServerSponsorsManager? _sponsorsMgr; // Sunrise-Sponsors
+ private ISharedSponsorsManager? _sponsorsMgr; // Sunrise-Sponsors
private readonly Dictionary _temporaryBypasses = [];
private ISawmill _sawmill = default!;
diff --git a/Content.Server/Preferences/Managers/ServerPreferencesManager.cs b/Content.Server/Preferences/Managers/ServerPreferencesManager.cs
index 1f1faae9e2..e2ff88f947 100644
--- a/Content.Server/Preferences/Managers/ServerPreferencesManager.cs
+++ b/Content.Server/Preferences/Managers/ServerPreferencesManager.cs
@@ -5,12 +5,12 @@ using System.Threading.Tasks;
using Content.Server.Database;
using Content.Shared.CCVar;
using Content.Shared.Preferences;
-using Content.Sunrise.Interfaces.Server;
using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Utility;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Server.Preferences.Managers
{
@@ -27,7 +27,7 @@ namespace Content.Server.Preferences.Managers
[Dependency] private readonly IDependencyCollection _dependencies = default!;
[Dependency] private readonly ILogManager _log = default!;
[Dependency] private readonly UserDbDataManager _userDb = default!;
- private IServerSponsorsManager? _sponsors;
+ private ISharedSponsorsManager? _sponsors;
// Cache player prefs on the server so we don't need as much async hell related to them.
private readonly Dictionary _cachedPlayerPrefs =
diff --git a/Content.Server/Station/Systems/StationSpawningSystem.cs b/Content.Server/Station/Systems/StationSpawningSystem.cs
index aa2e0553fe..d7f7d7681c 100644
--- a/Content.Server/Station/Systems/StationSpawningSystem.cs
+++ b/Content.Server/Station/Systems/StationSpawningSystem.cs
@@ -24,7 +24,6 @@ using Content.Shared.Roles;
using Content.Shared.Roles.Jobs;
using Content.Shared.Station;
using Content.Shared.StatusIcon;
-using Content.Sunrise.Interfaces.Server;
using JetBrains.Annotations;
using Robust.Shared.Configuration;
using Robust.Shared.Map;
@@ -32,6 +31,7 @@ using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Server.Station.Systems;
@@ -54,7 +54,7 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
[Dependency] private readonly MetaDataSystem _metaSystem = default!;
[Dependency] private readonly PdaSystem _pdaSystem = default!;
[Dependency] private readonly SharedAccessSystem _accessSystem = default!;
- private IServerSponsorsManager? _sponsorsManager; // Sunrise-Sponsors
+ private ISharedSponsorsManager? _sponsorsManager; // Sunrise-Sponsors
private bool _randomizeCharacters;
diff --git a/Content.Shared/Administration/PlayerInfo.cs b/Content.Shared/Administration/PlayerInfo.cs
index 93f1aa0b39..d935785eba 100644
--- a/Content.Shared/Administration/PlayerInfo.cs
+++ b/Content.Shared/Administration/PlayerInfo.cs
@@ -14,7 +14,9 @@ namespace Content.Shared.Administration
NetUserId SessionId,
bool Connected,
bool ActiveThisRound,
- TimeSpan? OverallPlaytime)
+ TimeSpan? OverallPlaytime,
+ bool IsSponsor,
+ string? SponsorTitle)
{
private string? _playtimeString;
diff --git a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs
index aa84108ab6..9beedfed90 100644
--- a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs
+++ b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs
@@ -8,7 +8,6 @@ using Content.Shared.Humanoid.Markings;
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.IdentityManagement;
using Content.Shared.Preferences;
-using Content.Sunrise.Interfaces.Shared;
using Robust.Shared;
using Robust.Shared.Configuration;
using Robust.Shared.GameObjects.Components.Localization;
@@ -19,6 +18,7 @@ using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Markdown;
using Robust.Shared.Utility;
using YamlDotNet.RepresentationModel;
+using Content.Sunrise.Interfaces.Shared; // Sunrise-Sponsors
namespace Content.Shared.Humanoid;
@@ -88,7 +88,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
var profile = export.Profile;
var collection = IoCManager.Instance;
- var sponsorPrototypes = _sponsors != null && _sponsors.TryGetPrototypes(session.UserId, out var prototypes) ? prototypes.ToArray() : []; // Sunrise-Sponsors
+ var sponsorPrototypes = _sponsors?.GetClientPrototypes().ToArray() ?? []; // Sunrise-Sponsors
profile.EnsureValid(session, collection!, sponsorPrototypes);
return profile;
}
diff --git a/Sunrise/Content.Sunrise.Interfaces.Client/IClientSponsorsManager.cs b/Sunrise/Content.Sunrise.Interfaces.Client/IClientSponsorsManager.cs
deleted file mode 100644
index 8b5aec6df2..0000000000
--- a/Sunrise/Content.Sunrise.Interfaces.Client/IClientSponsorsManager.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using Content.Sunrise.Interfaces.Shared;
-using Robust.Shared.Maths;
-
-namespace Content.Sunrise.Interfaces.Client;
-
-public interface IClientSponsorsManager : ISharedSponsorsManager
-{
- public List Prototypes { get; }
- public bool PriorityJoin { get; }
- public Color? OocColor { get; }
- public int ExtraCharSlots { get; }
- public bool AllowedRespawn { get; }
-}
diff --git a/Sunrise/Content.Sunrise.Interfaces.Server/IServerSponsorsManager.cs b/Sunrise/Content.Sunrise.Interfaces.Server/IServerSponsorsManager.cs
deleted file mode 100644
index b001a81c8b..0000000000
--- a/Sunrise/Content.Sunrise.Interfaces.Server/IServerSponsorsManager.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-using Content.Sunrise.Interfaces.Shared;
-using Robust.Shared.Maths;
-using Robust.Shared.Network;
-using Robust.Shared.Player;
-
-namespace Content.Sunrise.Interfaces.Server;
-
-public interface IServerSponsorsManager : ISharedSponsorsManager
-{
- public bool TryGetGhostTheme(NetUserId userId, [NotNullWhen(true)] out string? ghostTheme);
- public bool TryGetOocColor(NetUserId userId, [NotNullWhen(true)] out Color? color);
- public bool TryGetOocTitle(NetUserId userId, [NotNullWhen(true)] out string? title);
- public int GetExtraCharSlots(NetUserId userId);
- public bool HavePriorityJoin(NetUserId userId);
- public bool IsSponsor(NetUserId userId);
- public bool AllowedRespawn(NetUserId userId);
- public List PickPrioritySessions(List sessions, string roleId);
- public NetUserId PickRoleSession(HashSet users, string roleId);
-
- public bool TryGetPriorityGhostRoles(NetUserId userId, [NotNullWhen(true)] out List? priorityAntags);
-
- public bool TryGetPriorityAntags(NetUserId userId, [NotNullWhen(true)] out List? priorityAntags);
-
- public bool TryGetPriorityRoles(NetUserId userId, [NotNullWhen(true)] out List? priorityRoles);
-}
diff --git a/Sunrise/Content.Sunrise.Interfaces.Shared/ISharedLoadoutsManager.cs b/Sunrise/Content.Sunrise.Interfaces.Shared/ISharedLoadoutsManager.cs
deleted file mode 100644
index c77ff83870..0000000000
--- a/Sunrise/Content.Sunrise.Interfaces.Shared/ISharedLoadoutsManager.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-using Robust.Shared.Network;
-
-namespace Content.Sunrise.Interfaces.Shared;
-
-public interface ISharedLoadoutsManager
-{
- public void Initialize();
- public bool TryGetServerPrototypes(NetUserId userId, [NotNullWhen(true)] out List? prototypes);
- public List GetClientPrototypes();
-}
diff --git a/Sunrise/Content.Sunrise.Interfaces.Shared/ISharedSponsorsManager.cs b/Sunrise/Content.Sunrise.Interfaces.Shared/ISharedSponsorsManager.cs
index 2ab9aab6ef..8770158094 100644
--- a/Sunrise/Content.Sunrise.Interfaces.Shared/ISharedSponsorsManager.cs
+++ b/Sunrise/Content.Sunrise.Interfaces.Shared/ISharedSponsorsManager.cs
@@ -1,6 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Robust.Shared.Maths;
using Robust.Shared.Network;
+using Robust.Shared.Player;
namespace Content.Sunrise.Interfaces.Shared;
@@ -10,6 +11,20 @@ public interface ISharedSponsorsManager
// Client
public List GetClientPrototypes();
+ public bool ClientAllowedRespawn();
+
// Server
public bool TryGetPrototypes(NetUserId userId, [NotNullWhen(true)] out List? prototypes);
+ public bool TryGetOocTitle(NetUserId userId, [NotNullWhen(true)] out string? title);
+ public bool TryGetOocColor(NetUserId userId, [NotNullWhen(true)] out Color? color);
+ public bool TryGetGhostTheme(NetUserId userId, [NotNullWhen(true)] out string? ghostTheme);
+ public int GetExtraCharSlots(NetUserId userId);
+ public bool HavePriorityJoin(NetUserId userId);
+ public bool IsSponsor(NetUserId userId);
+ public bool IsAllowedRespawn(NetUserId userId);
+ public List PickPrioritySessions(List sessions, string roleId);
+ public NetUserId? PickRoleSession(HashSet users, string roleId);
+ public bool TryGetPriorityGhostRoles(NetUserId userId, [NotNullWhen(true)] out List? priorityAntags);
+ public bool TryGetPriorityAntags(NetUserId userId, [NotNullWhen(true)] out List? priorityAntags);
+ public bool TryGetPriorityRoles(NetUserId userId, [NotNullWhen(true)] out List? priorityRoles);
}