Skip to content

Commit

Permalink
add snipes/ipc for liza
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Nov 22, 2024
1 parent afa5ebc commit 41c6bed
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Automaton/Features/AutoSnipeQuests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Automaton.Features;

[Tweak]
internal class AutoSnipeQuests : Tweak
{
public override string Name => "Sniper no sniping";
public override string Description => "Automatically completes snipe quests.";

public override void Enable() => P.Memory.SnipeHook.Enable();
public override void Disable() => P.Memory.SnipeHook.Disable();
}
19 changes: 19 additions & 0 deletions Automaton/IPC/Provider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using ECommons.EzIpcManager;

namespace Automaton.IPC;
internal class Provider
{
public Provider() => EzIPC.Init(this);

[EzIPC]
public bool IsTweakEnabled(string assemblyName) => C.EnabledTweaks.Contains(assemblyName);

[EzIPC]
public void SetTweakState(string assemblyName, bool state)
{
if (state)
C.EnabledTweaks.Add(assemblyName);
else
C.EnabledTweaks.Remove(assemblyName);
}
}

0 comments on commit 41c6bed

Please sign in to comment.