Traitor objective issuers (#27855)
* the thing * another one --------- Co-authored-by: whateverusername0 <whateveremail>
This commit is contained in:
@@ -31,6 +31,9 @@ public sealed partial class TraitorRuleComponent : Component
|
||||
[DataField]
|
||||
public ProtoId<DatasetPrototype> CodewordVerbs = "verbs";
|
||||
|
||||
[DataField]
|
||||
public ProtoId<DatasetPrototype> ObjectiveIssuers = "TraitorCorporations";
|
||||
|
||||
public int TotalTraitors => TraitorMinds.Count;
|
||||
public string[] Codewords = new string[3];
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
|
||||
return false;
|
||||
|
||||
var briefing = Loc.GetString("traitor-role-codewords-short", ("codewords", string.Join(", ", component.Codewords)));
|
||||
var issuer = _random.Pick(_prototypeManager.Index(component.ObjectiveIssuers).Values);
|
||||
|
||||
Note[]? code = null;
|
||||
if (giveUplink)
|
||||
@@ -97,7 +98,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
|
||||
Loc.GetString("traitor-role-uplink-code-short", ("code", string.Join("-", code).Replace("sharp", "#"))));
|
||||
}
|
||||
|
||||
_antag.SendBriefing(traitor, GenerateBriefing(component.Codewords, code), null, component.GreetSoundNotification);
|
||||
_antag.SendBriefing(traitor, GenerateBriefing(component.Codewords, code, issuer), null, component.GreetSoundNotification);
|
||||
|
||||
component.TraitorMinds.Add(mindId);
|
||||
|
||||
@@ -142,10 +143,10 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
|
||||
args.Text += "\n" + Loc.GetString("traitor-round-end-codewords", ("codewords", string.Join(", ", comp.Codewords)));
|
||||
}
|
||||
|
||||
private string GenerateBriefing(string[] codewords, Note[]? uplinkCode)
|
||||
private string GenerateBriefing(string[] codewords, Note[]? uplinkCode, string? objectiveIssuer = null)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine(Loc.GetString("traitor-role-greeting"));
|
||||
sb.AppendLine(Loc.GetString("traitor-role-greeting", ("corporation", objectiveIssuer ?? Loc.GetString("objective-issuer-unknown"))));
|
||||
sb.AppendLine(Loc.GetString("traitor-role-codewords-short", ("codewords", string.Join(", ", codewords))));
|
||||
if (uplinkCode != null)
|
||||
sb.AppendLine(Loc.GetString("traitor-role-uplink-code-short", ("code", string.Join("-", uplinkCode).Replace("sharp", "#"))));
|
||||
|
||||
@@ -4,6 +4,7 @@ traitor-round-end-codewords = The codewords were: [color=White]{$codewords}[/col
|
||||
traitor-round-end-agent-name = traitor
|
||||
|
||||
objective-issuer-syndicate = [color=crimson]The Syndicate[/color]
|
||||
objective-issuer-unknown = Unknown
|
||||
|
||||
# Shown at the end of a round of Traitor
|
||||
|
||||
@@ -23,7 +24,7 @@ traitor-death-match-end-round-description-entry = {$originalName}'s PDA, with {$
|
||||
|
||||
# TraitorRole
|
||||
traitor-role-greeting =
|
||||
You are a syndicate agent.
|
||||
You are an agent sent by {$corporation} on behalf of The Syndicate.
|
||||
Your objectives and codewords are listed in the character menu.
|
||||
Use the uplink loaded into your PDA to buy the tools you'll need for this mission.
|
||||
Death to Nanotrasen!
|
||||
|
||||
12
Resources/Prototypes/Datasets/corporations.yml
Normal file
12
Resources/Prototypes/Datasets/corporations.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- type: dataset
|
||||
id: TraitorCorporations
|
||||
values:
|
||||
- "CyberSun Industries"
|
||||
- "Gorlex Marauders"
|
||||
- "MI13"
|
||||
- "Tiger Cooperative"
|
||||
- "S.E.L.F."
|
||||
- "Animal Rights Consortium"
|
||||
- "Donk Corporation"
|
||||
- "Waffle Corporation"
|
||||
- "Interdyne Pharmaceutics"
|
||||
Reference in New Issue
Block a user