Give names to solution & identity entities (#26993)
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user