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:
@@ -13,6 +13,7 @@ using Content.Shared.GameObjects.Verbs;
|
||||
using Content.Shared.Interfaces;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
@@ -123,7 +124,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
Contents = ContainerManagerComponent.Ensure<Container>(nameof(EntityStorageComponent), Owner);
|
||||
Contents = ContainerHelpers.EnsureContainer<Container>(Owner, nameof(EntityStorageComponent));
|
||||
EntityQuery = new IntersectingEntityQuery(Owner);
|
||||
|
||||
Contents.ShowContents = _showContents;
|
||||
|
||||
@@ -3,7 +3,7 @@ using Content.Server.GameObjects.Components.GUI;
|
||||
using Content.Server.Interfaces.GameObjects.Components.Items;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.Interfaces;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -29,7 +29,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
_itemContainer = ContainerManagerComponent.Ensure<ContainerSlot>("stash", Owner, out _);
|
||||
_itemContainer = ContainerHelpers.EnsureContainer<ContainerSlot>(Owner, "stash", out _);
|
||||
}
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ using Content.Shared.Utility;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Log;
|
||||
@@ -350,7 +351,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
base.Initialize();
|
||||
|
||||
// ReSharper disable once StringLiteralTypo
|
||||
_storage = ContainerManagerComponent.Ensure<Container>("storagebase", Owner);
|
||||
_storage = ContainerHelpers.EnsureContainer<Container>(Owner, "storagebase");
|
||||
_storage.OccludesLight = _occludesLight;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using Content.Shared.GameObjects.Components;
|
||||
using Content.Shared.GameObjects.Components.Tag;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
Reference in New Issue
Block a user