diff --git a/.github/workflows/auto-locale.yml b/.github/workflows/auto-locale.yml index ee32fd5c07e..657ea98d847 100644 --- a/.github/workflows/auto-locale.yml +++ b/.github/workflows/auto-locale.yml @@ -1,12 +1,13 @@ name: Update Locale on: - push: - branches: - - master - pull_request: - types: - - closed + workflow_dispatch: +# push: +# branches: +# - master +# pull_request: +# types: +# - closed permissions: contents: write @@ -15,13 +16,14 @@ permissions: jobs: update-locale: runs-on: ubuntu-latest - if: github.repository == 'space-sunrise/space-station-14' && github.event.pull_request.merged == true + if: github.repository == 'space-sunrise/space-station-14' # && github.event.pull_request.merged == true steps: - name: Checkout repository uses: actions/checkout@v3 with: persist-credentials: false + token: ${{ secrets.PAT }} - name: Set up Python uses: actions/setup-python@v2 @@ -50,7 +52,6 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }} git add "Resources/Locale/*" if git diff --cached --quiet; then echo "No changes to commit." diff --git a/.github/workflows/build-docfx.yml b/.github/workflows/build-docfx.yml index ca1a6f0af12..2842578abc8 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 76cd5309dd9..7d53d494d08 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 c67bd07f6af..e4f2701e036 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 8c0ef53d076..a6b0fd4398f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.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: Get Engine Tag run: | diff --git a/.github/workflows/test-packaging.yml b/.github/workflows/test-packaging.yml index e3b430fdcfc..ab9a57f0aad 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 8cc3f6173b4..c8cac429882 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 e2db7a8d6b4..47d251910cb 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 @@ protected override void Draw(in OverlayDrawArgs args) { 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 @@ protected override void Draw(in OverlayDrawArgs args) 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 04edc05e978..4336b82a27c 100644 --- a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs @@ -234,6 +234,7 @@ private int Compare(PlayerInfo x, PlayerInfo y) Header.Job => Compare(x.StartingJob, y.StartingJob), Header.Sponsor => string.Compare(x.SponsorTitle!, y.SponsorTitle, StringComparison.Ordinal), // Sunrise-Sponsors 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 b3b2b33f977..e390161806e 100644 --- a/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml +++ b/Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml @@ -31,6 +31,11 @@ HorizontalExpand="True" ClipText="True"/> +