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

@@ -1,5 +1,6 @@
using Content.Server.Popups;
using Content.Server.Interaction.Components;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.MobState.Components;
using Robust.Shared.Audio;
@@ -42,7 +43,7 @@ public sealed class InteractionPopupSystem : EntitySystem
if (_random.Prob(component.SuccessChance))
{
if (component.InteractSuccessString != null)
msg = Loc.GetString(component.InteractSuccessString, ("target", uid)); // Success message (localized).
msg = Loc.GetString(component.InteractSuccessString, ("target", Identity.Entity(uid, EntityManager))); // Success message (localized).
if (component.InteractSuccessSound != null)
sfx = component.InteractSuccessSound.GetSound();
@@ -50,7 +51,7 @@ public sealed class InteractionPopupSystem : EntitySystem
else
{
if (component.InteractFailureString != null)
msg = Loc.GetString(component.InteractFailureString, ("target", uid)); // Failure message (localized).
msg = Loc.GetString(component.InteractFailureString, ("target", Identity.Entity(uid, EntityManager))); // Failure message (localized).
if (component.InteractFailureSound != null)
sfx = component.InteractFailureSound.GetSound();
@@ -58,7 +59,8 @@ public sealed class InteractionPopupSystem : EntitySystem
if (component.MessagePerceivedByOthers != null)
{
string msgOthers = Loc.GetString(component.MessagePerceivedByOthers,("user", args.User), ("target", uid));
string msgOthers = Loc.GetString(component.MessagePerceivedByOthers,
("user", Identity.Entity(args.User, EntityManager)), ("target", Identity.Entity(uid, EntityManager)));
_popupSystem.PopupEntity(msg, uid, Filter.Entities(args.User));
_popupSystem.PopupEntity(msgOthers, uid, Filter.Pvs(uid, 2F, EntityManager).RemoveWhereAttachedEntity(puid => puid == args.User));
}