-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0dfa2a8
commit bfd13b6
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
source/GameInterface/Services/TownService/Patches/TownPatches.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using HarmonyLib; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using TaleWorlds.CampaignSystem.Settlements; | ||
|
||
namespace GameInterface.Services.TownService.Patches | ||
{ | ||
/// <summary> | ||
/// Disables all functionality for Town | ||
/// </summary> | ||
[HarmonyPatch(typeof(Town))] | ||
internal class TownPatches | ||
{ | ||
[HarmonyPatch("DailyTick")] | ||
[HarmonyPrefix] | ||
private static bool DailyTickPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Town.OwnerClan), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool OwnerClanPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Town.Security), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool SecurityPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Town.Loyalty), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool LoyaltyPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
|
||
[HarmonyPatch(nameof(Town.TradeTaxAccumulated), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool TradeTaxAccumulatedPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Town.Governor), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool GovernorPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Town.LastCapturedBy), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool LastCapturedByPrefix() | ||
{ | ||
return false; | ||
} | ||
} | ||
} |