]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add data field for id card microwave behaviour (#28087)
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Fri, 17 May 2024 08:48:22 +0000 (01:48 -0700)
committerGitHub <noreply@github.com>
Fri, 17 May 2024 08:48:22 +0000 (10:48 +0200)
Content.Server/Access/Systems/IdCardSystem.cs
Content.Shared/Access/Components/IdCardComponent.cs

index 9cd9976cea900c59eff98f01bdc6c4356cc413b0..47388d1a6fd2aafde8883664ccf2e13d7a7d185e 100644 (file)
@@ -27,6 +27,9 @@ public sealed class IdCardSystem : SharedIdCardSystem
 
     private void OnMicrowaved(EntityUid uid, IdCardComponent component, BeingMicrowavedEvent args)
     {
+        if (!component.CanMicrowave)
+            return;
+
         if (TryComp<AccessComponent>(uid, out var access))
         {
             float randomPick = _random.NextFloat();
index 39d5d9d27f328e633338ae7c7cf4b4b1aa5bc2eb..a099cd26d24553d5ea636748340c61586ceb5a88 100644 (file)
@@ -46,4 +46,7 @@ public sealed partial class IdCardComponent : Component
 
     [DataField]
     public LocId FullNameLocId = "access-id-card-component-owner-full-name-job-title-text";
+
+    [DataField]
+    public bool CanMicrowave = true;
 }