From: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Date: Fri, 17 May 2024 08:48:22 +0000 (-0700) Subject: Add data field for id card microwave behaviour (#28087) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=de7e1b33dd74951f03ffffec48bf10958840f794;p=space-station-14.git Add data field for id card microwave behaviour (#28087) --- diff --git a/Content.Server/Access/Systems/IdCardSystem.cs b/Content.Server/Access/Systems/IdCardSystem.cs index 9cd9976cea..47388d1a6f 100644 --- a/Content.Server/Access/Systems/IdCardSystem.cs +++ b/Content.Server/Access/Systems/IdCardSystem.cs @@ -27,6 +27,9 @@ public sealed class IdCardSystem : SharedIdCardSystem private void OnMicrowaved(EntityUid uid, IdCardComponent component, BeingMicrowavedEvent args) { + if (!component.CanMicrowave) + return; + if (TryComp(uid, out var access)) { float randomPick = _random.NextFloat(); diff --git a/Content.Shared/Access/Components/IdCardComponent.cs b/Content.Shared/Access/Components/IdCardComponent.cs index 39d5d9d27f..a099cd26d2 100644 --- a/Content.Shared/Access/Components/IdCardComponent.cs +++ b/Content.Shared/Access/Components/IdCardComponent.cs @@ -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; }