Skip to content

Commit

Permalink
Fix missing gender variable
Browse files Browse the repository at this point in the history
  • Loading branch information
c4llv07e committed Oct 31, 2024
1 parent 62e4ee7 commit dd6edbd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Content.Server/GameTicking/GameTicker.Spawning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -233,6 +235,10 @@ private void SpawnPlayer(ICommonSession player,

_mind.TransferTo(newMind, mob);

Gender gender = Gender.Epicene;
if (TryComp<HumanoidAppearanceComponent>(mob, out var appearance))
gender = appearance.Gender;

if (lateJoin && !silent)
{
if (jobPrototype.JoinNotifyCrew)
Expand All @@ -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);
}
Expand Down

0 comments on commit dd6edbd

Please sign in to comment.