Dewarns access (#16666)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
TemporalOroboros
2023-07-22 21:19:51 -07:00
committed by GitHub
parent 415701fd74
commit df1dcb74ac
27 changed files with 438 additions and 407 deletions

View File

@@ -18,6 +18,7 @@ namespace Content.Server.Access.Systems
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly MetaDataSystem _metaSystem = default!;
public override void Initialize()
{
@@ -112,7 +113,7 @@ namespace Content.Server.Access.Systems
if (player != null)
{
_adminLogger.Add(LogType.Identity, LogImpact.Low,
$"{ToPrettyString(player.Value):player} has changed the job title of {ToPrettyString(id.Owner):entity} to {jobTitle} ");
$"{ToPrettyString(player.Value):player} has changed the job title of {ToPrettyString(uid):entity} to {jobTitle} ");
}
return true;
}
@@ -149,7 +150,7 @@ namespace Content.Server.Access.Systems
if (player != null)
{
_adminLogger.Add(LogType.Identity, LogImpact.Low,
$"{ToPrettyString(player.Value):player} has changed the name of {ToPrettyString(id.Owner):entity} to {fullName} ");
$"{ToPrettyString(player.Value):player} has changed the name of {ToPrettyString(uid):entity} to {fullName} ");
}
return true;
}
@@ -174,7 +175,7 @@ namespace Content.Server.Access.Systems
: Loc.GetString("access-id-card-component-owner-full-name-job-title-text",
("fullName", id.FullName),
("jobSuffix", jobSuffix));
EntityManager.GetComponent<MetaDataComponent>(id.Owner).EntityName = val;
_metaSystem.SetEntityName(uid, val);
}
}
}