Fix latejoin arrival announcement for roles with special entities (#12210)
* fix latejoin arrival announcement for roles with special entities * tests moment * use identity
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using Content.Server.Ghost;
|
||||
using Content.Server.Ghost.Components;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Server.Players;
|
||||
using Content.Server.Spawners.Components;
|
||||
using Content.Server.Speech.Components;
|
||||
@@ -183,16 +184,6 @@ namespace Content.Server.GameTicking
|
||||
|
||||
_playTimeTrackings.PlayerRolesChanged(player);
|
||||
|
||||
if (lateJoin)
|
||||
{
|
||||
_chatSystem.DispatchStationAnnouncement(station,
|
||||
Loc.GetString(
|
||||
"latejoin-arrival-announcement",
|
||||
("character", character.Name),
|
||||
("job", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(job.Name))
|
||||
), Loc.GetString("latejoin-arrival-sender"),
|
||||
playDefaultSound: false);
|
||||
}
|
||||
|
||||
var mobMaybe = _stationSpawning.SpawnPlayerCharacterOnStation(station, job, character);
|
||||
DebugTools.AssertNotNull(mobMaybe);
|
||||
@@ -200,6 +191,17 @@ namespace Content.Server.GameTicking
|
||||
|
||||
newMind.TransferTo(mob);
|
||||
|
||||
if (lateJoin)
|
||||
{
|
||||
_chatSystem.DispatchStationAnnouncement(station,
|
||||
Loc.GetString(
|
||||
"latejoin-arrival-announcement",
|
||||
("character", Identity.Entity(mob, EntityManager)),
|
||||
("job", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(job.Name))
|
||||
), Loc.GetString("latejoin-arrival-sender"),
|
||||
playDefaultSound: false);
|
||||
}
|
||||
|
||||
if (player.UserId == new Guid("{e887eb93-f503-4b65-95b6-2f282c014192}"))
|
||||
{
|
||||
EntityManager.AddComponent<OwOAccentComponent>(mob);
|
||||
|
||||
Reference in New Issue
Block a user