Fix queued deletion check (singulo loosing at beyond PA 1 but only on live servers) (#28906)

Fix queued deletion check
This commit is contained in:
Partmedia 2024-06-12 14:56:07 -08:00 committed by null
parent e77f2a23c2
commit 13f88e6ba8
No known key found for this signature in database
GPG Key ID: 212F05528FD678BE
1 changed files with 5 additions and 3 deletions

View File

@ -118,10 +118,12 @@ public sealed class EventHorizonSystem : SharedEventHorizonSystem
/// </summary>
public void ConsumeEntity(EntityUid hungry, EntityUid morsel, EventHorizonComponent eventHorizon, BaseContainer? outerContainer = null)
{
if (!EntityManager.IsQueuedForDeletion(morsel) // I saw it log twice a few times for some reason?
&& (HasComp<MindContainerComponent>(morsel)
if (EntityManager.IsQueuedForDeletion(morsel)) // already handled, and we're substepping
return;
if (HasComp<MindContainerComponent>(morsel)
|| _tagSystem.HasTag(morsel, "HighRiskItem")
|| HasComp<ContainmentFieldGeneratorComponent>(morsel)))
|| HasComp<ContainmentFieldGeneratorComponent>(morsel))
{
_adminLogger.Add(LogType.EntityDelete, LogImpact.Extreme, $"{ToPrettyString(morsel)} entered the event horizon of {ToPrettyString(hungry)} and was deleted");
}