1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 09:33:36 +08:00

Dustbin: fix patch attributes to use nameof()

This commit is contained in:
2025-03-26 18:18:03 +08:00
parent 092795cbac
commit 69ab11c392
3 changed files with 13 additions and 13 deletions

View File

@@ -100,14 +100,14 @@ public static class TankPatch
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GameMain), "Start")]
[HarmonyPatch(typeof(GameMain), nameof(GameMain.Start))]
private static void GameMain_Start_Prefix()
{
Reset();
}
[HarmonyPostfix]
[HarmonyPatch(typeof(UITankWindow), "_OnCreate")]
[HarmonyPatch(typeof(UITankWindow), nameof(UITankWindow._OnCreate))]
private static void UITankWindow__OnCreate_Postfix(UITankWindow __instance)
{
_tankDustbinCheckBox = UI.MyCheckBox.CreateCheckBox(false, __instance.transform, 120f, 20f, Localization.CurrentLanguageLCID == Localization.LCID_ZHCN ? "垃圾桶" : "Dustbin");
@@ -127,7 +127,7 @@ public static class TankPatch
}
[HarmonyPostfix]
[HarmonyPatch(typeof(UITankWindow), "_OnUpdate")]
[HarmonyPatch(typeof(UITankWindow), nameof(UITankWindow._OnUpdate))]
private static void UITankWindow__OnUpdate_Postfix(UITankWindow __instance)
{
var tankId = __instance.tankId;
@@ -142,7 +142,7 @@ public static class TankPatch
}
[HarmonyPrefix]
[HarmonyPatch(typeof(TankComponent), "GameTick")]
[HarmonyPatch(typeof(TankComponent), nameof(TankComponent.GameTick))]
private static bool TankComponent_GameTick_Prefix(ref TankComponent __instance, PlanetFactory factory)
{
if (__instance.fluidInc < 0)