]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix id card console not updating records (#28237)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Sat, 25 May 2024 20:08:15 +0000 (20:08 +0000)
committerGitHub <noreply@github.com>
Sat, 25 May 2024 20:08:15 +0000 (16:08 -0400)
* fix id card console not updating records

* test

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.Server/Access/Systems/IdCardConsoleSystem.cs

index e680b0c6f4071d10c64137011da112badafd3be6..4e63c93a837d23ccd94fdbe51d973443b05aec9a 100644 (file)
@@ -135,6 +135,8 @@ public sealed class IdCardConsoleSystem : SharedIdCardConsoleSystem
             _idCard.TryChangeJobDepartment(targetId, job);
         }
 
+        UpdateStationRecord(uid, targetId, newFullName, newJobTitle, job);
+
         if (!newAccessList.TrueForAll(x => component.AccessLevels.Contains(x)))
         {
             _sawmill.Warning($"User {ToPrettyString(uid)} tried to write unknown access tag.");
@@ -168,8 +170,6 @@ public sealed class IdCardConsoleSystem : SharedIdCardConsoleSystem
         This current implementation is pretty shit as it logs 27 entries (27 lines) if someone decides to give themselves AA*/
         _adminLogger.Add(LogType.Action, LogImpact.Medium,
             $"{ToPrettyString(player):player} has modified {ToPrettyString(targetId):entity} with the following accesses: [{string.Join(", ", addedTags.Union(removedTags))}] [{string.Join(", ", newAccessList)}]");
-
-        UpdateStationRecord(uid, targetId, newFullName, newJobTitle, job);
     }
 
     /// <summary>