Remove IContainer and move functions to the container system. (#19834)
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
if (!Resolve(uid, ref holder))
|
||||
return false;
|
||||
|
||||
if (!holder.Container.CanInsert(toInsert))
|
||||
if (!_containerSystem.CanInsert(toInsert, holder.Container))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -753,10 +753,10 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
|
||||
|
||||
public override bool CanInsert(EntityUid uid, SharedDisposalUnitComponent component, EntityUid entity)
|
||||
{
|
||||
if (!base.CanInsert(uid, component, entity) || component is not SharedDisposalUnitComponent serverComp)
|
||||
if (!base.CanInsert(uid, component, entity))
|
||||
return false;
|
||||
|
||||
return serverComp.Container.CanInsert(entity);
|
||||
return _containerSystem.CanInsert(entity, component.Container);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user