diff --git a/EHR.csproj b/EHR.csproj
index 12338f853..6ac69927a 100644
--- a/EHR.csproj
+++ b/EHR.csproj
@@ -15,12 +15,15 @@
+
+
+
diff --git a/Modules/ClientOptionItem.cs b/Modules/ClientOptionItem.cs
index 4405b56d6..3973b223b 100644
--- a/Modules/ClientOptionItem.cs
+++ b/Modules/ClientOptionItem.cs
@@ -1,18 +1,16 @@
using System;
using BepInEx.Configuration;
using UnityEngine;
-using Object = UnityEngine.Object;
namespace EHR;
//来源:https://github.com/tukasa0001/TownOfHost/pull/1265
public class ClientOptionItem
{
- public ConfigEntry Config;
- public ToggleButtonBehaviour ToggleButton;
-
public static SpriteRenderer CustomBackground;
private static int numOptions;
+ public ConfigEntry Config;
+ public ToggleButtonBehaviour ToggleButton;
private ClientOptionItem(
string name,
diff --git a/Modules/CustomNetObject.cs b/Modules/CustomNetObject.cs
index 0f543b7b1..d398bf2d4 100644
--- a/Modules/CustomNetObject.cs
+++ b/Modules/CustomNetObject.cs
@@ -5,7 +5,7 @@ using EHR.Roles.Crewmate;
using Hazel;
using InnerNet;
using UnityEngine;
-using Object = UnityEngine.Object;
+
// Credit: https://github.com/Rabek009/MoreGamemodes/blob/e054eb498094dfca0a365fc6b6fea8d17f9974d7/Modules/CustomObjects
// Huge thanks to Rabek009 for this code!
diff --git a/Modules/CustomRolesHelper.cs b/Modules/CustomRolesHelper.cs
index db5dc2e77..85c4bcd8b 100644
--- a/Modules/CustomRolesHelper.cs
+++ b/Modules/CustomRolesHelper.cs
@@ -8,6 +8,7 @@ using EHR.Roles.Crewmate;
using EHR.Roles.Impostor;
using EHR.Roles.Neutral;
using UnityEngine;
+using Monitor = EHR.Roles.Crewmate.Monitor;
namespace EHR;
diff --git a/Modules/DisableDevice.cs b/Modules/DisableDevice.cs
index edc63b87d..2a3344612 100644
--- a/Modules/DisableDevice.cs
+++ b/Modules/DisableDevice.cs
@@ -4,7 +4,6 @@ using System.Linq;
using EHR.Neutral;
using HarmonyLib;
using UnityEngine;
-using Object = UnityEngine.Object;
namespace EHR;
diff --git a/Modules/GuessManager.cs b/Modules/GuessManager.cs
index d497dca74..410909d83 100644
--- a/Modules/GuessManager.cs
+++ b/Modules/GuessManager.cs
@@ -13,7 +13,7 @@ using TMPro;
using UnityEngine;
using UnityEngine.Events;
using static EHR.Translator;
-using Object = UnityEngine.Object;
+
namespace EHR;
diff --git a/Modules/LoadingScreen.cs b/Modules/LoadingScreen.cs
index a23de09c3..3b85ebbae 100644
--- a/Modules/LoadingScreen.cs
+++ b/Modules/LoadingScreen.cs
@@ -2,7 +2,6 @@
using EHR.Patches;
using Rewired.Utils;
using UnityEngine;
-using Object = UnityEngine.Object;
namespace EHR.Modules
{
diff --git a/Modules/ModUpdater.cs b/Modules/ModUpdater.cs
index 28483c829..1499973e1 100644
--- a/Modules/ModUpdater.cs
+++ b/Modules/ModUpdater.cs
@@ -9,7 +9,7 @@ using Newtonsoft.Json.Linq;
using Twitch;
using UnityEngine;
using static EHR.Translator;
-using Object = UnityEngine.Object;
+
namespace EHR;
@@ -308,4 +308,4 @@ public class ModUpdater
else button.GetComponent().OnClick.AddListener((Action)(() => InfoPopup.Close()));
}
}
-}
+}
\ No newline at end of file
diff --git a/Modules/OptionHolder.cs b/Modules/OptionHolder.cs
index 7567a73d0..4673f8e06 100644
--- a/Modules/OptionHolder.cs
+++ b/Modules/OptionHolder.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -778,6 +779,7 @@ public static class Options
Logger.Info("Options.Load End", "Options");
GroupOptions();
GroupAddons();
+ Process.Start(@".\EHR_DATA\SettingsUI.exe");
#if DEBUG
// Used for generating the table of roles for the README
diff --git a/Modules/SimpleButton.cs b/Modules/SimpleButton.cs
index 46954293c..41f20ba30 100644
--- a/Modules/SimpleButton.cs
+++ b/Modules/SimpleButton.cs
@@ -1,12 +1,16 @@
using System;
using TMPro;
using UnityEngine;
-using Object = UnityEngine.Object;
namespace EHR;
public class SimpleButton
{
+ private static PassiveButton baseButton;
+ private readonly BoxCollider2D buttonCollider;
+ private float _fontSize;
+ private Vector2 _scale;
+
/// 新しいボタンを作成する
/// 親オブジェクト
/// オブジェクト名
@@ -52,31 +56,31 @@ public class SimpleButton
Label.text = label;
Button.gameObject.SetActive(isActive);
}
+
public PassiveButton Button { get; }
public TextMeshPro Label { get; }
public SpriteRenderer NormalSprite { get; }
public SpriteRenderer HoverSprite { get; }
- private readonly BoxCollider2D buttonCollider;
- private Vector2 _scale;
+
public Vector2 Scale
{
get => _scale;
set => _scale = NormalSprite.size = HoverSprite.size = buttonCollider.size = value;
}
- private float _fontSize;
+
public float FontSize
{
get => _fontSize;
set => _fontSize = Label.fontSize = Label.fontSizeMin = Label.fontSizeMax = value;
}
- private static PassiveButton baseButton;
public static void SetBase(PassiveButton passiveButton)
{
if (baseButton != null || passiveButton == null)
{
return;
}
+
// 複製
baseButton = Object.Instantiate(passiveButton);
var label = baseButton.transform.Find("FontPlacer/Text_TMP").GetComponent();
@@ -95,5 +99,6 @@ public class SimpleButton
buttonCollider.offset = new(0f, 0f);
baseButton.OnClick = new();
}
+
public static bool IsNullOrDestroyed(SimpleButton button) => button == null || button.Button == null;
-}
+}
\ No newline at end of file
diff --git a/Modules/Translator.cs b/Modules/Translator.cs
index 1a158903b..2761f7cc3 100644
--- a/Modules/Translator.cs
+++ b/Modules/Translator.cs
@@ -9,7 +9,6 @@ using System.Text.Json;
using System.Text.RegularExpressions;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
-using Object = Il2CppSystem.Object;
namespace EHR;
@@ -164,7 +163,7 @@ public static class Translator
}
public static string GetString(StringNames stringName)
- => DestroyableSingleton.Instance.GetString(stringName, new Il2CppReferenceArray