Localize antag roles (#10638)

This commit is contained in:
Morb
2022-09-01 05:37:54 +03:00
committed by GitHub
parent d946ed5009
commit 49397adbc5
7 changed files with 47 additions and 16 deletions

View File

@@ -8,6 +8,9 @@ namespace Content.Shared.Roles
[Prototype("antag")] [Prototype("antag")]
public sealed class AntagPrototype : IPrototype public sealed class AntagPrototype : IPrototype
{ {
private string _name = string.Empty;
private string _objective = string.Empty;
[ViewVariables] [ViewVariables]
[IdDataFieldAttribute] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
@@ -16,13 +19,21 @@ namespace Content.Shared.Roles
/// The name of this antag as displayed to players. /// The name of this antag as displayed to players.
/// </summary> /// </summary>
[DataField("name")] [DataField("name")]
public string Name { get; } = string.Empty; public string Name
{
get => _name;
private set => _name = Loc.GetString(value);
}
/// <summary> /// <summary>
/// The antag's objective, displayed at round-start to the player. /// The antag's objective, displayed at round-start to the player.
/// </summary> /// </summary>
[DataField("objective")] [DataField("objective")]
public string Objective { get; private set; } = string.Empty; public string Objective
{
get => _objective;
private set => _objective = Loc.GetString(value);
}
/// <summary> /// <summary>
/// Whether or not the antag role is one of the bad guys. /// Whether or not the antag role is one of the bad guys.

View File

@@ -0,0 +1,20 @@
roles-antag-syndicate-agent-name = Syndicate agent
roles-antag-syndicate-agent-objective = Complete your objectives without being caught.
roles-antag-initial-infected-name = Initial Infected
roles-antag-initial-infected-objective = Once you turn, infect as many other crew members as possible.
roles-antag-zombie-name = Zombie
roles-antag-zombie-objective = Turn as many humans as possible into zombies.
roles-antag-suspicion-innocent-name = Innocent
roles-antag-suspicion-innocent-objective = Discover and eliminate all traitors.
roles-antag-suspicion-suspect-name = Suspect
roles-antag-suspicion-suspect-objective = Kill the innocents.
roles-antag-nuclear-operative-commander-name = Nuclear operative commander
roles-antag-nuclear-operative-commander-objective = Lead your team to the destruction of the station.
roles-antag-nuclear-operative-name = Nuclear operative
roles-antag-nuclear-operative-objective = Find the nuke disk and blow up the station.

View File

@@ -1,6 +1,6 @@
- type: antag - type: antag
id: SuspicionInnocent id: SuspicionInnocent
name: "Innocent" name: roles-antag-suspicion-innocent-name
antagonist: false antagonist: false
setPreference: false setPreference: false
objective: "Discover and eliminate all traitors." objective: roles-antag-suspicion-innocent-objective

View File

@@ -1,6 +1,6 @@
- type: antag - type: antag
id: SuspicionTraitor id: SuspicionTraitor
name: "Suspect" name: roles-antag-suspicion-suspect-name
antagonist: true antagonist: true
setPreference: true setPreference: true
objective: "Kill the innocents." objective: roles-antag-suspicion-suspect-objective

View File

@@ -1,13 +1,13 @@
- type: antag - type: antag
id: Nukeops id: Nukeops
name: "Nuclear Operative" name: roles-antag-nuclear-operative-name
antagonist: true antagonist: true
setPreference: true setPreference: true
objective: "Find the nuke disk and blow up the station." objective: roles-antag-nuclear-operative-objective
- type: antag - type: antag
id: NukeopsCommander id: NukeopsCommander
name: "Nuclear Operative Commander" name: roles-antag-nuclear-operative-commander-name
antagonist: true antagonist: true
setPreference: true setPreference: true
objective: "Lead your team to the destruction of the station." objective: roles-antag-nuclear-operative-commander-objective

View File

@@ -1,6 +1,6 @@
- type: antag - type: antag
id: Traitor id: Traitor
name: "Syndicate Agent" name: roles-antag-syndicate-agent-name
antagonist: true antagonist: true
setPreference: true setPreference: true
objective: "Complete your objectives without being caught." objective: roles-antag-syndicate-agent-objective

View File

@@ -1,13 +1,13 @@
- type: antag - type: antag
id: InitialInfected id: InitialInfected
name: "Initial Infected" name: roles-antag-initial-infected-name
antagonist: true antagonist: true
setPreference: true setPreference: true
objective: "Once you turn, infect as many other crew members as possible" objective: roles-antag-initial-infected-objective
- type: antag - type: antag
id: Zombie id: Zombie
name: "Zombie" name: roles-antag-zombie-name
antagonist: true antagonist: true
setPreference: false setPreference: false
objective: "Turn as many humans as possible into zombies." objective: roles-antag-zombie-objective