diff --git a/Dustbin/Dustbin.csproj b/Dustbin/Dustbin.csproj index 8097725..af5728a 100644 --- a/Dustbin/Dustbin.csproj +++ b/Dustbin/Dustbin.csproj @@ -23,8 +23,7 @@ - - + diff --git a/Dustbin/StoragePatch.cs b/Dustbin/StoragePatch.cs index 8e2fdbe..286ecbe 100644 --- a/Dustbin/StoragePatch.cs +++ b/Dustbin/StoragePatch.cs @@ -10,7 +10,7 @@ namespace Dustbin; public static class StoragePatch { public static readonly FieldInfo IsDustbinField = AccessTools.Field(typeof(StorageComponent), "IsDustbin"); - private static MyCheckBox _storageDustbinCheckBox; + private static UI.MyCheckBox _storageDustbinCheckBox; private static int _lastStorageId; public static void Reset() @@ -85,7 +85,7 @@ public static class StoragePatch [HarmonyPatch(typeof(UIStorageWindow), "_OnCreate")] private static void UIStorageWindow__OnCreate_Postfix(UIStorageWindow __instance) { - _storageDustbinCheckBox = MyCheckBox.CreateCheckBox(false, __instance.transform, 50f, 50f, Localization.language == Language.zhCN ? "垃圾桶" : "Dustbin"); + _storageDustbinCheckBox = UI.MyCheckBox.CreateCheckBox(false, __instance.transform, 50f, 50f, Localization.language == Language.zhCN ? "垃圾桶" : "Dustbin"); var window = __instance; _storageDustbinCheckBox.OnChecked += () => { diff --git a/Dustbin/TankPatch.cs b/Dustbin/TankPatch.cs index fef1c85..c549f8c 100644 --- a/Dustbin/TankPatch.cs +++ b/Dustbin/TankPatch.cs @@ -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 += () => { diff --git a/Dustbin/UI/MyCheckbox.cs b/Dustbin/UI/MyCheckbox.cs index 8bfbc45..caa62b8 100644 --- a/Dustbin/UI/MyCheckbox.cs +++ b/Dustbin/UI/MyCheckbox.cs @@ -2,7 +2,7 @@ using UnityEngine; using UnityEngine.UI; -namespace Dustbin; +namespace Dustbin.UI; // MyCheckBox modified from LSTM: https://github.com/hetima/DSP_LSTM/blob/main/LSTM/MyCheckBox.cs public class MyCheckBox : MonoBehaviour