demo2
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "NightShiftProtocol.Unity",
|
||||
"rootNamespace": "NightShiftProtocol",
|
||||
"references": [
|
||||
"NightShiftProtocol.Rules",
|
||||
"Demo2.Domain",
|
||||
"Demo2.Runtime",
|
||||
"ShrinkModFramework.Runtime",
|
||||
"ShrinkCommand.Runtime"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a727c069198ce2a468b98ee588f5a733
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a79e815068bd88c44a9e0715e3baaef1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user