Removes all dependencies on engine component events. (#4199)

This commit is contained in:
Acruid
2021-06-18 01:49:18 -07:00
committed by GitHub
parent 9fea68707c
commit e1e54e9cb1
27 changed files with 235 additions and 184 deletions

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Content.Server.Interaction;
using Content.Server.Storage.Components;
using JetBrains.Annotations;
@@ -39,6 +39,11 @@ namespace Content.Server.Storage
{
storageComp.HandleEntityMaybeRemoved(message);
}
if (oldParentEntity.TryGetComponent<StorageCounterComponent>(out var newStorageComp))
{
newStorageComp.ContainerUpdateAppearance(message.Container);
}
}
private static void HandleEntityInsertedIntoContainer(EntInsertedIntoContainerMessage message)
@@ -49,6 +54,11 @@ namespace Content.Server.Storage
{
storageComp.HandleEntityMaybeInserted(message);
}
if (oldParentEntity.TryGetComponent<StorageCounterComponent>(out var newStorageComp))
{
newStorageComp.ContainerUpdateAppearance(message.Container);
}
}
private void CheckSubscribedEntities(ServerStorageComponent storageComp)