demo2
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#nullable enable
|
||||
|
||||
using Demo2.Runtime;
|
||||
using ShrinkCommand;
|
||||
using ShrinkModFramework;
|
||||
|
||||
namespace NightShiftProtocol
|
||||
{
|
||||
[ShrinkMod("example.night-shift-protocol", "夜班协议", "1.0.0", AutoApplyHarmonyPatches = false)]
|
||||
public sealed class NightShiftUnityMod : ShrinkModBase
|
||||
{
|
||||
public override void OnRegisterContent(ShrinkModContext context)
|
||||
{
|
||||
context.GetRegistry<Demo2.Domain.IDemo2Mod>(Demo2ModBridge.RegistryName)
|
||||
.Register(context.ModInfo.ModId, context.ModInfo.ModId, new NightShiftContent());
|
||||
}
|
||||
|
||||
public override void OnReady(ShrinkModContext context)
|
||||
{
|
||||
context.Log("Night-shift content registered without per-item callbacks or Harmony ECS patches.");
|
||||
}
|
||||
}
|
||||
|
||||
[ShrinkCommandSubscriber]
|
||||
public static class NightShiftServerCommands
|
||||
{
|
||||
[ShrinkCommand("demo2 night-shift status", Description = "显示夜班协议加载状态", Permission = "demo2.mods.inspect")]
|
||||
private static string Status() => "night-shift-protocol=registered; appliesTo=next-cycle-or-next-game";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user