From faec39ced4d6a65b1ecbf373ba282202171f5224 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Tue, 16 Apr 2024 16:26:47 +1200 Subject: [PATCH] Give names to solution & identity entities (#26993) --- .../Containers/EntitySystems/SolutionContainerSystem.cs | 2 +- Content.Server/IdentityManagement/IdentitySystem.cs | 1 + .../Chemistry/EntitySystems/SharedSolutionContainerSystem.cs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Server/Chemistry/Containers/EntitySystems/SolutionContainerSystem.cs b/Content.Server/Chemistry/Containers/EntitySystems/SolutionContainerSystem.cs index 468212f5ea..755312554c 100644 --- a/Content.Server/Chemistry/Containers/EntitySystems/SolutionContainerSystem.cs +++ b/Content.Server/Chemistry/Containers/EntitySystems/SolutionContainerSystem.cs @@ -149,12 +149,12 @@ public sealed partial class SolutionContainerSystem : SharedSolutionContainerSys var relation = new ContainedSolutionComponent() { Container = container.Owner, ContainerName = name }; AddComp(uid, relation); + MetaData.SetEntityName(uid, $"solution - {name}"); ContainerSystem.Insert(uid, container, force: true); return (uid, solution, relation); } - #region Event Handlers private void OnMapInit(Entity entity, ref MapInitEvent args) diff --git a/Content.Server/IdentityManagement/IdentitySystem.cs b/Content.Server/IdentityManagement/IdentitySystem.cs index ec8412ed1a..a959b96ef9 100644 --- a/Content.Server/IdentityManagement/IdentitySystem.cs +++ b/Content.Server/IdentityManagement/IdentitySystem.cs @@ -62,6 +62,7 @@ public class IdentitySystem : SharedIdentitySystem { var ident = Spawn(null, Transform(uid).Coordinates); + _metaData.SetEntityName(ident, "identity"); QueueIdentityUpdate(uid); _container.Insert(ident, component.IdentityEntitySlot); } diff --git a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs index 5bb97e83eb..e74c146380 100644 --- a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs @@ -57,6 +57,7 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem [Dependency] protected readonly SharedAppearanceSystem AppearanceSystem = default!; [Dependency] protected readonly SharedHandsSystem Hands = default!; [Dependency] protected readonly SharedContainerSystem ContainerSystem = default!; + [Dependency] protected readonly MetaDataSystem MetaData = default!; public override void Initialize() { -- 2.52.0