1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-08 20:53:28 +08:00

Release MechaDroneTweaks 1.1.4, CheatEnabler 2.3.10, UXAssist 1.0.13

This commit is contained in:
2024-02-18 20:43:37 +08:00
parent d72d16a171
commit e2d83ee3cb
13 changed files with 107 additions and 31 deletions

View File

@@ -5,7 +5,7 @@
<TargetFramework>net472</TargetFramework>
<BepInExPluginGuid>org.soardev.cheatenabler</BepInExPluginGuid>
<Description>DSP MOD - CheatEnabler</Description>
<Version>2.3.9</Version>
<Version>2.3.10</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<PackageId>CheatEnabler</PackageId>
@@ -16,7 +16,7 @@
<ItemGroup>
<PackageReference Include="BepInEx.Core" Version="5.*" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
<PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.28.21219-r.0" />
<PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.29.21950-r.0" />
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" />
</ItemGroup>

View File

@@ -83,11 +83,20 @@ public static class PlanetPatch
{
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
new CodeMatch(OpCodes.Ldarg_0),
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(BuildTool_Reform), nameof(BuildTool_Reform.cursorPointCount))),
new CodeMatch(ci => ci.opcode == OpCodes.Blt || ci.opcode == OpCodes.Blt_S)
).RemoveInstructions(2).InsertAndAdvance(
new CodeInstruction(OpCodes.Ldc_I4_0)
).MatchForward(false,
new CodeMatch(OpCodes.Callvirt, AccessTools.Method(typeof(Player), "get_sandCount"))
).Advance(4).InsertAndAdvance(
).Advance(1).MatchForward(false,
new CodeMatch(OpCodes.Conv_I8),
new CodeMatch(OpCodes.Sub)
).Advance(2).InsertAndAdvance(
new CodeInstruction(OpCodes.Ldc_I8, 0L),
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(Math), "Max", new[] { typeof(long), typeof(long) }))
).Advance(1).RemoveInstructions(4);
);
return matcher.InstructionEnumeration();
}
}

View File

@@ -4,6 +4,10 @@
#### 添加一些作弊功能,同时屏蔽异常检测
## Changlog
* 2.3.10
+ Fix following functions not working in new game updates:
- `Pump Anywhere`
- `Terraform without enough sands`
* 2.3.9
+ Support game version 0.10.28.21219
* 2.3.8
@@ -120,6 +124,10 @@
* [Multifunction_mod](https://github.com/blacksnipebiu/Multifunction_mod): Some cheat functions
## 更新日志
* 2.3.10
+ 修复了以下功能在新游戏版本中不生效的问题:
- `平地抽水`
- `沙土不够时依然可以整改地形`
* 2.3.9
+ 支持游戏版本0.10.28.21219
* 2.3.8

View File

@@ -1,10 +1,10 @@
{
"name": "CheatEnabler",
"version_number": "2.3.9",
"version_number": "2.3.10",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler",
"description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测",
"dependencies": [
"xiaoye97-BepInEx-5.4.17",
"soarqin-UXAssist-1.0.2"
"soarqin-UXAssist-1.0.13"
]
}

View File

@@ -6,7 +6,7 @@
<AssemblyName>MechaDronesTweaks</AssemblyName>
<BepInExPluginGuid>org.soardev.mechadronestweaks</BepInExPluginGuid>
<Description>DSP MOD - MechaDronesTweaks</Description>
<Version>1.1.3</Version>
<Version>1.1.4</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<RestoreAdditionalProjectSources>https://nuget.bepinex.dev/v3/index.json</RestoreAdditionalProjectSources>

View File

@@ -4,6 +4,9 @@
#### 机甲建设机调整(FastDrones MOD的后继者)
## Updates
* 1.1.4
+ Fixed support for game version 0.10.29
* 1.1.3
+ Support for game version 0.10.28.20759+
+ Fixed a minor bug that `RemoveSpeedLimitForStage1` not working while `UseFixedSpeed` set to false and `SpeedMultiplier` set to 1
@@ -35,6 +38,9 @@
* Note: This MOD will disable `FastDrones` if the MOD is installed, to avoid conflict in functions.
## 更新日志
* 1.1.4
+ 修复了对游戏版本0.10.29的支持
* 1.1.3
+ 支持游戏版本0.10.28.20759+
+ 修复了当`UseFixedSpeed`设置为false且`SpeedMultiplier`设置为1时`RemoveSpeedLimitForStage1`无效的问题

View File

@@ -1,6 +1,6 @@
{
"name": "MechaDronesTweaks",
"version_number": "1.1.3",
"version_number": "1.1.4",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/MechaDronesTweaks",
"description": "Some tweaks for mecha drones and build functions(Successor to FastDrones MOD) / 机甲建设机和建设功能调整(FastDrones MOD的后继者)",
"dependencies": [

View File

@@ -350,7 +350,7 @@ public static class FactoryPatch
* brtrue.s 2054 (173A) ldc.i4.s 17
* ldc.i4.s EBuildCondition.JointCannotLift (19)
* br.s 2055 (173C) stfld valuetype EBuildCondition BuildPreview::condition
* ldc.i4.s EBuildCondition.EBuildCondition.JointCannotLift (19) (18)
* ldc.i4.s EBuildCondition.TooBendToLift (18)
* stfld valuetype EBuildCondition BuildPreview::condition
*/
matcher.MatchForward(false,

View File

@@ -4,6 +4,13 @@
#### 一些提升用户体验的功能和补丁
## Changlog
* 1.0.13
+ `Off-grid building and stepped rotation`: show building coorinates(relative to grids) on building preview and building info panel now
+ Increase maximum count of Metadata Instantiations to 20000 (from 2000)
+ Increase capacity of player order queue to 128 (from 16)
+ Fix issue caused by game updates
- `Remove some build conditions`: fixed issue that some conditions are not eliminated
- `Re-initialize planet`: fixed crash issue
* 1.0.12
+ Fix a bug that ejectors aimed at even-numbered orbits stop working when `Stop ejectors when available nodes are all filled up` is enabled.
* 1.0.11
@@ -54,6 +61,8 @@
+ Strict hotkey dectection for build menu, thus building hotkeys(0~9, F1~F10, X, U) are not triggered while holding Ctrl/Alt/Shift.
+ Fix a bug that warning popup on `Veins Utilization` upgraded to level 8000+
+ Sort blueprint structures before saving, to reduce generated blueprint data size a little
+ Increase maximum count of Metadata Instantiations to 20000 (from 2000)
+ Increase capacity of player order queue to 128 (from 16)
* Features:
+ General
- Enable game window resize
@@ -92,6 +101,13 @@
* [OffGridConstruction](https://github.com/Velociraptor115-DSPModding/OffGridConstruction): Off-grid building & stepped rotation implementations
## 更新日志
* 1.0.13
+ `脱离网格建造和小角度旋转`:现在在建造预览和建筑信息面板上显示建筑坐标(相对于网格)
+ 将元数据提取的最大数量增加到20000(原来为2000)
+ 将玩家指令队列的容量增加到128(原来为16)
+ 修复了游戏更新导致的问题
- `移除部分不影响游戏逻辑的建造条件`:修复了一些条件未被移除的问题
- `初始化本行星`:修复了崩溃问题
* 1.0.12
+ 修复了当`当可用节点全部造完时停止弹射`选项启用时瞄准偶数轨道的弹射器停止工作的bug
* 1.0.11
@@ -147,6 +163,8 @@
- 可调整游戏窗口大小(可最大化和拖动边框)
- 记住上次退出时的窗口位置和大小
- 在加载和平模式存档时将其转换为战斗模式
- 将元数据提取的最大数量增加到20000(原来为2000)
- 将玩家指令队列的容量增加到128(原来为16)
+ 行星/工厂
- 无限交互距离
- 夜间日光灯

View File

@@ -1,4 +1 @@
#### TODO
* Show coordinates of buildings, on both preview-mode and panel
* Better handling of consuming metadata
* More queued commands

View File

@@ -284,30 +284,68 @@ public class UXAssist : BaseUnityPlugin
}
}
// Can set belt icon tag to float, and increase maximum belt icon tag length to 8
[HarmonyPostfix]
[HarmonyPatch(typeof(UIBeltWindow), nameof(UIBeltWindow._OnCreate))]
private static void UIBeltWindow_OnCreate_Postfix(UIBeltWindow __instance)
// Increase maximum value of property realizing, 2000 -> 20000
[HarmonyTranspiler]
[HarmonyPatch(typeof(UIPropertyEntry), nameof(UIPropertyEntry.UpdateUIElements))]
[HarmonyPatch(typeof(UIPropertyEntry), nameof(UIPropertyEntry.OnRealizeButtonClick))]
[HarmonyPatch(typeof(UIPropertyEntry), nameof(UIPropertyEntry.OnInputValueEnd))]
private static IEnumerable<CodeInstruction> UIProductEntry_UpdateUIElements_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
__instance.iconTagCountInput.contentType = InputField.ContentType.DecimalNumber;
__instance.iconTagCountInput.characterLimit = 8;
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
new CodeMatch(OpCodes.Ldc_I4, 2000)
);
matcher.Repeat(m =>
{
m.SetAndAdvance(OpCodes.Ldc_I4, 20000);
});
return matcher.InstructionEnumeration();
}
[HarmonyTranspiler]
[HarmonyPatch(typeof(UIBeltWindow), nameof(UIBeltWindow._OnUpdate))]
private static IEnumerable<CodeInstruction> UIBeltWindow_OnUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
[HarmonyPatch(typeof(UIPropertyEntry), nameof(UIPropertyEntry.OnInputValueEnd))]
private static IEnumerable<CodeInstruction> UIProductEntry_OnInputValueEnd_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
var matcher = new CodeMatcher(instructions, generator);
matcher.End().MatchBack(false,
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(UIBeltWindow), nameof(UIBeltWindow.iconTagCountInput))),
new CodeMatch(ci => ci.opcode == OpCodes.Ldloca || ci.opcode == OpCodes.Ldloca_S),
new CodeMatch(OpCodes.Call, AccessTools.Method(typeof(float), nameof(float.ToString), []))
matcher.MatchForward(false,
new CodeMatch(ci => ci.opcode == OpCodes.Ldc_R4 && ci.OperandIs(2000f))
);
matcher.Advance(2).InsertAndAdvance(
new CodeInstruction(OpCodes.Ldstr, "G8")
).Set(
OpCodes.Call, AccessTools.Method(typeof(float), nameof(float.ToString), [typeof(string)])
matcher.Repeat(m =>
{
m.SetAndAdvance(OpCodes.Ldc_R4, 20000f);
});
return matcher.InstructionEnumeration();
}
// Increase capacity of player order queue, 16 -> 128
[HarmonyTranspiler]
[HarmonyPatch(typeof(PlayerOrder), MethodType.Constructor, typeof(Player))]
private static IEnumerable<CodeInstruction> PlayerOrder_Constructor_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
new CodeMatch(ci => (ci.opcode == OpCodes.Ldc_I4_S || ci.opcode == OpCodes.Ldc_I4) && ci.OperandIs(16))
);
matcher.Repeat(m =>
{
m.SetAndAdvance(OpCodes.Ldc_I4, 128);
});
return matcher.InstructionEnumeration();
}
[HarmonyTranspiler]
[HarmonyPatch(typeof(PlayerOrder), nameof(PlayerOrder._trimEnd))]
[HarmonyPatch(typeof(PlayerOrder), nameof(PlayerOrder.Enqueue))]
private static IEnumerable<CodeInstruction> PlayerOrder_ExtendCount_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
new CodeMatch(ci => (ci.opcode == OpCodes.Ldc_I4_S || ci.opcode == OpCodes.Ldc_I4) && ci.OperandIs(16))
);
matcher.Repeat(m =>
{
m.SetAndAdvance(OpCodes.Ldc_I4, 128);
});
return matcher.InstructionEnumeration();
}
}

View File

@@ -4,7 +4,7 @@
<TargetFramework>net472</TargetFramework>
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
<Description>DSP MOD - UXAssist</Description>
<Version>1.0.12</Version>
<Version>1.0.13</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<PackageId>UXAssist</PackageId>
@@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="BepInEx.Core" Version="5.*" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
<PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.28.21219-r.0" />
<PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.29.21950-r.0" />
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" />
</ItemGroup>

View File

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