Shared Containers (#3331)

* Namespace changes for containers.
Moved ContainerSlot from content to engine.

* Merged client/server ContainerManagerComponents into a single shared version.

* Mapfile and nullability fixes.

* Upgrades map.

* Update engine.
This commit is contained in:
Acruid
2021-03-01 15:24:46 -08:00
committed by GitHub
parent adda1ee404
commit 6c081d9d8d
64 changed files with 796 additions and 1439 deletions

View File

@@ -6,7 +6,6 @@ using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.Interfaces;
using Content.Shared.Atmos;
using Content.Shared.GameObjects.Components.Body;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
@@ -64,7 +63,7 @@ namespace Content.Server.GameObjects.Components.Disposal
{
base.Initialize();
_contents = ContainerManagerComponent.Ensure<Container>(nameof(DisposalHolderComponent), Owner);
_contents = ContainerHelpers.EnsureContainer<Container>(Owner, nameof(DisposalHolderComponent));
}
public override void OnRemove()

View File

@@ -589,7 +589,7 @@ namespace Content.Server.GameObjects.Components.Disposal
{
base.Initialize();
_container = ContainerManagerComponent.Ensure<Container>(Name, Owner);
_container = ContainerHelpers.EnsureContainer<Container>(Owner, Name);
if (UserInterface != null)
{

View File

@@ -7,6 +7,7 @@ using Content.Shared.GameObjects.Verbs;
using Content.Shared.Interfaces;
using Robust.Server.Console;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
@@ -222,7 +223,7 @@ namespace Content.Server.GameObjects.Components.Disposal
{
base.Initialize();
Contents = ContainerManagerComponent.Ensure<Container>(Name, Owner);
Contents = ContainerHelpers.EnsureContainer<Container>(Owner, Name);
Owner.EnsureComponent<AnchorableComponent>();
}

View File

@@ -546,7 +546,7 @@ namespace Content.Server.GameObjects.Components.Disposal
{
base.Initialize();
_container = ContainerManagerComponent.Ensure<Container>(Name, Owner);
_container = ContainerHelpers.EnsureContainer<Container>(Owner, Name);
if (UserInterface != null)
{

View File

@@ -1,5 +1,6 @@
#nullable enable
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;