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 };
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<SolutionContainerManagerComponent> entity, ref MapInitEvent args)

View File

@@ -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);
}

View File

@@ -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()
{