mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 03:33:29 +08:00
UXAssist release 1.2.8
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
## Changlog
|
## Changlog
|
||||||
|
|
||||||
* 1.2.8
|
* 1.2.8
|
||||||
|
+ New feature: `Fast fill in to and take out from tanks`
|
||||||
|
- You can set multiplier for tanks' operation speed
|
||||||
|
- This affects manually fill in to and/or take out from tanks, as well as transfer from upper to lower level.
|
||||||
|
+ Fixes to `Append mod profile name to game window title`:
|
||||||
|
- Fix a bug that window title is not set correctly when multiple instance is launched.
|
||||||
|
- Fix a bug that window title is not set correctly if BepInEx debug console is enabled.
|
||||||
+ `Real-time logistic stations info panel`: Fix a bug that item status bar appears unexpectedly.
|
+ `Real-time logistic stations info panel`: Fix a bug that item status bar appears unexpectedly.
|
||||||
* 1.2.7
|
* 1.2.7
|
||||||
+ Fix some minor issues
|
+ Fix some minor issues
|
||||||
@@ -12,6 +18,10 @@
|
|||||||
+ New feature: `Set process priority`
|
+ New feature: `Set process priority`
|
||||||
+ New feature: `Set enabled CPU threads`
|
+ New feature: `Set enabled CPU threads`
|
||||||
+ `Drag building power poles in maximum connection range`: Add a new config option `Build Tesla Tower and Wireless Power Tower alternately`
|
+ `Drag building power poles in maximum connection range`: Add a new config option `Build Tesla Tower and Wireless Power Tower alternately`
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Older versions</summary>
|
||||||
|
|
||||||
* 1.2.4
|
* 1.2.4
|
||||||
+ `Sunlight at night`:
|
+ `Sunlight at night`:
|
||||||
- Fix flickering issue while mecha is sailing.
|
- Fix flickering issue while mecha is sailing.
|
||||||
@@ -43,10 +53,6 @@
|
|||||||
+ `Real-time logistic stations info panel`: Fix a crash issue.
|
+ `Real-time logistic stations info panel`: Fix a crash issue.
|
||||||
+ `Dyson Sphere "Auto Fast Build"`: Fix possible wrong production records.
|
+ `Dyson Sphere "Auto Fast Build"`: Fix possible wrong production records.
|
||||||
+ Codes refactored, for better maintainability.
|
+ Codes refactored, for better maintainability.
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Older versions</summary>
|
|
||||||
|
|
||||||
* 1.1.6
|
* 1.1.6
|
||||||
+ New feature: `Scale up mouse cursor`
|
+ New feature: `Scale up mouse cursor`
|
||||||
- Note: This will enable software cursor mode, which may cause mouse movement lag on heavy load.
|
- Note: This will enable software cursor mode, which may cause mouse movement lag on heavy load.
|
||||||
@@ -211,6 +217,12 @@
|
|||||||
## 更新日志
|
## 更新日志
|
||||||
|
|
||||||
* 1.2.8
|
* 1.2.8
|
||||||
|
+ 新功能:`储液罐快速注入和抽取液体`
|
||||||
|
- 你可以设置储液罐操作速度的倍率
|
||||||
|
- 影响手动注入和抽取,以及从储液罐上层传输到下层的速度
|
||||||
|
+ 在游戏窗口标题中追加mod配置档案名的修复:
|
||||||
|
- 修复了多实例启动时窗口标题未正确设置的问题
|
||||||
|
- 修复了启用BepInEx调试控制台时窗口标题未正确设置的问题
|
||||||
+ `物流运输站实时信息面板`:修复了一个物品状态条意外显示的问题
|
+ `物流运输站实时信息面板`:修复了一个物品状态条意外显示的问题
|
||||||
* 1.2.7
|
* 1.2.7
|
||||||
+ 修复了一些小问题
|
+ 修复了一些小问题
|
||||||
@@ -222,6 +234,10 @@
|
|||||||
+ 新功能:`设置进程优先级`
|
+ 新功能:`设置进程优先级`
|
||||||
+ 新功能:`设置使用的CPU线程`
|
+ 新功能:`设置使用的CPU线程`
|
||||||
+ `拖动建造电线杆时自动使用最大连接距离间隔`:添加一个新的设置项`交替建造电力感应塔和无线输电塔`
|
+ `拖动建造电线杆时自动使用最大连接距离间隔`:添加一个新的设置项`交替建造电力感应塔和无线输电塔`
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>更早的版本</summary>
|
||||||
|
|
||||||
* 1.2.4
|
* 1.2.4
|
||||||
+ `夜间日光灯`:
|
+ `夜间日光灯`:
|
||||||
- 修复了航行时闪烁的问题
|
- 修复了航行时闪烁的问题
|
||||||
@@ -253,10 +269,6 @@
|
|||||||
+ `物流运输站实时信息面板`:修复了一个崩溃问题
|
+ `物流运输站实时信息面板`:修复了一个崩溃问题
|
||||||
+ `戴森球自动快速建造`:修复了可能出现的错误生产记录
|
+ `戴森球自动快速建造`:修复了可能出现的错误生产记录
|
||||||
+ 代码重构,以获得更好的可维护性
|
+ 代码重构,以获得更好的可维护性
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>更早的版本</summary>
|
|
||||||
|
|
||||||
* 1.1.6
|
* 1.1.6
|
||||||
+ 新功能:`放大鼠标指针`
|
+ 新功能:`放大鼠标指针`
|
||||||
- 注意:这将启用软件指针模式,可能会在CPU负载较重时导致鼠标移动延迟
|
- 注意:这将启用软件指针模式,可能会在CPU负载较重时导致鼠标移动延迟
|
||||||
|
|||||||
@@ -1203,7 +1203,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__instance.productCount > 0 && __instance.insertTarget > 0 && __instance.productId > 0)
|
if (__instance is { productCount: > 0, insertTarget: > 0, productId: > 0 })
|
||||||
{
|
{
|
||||||
var multiplier = 36000000.0 / __instance.period * miningSpeed;
|
var multiplier = 36000000.0 / __instance.period * miningSpeed;
|
||||||
if (__instance.type == EMinerType.Vein)
|
if (__instance.type == EMinerType.Vein)
|
||||||
@@ -1220,7 +1220,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
var stack = __instance.productCount < count ? __instance.productCount : count;
|
var stack = __instance.productCount < count ? __instance.productCount : count;
|
||||||
var outputCount = factory.InsertInto(__instance.insertTarget, 0, __instance.productId, (byte)stack, 0, out _);
|
var outputCount = factory.InsertInto(__instance.insertTarget, 0, __instance.productId, (byte)stack, 0, out _);
|
||||||
__instance.productCount -= outputCount;
|
__instance.productCount -= outputCount;
|
||||||
if (__instance.productCount == 0 && __instance.type == EMinerType.Vein)
|
if (__instance is { productCount: 0, type: EMinerType.Vein })
|
||||||
{
|
{
|
||||||
__instance.productId = 0;
|
__instance.productId = 0;
|
||||||
}
|
}
|
||||||
@@ -1775,15 +1775,11 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
|
|
||||||
private class TankFastFillInAndTakeOut : PatchImpl<TankFastFillInAndTakeOut>
|
private class TankFastFillInAndTakeOut : PatchImpl<TankFastFillInAndTakeOut>
|
||||||
{
|
{
|
||||||
private static int GetRealCount()
|
private static readonly CodeInstruction[] MultiplierWithCountCheck = [
|
||||||
{
|
new(OpCodes.Ldsfld, AccessTools.Field(typeof(FactoryPatch), nameof(_tankFastFillInAndTakeOutMultiplierRealValue))),
|
||||||
return _tankFastFillInAndTakeOutMultiplierRealValue;
|
new(OpCodes.Call, AccessTools.Method(typeof(Math), nameof(Math.Min), [typeof(int), typeof(int)]))
|
||||||
}
|
];
|
||||||
|
private static readonly CodeInstruction GetRealCount = new(OpCodes.Ldsfld, AccessTools.Field(typeof(FactoryPatch), nameof(_tankFastFillInAndTakeOutMultiplierRealValue)));
|
||||||
private static int MultiplierWithCountCheck(int count)
|
|
||||||
{
|
|
||||||
return Math.Min(count, _tankFastFillInAndTakeOutMultiplierRealValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyTranspiler]
|
[HarmonyTranspiler]
|
||||||
[HarmonyPatch(typeof(PlanetFactory), nameof(PlanetFactory.EntityFastFillIn))]
|
[HarmonyPatch(typeof(PlanetFactory), nameof(PlanetFactory.EntityFastFillIn))]
|
||||||
@@ -1794,14 +1790,14 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
new CodeMatch(ci => ci.IsStloc()),
|
new CodeMatch(ci => ci.IsStloc()),
|
||||||
new CodeMatch(OpCodes.Ldc_I4_2),
|
new CodeMatch(OpCodes.Ldc_I4_2),
|
||||||
new CodeMatch(ci => ci.IsStloc())
|
new CodeMatch(ci => ci.IsStloc())
|
||||||
).Advance(1).RemoveInstruction().InsertAndAdvance(Transpilers.EmitDelegate(GetRealCount)).MatchForward(false,
|
).Advance(1).RemoveInstruction().InsertAndAdvance(GetRealCount).MatchForward(false,
|
||||||
new CodeMatch(OpCodes.Ldc_I4_1),
|
new CodeMatch(OpCodes.Ldc_I4_1),
|
||||||
new CodeMatch(ci => ci.Branches(out _)),
|
new CodeMatch(ci => ci.Branches(out _)),
|
||||||
new CodeMatch(OpCodes.Ldc_I4_1),
|
new CodeMatch(OpCodes.Ldc_I4_1),
|
||||||
new CodeMatch(ci => ci.Branches(out _)),
|
new CodeMatch(ci => ci.Branches(out _)),
|
||||||
new CodeMatch(OpCodes.Ldc_I4_2),
|
new CodeMatch(OpCodes.Ldc_I4_2),
|
||||||
new CodeMatch(ci => ci.IsStloc())
|
new CodeMatch(ci => ci.IsStloc())
|
||||||
).RemoveInstructions(5).Insert(Transpilers.EmitDelegate(MultiplierWithCountCheck));
|
).RemoveInstructions(5).Insert(MultiplierWithCountCheck);
|
||||||
return matcher.InstructionEnumeration();
|
return matcher.InstructionEnumeration();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1815,14 +1811,14 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
new CodeMatch(OpCodes.Ldc_I4_2),
|
new CodeMatch(OpCodes.Ldc_I4_2),
|
||||||
new CodeMatch(OpCodes.Ldc_I4_0),
|
new CodeMatch(OpCodes.Ldc_I4_0),
|
||||||
new CodeMatch(ci => ci.opcode == OpCodes.Ldloca || ci.opcode == OpCodes.Ldloca_S)
|
new CodeMatch(ci => ci.opcode == OpCodes.Ldloca || ci.opcode == OpCodes.Ldloca_S)
|
||||||
).Advance(1).RemoveInstruction().InsertAndAdvance(Transpilers.EmitDelegate(GetRealCount)).MatchForward(false,
|
).Advance(1).RemoveInstruction().InsertAndAdvance(GetRealCount).MatchForward(false,
|
||||||
new CodeMatch(OpCodes.Ldc_I4_1),
|
new CodeMatch(OpCodes.Ldc_I4_1),
|
||||||
new CodeMatch(ci => ci.opcode == OpCodes.Bgt || ci.opcode == OpCodes.Bgt_S),
|
new CodeMatch(ci => ci.opcode == OpCodes.Bgt || ci.opcode == OpCodes.Bgt_S),
|
||||||
new CodeMatch(OpCodes.Ldc_I4_1),
|
new CodeMatch(OpCodes.Ldc_I4_1),
|
||||||
new CodeMatch(ci => ci.opcode == OpCodes.Br || ci.opcode == OpCodes.Br_S),
|
new CodeMatch(ci => ci.opcode == OpCodes.Br || ci.opcode == OpCodes.Br_S),
|
||||||
new CodeMatch(OpCodes.Ldc_I4_2),
|
new CodeMatch(OpCodes.Ldc_I4_2),
|
||||||
new CodeMatch(ci => ci.IsLdloc())
|
new CodeMatch(ci => ci.IsLdloc())
|
||||||
).RemoveInstructions(5).Insert(Transpilers.EmitDelegate(MultiplierWithCountCheck));
|
).RemoveInstructions(5).Insert(MultiplierWithCountCheck);
|
||||||
return matcher.InstructionEnumeration();
|
return matcher.InstructionEnumeration();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1839,8 +1835,44 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
new CodeMatch(OpCodes.Ldc_I4_2),
|
new CodeMatch(OpCodes.Ldc_I4_2),
|
||||||
new CodeMatch(ci => ci.IsStloc())
|
new CodeMatch(ci => ci.IsStloc())
|
||||||
);
|
);
|
||||||
matcher.Repeat(m => m.RemoveInstructions(5).InsertAndAdvance(Transpilers.EmitDelegate(MultiplierWithCountCheck)));
|
matcher.Repeat(m => m.RemoveInstructions(5).InsertAndAdvance(MultiplierWithCountCheck));
|
||||||
return matcher.InstructionEnumeration();
|
return matcher.InstructionEnumeration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(TankComponent), nameof(TankComponent.TickOutput))]
|
||||||
|
private static bool TankComponent_TickOutput_Prefix(ref TankComponent __instance, PlanetFactory factory)
|
||||||
|
{
|
||||||
|
if (!__instance.outputSwitch || __instance.fluidCount <= 0)
|
||||||
|
return false;
|
||||||
|
var lastTankId = __instance.lastTankId;
|
||||||
|
if (lastTankId <= 0)
|
||||||
|
return false;
|
||||||
|
var factoryStorage = factory.factoryStorage;
|
||||||
|
ref var tankComponent = ref factoryStorage.tankPool[lastTankId];
|
||||||
|
if (!tankComponent.inputSwitch || (tankComponent.fluidId > 0 && tankComponent.fluidId != __instance.fluidId))
|
||||||
|
return false;
|
||||||
|
var left = tankComponent.fluidCapacity - tankComponent.fluidCount;
|
||||||
|
if (left <= 0)
|
||||||
|
return false;
|
||||||
|
if (tankComponent.fluidId == 0)
|
||||||
|
tankComponent.fluidId = __instance.fluidId;
|
||||||
|
var takeOut = Math.Min(left, _tankFastFillInAndTakeOutMultiplierRealValue);
|
||||||
|
if (takeOut >= __instance.fluidCount)
|
||||||
|
{
|
||||||
|
tankComponent.fluidCount += __instance.fluidCount;
|
||||||
|
tankComponent.fluidInc += __instance.fluidInc;
|
||||||
|
__instance.fluidId = 0;
|
||||||
|
__instance.fluidCount = 0;
|
||||||
|
__instance.fluidInc = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var takeInc = __instance.split_inc(ref __instance.fluidCount, ref __instance.fluidInc, takeOut);
|
||||||
|
tankComponent.fluidCount += takeOut;
|
||||||
|
tankComponent.fluidInc += takeInc;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,6 +50,9 @@
|
|||||||
- Logistic storage limits are not scaled on upgrading `Logistics Carrier Capacity`, if they are not set to maximum capacity.
|
- Logistic storage limits are not scaled on upgrading `Logistics Carrier Capacity`, if they are not set to maximum capacity.
|
||||||
- You can use arrow keys to adjust logistic storage limits gracefully.
|
- You can use arrow keys to adjust logistic storage limits gracefully.
|
||||||
- Quick build and dismantle stacking labs/storages/tanks
|
- Quick build and dismantle stacking labs/storages/tanks
|
||||||
|
- Fast fill in to and take out from tanks
|
||||||
|
- You can set multiplier for tanks' operation speed
|
||||||
|
- This affects manually fill in to and/or take out from tanks, as well as transfer from upper to lower level.
|
||||||
- Protect veins from exhaustion
|
- Protect veins from exhaustion
|
||||||
- By default, the vein amount is protected at 100, and oil speed is protected at 1.0/s, you can set them yourself in config file.
|
- By default, the vein amount is protected at 100, and oil speed is protected at 1.0/s, you can set them yourself in config file.
|
||||||
- When reach the protection value, veins/oils steeps will not be mined/extracted any longer.
|
- When reach the protection value, veins/oils steeps will not be mined/extracted any longer.
|
||||||
@@ -164,6 +167,9 @@
|
|||||||
- 当升级`运输机舱扩容`时,不会对各种物流塔的存储限制按比例提升,除非设置为最大允许容量。
|
- 当升级`运输机舱扩容`时,不会对各种物流塔的存储限制按比例提升,除非设置为最大允许容量。
|
||||||
- 你可以使用方向键微调物流塔存储限制
|
- 你可以使用方向键微调物流塔存储限制
|
||||||
- 快速建造和拆除堆叠研究站/储物仓/储液罐
|
- 快速建造和拆除堆叠研究站/储物仓/储液罐
|
||||||
|
- 储液罐快速注入和抽取液体
|
||||||
|
- 你可以设置储液罐操作速度的倍率
|
||||||
|
- 影响手动注入和抽取,以及从储液罐上层传输到下层的速度
|
||||||
- 保护矿脉不会耗尽
|
- 保护矿脉不会耗尽
|
||||||
- 默认矿脉数量保护在100,采油速保护在1.0/s,你可以在配置文件中自行设置。
|
- 默认矿脉数量保护在100,采油速保护在1.0/s,你可以在配置文件中自行设置。
|
||||||
- 当达到保护值时,矿脉和油井将不再被开采。
|
- 当达到保护值时,矿脉和油井将不再被开采。
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
|
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
|
||||||
<Description>DSP MOD - UXAssist</Description>
|
<Description>DSP MOD - UXAssist</Description>
|
||||||
<Version>1.2.7</Version>
|
<Version>1.2.8</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<PackageId>UXAssist</PackageId>
|
<PackageId>UXAssist</PackageId>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "UXAssist",
|
"name": "UXAssist",
|
||||||
"version_number": "1.2.7",
|
"version_number": "1.2.8",
|
||||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
|
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
|
||||||
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
|
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|||||||
Reference in New Issue
Block a user