Id[entity] 2.0 (real) (#9612)

* starter API

* network ID cards

* Port more stuff from old identity

* Re-implement identity representation + name updating

* move

* proper name returning for `IdentityName`

* move everything important to server, give in to  temptation

* shared / server / client split sadly. move ensure to shared and spawn to server

* identity update queueing + identityblocker

* fixes

* and just like that it's usable for admins

* huge identity pass

* pass dos

* jesus christ

* figs :D

* fuck u

* fix bad merge.

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
This commit is contained in:
Kara
2022-07-10 18:36:53 -07:00
committed by GitHub
parent fb6586cdc6
commit 2d5ec7f85c
68 changed files with 668 additions and 188 deletions

View File

@@ -9,6 +9,7 @@ using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Content.Shared.Hands;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
using Content.Shared.MobState.Components;
@@ -63,7 +64,7 @@ public sealed partial class ChemistrySystem
else
{
_popup.PopupEntity(Loc.GetString("injector-component-cannot-transfer-message",
("target", target)), component.Owner, Filter.Entities(user));
("target", Identity.Entity(target, EntityManager))), component.Owner, Filter.Entities(user));
}
}
else if (component.ToggleState == SharedInjectorComponent.InjectorToggleMode.Draw)
@@ -82,7 +83,7 @@ public sealed partial class ChemistrySystem
else
{
_popup.PopupEntity(Loc.GetString("injector-component-cannot-draw-message",
("target", target)), component.Owner, Filter.Entities(user));
("target", Identity.Entity(target, EntityManager))), component.Owner, Filter.Entities(user));
}
}
}
@@ -194,7 +195,7 @@ public sealed partial class ChemistrySystem
if (user != target)
{
// Create a pop-up for the target
var userName = MetaData(user).EntityName;
var userName = Identity.Name(user, EntityManager);
_popup.PopupEntity(Loc.GetString("injector-component-injecting-target",
("user", userName)), user, Filter.Entities(target));
@@ -256,7 +257,7 @@ public sealed partial class ChemistrySystem
if (realTransferAmount <= 0)
{
_popup.PopupEntity(Loc.GetString("injector-component-cannot-inject-message", ("target", targetBloodstream.Owner)),
_popup.PopupEntity(Loc.GetString("injector-component-cannot-inject-message", ("target", Identity.Entity(targetBloodstream.Owner, EntityManager))),
component.Owner, Filter.Entities(user));
return;
}
@@ -270,7 +271,7 @@ public sealed partial class ChemistrySystem
_popup.PopupEntity(Loc.GetString("injector-component-inject-success-message",
("amount", removedSolution.TotalVolume),
("target", targetBloodstream.Owner)), component.Owner, Filter.Entities(user));
("target", Identity.Entity(targetBloodstream.Owner, EntityManager))), component.Owner, Filter.Entities(user));
Dirty(component);
AfterInject(component);
@@ -289,7 +290,7 @@ public sealed partial class ChemistrySystem
if (realTransferAmount <= 0)
{
_popup.PopupEntity(Loc.GetString("injector-component-target-already-full-message", ("target", targetEntity)),
_popup.PopupEntity(Loc.GetString("injector-component-target-already-full-message", ("target", Identity.Entity(targetEntity, EntityManager))),
component.Owner, Filter.Entities(user));
return;
}
@@ -310,7 +311,7 @@ public sealed partial class ChemistrySystem
_popup.PopupEntity(Loc.GetString("injector-component-transfer-success-message",
("amount", removedSolution.TotalVolume),
("target", targetEntity)), component.Owner, Filter.Entities(user));
("target", Identity.Entity(targetEntity, EntityManager))), component.Owner, Filter.Entities(user));
Dirty(component);
AfterInject(component);
@@ -349,7 +350,7 @@ public sealed partial class ChemistrySystem
if (realTransferAmount <= 0)
{
_popup.PopupEntity(Loc.GetString("injector-component-target-is-empty-message", ("target", targetEntity)),
_popup.PopupEntity(Loc.GetString("injector-component-target-is-empty-message", ("target", Identity.Entity(targetEntity, EntityManager))),
component.Owner, Filter.Entities(user));
return;
}
@@ -371,7 +372,7 @@ public sealed partial class ChemistrySystem
_popup.PopupEntity(Loc.GetString("injector-component-draw-success-message",
("amount", removedSolution.TotalVolume),
("target", targetEntity)), component.Owner, Filter.Entities(user));
("target", Identity.Entity(targetEntity, EntityManager))), component.Owner, Filter.Entities(user));
Dirty(component);
AfterDraw(component);
@@ -395,7 +396,7 @@ public sealed partial class ChemistrySystem
_popup.PopupEntity(Loc.GetString("injector-component-draw-success-message",
("amount", drawAmount),
("target", target)), component.Owner, Filter.Entities(user));
("target", Identity.Entity(target, EntityManager))), component.Owner, Filter.Entities(user));
Dirty(component);
AfterDraw(component);