From dd6edbdc1aa02a054edb95747a0007fc96ceb19d Mon Sep 17 00:00:00 2001 From: c4llv07e Date: Thu, 31 Oct 2024 09:03:54 +0300 Subject: [PATCH] Fix missing gender variable --- Content.Server/GameTicking/GameTicker.Spawning.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameTicking/GameTicker.Spawning.cs b/Content.Server/GameTicking/GameTicker.Spawning.cs index a511be510af..4e453ae50b3 100644 --- a/Content.Server/GameTicking/GameTicker.Spawning.cs +++ b/Content.Server/GameTicking/GameTicker.Spawning.cs @@ -7,12 +7,14 @@ using Content.Server.Speech.Components; using Content.Server.Station.Components; using Content.Shared.Database; +using Content.Shared.Humanoid; using Content.Shared.Mind; using Content.Shared.Players; using Content.Shared.Preferences; using Content.Shared.Roles; using Content.Shared.Roles.Jobs; using JetBrains.Annotations; +using Robust.Shared.Enums; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Network; @@ -233,6 +235,10 @@ private void SpawnPlayer(ICommonSession player, _mind.TransferTo(newMind, mob); + Gender gender = Gender.Epicene; + if (TryComp(mob, out var appearance)) + gender = appearance.Gender; + if (lateJoin && !silent) { if (jobPrototype.JoinNotifyCrew) @@ -254,7 +260,8 @@ private void SpawnPlayer(ICommonSession player, ("character", MetaData(mob).EntityName), ("gender", character.Gender), // Corvax-LastnameGender ("entity", mob), - ("job", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(jobName))), + ("job", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(jobName)), + ("gender", gender.ToString().ToLowerInvariant())), Loc.GetString("latejoin-arrival-sender"), playDefaultSound: false); }