-
Notifications
You must be signed in to change notification settings - Fork 0
/
PatchSettlementNameplateVM.cs
45 lines (44 loc) · 1.45 KB
/
PatchSettlementNameplateVM.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using HarmonyLib;
using SandBox.ViewModelCollection.Nameplate;
using TaleWorlds.CampaignSystem;
namespace SettlementFactionNameplate
{
[HarmonyPatch(typeof(SettlementNameplateVM), "RefreshRelationStatus")]
class PatchSettlementNameplateVM
{
private static bool Prefix(SettlementNameplateVM __instance, ref int ____bindRelation, IFaction ____currentFaction) {
String faction = ____currentFaction.ToString().Replace(" ","");
switch (faction) {
case "Aserai":
____bindRelation = 3;
break;
case "Battania":
____bindRelation = 4;
break;
case "Khuzait":
____bindRelation = 5;
break;
case "NorthernEmpire":
____bindRelation = 6;
break;
case "SouthernEmpire":
____bindRelation = 7;
break;
case "Sturgia":
____bindRelation = 8;
break;
case "Vlandia":
____bindRelation = 9;
break;
case "WesternEmpire":
____bindRelation = 10;
break;
default:
return true;
break;
}
return false;
}
}
}