From cbb7c84fdaec7832bb1e41f794c73c091308f238 Mon Sep 17 00:00:00 2001 From: Uberration Date: Thu, 23 Oct 2025 00:58:18 -0400 Subject: [PATCH] Fix: LockSystem - HasUserAccess - Set DenyReason Localization Text Properly (#41012) * Update AccessReaderSystem.cs Fixes #40987 Related to PR #40883 Set DenyReason in CheckUserHasLockAccessEvent when access is denied to display "Access denied." popup to users. Uses ??= to avoid overriding reasons from possible systems. * RE-FIX: Localize default deny reason in LockSystem.HasUserAccess The default deny reason was being passed as a localization key string instead of being localized before display. * Re-added null coalescing operator Per maint request --- Content.Shared/Lock/LockSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Shared/Lock/LockSystem.cs b/Content.Shared/Lock/LockSystem.cs index ca780780fb..95a681dc38 100644 --- a/Content.Shared/Lock/LockSystem.cs +++ b/Content.Shared/Lock/LockSystem.cs @@ -351,7 +351,7 @@ public sealed class LockSystem : EntitySystem if (!quiet) { - var denyReason = accessEv.DenyReason ?? _defaultDenyReason; + var denyReason = accessEv.DenyReason ?? Loc.GetString(_defaultDenyReason); _sharedPopupSystem.PopupClient(denyReason, ent, user); }