From 122bfcf81ed0c35c4fe84627ff8851aa58907fdd Mon Sep 17 00:00:00 2001 From: Fishfish458 <47410468+Fishfish458@users.noreply.github.com> Date: Sat, 19 Feb 2022 19:07:13 -0600 Subject: [PATCH] [CHANGE] microwave only removes access (#6747) Co-authored-by: fishfish458 --- Content.Server/Access/Systems/IdCardSystem.cs | 17 ++++++++++++++++- .../access/components/id-card-component.ftl | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Content.Server/Access/Systems/IdCardSystem.cs b/Content.Server/Access/Systems/IdCardSystem.cs index e985d89fe5..605f4ce63a 100644 --- a/Content.Server/Access/Systems/IdCardSystem.cs +++ b/Content.Server/Access/Systems/IdCardSystem.cs @@ -41,8 +41,23 @@ namespace Content.Server.Access.Systems { if (TryComp(uid, out var access)) { + float randomPick = _random.NextFloat(); + // if really unlucky, burn card + if (randomPick <= 0.15f) + { + TryComp(uid, out TransformComponent? transformComponent); + if (transformComponent != null) + { + _popupSystem.PopupCoordinates(Loc.GetString("id-card-component-microwave-burnt", ("id", uid)), + transformComponent.Coordinates, Filter.Pvs(uid)); + EntityManager.SpawnEntity("FoodBadRecipe", + transformComponent.Coordinates); + } + EntityManager.QueueDeleteEntity(uid); + return; + } // If they're unlucky, brick their ID - if (_random.Prob(0.25f)) + if (randomPick <= 0.25f) { _popupSystem.PopupEntity(Loc.GetString("id-card-component-microwave-bricked", ("id", uid)), uid, Filter.Pvs(uid)); diff --git a/Resources/Locale/en-US/access/components/id-card-component.ftl b/Resources/Locale/en-US/access/components/id-card-component.ftl index 13e3e40252..a07d94e66a 100644 --- a/Resources/Locale/en-US/access/components/id-card-component.ftl +++ b/Resources/Locale/en-US/access/components/id-card-component.ftl @@ -3,5 +3,6 @@ access-id-card-component-owner-name-job-title-text = {$originalOwnerName}{$jobSuffix} access-id-card-component-owner-full-name-job-title-text = {$fullName}'s ID card{$jobSuffix} +id-card-component-microwave-burnt = {$id}'s circuits pop loudly! id-card-component-microwave-bricked = {$id}'s circuits sizzle! id-card-component-microwave-safe = {$id}'s circuits make a weird noise.