more objective logging + maybe fix the no objective bug (#24139)
* more objective log * remove hijack from group!!!! --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -238,6 +238,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
|
|||||||
var maxDifficulty = _cfg.GetCVar(CCVars.TraitorMaxDifficulty);
|
var maxDifficulty = _cfg.GetCVar(CCVars.TraitorMaxDifficulty);
|
||||||
var maxPicks = _cfg.GetCVar(CCVars.TraitorMaxPicks);
|
var maxPicks = _cfg.GetCVar(CCVars.TraitorMaxPicks);
|
||||||
var difficulty = 0f;
|
var difficulty = 0f;
|
||||||
|
Log.Debug($"Attempting {maxPicks} objective picks with {maxDifficulty} difficulty");
|
||||||
for (var pick = 0; pick < maxPicks && maxDifficulty > difficulty; pick++)
|
for (var pick = 0; pick < maxPicks && maxDifficulty > difficulty; pick++)
|
||||||
{
|
{
|
||||||
var objective = _objectives.GetRandomObjective(mindId, mind, "TraitorObjectiveGroups");
|
var objective = _objectives.GetRandomObjective(mindId, mind, "TraitorObjectiveGroups");
|
||||||
@@ -245,7 +246,9 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
_mindSystem.AddObjective(mindId, mind, objective.Value);
|
_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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
weights:
|
weights:
|
||||||
EscapeShuttleObjective: 1
|
EscapeShuttleObjective: 1
|
||||||
DieObjective: 0.05
|
DieObjective: 0.05
|
||||||
HijackShuttleObjective: 0.02
|
#HijackShuttleObjective: 0.02
|
||||||
|
|
||||||
- type: weightedRandom
|
- type: weightedRandom
|
||||||
id: TraitorObjectiveGroupSocial
|
id: TraitorObjectiveGroupSocial
|
||||||
|
|||||||
Reference in New Issue
Block a user