Skip to content

Commit

Permalink
FIX: No codewords for traitor without PDA (#1838)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeZer2 authored Sep 11, 2024
1 parent 4e1f4ca commit ad171ae
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Content.Server/GameTicking/Rules/TraitorRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,18 @@ public bool MakeTraitor(EntityUid traitor, TraitorRuleComponent component, bool
// creadth: we need to create uplink for the antag.
// PDA should be in place already
var pda = _uplink.FindUplinkTarget(traitor);
if (pda == null || !_uplink.AddUplink(traitor, startingBalance, giveDiscounts: true))
return false;

// Give traitors their codewords and uplink code to keep in their character info menu
code = EnsureComp<RingerUplinkComponent>(pda.Value).Code;
//ss220 fix no codewords for traitor w/o pda start
if (pda != null && _uplink.AddUplink(traitor, startingBalance, giveDiscounts: true))
{
// Give traitors their codewords and uplink code to keep in their character info menu
code = EnsureComp<RingerUplinkComponent>(pda.Value).Code;

// If giveUplink is false the uplink code part is omitted
briefing = string.Format("{0}\n{1}", briefing,
Loc.GetString("traitor-role-uplink-code-short", ("code", string.Join("-", code).Replace("sharp", "#"))));
// If giveUplink is false the uplink code part is omitted
briefing = string.Format("{0}\n{1}", briefing,
Loc.GetString("traitor-role-uplink-code-short", ("code", string.Join("-", code).Replace("sharp", "#"))));
}
//ss220 fix no codewords for traitor w/o pda end
}

_antag.SendBriefing(traitor, GenerateBriefing(component.Codewords, code, issuer), null, component.GreetSoundNotification);
Expand Down

0 comments on commit ad171ae

Please sign in to comment.