]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
more objective logging + maybe fix the no objective bug (#24139)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Mon, 15 Jan 2024 23:09:14 +0000 (23:09 +0000)
committerGitHub <noreply@github.com>
Mon, 15 Jan 2024 23:09:14 +0000 (16:09 -0700)
* more objective log

* remove hijack from group!!!!

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.Server/GameTicking/Rules/TraitorRuleSystem.cs
Resources/Prototypes/Objectives/objectiveGroups.yml

index 26125a6da750260e006071e8d82559bd25621434..dce144901f3c87bf3c32676cabcdbc0381388398 100644 (file)
@@ -238,6 +238,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
             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<TraitorRuleComponent>
                     continue;
 
                 _mindSystem.AddObjective(mindId, mind, objective.Value);
-                difficulty += Comp<ObjectiveComponent>(objective.Value).Difficulty;
+                var adding = Comp<ObjectiveComponent>(objective.Value).Difficulty;
+                difficulty += adding;
+                Log.Debug($"Added objective {ToPrettyString(objective):objective} with {adding} difficulty");
             }
         }
 
index f2d900afe61f80614bee989dcd1473d8be9e5bb3..aa443781cfd2e9e98c2bd024ce07be180d05dcf0 100644 (file)
@@ -33,7 +33,7 @@
   weights:
     EscapeShuttleObjective: 1
     DieObjective: 0.05
-    HijackShuttleObjective: 0.02
+    #HijackShuttleObjective: 0.02
 
 - type: weightedRandom
   id: TraitorObjectiveGroupSocial