mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-03-29 01:37:15 +08:00
Compare commits
2 Commits
51f694a892
...
b566256748
| Author | SHA1 | Date | |
|---|---|---|---|
| b566256748 | |||
| f956032596 |
@@ -194,6 +194,7 @@ 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),
|
||||
@@ -209,6 +210,7 @@ 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;
|
||||
@@ -221,6 +223,7 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
SetSailsCacheCapacity(index, 256);
|
||||
cache = _sailsCache[index];
|
||||
}
|
||||
CheatEnabler.Logger.LogDebug("B");
|
||||
if (_fireAllBullets)
|
||||
{
|
||||
var capacity = _sailsCacheCapacity[index];
|
||||
@@ -231,6 +234,7 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
{
|
||||
capacity *= 2;
|
||||
} while (leastCapacity > capacity);
|
||||
CheatEnabler.Logger.LogDebug($"New Capacity: {capacity}");
|
||||
SetSailsCacheCapacity(index, capacity);
|
||||
cache = _sailsCache[index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user