Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing gender variable #2722

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading