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

Work in progress

This commit is contained in:
2023-09-28 03:21:46 +08:00
parent c092ae81bb
commit b3e216bc6a
12 changed files with 241 additions and 211 deletions

View File

@@ -12,21 +12,16 @@ public static class PlanetFunctions
public static void Init()
{
PlayerActionsInGlobeViewEnabled.SettingChanged += (_, _) => PlayerActionInGlobeViewValueChanged();
PlayerActionInGlobeViewValueChanged();
PlayerActionsInGlobeViewEnabled.SettingChanged += (_, _) => PlayerActionsInGlobeView.Enable(PlayerActionsInGlobeViewEnabled.Value);
PlayerActionsInGlobeView.Enable(PlayerActionsInGlobeViewEnabled.Value);
}
public static void Uninit()
{
PlayerActionInGlobeView.Enable(false);
PlayerActionsInGlobeView.Enable(false);
}
private static void PlayerActionInGlobeViewValueChanged()
{
PlayerActionInGlobeView.Enable(PlayerActionsInGlobeViewEnabled.Value);
}
public static class PlayerActionInGlobeView
public static class PlayerActionsInGlobeView
{
private static Harmony _patch;
@@ -34,7 +29,7 @@ public static class PlanetFunctions
{
if (on)
{
_patch ??= Harmony.CreateAndPatchAll(typeof(PlayerActionInGlobeView));
_patch ??= Harmony.CreateAndPatchAll(typeof(PlayerActionsInGlobeView));
return;
}
_patch?.UnpatchSelf();