More container pruning (#8576)
This commit is contained in:
@@ -17,6 +17,8 @@ namespace Content.Server.Labels
|
||||
{
|
||||
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
|
||||
|
||||
public const string ContainerName = "paper_label";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -31,7 +33,7 @@ namespace Content.Server.Labels
|
||||
|
||||
private void OnComponentInit(EntityUid uid, PaperLabelComponent component, ComponentInit args)
|
||||
{
|
||||
_itemSlotsSystem.AddItemSlot(uid, component.Name, component.LabelSlot);
|
||||
_itemSlotsSystem.AddItemSlot(uid, ContainerName, component.LabelSlot);
|
||||
|
||||
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
|
||||
return;
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Content.Server.Storage.Components
|
||||
protected override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
Contents = Owner.EnsureContainer<Container>(nameof(EntityStorageComponent));
|
||||
Contents = Owner.EnsureContainer<Container>(EntityStorageSystem.ContainerName);
|
||||
Contents.ShowContents = _showContents;
|
||||
Contents.OccludesLight = _occludesLight;
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ public sealed class EntityStorageSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
|
||||
public const string ContainerName = "entity_storage";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
Reference in New Issue
Block a user