Skip to content

Commit 074ac69

Browse files
GameRules - SecretPlus Medium, Changed Chaos/Antag Scores to be based upon initial ready players (ProjectOmu#218)
Edited `SecretPlusSystem.cs` to be fully on Ready Players at round start rolling. Co-authored-by: John Willis <143434770+CerberusWolfie@users.noreply.github.com>
1 parent df68c34 commit 074ac69

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Content.Goobstation.Server/StationEvents/SecretPlus/SecretPlusSystem.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,18 @@ public override void Initialize()
9797

9898
protected override void Added(EntityUid uid, SecretPlusComponent scheduler, GameRuleComponent gameRule, GameRuleAddedEvent args)
9999
{
100-
var totalPlayers = GetTotalPlayerCount(_playerManager.Sessions);
101-
// set up starting chaos score
100+
// Omu Station - Start
101+
// Edited it Initial ChaosScore & Antag Weight, to be based upon the amount of ReadyPlayers to be consistent with round start score.
102+
103+
var readyPlayers = GameTicker.ReadyPlayerCount();
104+
// set up starting chaos score based on ready players
102105
scheduler.ChaosScore =
103-
-_random.NextFloat(scheduler.MinStartingChaos * totalPlayers, scheduler.MaxStartingChaos * totalPlayers) *
106+
-_random.NextFloat(scheduler.MinStartingChaos * readyPlayers, scheduler.MaxStartingChaos * readyPlayers) *
104107
_roundstartChaosScoreMultiplier;
105108

109+
LogMessage($"Initial chaos score: {scheduler.ChaosScore} (based on {readyPlayers} ready players)");
110+
// Omu Station - End
111+
106112
// roll midroundchaos generation variation
107113
var roll = _random.NextFloat();
108114
roll = MathF.Pow(roll, scheduler.ChaosChangeVariationExponent);

0 commit comments

Comments
 (0)