-
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.
Disable Village Functionality (#636)
* Create TownPatches.cs * Added comment and fixed file name * Update VillagePatches.cs
- Loading branch information
1 parent
b0f737f
commit 0dfa2a8
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
source/GameInterface/Services/VillageService/Patches/VillagePatches.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,39 @@ | ||
using HarmonyLib; | ||
using TaleWorlds.CampaignSystem.Settlements; | ||
|
||
namespace GameInterface.Services.VillageService.Patches; | ||
|
||
/// <summary> | ||
/// Disables all functionality for Town | ||
/// </summary> | ||
[HarmonyPatch(typeof(Village))] | ||
internal class VillagePatches | ||
{ | ||
[HarmonyPatch("DailyTick")] | ||
[HarmonyPrefix] | ||
private static bool DailyTickPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Village.VillageState), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool VillageStatePrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Village.Hearth), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool HearthPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Village.TradeTaxAccumulated), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool TradeTaxAccumulatedPrefix() | ||
{ | ||
return false; | ||
} | ||
} |