1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-08 22:13:30 +08:00

UXAssist v1.2.19

This commit is contained in:
2025-04-16 15:49:14 +08:00
parent db0970c3c4
commit 1d01fdbd15
8 changed files with 106 additions and 30 deletions

View File

@@ -1,5 +1,19 @@
## Changlog
* 1.2.19
+ New feature: `Tweak building buffer`
- Factory recipe buffer formula: take the larger value between `Assembler buffer time multiplier(in seconds) * items needed per second` and `Assembler buffer minimum multiplier * items needed per recipe`
- `Assembler buffer time multiplier(in seconds)`: Range 2-10, default is 4 (same as game)
- `Assembler buffer minimum multiplier`: Range 2-10, default is 2 (same as game)
- Matrix Lab assembly mode formula: Default buffer is `Buffer count for assembling in labs`, when using Self-evolution Lab, if recipe's original production time is not greater than 9 seconds, add `Extra buffer count for Self-evolution Labs` * (`Lab speed` - 1)
- `Buffer count for assembling in labs`: Range 2-20, default is 6 (same as game)
- `Extra buffer count for Self-evolution Labs`: Range 1-10, default is 3 (same as game)
- `Buffer count for researching in labs`: Range 2-20, default is 10 (same as game)
- `Ray Receiver Graviton Lens buffer count`: Range 1-20, default is 1 (game default is 20)
+ New feature: `Shortcut keys for showing stars' name`
- Add a shortcut key to always show all star names in starmap when holding, default is `Alt`
- Add a shortcut key to toggle between three star name display states in starmap: `Original state`, `Show all names`, `Hide all names`, default is `Tab`, will restore to original state when closing starmap
+ `Cut conveyor belt`: Fix a bug that entity logic connection is not cut so that belt is not cut off on copying as a blueprint.
* 1.2.18
+ `Protect veins from exhaustion`: Optimized implementation, now veins will not be protected once you have upgrade `Veins Utilization` to level 390+, while the cost rate becomes absolute 0.
+ `Night Sunlight`: Fix bugs that sunlight angle is not updated as expected.
@@ -33,7 +47,7 @@
+ Fix an issue caused by game update: tips are not shown when mouse hovering on tips button.
* 1.2.10
+ `Set enabled CPU threads`: Fix hybrid-architect check for CPUs without hyper-threading
+ `Re-initialize Dyson Spheres` and `Quick dismantle Dyson Shells`: Fix possible crashes and a display issue, while Dyson Sphere panel is actived.
+ `Re-initialize Dyson Spheres` and `Quick dismantle Dyson Shells`: Fix possible crashes and a display issue, while Dyson Sphere panel is actived.
* 1.2.9
+ `Protect veins from exhaustion`:
- Fix a bug that vein protection causes crashes (#50).
@@ -92,7 +106,7 @@
+ New feature: `Scale up mouse cursor`
- Note: This will enable software cursor mode, which may cause mouse movement lag on heavy load.
+ New feature: `Real-time logistic stations info panel`
- Note: This function will be hidden if you enabled `Show station info` in mod `Auxilaryfunction`.
- Note: This function will be hidden if you enabled `Show station info` in mod `Auxilaryfunction`.
+ Fix an issue that `Dyson Sphere "Auto Fast Build"` does not generate production records for solar sails.
+ Remove use of AssetBundle, move all icons into `Assembly Resources`, for better flexibility.
* 1.1.5
@@ -251,6 +265,20 @@
## 更新日志
* 1.2.19
+ 新功能:`调整建筑输入缓冲`
- 工厂配方计算公式,在`工厂配方缓冲时间倍率秒数x每秒需要的原料数量``工厂配方缓冲最小倍率x每生产一次配方需要的原料数量`中取更大的那个值
- `工厂配方缓冲时间倍率(秒)`范围2-10默认为4(同游戏)
- `工厂配方缓冲最小倍率`范围2-10默认为2(同游戏)
- 研究站矩阵合成模式计算公式,默认缓存`研究站矩阵合成模式缓存数量`当使用自演化研究站时如果配方的原始生产时间不大于9秒则增加`自演化研究站矩阵额外缓冲数量`*(`研究站速度倍率`-1)
- `研究站矩阵合成模式缓存数量`范围2-20默认为6(同游戏)
- `自演化研究站矩阵额外缓冲数量`范围1-10默认为3(同游戏)
- `研究站科研模式缓存数量`范围2-20默认为10(同游戏)
- `射线接收器透镜缓冲数量`范围1-20默认为1(游戏默认为20)
+ 新功能:`启用显示所有星系名称的快捷键`
- 新增一个快捷键,按住后始终在星图显示所有星系名称,默认为`Alt`
- 新增一个快捷键,在星图视图切换三种星系名称显示状态:`原始显示状态``显示所有名称``隐藏所有名称`,默认为`Tab`,关闭星图时会恢复到原始状态
+ `切割传送带`:修复了实体逻辑连接未切断导致复制为蓝图时传送带未被切断的问题。
* 1.2.18
+ `保护矿脉不会耗尽`:优化实现,当`矿物利用`升级到390级以上时消耗速度变为0时矿脉将不再被保护。
+ `夜间日光灯`:修复了光照角度未正确更新的问题。
@@ -296,7 +324,7 @@
- 影响手动注入和抽取,以及从储液罐上层传输到下层的速度
+ 在游戏窗口标题中追加mod配置档案名的修复
- 修复了多实例启动时窗口标题未正确设置的问题
- 修复了启用BepInEx调试控制台时窗口标题未正确设置的问题
- 修复了启用BepInEx调试控制台时窗口标题未正确设置的问题
+ `物流运输站实时信息面板`:修复了一个物品状态条意外显示的问题
* 1.2.7
+ 修复了一些小问题

View File

@@ -2089,6 +2089,14 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
[HarmonyPatch(typeof(LabComponent), nameof(LabComponent.UpdateNeedsAssemble))]
private static IEnumerable<CodeInstruction> LabComponent_UpdateNeedsAssemble_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
/*
* Patch:
* int num2 = ((this.timeSpend > 5400000) ? 6 :
* (3 * ((this.speedOverride + 5001) / 10000) + 3));
* To:
* int num2 = ((this.timeSpend > 5400000) ? LabBufferMaxCountForAssemble.Value :
* (LabBufferExtraCountForAdvancedAssemble.Value * ((this.speedOverride + 5001) / 10000) + (LabBufferMaxCountForAssemble.Value - LabBufferExtraCountForAdvancedAssemble.Value)));
*/
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
new CodeMatch(OpCodes.Ldarg_0),
@@ -2118,6 +2126,22 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
[HarmonyPatch(typeof(LabComponent), nameof(LabComponent.UpdateNeedsResearch))]
private static IEnumerable<CodeInstruction> LabComponent_UpdateNeedsResearch_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
/*
* Patch:
* this.needs[0] = ((this.matrixServed[0] < 36000) ? 6001 : 0);
* this.needs[1] = ((this.matrixServed[1] < 36000) ? 6002 : 0);
* this.needs[2] = ((this.matrixServed[2] < 36000) ? 6003 : 0);
* this.needs[3] = ((this.matrixServed[3] < 36000) ? 6004 : 0);
* this.needs[4] = ((this.matrixServed[4] < 36000) ? 6005 : 0);
* this.needs[5] = ((this.matrixServed[5] < 36000) ? 6006 : 0);
* To:
* this.needs[0] = ((this.matrixServed[0] < LabBufferMaxCountForResearch.Value * 3600) ? 6001 : 0);
* this.needs[1] = ((this.matrixServed[1] < LabBufferMaxCountForResearch.Value * 3600) ? 6002 : 0);
* this.needs[2] = ((this.matrixServed[2] < LabBufferMaxCountForResearch.Value * 3600) ? 6003 : 0);
* this.needs[3] = ((this.matrixServed[3] < LabBufferMaxCountForResearch.Value * 3600) ? 6004 : 0);
* this.needs[4] = ((this.matrixServed[4] < LabBufferMaxCountForResearch.Value * 3600) ? 6005 : 0);
* this.needs[5] = ((this.matrixServed[5] < LabBufferMaxCountForResearch.Value * 3600) ? 6006 : 0);
*/
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
new CodeMatch(OpCodes.Ldc_I4, 36000)

View File

@@ -162,43 +162,43 @@ public static class PlayerPatch
_showAllStarsNameStatus = (_showAllStarsNameStatus + 1) % 3;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(UIStarmap), nameof(UIStarmap._OnClose))]
private static void UIStarmap__OnClose_Postfix()
{
_showAllStarsNameStatus = 0;
}
[HarmonyTranspiler]
[HarmonyPatch(typeof(UIStarmapStar), nameof(UIStarmapStar._OnLateUpdate))]
private static IEnumerable<CodeInstruction> UIStarmapStar__OnLateUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
new CodeMatch(OpCodes.Ldarg_0),
new CodeMatch(OpCodes.Ldloc_1),
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(UIStarmapStar), nameof(UIStarmapStar.projected)))
);
matcher.Advance(3);
matcher.CreateLabel(out var jumpPos1);
matcher.InsertAndAdvance(
new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(ShortcutKeysForStarsName), nameof(_showAllStarsNameStatus))),
new CodeInstruction(OpCodes.Ldc_I4_2),
new CodeInstruction(OpCodes.Ceq),
new CodeInstruction(OpCodes.Brfalse, jumpPos1),
new CodeInstruction(OpCodes.Ldc_I4_0),
new CodeInstruction(OpCodes.Stloc_1)
);
Label? jumpPos2 = null;
Label? jumpPos = null;
matcher.MatchForward(false,
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(UIStarmapStar), nameof(UIStarmapStar.projectedCoord))),
new CodeMatch(ci => ci.IsLdloc()),
new CodeMatch(ci => ci.Branches(out jumpPos2))
new CodeMatch(ci => ci.Branches(out jumpPos))
);
matcher.Advance(3);
var labels = matcher.Labels;
matcher.Labels = null;
matcher.Labels = [];
matcher.CreateLabel(out var jumpPos2);
matcher.InsertAndAdvance(
new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(ShortcutKeysForStarsName), nameof(_showAllStarsNameStatus))).WithLabels(labels),
new CodeInstruction(OpCodes.Ldc_I4_1),
new CodeInstruction(OpCodes.Ceq),
new CodeInstruction(OpCodes.Brtrue, jumpPos2.Value),
new CodeInstruction(OpCodes.Brtrue, jumpPos.Value),
new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(PlayerPatch), nameof(_showAllStarsNameKey))),
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(KeyBindings), nameof(KeyBindings.IsKeyPressing))),
new CodeInstruction(OpCodes.Brtrue, jumpPos2.Value)
new CodeInstruction(OpCodes.Brtrue, jumpPos.Value),
new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(ShortcutKeysForStarsName), nameof(_showAllStarsNameStatus))),
new CodeInstruction(OpCodes.Ldc_I4_2),
new CodeInstruction(OpCodes.Ceq),
new CodeInstruction(OpCodes.Brfalse, jumpPos2),
new CodeInstruction(OpCodes.Ldc_I4_0),
new CodeInstruction(OpCodes.Stloc_1),
new CodeInstruction(OpCodes.Br, jumpPos.Value)
);
return matcher.InstructionEnumeration();
}

View File

@@ -86,11 +86,23 @@
- 1 Metaverse = 30 Negentropy Singularities
- 1 Metaverse = 30 Matter Recombinators
- 1 Metaverse = 10 Core Elements
- Tweak building buffer
- Factory recipe buffer formula: take the larger value between `Assembler buffer time multiplier(in seconds) * items needed per second` and `Assembler buffer minimum multiplier * items needed per recipe`
- `Assembler buffer time multiplier(in seconds)`: Range 2-10, default is 4 (same as game)
- `Assembler buffer minimum multiplier`: Range 2-10, default is 2 (same as game)
- Matrix Lab assembly mode formula: Default buffer is `Buffer count for assembling in labs`, when using Self-evolution Lab, if recipe's original production time is not greater than 9 seconds, add `Extra buffer count for Self-evolution Labs` * (`Lab speed` - 1)
- `Buffer count for assembling in labs`: Range 2-20, default is 6 (same as game)
- `Extra buffer count for Self-evolution Labs`: Range 1-10, default is 3 (same as game)
- `Buffer count for researching in labs`: Range 2-20, default is 10 (same as game)
- `Ray Receiver Graviton Lens buffer count`: Range 1-20, default is 1 (game default is 20)
+ Player/Mecha
- Unlimited interactive range
- Enable player actions in globe view
- Hide tips for soil piles changes
- Enhanced count control for hand-make
- Shortcut keys for showing stars' name
- Add a shortcut key to always show all star names in starmap when holding, default is `Alt`
- Add a shortcut key to toggle between three star name display states in starmap: `Original state`, `Show all names`, `Hide all names`, default is `Tab`, will restore to original state when closing starmap
- Auto navigation on sailings
- It keeps Icarus on course to the target planet
- It will try to bypass any obstacles(planets, stars or dark-fog hives) on the way
@@ -209,12 +221,24 @@
- 1个元宇宙 = 30个负熵奇点
- 1个元宇宙 = 30个物质重组器
- 1个元宇宙 = 10个核心素
- 调整建筑输入缓冲
- 工厂配方计算公式,在`工厂配方缓冲时间倍率秒数x每秒需要的原料数量``工厂配方缓冲最小倍率x每生产一次配方需要的原料数量`中取更大的那个值
- `工厂配方缓冲时间倍率(秒)`范围2-10默认为4(同游戏)
- `工厂配方缓冲最小倍率`范围2-10默认为2(同游戏)
- 研究站矩阵合成模式计算公式,默认缓存`研究站矩阵合成模式缓存数量`当使用自演化研究站时如果配方的原始生产时间不大于9秒则增加`自演化研究站矩阵额外缓冲数量`*(`研究站速度倍率`-1)
- `研究站矩阵合成模式缓存数量`范围2-20默认为6(同游戏)
- `自演化研究站矩阵额外缓冲数量`范围1-10默认为3(同游戏)
- `研究站科研模式缓存数量`范围2-20默认为10(同游戏)
- `射线接收器透镜缓冲数量`范围1-20默认为1(游戏默认为20)
+ 玩家/机甲
- 无限交互距离
- 移除建造数量和范围限制
- 在行星视图中允许玩家操作
- 隐藏沙土数量变动的提示
- 手动制造物品的数量控制改进
- 启用显示所有星系名称的快捷键
- 新增一个快捷键,按住后始终在星图显示所有星系名称,默认为`Alt`
- 新增一个快捷键,在星图视图切换三种星系名称显示状态:`原始显示状态``显示所有名称``隐藏所有名称`,默认为`Tab`,关闭星图时会恢复到原始状态
- 航行时自动导航
- 它会保持伊卡洛斯飞向目标星球
- 它会尝试绕过途中的任何障碍物(行星、恒星或黑雾巢穴)

View File

@@ -94,7 +94,7 @@ public static class UIConfigWindow
I18N.Add("Assembler buffer time multiplier(in seconds)", "Assembler buffer time multiplier(in seconds)", "工厂配方缓冲时间倍率(秒)");
I18N.Add("Assembler buffer minimum multiplier", "Assembler buffer minimum multiplier", "工厂配方缓冲最小倍率");
I18N.Add("Buffer count for assembling in labs", "Buffer count for assembling in labs", "研究站矩阵合成模式缓存数量");
I18N.Add("Extra buffer count in Self-evolution Labs", "Extra buffer count in Self-evolution Labs", "自演化研究站矩阵额外缓冲数量");
I18N.Add("Extra buffer count for Self-evolution Labs", "Extra buffer count for Self-evolution Labs", "自演化研究站矩阵额外缓冲数量");
I18N.Add("Buffer count for researching in labs", "Buffer count for researching in labs", "研究站科研模式缓存数量");
I18N.Add("Ray Receiver Graviton Lens buffer count", "Ray Receiver Graviton Lens buffer count", "射线接收器透镜缓冲数量");
I18N.Add("Shortcut keys for showing stars' name", "Shortcut keys for showing stars' name", "启用显示所有星系名称的快捷键");
@@ -373,7 +373,7 @@ public static class UIConfigWindow
txt = wnd.AddText2(x + 20f, y, tab2, "Buffer count for assembling in labs", 13);
var nx3 = txt.preferredWidth + 5f;
y += 27f;
txt = wnd.AddText2(x + 20f, y, tab2, "Extra buffer count in Self-evolution Labs", 13);
txt = wnd.AddText2(x + 20f, y, tab2, "Extra buffer count for Self-evolution Labs", 13);
var nx4 = txt.preferredWidth + 5f;
y += 27f;
txt = wnd.AddText2(x + 20f, y, tab2, "Buffer count for researching in labs", 13);

View File

@@ -142,9 +142,9 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
"Tweak buffer count for assemblers and power generators");
FactoryPatch.AssemblerBufferTimeMultiplier = Config.Bind("Factory", "AssemblerBufferTimeMultiplier", 4, new ConfigDescription("Assembler buffer time multiplier in seconds", new AcceptableValueRange<int>(2, 10)));
FactoryPatch.AssemblerBufferMininumMultiplier = Config.Bind("Factory", "AssemblerBufferMininumMultiplier", 4, new ConfigDescription("Assembler buffer minimum multiplier", new AcceptableValueRange<int>(2, 10)));
FactoryPatch.LabBufferMaxCountForAssemble = Config.Bind("Factory", "LabBufferMaxCountForAssemble", 100, new ConfigDescription("Buffer count for assembling in labs", new AcceptableValueRange<int>(2, 20)));
FactoryPatch.LabBufferExtraCountForAdvancedAssemble = Config.Bind("Factory", "LabBufferExtraCountForAdvancedAssemble", 100, new ConfigDescription("Extra buffer count in Self-evolution Labs", new AcceptableValueRange<int>(1, 10)));
FactoryPatch.LabBufferMaxCountForResearch = Config.Bind("Factory", "LabBufferMaxCountForResearch", 100, new ConfigDescription("Buffer count for researching in labs", new AcceptableValueRange<int>(2, 20)));
FactoryPatch.LabBufferMaxCountForAssemble = Config.Bind("Factory", "LabBufferMaxCountForAssemble", 6, new ConfigDescription("Buffer count for assembling in labs", new AcceptableValueRange<int>(2, 20)));
FactoryPatch.LabBufferExtraCountForAdvancedAssemble = Config.Bind("Factory", "LabBufferExtraCountForAdvancedAssemble", 3, new ConfigDescription("Extra buffer count for Self-evolution Labs", new AcceptableValueRange<int>(1, 10)));
FactoryPatch.LabBufferMaxCountForResearch = Config.Bind("Factory", "LabBufferMaxCountForResearch", 10, new ConfigDescription("Buffer count for researching in labs", new AcceptableValueRange<int>(2, 20)));
FactoryPatch.ReceiverBufferCount = Config.Bind("Factory", "ReceiverBufferCount", 1, new ConfigDescription("Ray Receiver Graviton Lens buffer count", new AcceptableValueRange<int>(1, 20)));
LogisticsPatch.LogisticsCapacityTweaksEnabled = Config.Bind("Factory", "LogisticsCapacityTweaks", true,
"Logistics capacity related tweaks");

View File

@@ -4,7 +4,7 @@
<TargetFramework>net472</TargetFramework>
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
<Description>DSP MOD - UXAssist</Description>
<Version>1.2.18</Version>
<Version>1.2.19</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<PackageId>UXAssist</PackageId>

View File

@@ -1,6 +1,6 @@
{
"name": "UXAssist",
"version_number": "1.2.18",
"version_number": "1.2.19",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
"dependencies": [