From: Uberration Date: Thu, 23 Oct 2025 04:58:18 +0000 (-0400) Subject: Fix: LockSystem - HasUserAccess - Set DenyReason Localization Text Properly (#41012) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=cbb7c84fdaec7832bb1e41f794c73c091308f238;p=space-station-14.git 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 --- 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); }