1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2026-02-05 10:22:19 +08:00

Compare commits

..

2 Commits

Author SHA1 Message Date
51f694a892 work in progress 2025-05-27 14:10:04 +08:00
23aa8c1f13 CheatEnabler: fire all bullets 2025-05-25 23:35:49 +08:00

View File

@@ -194,7 +194,6 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.direction)))
).Advance(2);
var end = matcher.Pos;
CheatEnabler.Logger.LogDebug($"{start} {end}");
matcher.Start().Advance(start).RemoveInstructions(end - start).Insert(
new CodeInstruction(OpCodes.Ldarg_0),
new CodeInstruction(OpCodes.Ldarg_3),
@@ -210,7 +209,6 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
{
var index = swarm.starData.index;
var orbitId = ejector.orbitId;
CheatEnabler.Logger.LogDebug($"AddDysonSail {index} {orbitId}");
var delta1 = endVec - swarm.starData.uPosition;
var delta2 = VectorLF3.Cross(endVec - uPos, swarm.orbits[orbitId].up).normalized * Math.Sqrt(swarm.dysonSphere.gravity / swarm.orbits[orbitId].radius);
var bulletCount = ejector.bulletCount;
@@ -223,7 +221,6 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
SetSailsCacheCapacity(index, 256);
cache = _sailsCache[index];
}
CheatEnabler.Logger.LogDebug("B");
if (_fireAllBullets)
{
var capacity = _sailsCacheCapacity[index];
@@ -234,7 +231,6 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
{
capacity *= 2;
} while (leastCapacity > capacity);
CheatEnabler.Logger.LogDebug($"New Capacity: {capacity}");
SetSailsCacheCapacity(index, capacity);
cache = _sailsCache[index];
}