diff --git a/CheatEnabler/CHANGELOG.md b/CheatEnabler/CHANGELOG.md
index 2757b2f..7e8eb82 100644
--- a/CheatEnabler/CHANGELOG.md
+++ b/CheatEnabler/CHANGELOG.md
@@ -8,6 +8,10 @@
+ New feature: `Enable warp without space warpers`
+ New feature: `Wind Turbines do global power coverage`
+ Fix an issue that `Complete Dyson Sphere Shells instantly` does not generate production records for solar sails.
+
+
+Older versions
+
* 2.3.24
+ `Complete Dyson Sphere Shells instantly`: Fix a bug that may cause negative power in some cases
* 2.3.23
@@ -133,6 +137,8 @@
* 1.0.0
+ Initial release
+
+
## 更新日志
* 2.3.26
@@ -143,7 +149,11 @@
+ 新功能:`无需空间翘曲器即可曲速飞行`
+ 新功能:`风力涡轮机供电覆盖全球`
+ 修复了`立即完成戴森壳建造`未生成太阳帆生产记录的问题
-* 2.3.24
+
+
+更早的版本
+
+2.3.24
+ `立即完成戴森壳建造`:修复了在某些情况下可能导致发电为负的问题
* 2.3.23
+ 新功能:`立即完成戴森壳建造`
@@ -267,3 +277,5 @@
+ 添加了很多功能
* 1.0.0
+ 初始版本
+
+
diff --git a/UXAssist/CHANGELOG.md b/UXAssist/CHANGELOG.md
index 0943496..ef93076 100644
--- a/UXAssist/CHANGELOG.md
+++ b/UXAssist/CHANGELOG.md
@@ -1,5 +1,11 @@
## Changlog
+* 1.2.3
+ + `Real-time logistic stations info panel`: Fix bar length not match with item amount when item amount is more than capacity.
+ + `Sunlight at night`: Fix not working.
+* 1.2.2
+ + `Real-time logistic stations info panel`: Fix text color mismatch sometimes
+ + `Logical Frame Rate`: Set default shortcut key to `Ctrl`+`-/+` to avoid conflict with other shortcut keys
* 1.2.1
+ `Off-grid building and stepped rotation`:
- Fix off-grid building's default shortcut key for belts
@@ -17,6 +23,10 @@
+ `Real-time logistic stations info panel`: Fix a crash issue.
+ `Dyson Sphere "Auto Fast Build"`: Fix possible wrong production records.
+ Codes refactored, for better maintainability.
+
+
+Older versions
+
* 1.1.6
+ New feature: `Scale up mouse cursor`
- Note: This will enable software cursor mode, which may cause mouse movement lag on heavy load.
@@ -31,7 +41,7 @@
+ New feature: `Dyson Sphere "Auto Fast Build" speed multiplier`
- Note: this only applies to `Dyson Sphere "Auto Fast Build"` in sandbox mode
+ New feature: `Mod manager profile based save folder`
- - Save files are stored in `Save\` folder.
+ - Save files are stored in `Save\<ProfileName>` folder.
- Will use original save location if matching default profile name.
+ `Quick build and dismantle stacking labs`: works for storages and tanks now
+ `Enable game window resize`: Keep window resizable on applying game options.
@@ -176,8 +186,16 @@
+ Initial release
+ Functions moved from [MechaDronesTweaks](https://dsp.thunderstore.io/package/soarqin/MechaDronesTweaks/) and [CheatEnabler](https://dsp.thunderstore.io/package/soarqin/CheatEnabler/)
+
+
## 更新日志
+* 1.2.3
+ + `物流运输站实时信息面板`:修复了物品数量超过容量限制时条长度不匹配的问题
+ + `夜间日光灯`:修复了不起作用的问题
+* 1.2.2
+ + `物流运输站实时信息面板`:修复了文本颜色不匹配的问题
+ + `逻辑帧倍率`:将默认快捷键设置为`Ctrl`+`-/+`,以避免与其他快捷键冲突
* 1.2.1
+ `脱离网格建造和小角度旋转`:
- 修复了传送带脱离网格建造的默认快捷键
@@ -195,6 +213,10 @@
+ `物流运输站实时信息面板`:修复了一个崩溃问题
+ `戴森球自动快速建造`:修复了可能出现的错误生产记录
+ 代码重构,以获得更好的可维护性
+
+
+更早的版本
+
* 1.1.6
+ 新功能:`放大鼠标指针`
- 注意:这将启用软件指针模式,可能会在CPU负载较重时导致鼠标移动延迟
@@ -209,7 +231,7 @@
+ 新功能:`戴森球自动快速建造速度倍率`
- 注意:这仅适用于沙盒模式下的`戴森球自动快速建造`功能
+ 新功能:`基于mod管理器配置档案名的存档文件夹`
- - 存档文件会存储在`Save\`文件夹中
+ - 存档文件会存储在`Save\<ProfileName>`文件夹中
- 如果匹配默认配置档案名则使用原始存档位置
+ `快速建造和拆除堆叠研究站`:现在也支持储物仓和储液罐
+ `允许调整游戏窗口大小`:在应用游戏选项时保持窗口可调整大小
@@ -353,3 +375,5 @@
* 1.0.0
+ 初始版本
+ 从[MechaDronesTweaks](https://dsp.thunderstore.io/package/soarqin/MechaDronesTweaks/)和[CheatEnabler](https://dsp.thunderstore.io/package/soarqin/CheatEnabler/)移动了部分功能过来
+
+
diff --git a/UXAssist/ModsCompat/BulletTimeWrapper.cs b/UXAssist/ModsCompat/BulletTimeWrapper.cs
index e55bf37..1e7378c 100644
--- a/UXAssist/ModsCompat/BulletTimeWrapper.cs
+++ b/UXAssist/ModsCompat/BulletTimeWrapper.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Reflection.Emit;
-using BepInEx.Configuration;
using HarmonyLib;
using UXAssist.Common;
diff --git a/UXAssist/Patches/FactoryPatch.cs b/UXAssist/Patches/FactoryPatch.cs
index 7ef1bb9..f0c9f81 100644
--- a/UXAssist/Patches/FactoryPatch.cs
+++ b/UXAssist/Patches/FactoryPatch.cs
@@ -12,7 +12,7 @@ using UXAssist.Common;
namespace UXAssist.Patches;
-public class FactoryPatch: PatchImpl
+public class FactoryPatch : PatchImpl
{
public static ConfigEntry UnlimitInteractiveEnabled;
public static ConfigEntry RemoveSomeConditionEnabled;
@@ -173,113 +173,73 @@ public class FactoryPatch: PatchImpl
return matcher.InstructionEnumeration();
}
- public class NightLight: PatchImpl
+ public class NightLight : PatchImpl
{
private const float NightLightAngleX = -8;
private const float NightLightAngleY = -2;
- public static bool Enabled;
private static bool _nightlightInitialized;
private static bool _mechaOnEarth;
private static AnimationState _sail;
private static Light _sunlight;
- protected override void OnEnable()
- {
- Enabled = _mechaOnEarth;
- }
-
protected override void OnDisable()
{
- Enabled = false;
- if (_sunlight == null) return;
+ if (!_sunlight) return;
_sunlight.transform.localEulerAngles = new Vector3(0f, 180f);
}
- public static void LateUpdate()
+ [HarmonyPostfix]
+ [HarmonyPatch(typeof(GameMain), nameof(GameMain.LateUpdate))]
+ public static void GameMain_LateUpdate_Postfix(GameMain __instance)
{
- if (!Enabled) return;
-
- switch (_nightlightInitialized)
+ if (!_nightlightInitialized)
{
- case false:
- Ready();
- break;
- case true:
- Go();
- break;
- }
- }
-
- private static void Ready()
- {
- if (!GameMain.isRunning || !GameMain.mainPlayer.controller.model.gameObject.activeInHierarchy) return;
- if (_sail == null)
- {
- _sail = GameMain.mainPlayer.animator.sails[GameMain.mainPlayer.animator.sailAnimIndex];
+ if (__instance.isMenuDemo || !__instance._running || !GameMain.mainPlayer.controller.model.gameObject.activeInHierarchy) return;
+ if (_sail == null) _sail = GameMain.mainPlayer.animator.sails[GameMain.mainPlayer.animator.sailAnimIndex];
+ _nightlightInitialized = true;
}
- _nightlightInitialized = true;
- }
-
- private static void Go()
- {
- if (!GameMain.isRunning)
+ if (_mechaOnEarth)
{
- End();
- return;
- }
+ if (__instance.isMenuDemo || !GameMain.isRunning)
+ {
+ _mechaOnEarth = false;
+ if (_sunlight != null)
+ {
+ _sunlight.transform.localEulerAngles = new Vector3(0f, 180f);
+ _sunlight = null;
+ }
- if (_sail && _sail.enabled)
- {
+ _sail = null;
+ _nightlightInitialized = false;
+ return;
+ }
+
+ if (!_sail || !_sail.enabled) return;
_mechaOnEarth = false;
- Enabled = false;
if (!_sunlight || !_sunlight.transform) return;
_sunlight.transform.localEulerAngles = new Vector3(0f, 180f);
_sunlight = null;
return;
}
- if (!_mechaOnEarth)
+ if (!_sunlight)
{
- if (!_sunlight)
- {
- var simu = GameMain.universeSimulator;
- if (simu)
- _sunlight = simu.LocalStarSimulator()?.sunLight;
- if (!_sunlight) return;
- }
-
- _mechaOnEarth = true;
- Enabled = NightLightEnabled.Value;
+ var simu = GameMain.universeSimulator;
+ if (simu) _sunlight = simu.LocalStarSimulator()?.sunLight;
+ if (!_sunlight) return;
}
- if (Enabled && _sunlight)
- {
- _sunlight.transform.rotation =
- Quaternion.LookRotation(-GameMain.mainPlayer.transform.up + GameMain.mainPlayer.transform.forward * NightLightAngleX / 10f +
- GameMain.mainPlayer.transform.right * NightLightAngleY / 10f);
- }
- }
-
- private static void End()
- {
- _mechaOnEarth = false;
- Enabled = false;
- if (_sunlight != null)
- {
- _sunlight.transform.localEulerAngles = new Vector3(0f, 180f);
- _sunlight = null;
- }
-
- _sail = null;
- _nightlightInitialized = false;
+ _mechaOnEarth = true;
+ if (_sunlight)
+ _sunlight.transform.rotation = Quaternion.LookRotation(-GameMain.mainPlayer.transform.up + GameMain.mainPlayer.transform.forward * NightLightAngleX / 10f +
+ GameMain.mainPlayer.transform.right * NightLightAngleY / 10f);
}
[HarmonyTranspiler]
[HarmonyPatch(typeof(StarSimulator), "LateUpdate")]
private static IEnumerable StarSimulator_LateUpdate_Transpiler(IEnumerable instructions, ILGenerator generator)
{
- // var vec = NightlightEnabled ? GameMain.mainPlayer.transform.up : __instance.transform.forward;
var matcher = new CodeMatcher(instructions, generator);
var label1 = generator.DefineLabel();
var label2 = generator.DefineLabel();
@@ -287,7 +247,7 @@ public class FactoryPatch: PatchImpl
new CodeMatch(OpCodes.Ldarg_0),
new CodeMatch(OpCodes.Call, AccessTools.PropertyGetter(typeof(Component), nameof(Component.transform)))
).InsertAndAdvance(
- new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(NightLight), nameof(Enabled))),
+ new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(NightLight), nameof(_mechaOnEarth))),
new CodeInstruction(OpCodes.Brfalse_S, label1),
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(GameMain), nameof(GameMain.mainPlayer))),
new CodeInstruction(OpCodes.Callvirt, AccessTools.PropertyGetter(typeof(Player), nameof(Player.transform))),
@@ -313,7 +273,7 @@ public class FactoryPatch: PatchImpl
matcher.MatchForward(false,
new CodeMatch(OpCodes.Stloc_1)
).Advance(1).InsertAndAdvance(
- new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(NightLight), nameof(Enabled))),
+ new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(NightLight), nameof(_mechaOnEarth))),
new CodeInstruction(OpCodes.Brfalse_S, label1),
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(GameMain), nameof(GameMain.mainPlayer))),
new CodeInstruction(OpCodes.Callvirt, AccessTools.PropertyGetter(typeof(Player), nameof(Player.transform))),
@@ -329,7 +289,7 @@ public class FactoryPatch: PatchImpl
}
}
- private class UnlimitInteractive: PatchImpl
+ private class UnlimitInteractive : PatchImpl
{
[HarmonyTranspiler]
[HarmonyPatch(typeof(PlayerAction_Inspect), nameof(PlayerAction_Inspect.GetObjectSelectDistance))]
@@ -340,7 +300,7 @@ public class FactoryPatch: PatchImpl
}
}
- private class RemoveSomeConditionBuild: PatchImpl
+ private class RemoveSomeConditionBuild : PatchImpl
{
[HarmonyTranspiler, HarmonyPriority(Priority.First)]
[HarmonyPatch(typeof(BuildTool_BlueprintPaste), nameof(BuildTool_BlueprintPaste.CheckBuildConditions))]
@@ -415,7 +375,9 @@ public class FactoryPatch: PatchImpl
*/
matcher.Start().MatchForward(false,
new CodeMatch(instr => instr.opcode == OpCodes.Ldloc_S || instr.opcode == OpCodes.Ldloc),
- new CodeMatch(instr => (instr.opcode == OpCodes.Ldc_I4_S || instr.opcode == OpCodes.Ldc_I4) && Convert.ToInt64(instr.operand) is >= (int)EBuildCondition.TooSteep and <= (int)EBuildCondition.InputConflict),
+ new CodeMatch(instr =>
+ (instr.opcode == OpCodes.Ldc_I4_S || instr.opcode == OpCodes.Ldc_I4) &&
+ Convert.ToInt64(instr.operand) is >= (int)EBuildCondition.TooSteep and <= (int)EBuildCondition.InputConflict),
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(BuildPreview), nameof(BuildPreview.condition)))
);
if (matcher.IsValid)
@@ -437,14 +399,14 @@ public class FactoryPatch: PatchImpl
}
}
- private class RemoveBuildRangeLimit: PatchImpl
+ private class RemoveBuildRangeLimit : PatchImpl
{
protected override void OnEnable()
{
var controller = GameMain.mainPlayer?.controller;
if (controller == null) return;
controller.actionBuild?.clickTool?._OnInit();
- }
+ }
[HarmonyTranspiler]
[HarmonyPatch(typeof(BuildTool_Click), nameof(BuildTool_Click._OnInit))]
@@ -488,7 +450,7 @@ public class FactoryPatch: PatchImpl
}
}
- private class LargerAreaForUpgradeAndDismantle: PatchImpl
+ private class LargerAreaForUpgradeAndDismantle : PatchImpl
{
[HarmonyTranspiler]
[HarmonyPatch(typeof(BuildTool_Dismantle), nameof(BuildTool_Dismantle.DeterminePreviews))]
@@ -504,7 +466,7 @@ public class FactoryPatch: PatchImpl
}
}
- private class LargerAreaForTerraform: PatchImpl
+ private class LargerAreaForTerraform : PatchImpl
{
[HarmonyTranspiler, HarmonyPatch(typeof(BuildTool_Reform), nameof(BuildTool_Reform.ReformAction))]
private static IEnumerable BuildTool_Reform_ReformAction_Transpiler(IEnumerable instructions, ILGenerator generator)
@@ -524,7 +486,7 @@ public class FactoryPatch: PatchImpl
}
}
- public class OffGridBuilding: PatchImpl
+ public class OffGridBuilding : PatchImpl
{
// private const float SteppedRotationDegrees = 15f;
@@ -685,7 +647,7 @@ public class FactoryPatch: PatchImpl
return matcher.InstructionEnumeration();
}
-
+
private static bool CheckOffgridForPathsKeyPressed()
{
ref var bind = ref _offgridfForPathsKey.defaultBind;
@@ -794,8 +756,8 @@ public class FactoryPatch: PatchImpl
}
*/
}
-
- public class TreatStackingAsSingle: PatchImpl
+
+ public class TreatStackingAsSingle : PatchImpl
{
[HarmonyTranspiler]
[HarmonyPatch(typeof(MonitorComponent), nameof(MonitorComponent.InternalUpdate))]
@@ -816,7 +778,7 @@ public class FactoryPatch: PatchImpl
}
}
- private class QuickBuildAndDismantleLab: PatchImpl
+ private class QuickBuildAndDismantleLab : PatchImpl
{
private static bool DetermineMoreLabsForDismantle(BuildTool dismantle, int id)
{
@@ -864,6 +826,7 @@ public class FactoryPatch: PatchImpl
factory.ReadObjectConn(nextId, 13, out _, out nextId2, out _);
if (nextId2 <= 0) break;
}
+
nextId = nextId2;
var itemProto = dismantle.GetItemProto(nextId);
var desc = itemProto.prefabDesc;
@@ -962,7 +925,7 @@ public class FactoryPatch: PatchImpl
}
}
- public class ProtectVeinsFromExhaustion: PatchImpl
+ public class ProtectVeinsFromExhaustion : PatchImpl
{
public static int KeepVeinAmount = 100;
public static float KeepOilSpeed = 1f;
@@ -1242,7 +1205,7 @@ public class FactoryPatch: PatchImpl
}
}
- private class DoNotRenderEntities: PatchImpl
+ private class DoNotRenderEntities : PatchImpl
{
[HarmonyPrefix]
[HarmonyPatch(typeof(ObjectRenderer), nameof(ObjectRenderer.Render))]
@@ -1300,7 +1263,7 @@ public class FactoryPatch: PatchImpl
}
}
- private class DragBuildPowerPoles: PatchImpl
+ private class DragBuildPowerPoles : PatchImpl
{
private static readonly List OldDragBuild = [];
private static readonly List OldDragBuildDist = [];
@@ -1312,7 +1275,7 @@ public class FactoryPatch: PatchImpl
GameLogic.OnGameEnd += GameMain_End_Postfix;
FixProto();
}
-
+
protected override void OnDisable()
{
UnfixProto();
@@ -1466,7 +1429,7 @@ public class FactoryPatch: PatchImpl
}
}
- private class BeltSignalsForBuyOut: PatchImpl
+ private class BeltSignalsForBuyOut : PatchImpl
{
private static bool _initialized;
private static bool _loaded;
@@ -1631,7 +1594,7 @@ public class FactoryPatch: PatchImpl
_signalBelts[index] = obj;
return obj;
}
-
+
private static Dictionary GetSignalBelts(int index)
{
return index >= 0 && index < _signalBelts.Length ? _signalBelts[index] : null;
@@ -1654,7 +1617,7 @@ public class FactoryPatch: PatchImpl
SignalBeltFactoryIndices.Remove(factory);
}
- private class Persist: PatchImpl
+ private class Persist : PatchImpl
{
protected override void OnEnable()
{
@@ -1767,6 +1730,7 @@ public class FactoryPatch: PatchImpl
mainPlayer.mecha.AddProductionStat(itemId, count, mainPlayer.nearestFactory);
}
}
+
if (consume > 0 && cargoPath.TryInsertItem(belt.segIndex + belt.segPivotOffset, itemId, consume, 0))
DarkFogItemsInVoid[itemIdx] -= consume;
}
diff --git a/UXAssist/Patches/GamePatch.cs b/UXAssist/Patches/GamePatch.cs
index 8391085..d26421b 100644
--- a/UXAssist/Patches/GamePatch.cs
+++ b/UXAssist/Patches/GamePatch.cs
@@ -57,7 +57,7 @@ public class GamePatch: PatchImpl
{
_speedDownKey = KeyBindings.RegisterKeyBinding(new BuiltinKey
{
- key = new CombineKey((int)KeyCode.KeypadMinus, 0, ECombineKeyAction.OnceClick, false),
+ key = new CombineKey((int)KeyCode.Minus, CombineKey.CTRL_COMB, ECombineKeyAction.OnceClick, false),
conflictGroup = KeyBindConflict.MOVEMENT | KeyBindConflict.FLYING | KeyBindConflict.SAILING | KeyBindConflict.BUILD_MODE_1 | KeyBindConflict.KEYBOARD_KEYBIND,
name = "UPSSpeedDown",
canOverride = true
@@ -66,7 +66,7 @@ public class GamePatch: PatchImpl
I18N.Add("KEYUPSSpeedDown", "Decrease logical frame rate", "降低逻辑帧率");
_speedUpKey = KeyBindings.RegisterKeyBinding(new BuiltinKey
{
- key = new CombineKey((int)KeyCode.KeypadPlus, 0, ECombineKeyAction.OnceClick, false),
+ key = new CombineKey((int)KeyCode.Equals, CombineKey.CTRL_COMB, ECombineKeyAction.OnceClick, false),
conflictGroup = KeyBindConflict.MOVEMENT | KeyBindConflict.UI | KeyBindConflict.FLYING | KeyBindConflict.SAILING | KeyBindConflict.BUILD_MODE_1 | KeyBindConflict.KEYBOARD_KEYBIND,
name = "UPSSpeedUp",
canOverride = true
diff --git a/UXAssist/Patches/LogisticsPatch.cs b/UXAssist/Patches/LogisticsPatch.cs
index e7bd0dd..1d19f90 100644
--- a/UXAssist/Patches/LogisticsPatch.cs
+++ b/UXAssist/Patches/LogisticsPatch.cs
@@ -460,8 +460,10 @@ public static class LogisticsPatch
private static int _remoteStorageMax = 10000;
private static int _localStorageExtra;
private static int _remoteStorageExtra;
- private static float _localStoragePixelPerItem = StorageSliderWidth / (_localStorageMax + _localStorageExtra);
- private static float _remoteStoragePixelPerItem = StorageSliderWidth / (_remoteStorageMax + _remoteStorageExtra);
+ private static int _localStorageMaxTotal = _localStorageMax;
+ private static int _remoteStorageMaxTotal = _remoteStorageMax;
+ private static float _localStoragePixelPerItem = StorageSliderWidth / _localStorageMaxTotal;
+ private static float _remoteStoragePixelPerItem = StorageSliderWidth / _remoteStorageMaxTotal;
private const int StorageSlotCount = 5;
private const int CarrierSlotCount = 3;
@@ -475,8 +477,10 @@ public static class LogisticsPatch
if (_remoteStorageExtra == history.remoteStationExtraStorage) return false;
_localStorageExtra = history.localStationExtraStorage;
_remoteStorageExtra = history.remoteStationExtraStorage;
- _localStoragePixelPerItem = StorageSliderWidth / (_localStorageMax + _localStorageExtra);
- _remoteStoragePixelPerItem = StorageSliderWidth / (_remoteStorageMax + _remoteStorageExtra);
+ _localStorageMaxTotal = _localStorageMax + _localStorageExtra;
+ _remoteStorageMaxTotal = _remoteStorageMax + _remoteStorageExtra;
+ _localStoragePixelPerItem = StorageSliderWidth / _localStorageMaxTotal;
+ _remoteStoragePixelPerItem = StorageSliderWidth / _remoteStorageMaxTotal;
return true;
}
@@ -1043,17 +1047,35 @@ public static class LogisticsPatch
_iconRemotes[i].gameObject.SetActive(CarrierEnabled[(int)_layout][1]);
_iconRemotesImage[i].sprite = StateSprite[(int)storageState.RemoteState];
_sliderBg[i].gameObject.SetActive(RealtimeLogisticsInfoPanelBarsEnabled.Value);
+ switch (_layout)
+ {
+ case EStationTipLayout.InterstellarLogistics:
+ {
+ countUIText.color = _iconRemotesImage[i].color = StateColor[(int)storageState.RemoteState];
+ break;
+ }
+ case EStationTipLayout.VeinCollector:
+ case EStationTipLayout.PlanetaryLogistics:
+ {
+ countUIText.color = _iconLocalsImage[i].color = StateColor[(int)storageState.LocalState];
+ break;
+ }
+ case EStationTipLayout.None:
+ case EStationTipLayout.Collector:
+ default:
+ break;
+ }
}
else if (itemId <= 0) return;
var barEnabled = RealtimeLogisticsInfoPanelBarsEnabled.Value;
var itemCount = storage.count;
- var itemMax = storage.max;
+ var itemLimit = _layout == EStationTipLayout.InterstellarLogistics ? _remoteStorageMaxTotal : _localStorageMaxTotal;
if (storageState.ItemCount != itemCount)
{
storageState.ItemCount = itemCount;
countUIText.text = itemCount.ToString();
- if (itemCount > itemMax) itemCount = itemMax;
+ if (itemCount > itemLimit) itemCount = itemLimit;
if (barEnabled)
{
if (itemCount == 0)
@@ -1080,7 +1102,7 @@ public static class LogisticsPatch
switch (itemOrdered)
{
case > 0:
- if (itemOrdered + itemCount > itemMax) itemOrdered = itemMax - itemCount;
+ if (itemOrdered + itemCount > itemLimit) itemOrdered = itemLimit - itemCount;
_sliderOrderedImage[i].color = OrderInColor;
var rectTrans = (RectTransform)_sliderOrdered[i].transform;
rectTrans.localPosition = new Vector3(
@@ -1111,6 +1133,7 @@ public static class LogisticsPatch
_sliderOrdered[i].gameObject.SetActive(itemOrdered != 0);
}
+ var itemMax = storage.max;
if (storageState.ItemMax != itemMax)
{
storageState.ItemMax = itemMax;
@@ -1140,8 +1163,7 @@ public static class LogisticsPatch
storageState.RemoteState = remoteLogic;
var iconRemoteImage = _iconRemotesImage[i];
iconRemoteImage.sprite = StateSprite[(int)remoteLogic];
- iconRemoteImage.color = StateColor[(int)remoteLogic];
- countUIText.color = iconRemoteImage.color;
+ countUIText.color = iconRemoteImage.color = StateColor[(int)remoteLogic];
}
break;
@@ -1155,8 +1177,7 @@ public static class LogisticsPatch
storageState.LocalState = localLogic;
var iconLocalImage = _iconLocalsImage[i];
iconLocalImage.sprite = StateSprite[(int)localLogic];
- iconLocalImage.color = StateColor[(int)localLogic];
- countUIText.color = iconLocalImage.color;
+ countUIText.color = iconLocalImage.color = StateColor[(int)localLogic];
}
break;
}
diff --git a/UXAssist/UXAssist.cs b/UXAssist/UXAssist.cs
index 1c89e77..0c656cd 100644
--- a/UXAssist/UXAssist.cs
+++ b/UXAssist/UXAssist.cs
@@ -1,8 +1,6 @@
using System;
-using System.Collections.Generic;
using System.IO;
using System.Reflection;
-using System.Reflection.Emit;
using BepInEx;
using BepInEx.Configuration;
using CommonAPI;
@@ -204,11 +202,6 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
LogisticsPatch.OnUpdate();
}
- private void LateUpdate()
- {
- FactoryPatch.NightLight.LateUpdate();
- }
-
private static void ToggleConfigWindow()
{
if (!_configWinInitialized)
diff --git a/UXAssist/UXAssist.csproj b/UXAssist/UXAssist.csproj
index 64bf877..4e1f44c 100644
--- a/UXAssist/UXAssist.csproj
+++ b/UXAssist/UXAssist.csproj
@@ -4,7 +4,7 @@
net472
org.soardev.uxassist
DSP MOD - UXAssist
- 1.2.1
+ 1.2.3
true
latest
UXAssist
diff --git a/UXAssist/package/manifest.json b/UXAssist/package/manifest.json
index 44c62e4..e7cf1ea 100644
--- a/UXAssist/package/manifest.json
+++ b/UXAssist/package/manifest.json
@@ -1,6 +1,6 @@
{
"name": "UXAssist",
- "version_number": "1.2.1",
+ "version_number": "1.2.3",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
"dependencies": [