fix(factions): make the truce switch cover every player truce, not one of five
Reported from a live game: with "Faction truce" off, a Trenta's Greydwarves stayed friendly. The switch was working - it just was not switched over the patch that mattered. Five separate Harmony postfixes answer BaseAI.IsEnemy, and only FactionHostilityPatch was gated. A Trenta reads its Black Forest truce from RaceHostilityManager, which had no switch, so turning the faction one off changed nothing visible. The same held for the Fenrir's wolves, the Aswid's progression list, the Draugh's undead, the Sverm's invertebrates, the Furling's Plains roster and the Skeleton's undead. Gated all four player-facing ones behind the existing flag rather than adding a switch each: from the player's side there is one question being asked, and a switch that answers a fifth of it is worse than none. DvergarMercenaryTrucePatch is deliberately left alone - it is a truce between a hired thrall and a wild dvergr, two NPCs, and has nothing to do with whether mobs come after the player. Key stays "Faction truce" though its scope grew: renaming it would orphan the entry in every .cfg already written, and the file beats the default in code, so anyone who had switched it off would silently get the truce back. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
34bdf35325
commit
a60f5e8217
4 changed files with 21 additions and 5 deletions
|
|
@ -702,6 +702,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
public static void Postfix(Character a, Character b, ref bool __result)
|
||||
{
|
||||
if (!FactionsConfig.Hostility) return;
|
||||
if (!__result || !SkeletonRace.IsSkeleton() || Player.m_localPlayer == null) return;
|
||||
|
||||
Character playerChar = Player.m_localPlayer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue