Add entity prototype save test (#10274)
This commit is contained in:
@@ -12,6 +12,8 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
{
|
||||
public abstract class DisposalTubeComponent : Component, IDisposalTubeComponent
|
||||
{
|
||||
public const string ContainerId = "disposal-tube";
|
||||
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
public static readonly TimeSpan ClangDelay = TimeSpan.FromSeconds(0.5);
|
||||
@@ -135,7 +137,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
Contents = ContainerHelpers.EnsureContainer<Container>(Owner, Name);
|
||||
Contents = ContainerHelpers.EnsureContainer<Container>(Owner, ContainerId);
|
||||
Owner.EnsureComponent<AnchorableComponent>();
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||
[Dependency] private readonly DumpableSystem _dumpableSystem = default!;
|
||||
[Dependency] private readonly TransformSystem _transformSystem = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
|
||||
|
||||
private readonly List<DisposalUnitComponent> _activeDisposals = new();
|
||||
|
||||
@@ -293,7 +294,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
|
||||
private void HandleDisposalInit(EntityUid uid, DisposalUnitComponent component, ComponentInit args)
|
||||
{
|
||||
component.Container = component.Owner.EnsureContainer<Container>(component.Name);
|
||||
component.Container = _containerSystem.EnsureContainer<Container>(uid, SharedDisposalUnitComponent.ContainerId);
|
||||
|
||||
UpdateInterface(component, component.Powered);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user