mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 02:53:29 +08:00
update MechaDroneTweaks and UniverseGenTweaks
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Reflection.Emit;
|
|||||||
using BepInEx;
|
using BepInEx;
|
||||||
using BepInEx.Configuration;
|
using BepInEx.Configuration;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace MechaDronesTweaks;
|
namespace MechaDronesTweaks;
|
||||||
|
|
||||||
@@ -72,187 +73,123 @@ public static class MechaDronesTweaks
|
|||||||
public static float SpeedMultiplier = 4f;
|
public static float SpeedMultiplier = 4f;
|
||||||
public static float EnergyMultiplier = 0.1f;
|
public static float EnergyMultiplier = 0.1f;
|
||||||
|
|
||||||
[HarmonyTranspiler, HarmonyPatch(typeof(UITechTree), "RefreshDataValueText")]
|
[HarmonyTranspiler]
|
||||||
|
[HarmonyPatch(typeof(ConstructionModuleComponent), nameof(ConstructionModuleComponent.SearchForNewTargets))]
|
||||||
|
[HarmonyPatch(typeof(ConstructionSystem), nameof(ConstructionSystem.UpdateDrones))]
|
||||||
|
[HarmonyPatch(typeof(UIMechaWindow), nameof(UIMechaWindow.UpdateProps))]
|
||||||
|
[HarmonyPatch(typeof(UITechTree), nameof(UITechTree.RefreshDataValueText))]
|
||||||
private static IEnumerable<CodeInstruction> UITechTreeRefreshDataValueText_Transpiler(
|
private static IEnumerable<CodeInstruction> UITechTreeRefreshDataValueText_Transpiler(
|
||||||
IEnumerable<CodeInstruction> instructions)
|
IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
{
|
{
|
||||||
foreach (var instr in instructions)
|
var matcher = new CodeMatcher(instructions, generator);
|
||||||
|
matcher.MatchForward(false,
|
||||||
|
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(GameHistoryData), nameof(GameHistoryData.constructionDroneSpeed)))
|
||||||
|
);
|
||||||
|
if (UseFixedSpeed)
|
||||||
{
|
{
|
||||||
if (instr.opcode == OpCodes.Callvirt &&
|
matcher.Repeat(m => m.Advance(1).InsertAndAdvance(
|
||||||
instr.OperandIs(AccessTools.Method(typeof(Mecha), "get_droneSpeed")))
|
new CodeInstruction(OpCodes.Pop),
|
||||||
|
new CodeInstruction(OpCodes.Ldc_R4, FixedSpeed)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
matcher.Repeat(m => m.Advance(1).InsertAndAdvance(
|
||||||
|
new CodeInstruction(OpCodes.Ldc_R4, SpeedMultiplier),
|
||||||
|
new CodeInstruction(OpCodes.Mul)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
return matcher.InstructionEnumeration();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyTranspiler]
|
||||||
|
[HarmonyPatch(typeof(ConstructionModuleComponent), nameof(ConstructionModuleComponent.EjectBaseDrone))]
|
||||||
|
[HarmonyPatch(typeof(ConstructionModuleComponent), nameof(ConstructionModuleComponent.EjectMechaDrone))]
|
||||||
|
private static IEnumerable<CodeInstruction> MechaUpdateTargets_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
|
{
|
||||||
|
var matcher = new CodeMatcher(instructions, generator);
|
||||||
|
if (!SkipStage1)
|
||||||
|
return matcher.InstructionEnumeration();
|
||||||
|
matcher.MatchForward(false,
|
||||||
|
new CodeMatch(OpCodes.Ldc_I4_1),
|
||||||
|
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(DroneComponent), nameof(DroneComponent.stage)))
|
||||||
|
).Operand = 2;
|
||||||
|
return matcher.InstructionEnumeration();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyTranspiler, HarmonyPatch(typeof(ConstructionSystem), nameof(ConstructionSystem.UpdateDrones))]
|
||||||
|
private static IEnumerable<CodeInstruction> MechaUpdateDrones_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
|
{
|
||||||
|
var matcher = new CodeMatcher(instructions, generator);
|
||||||
|
if (EnergyMultiplier >= 1f)
|
||||||
|
return matcher.InstructionEnumeration();
|
||||||
|
matcher.MatchForward(false,
|
||||||
|
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(ModeConfig), nameof(ModeConfig.droneEnergyPerMeter)))
|
||||||
|
).Advance(1).Insert(
|
||||||
|
new CodeInstruction(OpCodes.Ldc_R8, (double)EnergyMultiplier),
|
||||||
|
new CodeInstruction(OpCodes.Mul)
|
||||||
|
);
|
||||||
|
return matcher.InstructionEnumeration();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyTranspiler]
|
||||||
|
// ref CraftData craft, PlanetFactory factory, ref Vector3 ejectPos, float droneSpeed, float dt, ref double mechaEnergy, ref double mechaEnergyChange, double flyEnergyRate, double repairEnergyCost, out float energyRatio
|
||||||
|
[HarmonyPatch(typeof(DroneComponent), nameof(DroneComponent.InternalUpdate), new[] { typeof(CraftData), typeof(PlanetFactory), typeof(Vector3), typeof(float), typeof(float), typeof(double), typeof(double), typeof(double), typeof(double), typeof(float) }, new[] { ArgumentType.Ref, ArgumentType.Normal, ArgumentType.Ref, ArgumentType.Normal, ArgumentType.Normal, ArgumentType.Ref, ArgumentType.Ref, ArgumentType.Normal, ArgumentType.Normal, ArgumentType.Out })]
|
||||||
|
// ref CraftData craft, PlanetFactory factory, Vector3 ejectPos, float droneSpeed, float dt, ref long energy, double flyEnergyRate, double repairEnergyCost, out float energyRatio
|
||||||
|
[HarmonyPatch(typeof(DroneComponent), nameof(DroneComponent.InternalUpdate), new[] { typeof(CraftData), typeof(PlanetFactory), typeof(Vector3), typeof(float), typeof(float), typeof(long), typeof(double), typeof(double), typeof(float) }, new[] { ArgumentType.Ref, ArgumentType.Normal, ArgumentType.Normal, ArgumentType.Normal, ArgumentType.Normal, ArgumentType.Ref, ArgumentType.Normal, ArgumentType.Normal, ArgumentType.Out })]
|
||||||
|
private static IEnumerable<CodeInstruction> MechaDroneUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
|
{
|
||||||
|
var matcher = new CodeMatcher(instructions, generator);
|
||||||
|
|
||||||
|
if (RemoveSpeedLimitForStage1)
|
||||||
|
{
|
||||||
|
matcher.MatchForward(false,
|
||||||
|
new CodeMatch(instr => instr.opcode == OpCodes.Ldc_R4 && instr.OperandIs(1f)),
|
||||||
|
new CodeMatch(instr => instr.opcode == OpCodes.Ldc_R4 && instr.OperandIs(3f))
|
||||||
|
);
|
||||||
|
matcher.Advance(1).Operand = 10000f;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!UseFixedSpeed && Math.Abs(SpeedMultiplier - 1.0f) < 0.01f)
|
||||||
|
return matcher.InstructionEnumeration();
|
||||||
|
|
||||||
|
matcher.Start().MatchForward(false,
|
||||||
|
new CodeMatch(OpCodes.Ldarg_0),
|
||||||
|
new CodeMatch(OpCodes.Ldc_R4),
|
||||||
|
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(DroneComponent), nameof(DroneComponent.progress)))
|
||||||
|
);
|
||||||
|
matcher.Repeat(m =>
|
||||||
|
{
|
||||||
|
if (m.InstructionAt(1).OperandIs(0f))
|
||||||
|
{
|
||||||
|
m.InstructionAt(3).labels = m.Labels;
|
||||||
|
m.RemoveInstructions(3);
|
||||||
|
}
|
||||||
|
else if (m.InstructionAt(1).OperandIs(1f))
|
||||||
|
{
|
||||||
|
m.Advance(1).Operand = 0f;
|
||||||
|
m.Advance(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
matcher.Start().MatchForward(false,
|
||||||
|
new CodeMatch(instr => instr.opcode == OpCodes.Ldc_R4 && instr.OperandIs(0.5f))
|
||||||
|
);
|
||||||
|
matcher.Repeat(m =>
|
||||||
{
|
{
|
||||||
if (UseFixedSpeed)
|
if (UseFixedSpeed)
|
||||||
{
|
{
|
||||||
yield return new CodeInstruction(OpCodes.Pop);
|
if (FixedSpeed > 75f)
|
||||||
yield return new CodeInstruction(OpCodes.Ldc_R4, FixedSpeed);
|
{
|
||||||
|
m.Operand = 0.5f * FixedSpeed / 75f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
yield return instr;
|
m.Operand = 0.5f * SpeedMultiplier;
|
||||||
yield return new CodeInstruction(OpCodes.Ldc_R4, SpeedMultiplier);
|
|
||||||
yield return new CodeInstruction(OpCodes.Mul);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
);
|
||||||
{
|
return matcher.InstructionEnumeration();
|
||||||
yield return instr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyTranspiler, HarmonyPatch(typeof(MechaDroneLogic), "UpdateTargets")]
|
|
||||||
private static IEnumerable<CodeInstruction> MechaUpdateTargets_Transpiler(IEnumerable<CodeInstruction> instructions)
|
|
||||||
{
|
|
||||||
if (SkipStage1)
|
|
||||||
{
|
|
||||||
var ilist = instructions.ToList();
|
|
||||||
for (var i = 0; i < ilist.Count; i++)
|
|
||||||
{
|
|
||||||
var instr = ilist[i];
|
|
||||||
if (instr.opcode == OpCodes.Ldc_I4_1)
|
|
||||||
{
|
|
||||||
var instrNext = ilist[i + 1];
|
|
||||||
if (instrNext.opcode == OpCodes.Stfld &&
|
|
||||||
instrNext.OperandIs(AccessTools.Field(typeof(MechaDrone), "stage")))
|
|
||||||
{
|
|
||||||
instr.opcode = OpCodes.Ldc_I4_2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
yield return instr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (var instr in instructions)
|
|
||||||
{
|
|
||||||
yield return instr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyTranspiler, HarmonyPatch(typeof(MechaDroneLogic), "UpdateDrones")]
|
|
||||||
private static IEnumerable<CodeInstruction> MechaUpdateDrones_Transpiler(IEnumerable<CodeInstruction> instructions)
|
|
||||||
{
|
|
||||||
if (EnergyMultiplier >= 1f)
|
|
||||||
{
|
|
||||||
foreach (var instr in instructions)
|
|
||||||
{
|
|
||||||
yield return instr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (var instr in instructions)
|
|
||||||
{
|
|
||||||
yield return instr;
|
|
||||||
if (instr.opcode != OpCodes.Ldfld ||
|
|
||||||
!instr.OperandIs(AccessTools.Field(typeof(Mecha), "droneEnergyPerMeter"))) continue;
|
|
||||||
yield return new CodeInstruction(OpCodes.Ldc_R8, (double)EnergyMultiplier);
|
|
||||||
yield return new CodeInstruction(OpCodes.Mul);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyTranspiler, HarmonyPatch(typeof(MechaDrone), "Update")]
|
|
||||||
private static IEnumerable<CodeInstruction> MechaDroneUpdate_Transpiler(IEnumerable<CodeInstruction> instructions)
|
|
||||||
{
|
|
||||||
if (!UseFixedSpeed && Math.Abs(SpeedMultiplier - 1.0f) < 0.01f)
|
|
||||||
{
|
|
||||||
foreach (var instr in instructions)
|
|
||||||
{
|
|
||||||
yield return instr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var ilist = instructions.ToList();
|
|
||||||
for (var i = 0; i < ilist.Count; i++)
|
|
||||||
{
|
|
||||||
var instr = ilist[i];
|
|
||||||
if (instr.opcode == OpCodes.Ldarg_0)
|
|
||||||
{
|
|
||||||
var instrNext = ilist[i + 1];
|
|
||||||
if (instrNext.opcode == OpCodes.Ldfld &&
|
|
||||||
instrNext.OperandIs(AccessTools.Field(typeof(MechaDrone), "speed")))
|
|
||||||
{
|
|
||||||
if (UseFixedSpeed)
|
|
||||||
{
|
|
||||||
var newInstr = new CodeInstruction(instr)
|
|
||||||
{
|
|
||||||
opcode = OpCodes.Ldc_R4,
|
|
||||||
operand = FixedSpeed
|
|
||||||
};
|
|
||||||
yield return newInstr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
yield return instr;
|
|
||||||
yield return instrNext;
|
|
||||||
yield return new CodeInstruction(OpCodes.Ldc_R4, SpeedMultiplier);
|
|
||||||
yield return new CodeInstruction(OpCodes.Mul);
|
|
||||||
}
|
|
||||||
|
|
||||||
i++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (instrNext.opcode == OpCodes.Ldc_R4)
|
|
||||||
{
|
|
||||||
if (instrNext.OperandIs(0f))
|
|
||||||
{
|
|
||||||
var instrNext2 = ilist[i + 2];
|
|
||||||
if (instrNext2.opcode == OpCodes.Stfld &&
|
|
||||||
instrNext2.OperandIs(AccessTools.Field(typeof(MechaDrone), "progress")))
|
|
||||||
{
|
|
||||||
ilist[i + 3].labels = instr.labels;
|
|
||||||
i += 2;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (instrNext.OperandIs(1f))
|
|
||||||
{
|
|
||||||
var instrNext2 = ilist[i + 2];
|
|
||||||
if (instrNext2.opcode == OpCodes.Stfld &&
|
|
||||||
instrNext2.OperandIs(AccessTools.Field(typeof(MechaDrone), "progress")))
|
|
||||||
{
|
|
||||||
instrNext.operand = 0f;
|
|
||||||
yield return instr;
|
|
||||||
yield return instrNext;
|
|
||||||
yield return instrNext2;
|
|
||||||
i += 2;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (instr.opcode == OpCodes.Ldc_R4)
|
|
||||||
{
|
|
||||||
if (instr.OperandIs(0.5f))
|
|
||||||
{
|
|
||||||
if (UseFixedSpeed)
|
|
||||||
{
|
|
||||||
if (FixedSpeed > 75f)
|
|
||||||
{
|
|
||||||
instr.operand = 0.5f * FixedSpeed / 75f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
instr.operand = 0.5f * SpeedMultiplier;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (instr.OperandIs(3f))
|
|
||||||
{
|
|
||||||
if (RemoveSpeedLimitForStage1)
|
|
||||||
{
|
|
||||||
instr.operand = 10000f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
yield return instr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<AssemblyName>MechaDronesTweaks</AssemblyName>
|
<AssemblyName>MechaDronesTweaks</AssemblyName>
|
||||||
<BepInExPluginGuid>org.soardev.mechadronestweaks</BepInExPluginGuid>
|
<BepInExPluginGuid>org.soardev.mechadronestweaks</BepInExPluginGuid>
|
||||||
<Description>DSP MOD - MechaDronesTweaks</Description>
|
<Description>DSP MOD - MechaDronesTweaks</Description>
|
||||||
<Version>1.1.2</Version>
|
<Version>1.1.3</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<RestoreAdditionalProjectSources>https://nuget.bepinex.dev/v3/index.json</RestoreAdditionalProjectSources>
|
<RestoreAdditionalProjectSources>https://nuget.bepinex.dev/v3/index.json</RestoreAdditionalProjectSources>
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
#### 机甲建设机调整(FastDrones MOD的后继者)
|
#### 机甲建设机调整(FastDrones MOD的后继者)
|
||||||
|
|
||||||
## Updates
|
## Updates
|
||||||
|
* 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
|
||||||
|
|
||||||
* 1.1.2
|
* 1.1.2
|
||||||
+ `RemoveBuildRangeLimit`, `LargerAreaForUpgradeAndDismantle` and `LargerAreaForTerraform` are moved to [UXAssist](https://dsp.thunderstore.io/package/soarqin/UXAssist)
|
+ `RemoveBuildRangeLimit`, `LargerAreaForUpgradeAndDismantle` and `LargerAreaForTerraform` are moved to [UXAssist](https://dsp.thunderstore.io/package/soarqin/UXAssist)
|
||||||
@@ -32,6 +35,9 @@
|
|||||||
* Note: This MOD will disable `FastDrones` if the MOD is installed, to avoid conflict in functions.
|
* Note: This MOD will disable `FastDrones` if the MOD is installed, to avoid conflict in functions.
|
||||||
|
|
||||||
## 更新日志
|
## 更新日志
|
||||||
|
* 1.1.3
|
||||||
|
+ 支持游戏版本0.10.28.20759+
|
||||||
|
+ 修复了当`UseFixedSpeed`设置为false且`SpeedMultiplier`设置为1时`RemoveSpeedLimitForStage1`无效的问题
|
||||||
|
|
||||||
* 1.1.2
|
* 1.1.2
|
||||||
+ `RemoveBuildRangeLimit`, `LargerAreaForUpgradeAndDismantle` 和 `LargerAreaForTerraform` 移动到了 MOD [UXAssist](https://dsp.thunderstore.io/package/soarqin/UXAssist) 中
|
+ `RemoveBuildRangeLimit`, `LargerAreaForUpgradeAndDismantle` 和 `LargerAreaForTerraform` 移动到了 MOD [UXAssist](https://dsp.thunderstore.io/package/soarqin/UXAssist) 中
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "MechaDronesTweaks",
|
"name": "MechaDronesTweaks",
|
||||||
"version_number": "1.1.2",
|
"version_number": "1.1.3",
|
||||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/MechaDronesTweaks",
|
"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的后继者)",
|
"description": "Some tweaks for mecha drones and build functions(Successor to FastDrones MOD) / 机甲建设机和建设功能调整(FastDrones MOD的后继者)",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|||||||
@@ -243,7 +243,28 @@ public class MoreSettings
|
|||||||
var matcher = new CodeMatcher(instructions, generator);
|
var matcher = new CodeMatcher(instructions, generator);
|
||||||
matcher.MatchForward(false,
|
matcher.MatchForward(false,
|
||||||
new CodeMatch(ci => ci.opcode == OpCodes.Ldc_I4 && ci.OperandIs(25700))
|
new CodeMatch(ci => ci.opcode == OpCodes.Ldc_I4 && ci.OperandIs(25700))
|
||||||
).Repeat(m => m.SetAndAdvance(OpCodes.Ldsfld, AccessTools.Field(typeof(MoreSettings), nameof(MoreSettings.MaxStarCount))).Insert(
|
);
|
||||||
|
matcher.Repeat(m => m.SetAndAdvance(OpCodes.Ldsfld, AccessTools.Field(typeof(MoreSettings), nameof(MoreSettings.MaxStarCount))).Insert(
|
||||||
|
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(ConfigEntry<int>), nameof(ConfigEntry<int>.Value))),
|
||||||
|
new CodeInstruction(OpCodes.Ldc_I4_1),
|
||||||
|
new CodeInstruction(OpCodes.Add),
|
||||||
|
new CodeInstruction(OpCodes.Ldc_I4_S, 100),
|
||||||
|
new CodeInstruction(OpCodes.Mul)
|
||||||
|
));
|
||||||
|
return matcher.InstructionEnumeration();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyTranspiler]
|
||||||
|
[HarmonyPatch(typeof(SectorModel), nameof(SectorModel.CreateGalaxyAstroBuffer))]
|
||||||
|
[HarmonyPatch(typeof(SpaceColliderLogic), nameof(SpaceColliderLogic.UpdateCollidersPose))]
|
||||||
|
private static IEnumerable<CodeInstruction> SectorModel_CreateGalaxyAstroBuffer_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
|
{
|
||||||
|
// 25600 -> (MaxStarCount.Value + 1) * 100
|
||||||
|
var matcher = new CodeMatcher(instructions, generator);
|
||||||
|
matcher.MatchForward(false,
|
||||||
|
new CodeMatch(ci => ci.opcode == OpCodes.Ldc_I4 && ci.OperandIs(25600))
|
||||||
|
);
|
||||||
|
matcher.Repeat(m => m.SetAndAdvance(OpCodes.Ldsfld, AccessTools.Field(typeof(MoreSettings), nameof(MoreSettings.MaxStarCount))).Insert(
|
||||||
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(ConfigEntry<int>), nameof(ConfigEntry<int>.Value))),
|
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(ConfigEntry<int>), nameof(ConfigEntry<int>.Value))),
|
||||||
new CodeInstruction(OpCodes.Ldc_I4_1),
|
new CodeInstruction(OpCodes.Ldc_I4_1),
|
||||||
new CodeInstruction(OpCodes.Add),
|
new CodeInstruction(OpCodes.Add),
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
#### 宇宙生成参数调节
|
#### 宇宙生成参数调节
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
* 1.2.4
|
||||||
|
+ Fix a crash while setting star count greater than 256 (again)
|
||||||
|
+ Fix bug that collider check is not enabled on stars with ID greater than 255
|
||||||
* 1.2.3
|
* 1.2.3
|
||||||
+ Fix a crash while setting star count greater than 256
|
+ Fix a crash while setting star count greater than 256
|
||||||
* 1.2.2
|
* 1.2.2
|
||||||
@@ -35,6 +38,9 @@
|
|||||||
* High luminosity for birth star
|
* High luminosity for birth star
|
||||||
|
|
||||||
## 更新日志
|
## 更新日志
|
||||||
|
* 1.2.4
|
||||||
|
+ 修复了设置星系数大于256时崩溃的问题(再次)
|
||||||
|
+ 修复了ID大于255的星系没有启用碰撞体检测的问题
|
||||||
* 1.2.3
|
* 1.2.3
|
||||||
+ 修复了设置星系数大于256时崩溃的问题
|
+ 修复了设置星系数大于256时崩溃的问题
|
||||||
* 1.2.2
|
* 1.2.2
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<AssemblyName>UniverseGenTweaks</AssemblyName>
|
<AssemblyName>UniverseGenTweaks</AssemblyName>
|
||||||
<BepInExPluginGuid>org.soardev.universegentweaks</BepInExPluginGuid>
|
<BepInExPluginGuid>org.soardev.universegentweaks</BepInExPluginGuid>
|
||||||
<Description>DSP MOD - UniverseGenTweaks</Description>
|
<Description>DSP MOD - UniverseGenTweaks</Description>
|
||||||
<Version>1.2.3</Version>
|
<Version>1.2.4</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<RestoreAdditionalProjectSources>https://nuget.bepinex.dev/v3/index.json</RestoreAdditionalProjectSources>
|
<RestoreAdditionalProjectSources>https://nuget.bepinex.dev/v3/index.json</RestoreAdditionalProjectSources>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "UniverseGenTweaks",
|
"name": "UniverseGenTweaks",
|
||||||
"version_number": "1.2.3",
|
"version_number": "1.2.4",
|
||||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UniverseGenTweaks",
|
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UniverseGenTweaks",
|
||||||
"description": "Universe Generation Tweaks / 宇宙生成参数调节",
|
"description": "Universe Generation Tweaks / 宇宙生成参数调节",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|||||||
Reference in New Issue
Block a user