Skip to content

Commit

Permalink
Give names to solution & identity entities (space-wizards#26993)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectroJr authored Apr 16, 2024
1 parent 229caa1 commit faec39c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ private Entity<SolutionComponent, ContainedSolutionComponent> SpawnSolutionUnini
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)
Expand Down
1 change: 1 addition & 0 deletions Content.Server/IdentityManagement/IdentitySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ private void OnMapInit(EntityUid uid, IdentityComponent component, MapInitEvent
{
var ident = Spawn(null, Transform(uid).Coordinates);

_metaData.SetEntityName(ident, "identity");
QueueIdentityUpdate(uid);
_container.Insert(ident, component.IdentityEntitySlot);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down

0 comments on commit faec39c

Please sign in to comment.