Compare commits
1
Commits
v0.3.0
...
174b9c6976
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
174b9c6976
|
@@ -5,7 +5,7 @@
|
|||||||
<AssemblyName>ShrinkCommand.Runtime</AssemblyName>
|
<AssemblyName>ShrinkCommand.Runtime</AssemblyName>
|
||||||
<RootNamespace>ShrinkCommand</RootNamespace>
|
<RootNamespace>ShrinkCommand</RootNamespace>
|
||||||
<PackageId>ShrinkSDK.Command</PackageId>
|
<PackageId>ShrinkSDK.Command</PackageId>
|
||||||
<Version>0.3.0</Version>
|
<Version>0.4.2</Version>
|
||||||
<Description>ShrinkSDK command parsing, permissions and execution runtime.</Description>
|
<Description>ShrinkSDK command parsing, permissions and execution runtime.</Description>
|
||||||
<ShrinkCodeGenEnabled>false</ShrinkCodeGenEnabled>
|
<ShrinkCodeGenEnabled>false</ShrinkCodeGenEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -13,6 +13,6 @@
|
|||||||
<Compile Include="..\Runtime\**\*.cs" />
|
<Compile Include="..\Runtime\**\*.cs" />
|
||||||
<PackageReference Include="UniTask" Version="2.5.10" />
|
<PackageReference Include="UniTask" Version="2.5.10" />
|
||||||
<PackageReference Include="ShrinkSDK.Runtime.Abstractions" Version="0.1.0" />
|
<PackageReference Include="ShrinkSDK.Runtime.Abstractions" Version="0.1.0" />
|
||||||
<PackageReference Include="ShrinkSDK.CodeGen" Version="0.1.0" PrivateAssets="compile;runtime;contentfiles;native" />
|
<PackageReference Include="ShrinkSDK.CodeGen" Version="0.2.0" PrivateAssets="compile;runtime;contentfiles;native" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -85,3 +85,13 @@ service.RegisterCommands(myCommandInstance);
|
|||||||
- 运行时创建的对象
|
- 运行时创建的对象
|
||||||
- 模组实例
|
- 模组实例
|
||||||
- 需要带状态的命令宿主
|
- 需要带状态的命令宿主
|
||||||
|
|
||||||
|
## 可复用能力
|
||||||
|
|
||||||
|
<!-- shrink:capabilities -->
|
||||||
|
Capability: 路径式命令解析、参数转换、来源权限和帮助输出
|
||||||
|
Aliases: 命令 控制台 控制 指令 权限 command
|
||||||
|
Limits: 不替代游戏行为实现;从网络调用仍需检查命令来源与权限;注册与执行归宿主协调
|
||||||
|
Extension: ShrinkCommandRegistration;RegisterConverter;ShrinkCommandAttribute
|
||||||
|
Evidence: [ShrinkCommandService](Runtime/Core/ShrinkCommandService.cs); [ShrinkCommandRegistration](Runtime/Core/ShrinkCommandService.cs)
|
||||||
|
<!-- /shrink:capabilities -->
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ namespace ShrinkCommand
|
|||||||
RegisterBuiltInCommands();
|
RegisterBuiltInCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IReadOnlyList<(string Path, MethodInfo Handler)> CaptureBindings() => _commands
|
||||||
|
.Select(command => (command.Descriptor.Path, command.Handler.Method)).ToArray();
|
||||||
|
|
||||||
public IReadOnlyList<ShrinkCommandDescriptor> Commands => _commands
|
public IReadOnlyList<ShrinkCommandDescriptor> Commands => _commands
|
||||||
.Select(command => command.Descriptor)
|
.Select(command => command.Descriptor)
|
||||||
.OrderBy(command => command.Path, StringComparer.OrdinalIgnoreCase)
|
.OrderBy(command => command.Path, StringComparer.OrdinalIgnoreCase)
|
||||||
|
|||||||
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "com.cneicy.shrink-command",
|
"name": "com.cneicy.shrink-command",
|
||||||
"version": "0.3.0",
|
"version": "0.4.2",
|
||||||
"displayName": "ShrinkCommand",
|
"displayName": "ShrinkCommand",
|
||||||
"description": "独立于网络层的 Unity 命令系统,提供路径式命令、权限、帮助输出与属性式注册。",
|
"description": "独立于网络层的 Unity 命令系统,提供路径式命令、权限、帮助输出与属性式注册。",
|
||||||
"unity": "2022.3",
|
"unity": "2022.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.cneicy.shrink-shared-codegen": "0.1.1",
|
"com.cneicy.shrink-shared-codegen": "0.2.1",
|
||||||
"com.cysharp.unitask": "2.5.10"
|
"com.cysharp.unitask": "2.5.10"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
Reference in New Issue
Block a user