starting TC penalties for powerful roles (#11111)

* starting TC based on role

* actually just remove all the job changes

* reviews

* moment
This commit is contained in:
Rane
2022-09-15 15:37:54 -04:00
committed by GitHub
parent 4ea7087d6f
commit 315c564315
2 changed files with 10 additions and 0 deletions

View File

@@ -184,6 +184,9 @@ public sealed class TraitorRuleSystem : GameRuleSystem
var startingBalance = _cfg.GetCVar(CCVars.TraitorStartingBalance);
if (mind.CurrentJob != null)
startingBalance = Math.Max(startingBalance - mind.CurrentJob.Prototype.AntagAdvantage, 0);
if (!_uplink.AddUplink(mind.OwnedEntity!.Value, startingBalance))
return false;

View File

@@ -53,6 +53,13 @@ namespace Content.Shared.Roles
[DataField("weight")]
public int Weight { get; private set; }
/// <summary>
/// A numerical score for how much easier this job is for antagonists.
/// For traitors, reduces starting TC by this amount. Other gamemodes can use it for whatever they find fitting.
/// </summary>
[DataField("antagAdvantage")]
public int AntagAdvantage = 0;
[DataField("startingGear", customTypeSerializer: typeof(PrototypeIdSerializer<StartingGearPrototype>))]
public string? StartingGear { get; private set; }