diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c4911eea7c..24eec50207 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,12 +6,35 @@ concurrency: on: workflow_dispatch: - schedule: - - cron: '0 1 * * *' + inputs: + dry_run: + description: Simulate a publish without any external side effects (no push, no PR, no CDN/Discord/RSS uploads, fail at the end to not clog list of successfu PRs because workflow relies on that). + required: false + default: false + type: boolean + version: + description: Optional version tag to apply to the released commit and push (used as-is, e.g. 'v2026.08.0'); adds no tag when empty. + required: false + type: string + # schedule: + # - cron: '0 10 * * *' + jobs: build: runs-on: ubuntu-latest + env: + DRY_RUN: ${{ github.event.inputs.dry_run == 'true' }} + steps: + - name: Announce dry run + if: ${{ github.event.inputs.dry_run == 'true' }} + run: | + echo "################################################################################" + echo "# DRY RUN IS RUNNING #" + echo "# Nothing will be committed, pushed, tagged, uploaded or posted. #" + echo "# This run is expected to fail at the end and never counts as a publish. #" + echo "################################################################################" + - name: Fail if we are attempting to run on the master branch if: ${{GITHUB.REF_NAME == 'master' && github.repository == 'space-wizards/space-station-14'}} run: exit 1 @@ -59,40 +82,76 @@ jobs: - name: Install dependencies run: dotnet restore - # - name: Update changelog - # run: | - # dotnet tool install --global SpaceWizards.ChangelogTool --version 1.0.7 - # ss14-changelog update -d Resources/Changelog - # env: - # REPO: ${{ github.repository }} - # BRANCH: stable - # CHANGELOG_REPO_PATH: Resources/Changelog - # EXTRA_CATEGORIES: Admin,Maps,Rules - # GITHUB_TOKEN: ${{ secrets.CL_ACCESS_TOKEN }} + - name: Get last publish SHA + id: last-publish + run: Tools/actions_get_last_publish_sha.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # - name: Commit and push changelog changes - # id: changelog - # run: | - # git config user.name "Space-Wizards-Bot" - # git config user.email "support@spacestation14.com" - # if [ -n "$(git status --porcelain Resources/Changelog)" ]; then - # git add Resources/Changelog - # git commit -m "Update changelog" - # git remote set-url origin "https://x-access-token:${CL_ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" - # git push origin "HEAD:${GITHUB_REF_NAME}" - # echo "committed=true" >> "$GITHUB_OUTPUT" - # fi - # env: - # CL_ACCESS_TOKEN: ${{ secrets.CL_ACCESS_TOKEN }} + - name: Update changelog + run: | + dotnet tool install --global SpaceWizards.ChangelogTool --version 1.0.8 + ss14-changelog update -d Resources/Changelog -s ${LAST_PUBLISH_SHA} + env: + REPO: ${{ github.repository }} + BRANCH: stable + CHANGELOG_REPO_PATH: Resources/Changelog + EXTRA_CATEGORIES: Admin,Maps,Rules + GITHUB_TOKEN: ${{ secrets.CL_ACCESS_TOKEN }} + LAST_PUBLISH_SHA: ${{ steps.last-publish.outputs.last_publish_sha }} - # - name: Create PR from stable to master - # if: steps.changelog.outputs.committed == 'true' - # env: - # GH_TOKEN: ${{ secrets.CL_ACCESS_TOKEN }} - # run: | - # if [ -z "$(gh pr list --repo "$GITHUB_REPOSITORY" --head stable --base master --state open --json number --jq '.[].number')" ]; then - # gh pr create --repo "$GITHUB_REPOSITORY" --base master --head stable --title "Update changelog" --body "Sync from release to master." - # fi + - name: Commit and push changelog changes + id: changelog + run: | + git config user.name "Space-Wizards-Bot" + git config user.email "bot@spacestation14.com" + if [ -n "$(git status --porcelain Resources/Changelog)" ]; then + git add Resources/Changelog + if [ "$DRY_RUN" = "true" ]; then + echo "DRY-RUN: staged files:" + git diff --cached --name-only | sed 's/^/DRY-RUN: /' + if git commit -m "Update changelog"; then + git push --dry-run "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}" || true + # Roll back the throwaway commit. Required by following step dry-run mode. + git reset --soft HEAD~1 + fi + else + git commit -m "Update changelog" + git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" + git push origin "HEAD:${GITHUB_REF_NAME}" + echo "committed=true" >> "$GITHUB_OUTPUT" + fi + fi + env: + GH_TOKEN: ${{ secrets.CL_ACCESS_TOKEN }} + + - name: Tag version commit + if: ${{ github.event.inputs.version != '' }} + env: + GH_TOKEN: ${{ secrets.CL_ACCESS_TOKEN }} + VERSION_TAG: ${{ github.event.inputs.version }} + run: | + HEAD_SHA=$(git rev-parse HEAD) + if [ "$DRY_RUN" = "true" ]; then + echo "DRY-RUN: would create tag '${VERSION_TAG}' at ${HEAD_SHA} and push it." + else + git tag "${VERSION_TAG}" + git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "refs/tags/${VERSION_TAG}" + fi + + - name: Create PR from stable to master + env: + GH_TOKEN: ${{ secrets.CL_ACCESS_TOKEN }} + run: | + if [ -z "$(gh pr list --repo "$GITHUB_REPOSITORY" --head stable --base master --state open --json number --jq '.[].number')" ]; then + if [ "$DRY_RUN" = "true" ]; then + gh pr create --dry-run --repo "$GITHUB_REPOSITORY" --base master --head stable --title "Stable to master sync after release" --body "Sync from release to master." || echo "::warning::DRY-RUN: PR would not be created (see gh output above)." + else + gh pr create --repo "$GITHUB_REPOSITORY" --base master --head stable --title "Update changelog" --body "Sync from release to master." + fi + else + echo "Merge from stable to master PR already exist, skipping." + fi - name: Build Packaging run: dotnet build Content.Packaging --configuration Release --no-restore /m @@ -121,3 +180,9 @@ jobs: # run: Tools/actions_changelog_rss.py # env: # CHANGELOG_RSS_KEY: ${{ secrets.CHANGELOG_RSS_KEY }} + + - name: Finalize dry run (not a publish) + if: ${{ github.event.inputs.dry_run == 'true' }} + run: | + echo "::error::Dry run completed - nothing was actually published. Exiting non-zero so this run is never recorded as a successful publish and is excluded from future 'Get last publish SHA' lookups." + exit 1 diff --git a/Content.Client/Access/AccessOverlay.cs b/Content.Client/Access/AccessOverlay.cs index 59c9441036..f0f2890d24 100644 --- a/Content.Client/Access/AccessOverlay.cs +++ b/Content.Client/Access/AccessOverlay.cs @@ -88,7 +88,7 @@ public sealed class AccessOverlay : Overlay var accessInfoText = textBuffer.ToString(); var screenPos = args.ViewportControl.WorldToScreen(_transformSystem.GetWorldPosition(transform)); - args.ScreenHandle.DrawString(_font, screenPos, accessInfoText, Color.Gold); + args.ScreenHandle.DrawString(_font, screenPos, accessInfoText, 1, Color.Gold, TextOutline.Default); } } } diff --git a/Content.Client/Access/Systems/JobStatusSystem.cs b/Content.Client/Access/Systems/JobStatusSystem.cs index 50968f68ff..f763f1a42a 100644 --- a/Content.Client/Access/Systems/JobStatusSystem.cs +++ b/Content.Client/Access/Systems/JobStatusSystem.cs @@ -11,8 +11,8 @@ public sealed partial class JobStatusSystem : SharedJobStatusSystem [Dependency] private ShowJobIconsSystem _showJobIcons = default!; [Dependency] private ShowCrewIconsSystem _showCrewIcons = default!; - private static readonly ProtoId CrewBorderIcon = "CrewBorderIcon"; - private static readonly ProtoId CrewUncertainBorderIcon = "CrewUncertainBorderIcon"; + private static readonly ProtoId CrewBorderIcon = "CrewBorderIcon"; + private static readonly ProtoId CrewUncertainBorderIcon = "CrewUncertainBorderIcon"; public override void Initialize() { diff --git a/Content.Client/Administration/AdminNameOverlay.cs b/Content.Client/Administration/AdminNameOverlay.cs index 78e49d087e..ae3d95800b 100644 --- a/Content.Client/Administration/AdminNameOverlay.cs +++ b/Content.Client/Administration/AdminNameOverlay.cs @@ -188,16 +188,18 @@ internal sealed class AdminNameOverlay : Overlay } } + var outline = TextOutline.Default with { Color = TextOutline.Default.Color.WithAlpha(alpha) }; + // Character name var color = Color.Aquamarine; color.A = alpha; - args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.CharacterName, uiScale, playerInfo.Connected ? color : colorDisconnected); + args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.CharacterName, uiScale, playerInfo.Connected ? color : colorDisconnected, outline); currentOffset += lineoffset; // Username color = Color.Yellow; color.A = alpha; - args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.Username, uiScale, playerInfo.Connected ? color : colorDisconnected); + args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.Username, uiScale, playerInfo.Connected ? color : colorDisconnected, outline); currentOffset += lineoffset; // Playtime @@ -205,7 +207,7 @@ internal sealed class AdminNameOverlay : Overlay { color = Color.Orange; color.A = alpha; - args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.PlaytimeString, uiScale, playerInfo.Connected ? color : colorDisconnected); + args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.PlaytimeString, uiScale, playerInfo.Connected ? color : colorDisconnected, outline); currentOffset += lineoffset; } @@ -214,7 +216,7 @@ internal sealed class AdminNameOverlay : Overlay { color = Color.GreenYellow; color.A = alpha; - args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.StartingJob, uiScale, playerInfo.Connected ? color : colorDisconnected); + args.ScreenHandle.DrawString(_font, screenCoordinates + currentOffset, playerInfo.StartingJob, uiScale, playerInfo.Connected ? color : colorDisconnected, outline); currentOffset += lineoffset; } @@ -265,7 +267,7 @@ internal sealed class AdminNameOverlay : Overlay var label = !string.IsNullOrEmpty(symbol) ? Loc.GetString("player-tab-character-name-antag-symbol", ("symbol", symbol), ("name", text)) : text; - args.ScreenHandle.DrawString(_fontBold, screenCoordinates + currentOffset, label, uiScale, color); + args.ScreenHandle.DrawString(_fontBold, screenCoordinates + currentOffset, label, uiScale, color, outline); currentOffset += lineoffset; //Save the coordinates and size of the text block, for stack merge check diff --git a/Content.Client/Administration/UI/PermissionsEui.cs b/Content.Client/Administration/UI/PermissionsEui.cs index 71aea9f45d..913c171ccc 100644 --- a/Content.Client/Administration/UI/PermissionsEui.cs +++ b/Content.Client/Administration/UI/PermissionsEui.cs @@ -211,16 +211,7 @@ namespace Content.Client.Administration.UI var al = _menu.AdminsList; var name = admin.UserName ?? admin.UserId.ToString(); - al.AddChild(new Label { Text = name }); - - var titleControl = new Label { Text = admin.Title ?? Loc.GetString("permissions-eui-edit-admin-title-control-text").ToLowerInvariant() }; - if (admin.Title == null) // none - { - titleControl.StyleClasses.Add(StyleClass.Italic); - } - - al.AddChild(titleControl); - + // Compute rank and combined flags first so we can create the edit button before other columns. bool italic; string rank; var combinedFlags = admin.PosFlags; @@ -237,6 +228,25 @@ namespace Content.Client.Administration.UI rank = Loc.GetString("permissions-eui-edit-no-rank-text").ToLowerInvariant(); } + var editButton = new Button { Text = Loc.GetString("permissions-eui-edit-title-button") }; + editButton.OnPressed += _ => OnEditPressed(admin); + + // Add the edit button as the first column + al.AddChild(editButton); + + // Name (C-key) + al.AddChild(new Label { Text = name }); + + // Prefix / Title + var titleControl = new Label { Text = admin.Title ?? Loc.GetString("permissions-eui-edit-admin-title-control-text").ToLowerInvariant() }; + if (admin.Title == null) // none + { + titleControl.StyleClasses.Add(StyleClass.Italic); + } + + al.AddChild(titleControl); + + // Rank var rankControl = new Label { Text = rank }; if (italic) { @@ -245,6 +255,7 @@ namespace Content.Client.Administration.UI al.AddChild(rankControl); + // Flags / Additional rights var flagsText = AdminFlagsHelper.PosNegFlagsText(admin.PosFlags, admin.NegFlags); al.AddChild(new Label @@ -254,10 +265,6 @@ namespace Content.Client.Administration.UI HorizontalAlignment = Control.HAlignment.Center, }); - var editButton = new Button { Text = Loc.GetString("permissions-eui-edit-title-button") }; - editButton.OnPressed += _ => OnEditPressed(admin); - al.AddChild(editButton); - if (!_adminManager.HasFlag(combinedFlags)) { editButton.Disabled = true; diff --git a/Content.Client/Administration/UI/SpawnExplosion/ExplosionDebugOverlay.cs b/Content.Client/Administration/UI/SpawnExplosion/ExplosionDebugOverlay.cs index 46ac390181..c4dd442311 100644 --- a/Content.Client/Administration/UI/SpawnExplosion/ExplosionDebugOverlay.cs +++ b/Content.Client/Administration/UI/SpawnExplosion/ExplosionDebugOverlay.cs @@ -113,7 +113,7 @@ public sealed partial class ExplosionDebugOverlay : Overlay else screenCenter += new Vector2(-8, -8); - handle.DrawString(_font, screenCenter, Intensity[i].ToString("F2")); + handle.DrawString(_font, screenCenter, Intensity[i].ToString("F2"), 1, Color.White, TextOutline.Default); } } @@ -123,7 +123,7 @@ public sealed partial class ExplosionDebugOverlay : Overlay var worldCenter = Vector2.Transform((epicenter + Vector2Helpers.Half) * tileSize, transform); var screenCenter = _eyeManager.WorldToScreen(worldCenter) + new Vector2(-24, -24); var text = $"{Intensity[0]:F2}\nΣ={TotalIntensity:F1}\nΔ={Slope:F1}"; - handle.DrawString(_font, screenCenter, text); + handle.DrawString(_font, screenCenter, text, 1, Color.White, TextOutline.Default); } } diff --git a/Content.Client/Atmos/Overlays/AtmosDebugOverlay.cs b/Content.Client/Atmos/Overlays/AtmosDebugOverlay.cs index 448261e33c..d0aaeade89 100644 --- a/Content.Client/Atmos/Overlays/AtmosDebugOverlay.cs +++ b/Content.Client/Atmos/Overlays/AtmosDebugOverlay.cs @@ -243,19 +243,19 @@ public sealed partial class AtmosDebugOverlay : Overlay ? "No Air" : data.Moles.Sum().ToString(CultureInfo.InvariantCulture); - handle.DrawString(_font, pos, $"Moles: {moles}"); + handle.DrawString(_font, pos, $"Moles: {moles}", 1, Color.White, TextOutline.Default); pos += offset; - handle.DrawString(_font, pos, $"Temp: {data.Temperature}"); + handle.DrawString(_font, pos, $"Temp: {data.Temperature}", 1, Color.White, TextOutline.Default); pos += offset; handle.DrawString(_font, pos, $"Excited: {data.InExcitedGroup?.ToString() ?? "None"}"); pos += offset; - handle.DrawString(_font, pos, $"Space: {data.IsSpace}"); + handle.DrawString(_font, pos, $"Space: {data.IsSpace}", 1, Color.White, TextOutline.Default); pos += offset; - handle.DrawString(_font, pos, $"Map: {data.MapAtmosphere}"); + handle.DrawString(_font, pos, $"Map: {data.MapAtmosphere}", 1, Color.White, TextOutline.Default); pos += offset; - handle.DrawString(_font, pos, $"NoGrid: {data.NoGrid}"); + handle.DrawString(_font, pos, $"NoGrid: {data.NoGrid}", 1, Color.White, TextOutline.Default); pos += offset; - handle.DrawString(_font, pos, $"Immutable: {data.Immutable}"); + handle.DrawString(_font, pos, $"Immutable: {data.Immutable}", 1, Color.White, TextOutline.Default); } private void GetGrids(MapId mapId, Box2Rotated box) diff --git a/Content.Client/Audio/ClientGlobalSoundSystem.cs b/Content.Client/Audio/ClientGlobalSoundSystem.cs index d0f3ca41a8..594db93b2b 100644 --- a/Content.Client/Audio/ClientGlobalSoundSystem.cs +++ b/Content.Client/Audio/ClientGlobalSoundSystem.cs @@ -8,7 +8,8 @@ using Robust.Shared.Player; namespace Content.Client.Audio; -public sealed partial class ClientGlobalSoundSystem : SharedGlobalSoundSystem +/// +public sealed partial class ClientGlobalSoundSystem : GlobalSoundSystem { [Dependency] private IConfigurationManager _cfg = default!; [Dependency] private SharedAudioSystem _audio = default!; diff --git a/Content.Client/CartridgeLoader/Cartridges/WantedListUiFragment.cs b/Content.Client/CartridgeLoader/Cartridges/WantedListUiFragment.cs index 823d3e532b..127e224674 100644 --- a/Content.Client/CartridgeLoader/Cartridges/WantedListUiFragment.cs +++ b/Content.Client/CartridgeLoader/Cartridges/WantedListUiFragment.cs @@ -215,7 +215,7 @@ public sealed partial class WantedListUiFragment : BoxContainer _ => record.Status.ToString(), }; - if (_prototypeManager.TryIndex(proto, out var prototype)) + if (_prototypeManager.TryIndex(proto, out var prototype)) { rect.Texture = _spriteSystem.Frame0(prototype.Icon); } diff --git a/Content.Client/Credits/CreditsWindow.xaml b/Content.Client/Credits/CreditsWindow.xaml index b7bc2329c1..921e8c5a12 100644 --- a/Content.Client/Credits/CreditsWindow.xaml +++ b/Content.Client/Credits/CreditsWindow.xaml @@ -1,4 +1,5 @@  @@ -26,11 +27,31 @@ - - - + + + + + + + + + + + + + diff --git a/Content.Client/Credits/CreditsWindow.xaml.cs b/Content.Client/Credits/CreditsWindow.xaml.cs index 0b30259ec9..dc17f5a37b 100644 --- a/Content.Client/Credits/CreditsWindow.xaml.cs +++ b/Content.Client/Credits/CreditsWindow.xaml.cs @@ -60,6 +60,9 @@ public sealed partial class CreditsWindow : DefaultWindow MasterTabContainer.OnTabChanged += OnTabChanged; + PageJumpLineEdit.OnTextEntered += + _ => PopulateAttributions(AttributionsContainer, ButtonsContainer, (PageJumpLineEdit.Value() - 1) * AttributionsSourcesPerPage); + PopulateContributors(Ss14ContributorsContainer); } @@ -75,13 +78,18 @@ public sealed partial class CreditsWindow : DefaultWindow else if (tab == LicensesTab.GetPositionInParent()) PopulateLicenses(LicensesContainer); else if (tab == AttributionsTab.GetPositionInParent()) - PopulateAttributions(AttributionsContainer, 0); + PopulateAttributions(AttributionsContainer, ButtonsContainer, 0); } - private async void PopulateAttributions(BoxContainer attributionsContainer, int count) + private async void PopulateAttributions(BoxContainer attributionsContainer, BoxContainer buttonsContainer, int count) { attributionsContainer.RemoveAllChildren(); + buttonsContainer.RemoveAllChildren(); + PageJumpLineEdit.Text = (count / AttributionsSourcesPerPage + 1).ToString(); + AttributionsScroll.VScroll = 0; + + // Assemble attributions if (_attributions.Count == 0) { var rsi = await CollectRSiAttributions(); @@ -89,8 +97,12 @@ public sealed partial class CreditsWindow : DefaultWindow _attributions.AddRange(rsi); _attributions.AddRange(rga); + + // A page can't be entered that we can't go to + PageJumpLineEdit.MaxValue = _attributions.Count / AttributionsSourcesPerPage + 1; } + // Pick the attributions for this page foreach (var message in _attributions.Skip(count).Take(AttributionsSourcesPerPage)) { var rich = new RichTextLabel(); @@ -98,22 +110,26 @@ public sealed partial class CreditsWindow : DefaultWindow attributionsContainer.AddChild(rich); } - var container = new BoxContainer { Orientation = LayoutOrientation.Horizontal }; + // Create and add the buttons + var previousButton = new Button + { + Text = Loc.GetString("credits-window-previous-page-button"), + Disabled = count - AttributionsSourcesPerPage < 0, + StyleClasses = { StyleClass.ButtonOpenRight }, + }; + previousButton.OnPressed += + _ => PopulateAttributions(attributionsContainer, buttonsContainer, count - AttributionsSourcesPerPage); + buttonsContainer.AddChild(previousButton); - var previousPageButton = new Button { Text = Loc.GetString("credits-window-previous-page-button") }; - previousPageButton.OnPressed += - _ => PopulateAttributions(attributionsContainer, count - AttributionsSourcesPerPage); - - var nextPageButton = new Button { Text = Loc.GetString("credits-window-next-page-button") }; - nextPageButton.OnPressed += - _ => PopulateAttributions(attributionsContainer, count + AttributionsSourcesPerPage); - - if (count - AttributionsSourcesPerPage >= 0) - container.AddChild(previousPageButton); - if (count + AttributionsSourcesPerPage < _attributions.Count) - container.AddChild(nextPageButton); - - attributionsContainer.AddChild(container); + var nextButton = new Button + { + Text = Loc.GetString("credits-window-next-page-button"), + Disabled = count + AttributionsSourcesPerPage >= _attributions.Count, + StyleClasses = { StyleClass.ButtonOpenLeft }, + }; + nextButton.OnPressed += + _ => PopulateAttributions(attributionsContainer, buttonsContainer, count + AttributionsSourcesPerPage); + buttonsContainer.AddChild(nextButton); } private Task> CollectRSiAttributions() diff --git a/Content.Client/Disposal/Tagger/DisposalTaggerBoundUserInterface.cs b/Content.Client/Disposal/Tagger/DisposalTaggerBoundUserInterface.cs index d5f7408df5..3a67718224 100644 --- a/Content.Client/Disposal/Tagger/DisposalTaggerBoundUserInterface.cs +++ b/Content.Client/Disposal/Tagger/DisposalTaggerBoundUserInterface.cs @@ -8,48 +8,36 @@ namespace Content.Client.Disposal.Tagger /// Initializes a and updates it when new server messages are received. /// [UsedImplicitly] - public sealed class DisposalTaggerBoundUserInterface : BoundUserInterface + public sealed class DisposalTaggerBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey) { private DisposalTaggerWindow? _window; - private const int TagLimit = 30; - - public DisposalTaggerBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) - { - } + public const int TagLimit = 30; protected override void Open() { base.Open(); _window = this.CreateWindow(); + _window.OnRouteChanged += NewRoute; - _window.Confirm.OnPressed += _ => AcceptButtonPressed(_window.TagInput.Text); - _window.TagInput.OnTextEntered += args => AcceptButtonPressed(args.Text); - - if (EntMan.TryGetComponent(Owner, out var tagger) && - tagger.Tag != string.Empty) - { - _window.TagInput.Text = tagger.Tag; - } + Update(); } - private void AcceptButtonPressed(string tag) + private void NewRoute(string route) { - SendMessage(new DisposalTaggerUiActionMessage(tag, TagLimit)); + SendMessage(new DisposalTaggerUiActionMessage(route, TagLimit)); Close(); } - protected override void UpdateState(BoundUserInterfaceState state) + public override void Update() { - base.UpdateState(state); + base.Update(); - if (state is not DisposalTaggerUserInterfaceState cast) - { + if (_window == null || !EntMan.TryGetComponent(Owner, out var tagger)) return; - } - _window?.UpdateState(cast); + _window.Populate(tagger.Tag, tagger.Editable); } } } diff --git a/Content.Client/Disposal/Tagger/DisposalTaggerWindow.xaml b/Content.Client/Disposal/Tagger/DisposalTaggerWindow.xaml index 68cb049184..5c524bf9c2 100644 --- a/Content.Client/Disposal/Tagger/DisposalTaggerWindow.xaml +++ b/Content.Client/Disposal/Tagger/DisposalTaggerWindow.xaml @@ -7,13 +7,10 @@ -