mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-03-22 11:53:25 +08:00
minor fixes
This commit is contained in:
@@ -394,8 +394,9 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
|||||||
}
|
}
|
||||||
swarm.RemoveSolarSail(index);
|
swarm.RemoveSolarSail(index);
|
||||||
}),
|
}),
|
||||||
// return false;
|
// return true;
|
||||||
new CodeInstruction(OpCodes.Ldc_I4_0),
|
// to avoid conflict with QuickAbsorbPatch
|
||||||
|
new CodeInstruction(OpCodes.Ldc_I4_1),
|
||||||
new CodeInstruction(OpCodes.Ret)
|
new CodeInstruction(OpCodes.Ret)
|
||||||
);
|
);
|
||||||
return matcher.InstructionEnumeration();
|
return matcher.InstructionEnumeration();
|
||||||
|
|||||||
@@ -2441,8 +2441,9 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (GameMain.instance.timei < nextTimei) return;
|
var main = GameMain.instance;
|
||||||
nextTimei = GameMain.instance.timei + 12;
|
if (main.timei < nextTimei) return;
|
||||||
|
nextTimei = main.timei + 12;
|
||||||
|
|
||||||
ref var entityData = ref factory.entityPool[entityId];
|
ref var entityData = ref factory.entityPool[entityId];
|
||||||
if (entityData.beltId <= 0) return;
|
if (entityData.beltId <= 0) return;
|
||||||
|
|||||||
@@ -311,14 +311,17 @@ public static class LogisticsPatch
|
|||||||
{
|
{
|
||||||
if (!Input.GetKey(code))
|
if (!Input.GetKey(code))
|
||||||
return false;
|
return false;
|
||||||
|
var main = GameMain.instance;
|
||||||
|
if (main == null)
|
||||||
|
return false;
|
||||||
if (code != _lastKey)
|
if (code != _lastKey)
|
||||||
{
|
{
|
||||||
_lastKey = code;
|
_lastKey = code;
|
||||||
_nextKeyTick = GameMain.instance.timei + 30;
|
_nextKeyTick = main.timei + 30;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var currTick = GameMain.instance.timei;
|
var currTick = main.timei;
|
||||||
if (_nextKeyTick > currTick) return false;
|
if (_nextKeyTick > currTick) return false;
|
||||||
_nextKeyTick = currTick + 4;
|
_nextKeyTick = currTick + 4;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user