mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-08-05 07:40:12 +08:00
Compare commits
3
Commits
cc783937e6
...
4ed33b2638
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ed33b2638 | ||
|
|
ee7ea6ec35 | ||
|
|
64f9aee06b |
@@ -23,3 +23,4 @@ build/
|
||||
|
||||
# Agent files
|
||||
/.omo/
|
||||
/.worktrees/
|
||||
|
||||
@@ -487,6 +487,8 @@ public static class LogisticsPatch
|
||||
private static long _nextKeyTick;
|
||||
private static bool _skipNextUIStationStorageEvent;
|
||||
private static bool _skipNextUIControlPanelStationStorageEvent;
|
||||
private static bool _refreshingUIStationStorage;
|
||||
private static bool _refreshingUIControlPanelStationStorage;
|
||||
|
||||
private static bool UpdateKeyPressed(KeyCode code)
|
||||
{
|
||||
@@ -627,11 +629,39 @@ public static class LogisticsPatch
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(UIStationStorage), "RefreshValues")]
|
||||
private static void UIStationStorage_RefreshValues_Prefix()
|
||||
{
|
||||
_refreshingUIStationStorage = true;
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(UIStationStorage), "RefreshValues")]
|
||||
private static void UIStationStorage_RefreshValues_Postfix()
|
||||
{
|
||||
_refreshingUIStationStorage = false;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(UIControlPanelStationStorage), "RefreshValues")]
|
||||
private static void UIControlPanelStationStorage_RefreshValues_Prefix()
|
||||
{
|
||||
_refreshingUIControlPanelStationStorage = true;
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(UIControlPanelStationStorage), "RefreshValues")]
|
||||
private static void UIControlPanelStationStorage_RefreshValues_Postfix()
|
||||
{
|
||||
_refreshingUIControlPanelStationStorage = false;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(UIStationStorage), nameof(UIStationStorage.OnMaxSliderValueChange))]
|
||||
private static bool UIStationStorage_OnMaxSliderValueChange_Prefix()
|
||||
{
|
||||
if (!_skipNextUIStationStorageEvent) return true;
|
||||
if (!_refreshingUIStationStorage && !_skipNextUIStationStorageEvent) return true;
|
||||
_skipNextUIStationStorageEvent = false;
|
||||
return false;
|
||||
}
|
||||
@@ -640,7 +670,7 @@ public static class LogisticsPatch
|
||||
[HarmonyPatch(typeof(UIControlPanelStationStorage), nameof(UIControlPanelStationStorage.OnMaxSliderValueChange))]
|
||||
private static bool UIControlPanelStationStorage_OnMaxSliderValueChange_Prefix()
|
||||
{
|
||||
if (!_skipNextUIControlPanelStationStorageEvent) return true;
|
||||
if (!_refreshingUIControlPanelStationStorage && !_skipNextUIControlPanelStationStorageEvent) return true;
|
||||
_skipNextUIControlPanelStationStorageEvent = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ public static class UIConfigWindow
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, LogisticsPatch.AllowOverflowInLogisticsEnabled, "Allow overflow for Logistic Stations and Advanced Mining Machines");
|
||||
y += 30f;
|
||||
wnd.AddCheckBox(x, y, tab2, LogisticsPatch.GreaterPowerUsageInLogisticsEnabled, "Increase maximum power usage in Logistic Stations and Advanced Mining Machines");
|
||||
wnd.AddCheckBox(x, y, tab3, LogisticsPatch.GreaterPowerUsageInLogisticsEnabled, "Increase maximum power usage in Logistic Stations and Advanced Mining Machines");
|
||||
y += 36f;
|
||||
checkBoxForMeasureTextWidth = wnd.AddCheckBox(x, y, tab3, LogisticsPatch.LogisticsConstrolPanelImprovementEnabled, "Logistics Control Panel Improvement");
|
||||
wnd.AddTipsButton2(x + checkBoxForMeasureTextWidth.Width + 5f, y + 6f, tab3, "Logistics Control Panel Improvement", "Logistics Control Panel Improvement tips", "lcp-improvement-tips");
|
||||
|
||||
Reference in New Issue
Block a user