Remove IContainer and move functions to the container system. (#19834)

This commit is contained in:
Leon Friedrich
2023-09-10 14:16:37 +12:00
committed by GitHub
parent 2d71eec6f9
commit b45e53603d
19 changed files with 54 additions and 48 deletions

View File

@@ -12,6 +12,8 @@ namespace Content.Shared.Body.Systems;
public partial class SharedBodySystem
{
[Dependency] private readonly SharedContainerSystem _container = default!;
private void InitializeOrgans()
{
SubscribeLocalEvent<OrganComponent, ComponentGetState>(OnOrganGetState);
@@ -35,7 +37,7 @@ public partial class SharedBodySystem
slot.Child == null &&
Resolve(organId.Value, ref organ, false) &&
Containers.TryGetContainer(slot.Parent, BodyContainerId, out var container) &&
container.CanInsert(organId.Value);
_container.CanInsert(organId.Value, container);
}
private void OnOrganGetState(EntityUid uid, OrganComponent organ, ref ComponentGetState args)