From 94a29978b5ff46e117f8c978c9f1e212d28775d5 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Wed, 6 Oct 2021 11:45:52 +0200 Subject: [PATCH] Fix being able to trap aghosts in lockers. This ain't an ideal fix, I'll admit. But it's better than nothing. Fixes #4767 --- Content.Server/Storage/Components/EntityStorageComponent.cs | 5 +++++ Resources/Changelog/Parts/aghost.yml | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 Resources/Changelog/Parts/aghost.yml diff --git a/Content.Server/Storage/Components/EntityStorageComponent.cs b/Content.Server/Storage/Components/EntityStorageComponent.cs index 1cb0066d88..d04d456a78 100644 --- a/Content.Server/Storage/Components/EntityStorageComponent.cs +++ b/Content.Server/Storage/Components/EntityStorageComponent.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Content.Server.Ghost.Components; using Content.Server.Tools.Components; using Content.Shared.ActionBlocker; using Content.Shared.Acts; @@ -209,6 +210,10 @@ namespace Content.Server.Storage.Components !entity.HasComponent()) continue; + // Let's not insert admin ghosts, yeah? This is really a a hack and should be replaced by attempt events + if (entity.HasComponent()) + continue; + if (!AddToContents(entity)) { continue; diff --git a/Resources/Changelog/Parts/aghost.yml b/Resources/Changelog/Parts/aghost.yml new file mode 100644 index 0000000000..dd42c6509f --- /dev/null +++ b/Resources/Changelog/Parts/aghost.yml @@ -0,0 +1,4 @@ +author: Zumorica +changes: + - type: Fix # One of the following: Add, Remove, Tweak, Fix + message: Fix being able to trap admin ghosts on lockers.