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

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using Content.Server.Construction;
using Content.Server.Interfaces.GameObjects;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
@@ -28,8 +29,8 @@ namespace Content.Server.GameObjects.Components.Construction
{
base.Initialize();
_boardContainer = ContainerManagerComponent.Ensure<Container>(MachineFrameComponent.BoardContainer, Owner);
_partContainer = ContainerManagerComponent.Ensure<Container>(MachineFrameComponent.PartContainer, Owner);
_boardContainer = ContainerHelpers.EnsureContainer<Container>(Owner, MachineFrameComponent.BoardContainer);
_partContainer = ContainerHelpers.EnsureContainer<Container>(Owner, MachineFrameComponent.PartContainer);
}
protected override void Startup()
@@ -59,8 +60,8 @@ namespace Content.Server.GameObjects.Components.Construction
public void CreateBoardAndStockParts()
{
// Entity might not be initialized yet.
var boardContainer = ContainerManagerComponent.Ensure<Container>(MachineFrameComponent.BoardContainer, Owner, out var existedBoard);
var partContainer = ContainerManagerComponent.Ensure<Container>(MachineFrameComponent.PartContainer, Owner, out var existedParts);
var boardContainer = ContainerHelpers.EnsureContainer<Container>(Owner, MachineFrameComponent.BoardContainer, out var existedBoard);
var partContainer = ContainerHelpers.EnsureContainer<Container>(Owner, MachineFrameComponent.PartContainer, out var existedParts);
if (string.IsNullOrEmpty(BoardPrototype))
return;