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

Minor refactoring

This commit is contained in:
2023-09-05 18:29:03 +08:00
parent a54ea58d71
commit 7f33c7c4fc
4 changed files with 6 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ namespace Dustbin;
public static class TankPatch
{
public static readonly FieldInfo IsDustbinField = AccessTools.Field(typeof(TankComponent), "IsDustbin");
private static MyCheckBox _tankDustbinCheckBox;
private static UI.MyCheckBox _tankDustbinCheckBox;
private static int _lastTankId;
public static void Reset()
@@ -91,7 +91,7 @@ public static class TankPatch
[HarmonyPatch(typeof(UITankWindow), "_OnCreate")]
private static void UITankWindow__OnCreate_Postfix(UITankWindow __instance)
{
_tankDustbinCheckBox = MyCheckBox.CreateCheckBox(false, __instance.transform, 120f, 20f, Localization.language == Language.zhCN ? "垃圾桶" : "Dustbin");
_tankDustbinCheckBox = UI.MyCheckBox.CreateCheckBox(false, __instance.transform, 120f, 20f, Localization.language == Language.zhCN ? "垃圾桶" : "Dustbin");
var window = __instance;
_tankDustbinCheckBox.OnChecked += () =>
{