-
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
2258bee
commit c0d9a82
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
source/GameInterface/Services/Buildings/Patches/BuildingPatches.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,40 @@ | ||
using HarmonyLib; | ||
using TaleWorlds.CampaignSystem.Settlements.Buildings; | ||
|
||
namespace GameInterface.Services.Buildings.Patches | ||
{ | ||
/// <summary> | ||
/// Disables functionality for <see cref="Building"/> | ||
/// </summary> | ||
[HarmonyPatch(typeof(Building))] | ||
internal class BuildingPatches | ||
{ | ||
[HarmonyPatch(nameof(Building.CurrentLevel), MethodType.Setter)] | ||
[HarmonyPrefix] | ||
private static bool CurrentLevelPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Building.LevelUp))] | ||
[HarmonyPrefix] | ||
private static bool LevelUpPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Building.LevelDown))] | ||
[HarmonyPrefix] | ||
private static bool LevelDownPrefix() | ||
{ | ||
return false; | ||
} | ||
|
||
[HarmonyPatch(nameof(Building.HitPointChanged))] | ||
[HarmonyPrefix] | ||
private static bool HitPointChangedPrefix() | ||
{ | ||
return false; | ||
} | ||
} | ||
} |