mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-02-05 00:22:21 +08:00
Work in progress
This commit is contained in:
@@ -144,13 +144,8 @@ public class CheatEnabler : BaseUnityPlugin
|
|||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (VFInput.inputing)
|
if (VFInput.inputing) return;
|
||||||
{
|
if (Hotkey.Value.IsDown()) ToggleConfigWindow();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Hotkey.Value.IsDown())
|
|
||||||
ToggleConfigWindow();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LateUpdate()
|
private void LateUpdate()
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public static class FactoryPatch
|
|||||||
NoConditionEnabled.SettingChanged += (_, _) => NoConditionBuild.Enable(NoConditionEnabled.Value);
|
NoConditionEnabled.SettingChanged += (_, _) => NoConditionBuild.Enable(NoConditionEnabled.Value);
|
||||||
NoCollisionEnabled.SettingChanged += (_, _) => NoCollisionValueChanged();
|
NoCollisionEnabled.SettingChanged += (_, _) => NoCollisionValueChanged();
|
||||||
BeltSignalGeneratorEnabled.SettingChanged += (_, _) => BeltSignalGenerator.Enable(BeltSignalGeneratorEnabled.Value);
|
BeltSignalGeneratorEnabled.SettingChanged += (_, _) => BeltSignalGenerator.Enable(BeltSignalGeneratorEnabled.Value);
|
||||||
BeltSignalNumberAltFormat.SettingChanged += (_, _) => { BeltSignalGenerator.OnAltFormatChanged(); };
|
BeltSignalNumberAltFormat.SettingChanged += (_, _) => BeltSignalGenerator.OnAltFormatChanged();
|
||||||
NightLightEnabled.SettingChanged += (_, _) => NightLight.Enable(NightLightEnabled.Value);
|
NightLightEnabled.SettingChanged += (_, _) => NightLight.Enable(NightLightEnabled.Value);
|
||||||
RemovePowerSpaceLimitEnabled.SettingChanged += (_, _) => RemovePowerSpaceLimit.Enable(RemovePowerSpaceLimitEnabled.Value);
|
RemovePowerSpaceLimitEnabled.SettingChanged += (_, _) => RemovePowerSpaceLimit.Enable(RemovePowerSpaceLimitEnabled.Value);
|
||||||
BoostWindPowerEnabled.SettingChanged += (_, _) => BoostWindPower.Enable(BoostWindPowerEnabled.Value);
|
BoostWindPowerEnabled.SettingChanged += (_, _) => BoostWindPower.Enable(BoostWindPowerEnabled.Value);
|
||||||
@@ -502,13 +502,12 @@ public static class FactoryPatch
|
|||||||
}
|
}
|
||||||
/* search for:
|
/* search for:
|
||||||
* ldloc.s V_88 (88)
|
* ldloc.s V_88 (88)
|
||||||
* ldc.i4.s 15-18
|
* ldc.i4.s 15-19
|
||||||
* stfld valuetype EBuildCondition BuildPreview::condition
|
* stfld valuetype EBuildCondition BuildPreview::condition
|
||||||
*/
|
*/
|
||||||
matcher.Start().MatchForward(false,
|
matcher.Start().MatchForward(false,
|
||||||
new CodeMatch(instr => instr.opcode == OpCodes.Ldloc_S || instr.opcode == OpCodes.Ldloc),
|
new CodeMatch(instr => instr.opcode == OpCodes.Ldloc_S || instr.opcode == OpCodes.Ldloc),
|
||||||
new CodeMatch(instr => (instr.opcode == OpCodes.Ldc_I4_S || instr.opcode == OpCodes.Ldc_I4) &&
|
new CodeMatch(instr => (instr.opcode == OpCodes.Ldc_I4_S || instr.opcode == OpCodes.Ldc_I4) && Convert.ToInt64(instr.operand) is >= 15 and <= 19),
|
||||||
(instr.OperandIs(15) || instr.OperandIs(16) || instr.OperandIs(17) || instr.OperandIs(18))),
|
|
||||||
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(BuildPreview), nameof(BuildPreview.condition)))
|
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(BuildPreview), nameof(BuildPreview.condition)))
|
||||||
);
|
);
|
||||||
if (matcher.IsValid)
|
if (matcher.IsValid)
|
||||||
|
|||||||
Reference in New Issue
Block a user