diff --git a/CheatEnabler/CheatEnabler.csproj b/CheatEnabler/CheatEnabler.csproj index 68e1e50..4bf1230 100644 --- a/CheatEnabler/CheatEnabler.csproj +++ b/CheatEnabler/CheatEnabler.csproj @@ -5,7 +5,7 @@ net472 org.soardev.cheatenabler DSP MOD - CheatEnabler - 2.3.28 + 2.3.29 true latest CheatEnabler @@ -24,6 +24,17 @@ + + diff --git a/UXAssist/CHANGELOG.md b/UXAssist/CHANGELOG.md index 6c67b41..cf34fc6 100644 --- a/UXAssist/CHANGELOG.md +++ b/UXAssist/CHANGELOG.md @@ -1,5 +1,7 @@ ## Changlog +* 1.2.17 + + Fix wrong implementation of `Protect veins from exhaustion` which causes wrong display of vein stats and veins not consumed. * 1.2.16 + New feature: `Cut conveyor belt` - Press shortcut key to cut conveyor belt under cursor. @@ -246,6 +248,8 @@ ## 更新日志 +* 1.2.17 + + 修复了`保护矿脉不会耗尽`导致矿脉状态显示错误和矿脉未被消耗的错误实现 * 1.2.16 + 新功能:`切割传送带` - 按快捷键切割光标位置的传送带 diff --git a/UXAssist/Patches/FactoryPatch.cs b/UXAssist/Patches/FactoryPatch.cs index f52eac5..8514ccf 100644 --- a/UXAssist/Patches/FactoryPatch.cs +++ b/UXAssist/Patches/FactoryPatch.cs @@ -1063,13 +1063,13 @@ public class FactoryPatch : PatchImpl { var groupIndex = (int)veinPool[veinId].groupIndex; amount -= usedCount; + veinPool[veinId].amount = amount; if (amount < __instance.minimumVeinAmount) { __instance.minimumVeinAmount = amount; } - var veinGroups = factory.veinGroups; - veinGroups[groupIndex].amount = amount; + factory.veinGroups[groupIndex].amount -= usedCount; factory.veinAnimPool[veinId].time = amount >= 20000 ? 0f : 1f - 0.00005f; if (amount <= 0) { @@ -1173,10 +1173,10 @@ public class FactoryPatch : PatchImpl usedCount = maxAllowed; } - amount = veinPool[veinId].amount -= usedCount; - var veinGroups = factory.veinGroups; + amount -= usedCount; + veinPool[veinId].amount = amount; var groupIndex = veinPool[veinId].groupIndex; - veinGroups[groupIndex].amount -= usedCount; + factory.veinGroups[groupIndex].amount -= usedCount; factory.veinAnimPool[veinId].time = amount >= 25000 ? 0f : 1f - amount * VeinData.oilSpeedMultiplier; if (amount <= 2500) { diff --git a/UXAssist/UXAssist.csproj b/UXAssist/UXAssist.csproj index 220f48c..7134274 100644 --- a/UXAssist/UXAssist.csproj +++ b/UXAssist/UXAssist.csproj @@ -4,7 +4,7 @@ net472 org.soardev.uxassist DSP MOD - UXAssist - 1.2.16 + 1.2.17 true latest UXAssist @@ -20,6 +20,18 @@ + + + diff --git a/UXAssist/package/manifest.json b/UXAssist/package/manifest.json index 670b303..3b5c4ac 100644 --- a/UXAssist/package/manifest.json +++ b/UXAssist/package/manifest.json @@ -1,6 +1,6 @@ { "name": "UXAssist", - "version_number": "1.2.16", + "version_number": "1.2.17", "website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist", "description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁", "dependencies": [