mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-08 22:13:30 +08:00
UXAssist 1.2.14 & CheatEnabler 2.3.27
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
## Changlog
|
||||
|
||||
* 2.3.27
|
||||
+ `Skip bullet period` & `Eject anyway`: Fix compatibility with `Dyson Sphere Program v0.10.32.25496`.
|
||||
* 2.3.26
|
||||
+ Refactor codes to adapt to UXAssist 1.2.0
|
||||
- You should update UXAssist to 1.2.0 or later before using this version.
|
||||
@@ -141,6 +143,8 @@
|
||||
|
||||
## 更新日志
|
||||
|
||||
* 2.3.27
|
||||
+ `跳过子弹阶段`和`全球弹射`:修复了与`戴森球计划 v0.10.32.25496`的兼容性
|
||||
* 2.3.26
|
||||
+ 重构代码以适应UXAssist 1.2.0
|
||||
- 在使用此版本之前,您应先更新UXAssist到1.2.0或更高版本。
|
||||
@@ -153,7 +157,7 @@
|
||||
<details>
|
||||
<summary>更早的版本</summary>
|
||||
|
||||
2.3.24
|
||||
* 2.3.24
|
||||
+ `立即完成戴森壳建造`:修复了在某些情况下可能导致发电为负的问题
|
||||
* 2.3.23
|
||||
+ 新功能:`立即完成戴森壳建造`
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<BepInExPluginGuid>org.soardev.cheatenabler</BepInExPluginGuid>
|
||||
<Description>DSP MOD - CheatEnabler</Description>
|
||||
<Version>2.3.26</Version>
|
||||
<Version>2.3.27</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PackageId>CheatEnabler</PackageId>
|
||||
|
||||
@@ -179,11 +179,11 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
||||
).Advance(1);
|
||||
var end = matcher.Pos;
|
||||
matcher.Start().Advance(start).RemoveInstructions(end - start).Insert(
|
||||
new CodeInstruction(OpCodes.Ldarg_2),
|
||||
new CodeInstruction(OpCodes.Ldarg_3),
|
||||
new CodeInstruction(OpCodes.Ldarg_0),
|
||||
new CodeInstruction(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.orbitId))),
|
||||
new CodeInstruction(OpCodes.Ldloc_S, 8),
|
||||
new CodeInstruction(OpCodes.Ldloc_S, 10),
|
||||
new CodeInstruction(OpCodes.Ldloc_S, 9),
|
||||
new CodeInstruction(OpCodes.Ldloc_S, 11),
|
||||
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(SkipBulletPatch), nameof(SkipBulletPatch.AddDysonSail)))
|
||||
);
|
||||
return matcher.InstructionEnumeration();
|
||||
@@ -391,26 +391,25 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
||||
private static IEnumerable<CodeInstruction> EjectorComponent_InternalUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
{
|
||||
var matcher = new CodeMatcher(instructions, generator);
|
||||
matcher.MatchForward(false,
|
||||
matcher.End().MatchBack(false,
|
||||
new CodeMatch(instr => instr.opcode == OpCodes.Ldc_R8 && Math.Abs((double)instr.operand - 0.08715574) < 0.00000001)
|
||||
);
|
||||
var start = matcher.Pos - 3;
|
||||
matcher.MatchForward(false,
|
||||
new CodeMatch(OpCodes.And)
|
||||
).Advance(1).MatchForward(false,
|
||||
new CodeMatch(OpCodes.And)
|
||||
new CodeMatch(OpCodes.Ldarg_0),
|
||||
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.bulletCount)))
|
||||
);
|
||||
var end = matcher.Pos - 2;
|
||||
/* Remove angle checking codes, then add:
|
||||
* V_13 = this.bulletCount > 0;
|
||||
*/
|
||||
matcher.Start().Advance(start).RemoveInstructions(end - start).Insert(
|
||||
new CodeInstruction(OpCodes.Ldarg_0),
|
||||
new CodeInstruction(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.bulletCount))),
|
||||
new CodeInstruction(OpCodes.Ldc_I4_0),
|
||||
new CodeInstruction(OpCodes.Cgt),
|
||||
new CodeInstruction(OpCodes.Stloc_S, 13)
|
||||
var end = matcher.Pos;
|
||||
matcher.Start().Advance(start).RemoveInstructions(end - start).MatchForward(false,
|
||||
new CodeMatch(ci => ci.IsStloc())
|
||||
).Advance(1);
|
||||
start = matcher.Pos;
|
||||
matcher.MatchForward(false,
|
||||
new CodeMatch(OpCodes.Ldarg_0),
|
||||
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.autoOrbit)))
|
||||
);
|
||||
end = matcher.Pos;
|
||||
matcher.Start().Advance(start).RemoveInstructions(end - start);
|
||||
return matcher.InstructionEnumeration();
|
||||
}
|
||||
}
|
||||
@@ -419,7 +418,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
||||
{
|
||||
[HarmonyTranspiler]
|
||||
[HarmonyPatch(typeof(EjectorComponent), nameof(EjectorComponent.InternalUpdate))]
|
||||
private static IEnumerable<CodeInstruction> EjectAndSiloComponent_InternalUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
private static IEnumerable<CodeInstruction> EjectComponent_InternalUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
{
|
||||
var matcher = new CodeMatcher(instructions, generator);
|
||||
/* Add a multiply to ejector speed */
|
||||
@@ -472,7 +471,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
||||
{
|
||||
[HarmonyTranspiler]
|
||||
[HarmonyPatch(typeof(SiloComponent), nameof(SiloComponent.InternalUpdate))]
|
||||
private static IEnumerable<CodeInstruction> EjectAndSiloComponent_InternalUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
private static IEnumerable<CodeInstruction> SiloComponent_InternalUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
{
|
||||
var matcher = new CodeMatcher(instructions, generator);
|
||||
/* Add a multiply to ejector speed */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "CheatEnabler",
|
||||
"version_number": "2.3.26",
|
||||
"version_number": "2.3.27",
|
||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler",
|
||||
"description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测",
|
||||
"dependencies": [
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
## Changlog
|
||||
|
||||
* 1.2.14
|
||||
+ Fix an issue that an unexpected menu icon is shown in the top-right corner of the config panel.
|
||||
+ `Stop ejectors when available nodes are all filled up`: Fix compatibility with `Dyson Sphere Program v0.10.32.25496`.
|
||||
* 1.2.13
|
||||
+ `Belt signals for buy out dark fog items automatically`: Fix possible crashes.
|
||||
+ `Logistics Control Panel Improvement`: Auto apply filter with in-hand item now.
|
||||
@@ -12,6 +15,10 @@
|
||||
* 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.
|
||||
|
||||
<details>
|
||||
<summary>Older versions</summary>
|
||||
|
||||
* 1.2.9
|
||||
+ `Protect veins from exhaustion`:
|
||||
- Fix a bug that vein protection causes crashes (#50).
|
||||
@@ -35,10 +42,6 @@
|
||||
+ New feature: `Set process priority`
|
||||
+ 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`
|
||||
|
||||
<details>
|
||||
<summary>Older versions</summary>
|
||||
|
||||
* 1.2.4
|
||||
+ `Sunlight at night`:
|
||||
- Fix flickering issue while mecha is sailing.
|
||||
@@ -233,6 +236,9 @@
|
||||
|
||||
## 更新日志
|
||||
|
||||
* 1.2.14
|
||||
+ 修正设置窗口右上角多出一个菜单图标的问题
|
||||
+ `当可用节点全部造完时停止弹射`:修复了与`戴森球计划 v0.10.32.25496`的兼容性
|
||||
* 1.2.13
|
||||
+ `用于自动购买黑雾物品的传送带信号`:修复了可能导致崩溃的问题
|
||||
+ `物流控制面板改进`:现在也自动将拿着的物品设为筛选条件
|
||||
@@ -245,6 +251,10 @@
|
||||
* 1.2.10
|
||||
+ `设置使用的CPU线程`:修复了对没有超线程的CPU的大小核检查
|
||||
+ `初始化戴森球`和`快速拆除戴森壳`:修复了在戴森球面板激活时可能导致崩溃的问题,以及显示错误的问题。
|
||||
|
||||
<details>
|
||||
<summary>Older versions</summary>
|
||||
|
||||
* 1.2.9
|
||||
+ `保护矿脉不会耗尽`:
|
||||
- 修复了矿脉保护导致崩溃的问题(#50)
|
||||
@@ -268,10 +278,6 @@
|
||||
+ 新功能:`设置进程优先级`
|
||||
+ 新功能:`设置使用的CPU线程`
|
||||
+ `拖动建造电线杆时自动使用最大连接距离间隔`:添加一个新的设置项`交替建造电力感应塔和无线输电塔`
|
||||
|
||||
<details>
|
||||
<summary>更早的版本</summary>
|
||||
|
||||
* 1.2.4
|
||||
+ `夜间日光灯`:
|
||||
- 修复了航行时闪烁的问题
|
||||
|
||||
@@ -389,20 +389,36 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
||||
{
|
||||
var matcher = new CodeMatcher(instructions, generator);
|
||||
matcher.MatchForward(false,
|
||||
// if (this.orbitId == 0
|
||||
// if (this.runtimeOrbitId == 0
|
||||
new CodeMatch(OpCodes.Ldarg_0),
|
||||
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.orbitId))),
|
||||
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.runtimeOrbitId))),
|
||||
new CodeMatch(OpCodes.Brtrue)
|
||||
).Advance(2).Insert(
|
||||
).Advance(2).InsertAndAdvance(
|
||||
// || !StopEjectOnNodeComplete.AnyNodeForAbsorb(this.starData.index))
|
||||
new CodeInstruction(OpCodes.Ldc_I4_0),
|
||||
new CodeInstruction(OpCodes.Cgt),
|
||||
new CodeInstruction(OpCodes.Ldarg_2),
|
||||
new CodeInstruction(OpCodes.Ldarg_3),
|
||||
new CodeInstruction(OpCodes.Ldfld, AccessTools.Field(typeof(DysonSwarm), nameof(DysonSwarm.starData))),
|
||||
new CodeInstruction(OpCodes.Ldfld, AccessTools.Field(typeof(StarData), nameof(StarData.index))),
|
||||
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(StopEjectOnNodeComplete), nameof(AnyNodeForAbsorb))),
|
||||
new CodeInstruction(OpCodes.And)
|
||||
);
|
||||
|
||||
// Do not search for next orbit if runtimeOrbitId is not 0 (which means nodes are completed)
|
||||
Label? jmpTarget = null;
|
||||
matcher.MatchForward(false,
|
||||
new CodeMatch(OpCodes.Ldarg_0),
|
||||
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.autoOrbit))),
|
||||
new CodeMatch(ci => ci.Branches(out jmpTarget))
|
||||
);
|
||||
if (jmpTarget == null) return matcher.InstructionEnumeration();
|
||||
var labels = matcher.Labels;
|
||||
matcher.Labels = null;
|
||||
matcher.Insert(
|
||||
new CodeInstruction(OpCodes.Ldarg_0).WithLabels(labels),
|
||||
new CodeInstruction(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.runtimeOrbitId))),
|
||||
new CodeInstruction(OpCodes.Brtrue, jmpTarget.Value)
|
||||
);
|
||||
return matcher.InstructionEnumeration();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,14 +27,14 @@ public class MyWindow : ManualBehaviour
|
||||
public static void InitBaseObject()
|
||||
{
|
||||
if (_baseObject) return;
|
||||
var go = Instantiate(UIRoot.instance.uiGame.tankWindow.gameObject);
|
||||
var go = Instantiate(UIRoot.instance.uiGame.inserterWindow.gameObject);
|
||||
go.SetActive(false);
|
||||
go.name = "my-window";
|
||||
Destroy(go.GetComponent<UITankWindow>());
|
||||
for (var i = 0; i < go.transform.childCount; i++)
|
||||
{
|
||||
var child = go.transform.GetChild(i).gameObject;
|
||||
if (child.name != "panel-bg" && child.name != "shadow" && child.name != "panel-bg")
|
||||
if (child.name != "panel-bg" && child.name != "shadow")
|
||||
{
|
||||
Destroy(child);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
|
||||
<Description>DSP MOD - UXAssist</Description>
|
||||
<Version>1.2.13</Version>
|
||||
<Version>1.2.14</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PackageId>UXAssist</PackageId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "UXAssist",
|
||||
"version_number": "1.2.13",
|
||||
"version_number": "1.2.14",
|
||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
|
||||
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
|
||||
"dependencies": [
|
||||
|
||||
Reference in New Issue
Block a user