28 lines
827 B
C#
28 lines
827 B
C#
using ShrinkCommand;
|
|
using ShrinkEventBus;
|
|
using ShrinkModFramework;
|
|
|
|
[ShrinkMod("fixture.mod", "Fixture Mod", "1.0.0")]
|
|
public sealed class FixtureMod : ShrinkModBase, IShrinkModUnload
|
|
{
|
|
public bool Ready { get; private set; }
|
|
public int UnloadCalls { get; private set; }
|
|
public override void OnReady(ShrinkModContext context) => Ready = true;
|
|
public void OnUnload(ShrinkModContext context) => UnloadCalls++;
|
|
}
|
|
|
|
public readonly struct ModFixtureEvent : IShrinkEvent { }
|
|
|
|
[ShrinkEventSubscriber]
|
|
public static class ModFixtureEvents
|
|
{
|
|
public static int Calls { get; private set; }
|
|
[ShrinkSubscribe] private static void Handle(ModFixtureEvent value) => Calls++;
|
|
}
|
|
|
|
[ShrinkCommandSubscriber]
|
|
public static class ModFixtureCommands
|
|
{
|
|
[ShrinkCommand("mod-fixture/ping")] public static void Ping() { }
|
|
}
|