Give names to solution & identity entities (#26993)

This commit is contained in:
Leon Friedrich
2024-04-16 16:26:47 +12:00
committed by GitHub
parent 229caa10bf
commit faec39ced4
3 changed files with 3 additions and 1 deletions

View File

@@ -149,12 +149,12 @@ public sealed partial class SolutionContainerSystem : SharedSolutionContainerSys
var relation = new ContainedSolutionComponent() { Container = container.Owner, ContainerName = name }; var relation = new ContainedSolutionComponent() { Container = container.Owner, ContainerName = name };
AddComp(uid, relation); AddComp(uid, relation);
MetaData.SetEntityName(uid, $"solution - {name}");
ContainerSystem.Insert(uid, container, force: true); ContainerSystem.Insert(uid, container, force: true);
return (uid, solution, relation); return (uid, solution, relation);
} }
#region Event Handlers #region Event Handlers
private void OnMapInit(Entity<SolutionContainerManagerComponent> entity, ref MapInitEvent args) private void OnMapInit(Entity<SolutionContainerManagerComponent> entity, ref MapInitEvent args)

View File

@@ -62,6 +62,7 @@ public class IdentitySystem : SharedIdentitySystem
{ {
var ident = Spawn(null, Transform(uid).Coordinates); var ident = Spawn(null, Transform(uid).Coordinates);
_metaData.SetEntityName(ident, "identity");
QueueIdentityUpdate(uid); QueueIdentityUpdate(uid);
_container.Insert(ident, component.IdentityEntitySlot); _container.Insert(ident, component.IdentityEntitySlot);
} }

View File

@@ -57,6 +57,7 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem
[Dependency] protected readonly SharedAppearanceSystem AppearanceSystem = default!; [Dependency] protected readonly SharedAppearanceSystem AppearanceSystem = default!;
[Dependency] protected readonly SharedHandsSystem Hands = default!; [Dependency] protected readonly SharedHandsSystem Hands = default!;
[Dependency] protected readonly SharedContainerSystem ContainerSystem = default!; [Dependency] protected readonly SharedContainerSystem ContainerSystem = default!;
[Dependency] protected readonly MetaDataSystem MetaData = default!;
public override void Initialize() public override void Initialize()
{ {