-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporarily disable UIControlPanel interactions
- Loading branch information
Showing
4 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
NebulaPatcher/Patches/Dynamic/UIControlPanelAdvancedMinerEntry_Patch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#region | ||
|
||
using HarmonyLib; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaPatcher.Patches.Dynamic; | ||
|
||
[HarmonyPatch(typeof(UIControlPanelAdvancedMinerEntry))] | ||
internal class UIControlPanelAdvancedMinerEntry_Patch | ||
{ | ||
[HarmonyPrefix] | ||
[HarmonyPatch(nameof(UIControlPanelAdvancedMinerEntry.OnFillNecessaryButtonClick))] | ||
public static bool OnFillNecessaryButtonClick_Prefix() | ||
{ | ||
if (!Multiplayer.IsActive) return true; | ||
|
||
// Temporarily disable fill item button. We will sync in the future | ||
return false; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
NebulaPatcher/Patches/Dynamic/UIControlPanelDispenserEntry_Patch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#region | ||
|
||
using HarmonyLib; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaPatcher.Patches.Dynamic; | ||
|
||
[HarmonyPatch(typeof(UIControlPanelDispenserEntry))] | ||
internal class UIControlPanelDispenserEntry_Patch | ||
{ | ||
[HarmonyPrefix] | ||
[HarmonyPatch(nameof(UIControlPanelDispenserEntry.OnFillNecessaryButtonClick))] | ||
public static bool OnFillNecessaryButtonClick_Prefix(UIControlPanelDispenserEntry __instance) | ||
{ | ||
if (!Multiplayer.IsActive) return true; | ||
|
||
// Temporarily disable fill item button. We will sync in the future | ||
return false; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
NebulaPatcher/Patches/Dynamic/UIControlPanelStationEntry_Patch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#region | ||
|
||
using HarmonyLib; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaPatcher.Patches.Dynamic; | ||
|
||
[HarmonyPatch(typeof(UIControlPanelStationEntry))] | ||
internal class UIControlPanelStationEntry_Patch | ||
{ | ||
[HarmonyPrefix] | ||
[HarmonyPatch(nameof(UIControlPanelStationEntry.OnFillNecessaryButtonClick))] | ||
public static bool OnFillNecessaryButtonClick_Prefix() | ||
{ | ||
if (!Multiplayer.IsActive) return true; | ||
|
||
// Temporarily disable fill item button. We will sync in the future | ||
return false; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
NebulaPatcher/Patches/Dynamic/UIControlPanelStationInspector_Patch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#region | ||
|
||
using HarmonyLib; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaPatcher.Patches.Dynamic; | ||
|
||
[HarmonyPatch(typeof(UIControlPanelStationInspector))] | ||
internal class UIControlPanelStationInspector_Patch | ||
{ | ||
[HarmonyPostfix, HarmonyPriority(Priority.Last)] | ||
[HarmonyPatch(nameof(UIControlPanelStationInspector._OnOpen))] | ||
public static void OnOpen_Postfix(UIControlPanelStationInspector __instance) | ||
{ | ||
if (!Multiplayer.IsActive) return; | ||
|
||
// Temporarily disable the station window, as we need to deal with remote station and sync in the future | ||
__instance._Close(); | ||
} | ||
} |