From 98912645a1894a0e813eea59d7a663d77a193216 Mon Sep 17 00:00:00 2001 From: Zetrith Date: Wed, 18 Oct 2023 20:50:19 +0200 Subject: [PATCH] Don't show "Ally" faction relation option --- Source/Client/Factions/MultifactionPatches.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Client/Factions/MultifactionPatches.cs b/Source/Client/Factions/MultifactionPatches.cs index 33db739b..72c31e24 100644 --- a/Source/Client/Factions/MultifactionPatches.cs +++ b/Source/Client/Factions/MultifactionPatches.cs @@ -42,12 +42,11 @@ static IEnumerable Postfix(IEnumerable gizmos, Pawn __instance) icon = MultiplayerStatic.ChangeRelationIcon, action = () => { - List list = new List(); - for (int i = 0; i <= 2; i++) + List list = new List { - var kind = (FactionRelationKind)i; - list.Add(new FloatMenuOption(kind.ToString(), () => { SetFactionRelation(otherFaction, kind); })); - } + new(FactionRelationKind.Hostile.ToString(), () => { SetFactionRelation(otherFaction, FactionRelationKind.Hostile); }), + new(FactionRelationKind.Neutral.ToString(), () => { SetFactionRelation(otherFaction, FactionRelationKind.Neutral); }) + }; Find.WindowStack.Add(new FloatMenu(list)); }