diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 179b7e45d8..35d6b39c06 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,17 +3,17 @@ # Sorting by path instead of by who added it one day :( # this isn't how codeowners rules work pls read the first comment instead of trying to force a sorting order -/Resources/ConfigPresets/WizardsDen/ @nikthechampiongr -/Content.*/Administration/ @DrSmugleaf @nikthechampiongr -/Resources/ServerInfo/ @nikthechampiongr -/Resources/ServerInfo/Guidebook/ServerRules/ @nikthechampiongr +/Resources/ConfigPresets/WizardsDen/ @nikthechampiongr @crazybrain23 +/Content.*/Administration/ @DrSmugleaf @nikthechampiongr @crazybrain23 +/Resources/ServerInfo/ @nikthechampiongr @crazybrain23 +/Resources/ServerInfo/Guidebook/ServerRules/ @nikthechampiongr @crazybrain23 /Resources/Prototypes/Maps/** @Emisse /Resources/Prototypes/Body/ @DrSmugleaf # suffering /Resources/Prototypes/Entities/Mobs/Player/ @DrSmugleaf /Resources/Prototypes/Entities/Mobs/Species/ @DrSmugleaf -/Resources/Prototypes/Guidebook/rules.yml @nikthechampiongr +/Resources/Prototypes/Guidebook/rules.yml @nikthechampiongr @crazybrain23 /Content.*/Body/ @DrSmugleaf /Content.YAMLLinter @DrSmugleaf /Content.Shared/Damage/ @DrSmugleaf @@ -25,7 +25,7 @@ # SKREEEE /Content.*.Database/ @PJB3005 @DrSmugleaf -/Content.Shared.Database/Log*.cs @PJB3005 @DrSmugleaf @nikthechampiongr +/Content.Shared.Database/Log*.cs @PJB3005 @DrSmugleaf @nikthechampiongr @crazybrain23 /Pow3r/ @PJB3005 /Content.Server/Power/Pow3r/ @PJB3005 diff --git a/.github/workflows/build-docfx.yml b/.github/workflows/build-docfx.yml index ca1a6f0af1..2842578abc 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@v3.2.0 with: - dotnet-version: 8.0.x + dotnet-version: 9.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 398baddd84..57775a41cc 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@v3.2.0 with: - dotnet-version: 8.0.x + dotnet-version: 9.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 8f50c621d8..f263c20027 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@v3.2.0 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Install dependencies run: dotnet restore diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 77cf56a512..d035843a23 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Get Engine Tag run: | diff --git a/.github/workflows/test-packaging.yml b/.github/workflows/test-packaging.yml index bddacb9fa4..05ca632de3 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@v3.2.0 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Install dependencies run: dotnet restore diff --git a/.github/workflows/yaml-linter.yml b/.github/workflows/yaml-linter.yml index 0b6e934cb5..1053bb4a3a 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@v3.2.0 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Install dependencies run: dotnet restore - name: Build diff --git a/Content.Client/Administration/AdminNameOverlay.cs b/Content.Client/Administration/AdminNameOverlay.cs index e2db7a8d6b..47d251910c 100644 --- a/Content.Client/Administration/AdminNameOverlay.cs +++ b/Content.Client/Administration/AdminNameOverlay.cs @@ -1,16 +1,21 @@ +using System.Linq; using System.Numerics; using Content.Client.Administration.Systems; +using Content.Shared.CCVar; +using Content.Shared.Mind; using Robust.Client.Graphics; using Robust.Client.ResourceManagement; using Robust.Client.UserInterface; -using Robust.Shared; -using Robust.Shared.Enums; using Robust.Shared.Configuration; +using Robust.Shared.Enums; +using Robust.Shared.Prototypes; namespace Content.Client.Administration; internal sealed class AdminNameOverlay : Overlay { + [Dependency] private readonly IConfigurationManager _config = default!; + private readonly AdminSystem _system; private readonly IEntityManager _entityManager; private readonly IEyeManager _eyeManager; @@ -18,8 +23,16 @@ internal sealed class AdminNameOverlay : Overlay private readonly IUserInterfaceManager _userInterfaceManager; private readonly Font _font; + //TODO make this adjustable via GUI + private readonly ProtoId[] _filter = + ["SoloAntagonist", "TeamAntagonist", "SiliconAntagonist", "FreeAgent"]; + private readonly string _antagLabelClassic = Loc.GetString("admin-overlay-antag-classic"); + private readonly Color _antagColorClassic = Color.OrangeRed; + public AdminNameOverlay(AdminSystem system, IEntityManager entityManager, IEyeManager eyeManager, IResourceCache resourceCache, EntityLookupSystem entityLookup, IUserInterfaceManager userInterfaceManager) { + IoCManager.InjectDependencies(this); + _system = system; _entityManager = entityManager; _eyeManager = eyeManager; @@ -35,6 +48,9 @@ internal sealed class AdminNameOverlay : Overlay { var viewport = args.WorldAABB; + //TODO make this adjustable via GUI + var classic = _config.GetCVar(CCVars.AdminOverlayClassic); + foreach (var playerInfo in _system.PlayerList) { var entity = _entityManager.GetEntity(playerInfo.NetEntity); @@ -64,12 +80,20 @@ internal sealed class AdminNameOverlay : Overlay var screenCoordinates = _eyeManager.WorldToScreen(aabb.Center + new Angle(-_eyeManager.CurrentEye.Rotation).RotateVec( aabb.TopRight - aabb.Center)) + new Vector2(1f, 7f); - if (playerInfo.Antag) + + if (classic && playerInfo.Antag) { - args.ScreenHandle.DrawString(_font, screenCoordinates + (lineoffset * 2), "ANTAG", uiScale, Color.OrangeRed); -; + args.ScreenHandle.DrawString(_font, screenCoordinates + (lineoffset * 2), _antagLabelClassic, uiScale, _antagColorClassic); } - args.ScreenHandle.DrawString(_font, screenCoordinates+lineoffset, playerInfo.Username, uiScale, playerInfo.Connected ? Color.Yellow : Color.White); + else if (!classic && _filter.Contains(playerInfo.RoleProto.ID)) + { + var label = Loc.GetString(playerInfo.RoleProto.Name).ToUpper(); + var color = playerInfo.RoleProto.Color; + + args.ScreenHandle.DrawString(_font, screenCoordinates + (lineoffset * 2), label, uiScale, color); + } + + args.ScreenHandle.DrawString(_font, screenCoordinates + lineoffset, playerInfo.Username, uiScale, playerInfo.Connected ? Color.Yellow : Color.White); args.ScreenHandle.DrawString(_font, screenCoordinates, playerInfo.CharacterName, uiScale, playerInfo.Connected ? Color.Aquamarine : Color.White); } } diff --git a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs index 043bf343ec..b7231869c9 100644 --- a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs @@ -197,6 +197,7 @@ public sealed partial class PlayerTab : Control Header.Character => Compare(x.CharacterName, y.CharacterName), Header.Job => Compare(x.StartingJob, y.StartingJob), Header.Antagonist => x.Antag.CompareTo(y.Antag), + Header.RoleType => Compare(x.RoleProto.Name , y.RoleProto.Name), 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..54e51747fb 100644 --- a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml +++ b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml @@ -24,6 +24,11 @@ HorizontalExpand="True" ClipText="True"/> +