mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-02-05 12:22:20 +08:00
Compare commits
2 Commits
b566256748
...
51f694a892
| Author | SHA1 | Date | |
|---|---|---|---|
| 51f694a892 | |||
| 23aa8c1f13 |
@@ -194,7 +194,6 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
|||||||
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.direction)))
|
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.direction)))
|
||||||
).Advance(2);
|
).Advance(2);
|
||||||
var end = matcher.Pos;
|
var end = matcher.Pos;
|
||||||
CheatEnabler.Logger.LogDebug($"{start} {end}");
|
|
||||||
matcher.Start().Advance(start).RemoveInstructions(end - start).Insert(
|
matcher.Start().Advance(start).RemoveInstructions(end - start).Insert(
|
||||||
new CodeInstruction(OpCodes.Ldarg_0),
|
new CodeInstruction(OpCodes.Ldarg_0),
|
||||||
new CodeInstruction(OpCodes.Ldarg_3),
|
new CodeInstruction(OpCodes.Ldarg_3),
|
||||||
@@ -210,7 +209,6 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
|||||||
{
|
{
|
||||||
var index = swarm.starData.index;
|
var index = swarm.starData.index;
|
||||||
var orbitId = ejector.orbitId;
|
var orbitId = ejector.orbitId;
|
||||||
CheatEnabler.Logger.LogDebug($"AddDysonSail {index} {orbitId}");
|
|
||||||
var delta1 = endVec - swarm.starData.uPosition;
|
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 delta2 = VectorLF3.Cross(endVec - uPos, swarm.orbits[orbitId].up).normalized * Math.Sqrt(swarm.dysonSphere.gravity / swarm.orbits[orbitId].radius);
|
||||||
var bulletCount = ejector.bulletCount;
|
var bulletCount = ejector.bulletCount;
|
||||||
@@ -223,7 +221,6 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
|||||||
SetSailsCacheCapacity(index, 256);
|
SetSailsCacheCapacity(index, 256);
|
||||||
cache = _sailsCache[index];
|
cache = _sailsCache[index];
|
||||||
}
|
}
|
||||||
CheatEnabler.Logger.LogDebug("B");
|
|
||||||
if (_fireAllBullets)
|
if (_fireAllBullets)
|
||||||
{
|
{
|
||||||
var capacity = _sailsCacheCapacity[index];
|
var capacity = _sailsCacheCapacity[index];
|
||||||
@@ -234,7 +231,6 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
|||||||
{
|
{
|
||||||
capacity *= 2;
|
capacity *= 2;
|
||||||
} while (leastCapacity > capacity);
|
} while (leastCapacity > capacity);
|
||||||
CheatEnabler.Logger.LogDebug($"New Capacity: {capacity}");
|
|
||||||
SetSailsCacheCapacity(index, capacity);
|
SetSailsCacheCapacity(index, capacity);
|
||||||
cache = _sailsCache[index];
|
cache = _sailsCache[index];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user