From 0a1b3ba601ccaf6827253bc9f824fba853e34fa8 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Mon, 15 Jan 2024 23:09:14 +0000 Subject: [PATCH] more objective logging + maybe fix the no objective bug (#24139) * more objective log * remove hijack from group!!!! --------- Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Server/GameTicking/Rules/TraitorRuleSystem.cs | 5 ++++- Resources/Prototypes/Objectives/objectiveGroups.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs index 26125a6da7..dce144901f 100644 --- a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs @@ -238,6 +238,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem var maxDifficulty = _cfg.GetCVar(CCVars.TraitorMaxDifficulty); var maxPicks = _cfg.GetCVar(CCVars.TraitorMaxPicks); var difficulty = 0f; + Log.Debug($"Attempting {maxPicks} objective picks with {maxDifficulty} difficulty"); for (var pick = 0; pick < maxPicks && maxDifficulty > difficulty; pick++) { var objective = _objectives.GetRandomObjective(mindId, mind, "TraitorObjectiveGroups"); @@ -245,7 +246,9 @@ public sealed class TraitorRuleSystem : GameRuleSystem continue; _mindSystem.AddObjective(mindId, mind, objective.Value); - difficulty += Comp(objective.Value).Difficulty; + var adding = Comp(objective.Value).Difficulty; + difficulty += adding; + Log.Debug($"Added objective {ToPrettyString(objective):objective} with {adding} difficulty"); } } diff --git a/Resources/Prototypes/Objectives/objectiveGroups.yml b/Resources/Prototypes/Objectives/objectiveGroups.yml index f2d900afe6..aa443781cf 100644 --- a/Resources/Prototypes/Objectives/objectiveGroups.yml +++ b/Resources/Prototypes/Objectives/objectiveGroups.yml @@ -33,7 +33,7 @@ weights: EscapeShuttleObjective: 1 DieObjective: 0.05 - HijackShuttleObjective: 0.02 + #HijackShuttleObjective: 0.02 - type: weightedRandom id: TraitorObjectiveGroupSocial -- 2.51.2