Define portable Eve world identity and input contracts
This commit is contained in:
parent
838a5ac923
commit
cf9a8652a3
6 changed files with 102 additions and 2 deletions
|
|
@ -0,0 +1,17 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<AssemblyName>GameCult.Eve.Surface</AssemblyName>
|
||||||
|
<Description>Portable Eve surface, provider, input, plugin, and entity-view contracts.</Description>
|
||||||
|
<CultLibRoot Condition="'$(CultLibRoot)' == ''">$(MSBuildThisFileDirectory)..\..\..\CultLib</CultLibRoot>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Runtime\EveCultMeshSurfaceSelection.cs" />
|
||||||
|
<ProjectReference Include="$(CultLibRoot)\src\GameCult.Caching\GameCult.Caching.csproj" />
|
||||||
|
<ProjectReference Include="$(CultLibRoot)\src\GameCult.Mesh\GameCult.Mesh.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8a186b6d206ffa847aa276e984162512
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -5,10 +5,11 @@
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Description>Portable Eve surface and provider contracts.</Description>
|
<Description>Portable Eve surface and provider contracts.</Description>
|
||||||
|
<CultLibRoot Condition="'$(CultLibRoot)' == ''">$(MSBuildThisFileDirectory)..\..\..\CultLib</CultLibRoot>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\CultLib\src\GameCult.Caching\GameCult.Caching.csproj" />
|
<ProjectReference Include="$(CultLibRoot)\src\GameCult.Caching\GameCult.Caching.csproj" />
|
||||||
<ProjectReference Include="..\..\..\CultLib\src\GameCult.Mesh\GameCult.Mesh.csproj" />
|
<ProjectReference Include="$(CultLibRoot)\src\GameCult.Mesh\GameCult.Mesh.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,20 @@ namespace GameCult.Eve.Surface
|
||||||
[Key(9)] public EveEntitySoaColumn[] Columns { get; set; } = Array.Empty<EveEntitySoaColumn>();
|
[Key(9)] public EveEntitySoaColumn[] Columns { get; set; } = Array.Empty<EveEntitySoaColumn>();
|
||||||
[Key(10)] public EveEntitySoaDirtyRange[] DirtyRanges { get; set; } = Array.Empty<EveEntitySoaDirtyRange>();
|
[Key(10)] public EveEntitySoaDirtyRange[] DirtyRanges { get; set; } = Array.Empty<EveEntitySoaDirtyRange>();
|
||||||
[Key(11)] public EveEntityRenderGroup[] RenderGroups { get; set; } = Array.Empty<EveEntityRenderGroup>();
|
[Key(11)] public EveEntityRenderGroup[] RenderGroups { get; set; } = Array.Empty<EveEntityRenderGroup>();
|
||||||
|
[Key(12)] public EveEntitySoaIdentity[] Identities { get; set; } = Array.Empty<EveEntitySoaIdentity>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject]
|
||||||
|
public sealed class EveEntitySoaIdentity
|
||||||
|
{
|
||||||
|
[Key(0)] public int EntityIndex { get; set; } = -1;
|
||||||
|
[Key(1)] public string EntityId { get; set; } = "";
|
||||||
|
[Key(2)] public string Kind { get; set; } = "";
|
||||||
|
[Key(3)] public string Label { get; set; } = "";
|
||||||
|
[Key(4)] public string Faction { get; set; } = "";
|
||||||
|
[Key(5)] public bool Selectable { get; set; } = true;
|
||||||
|
[Key(6)] public bool Controllable { get; set; }
|
||||||
|
[Key(7)] public string AssetRef { get; set; } = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
[MessagePackObject]
|
[MessagePackObject]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using GameCult.Caching;
|
||||||
|
using MessagePack;
|
||||||
|
|
||||||
|
namespace GameCult.Eve.Surface
|
||||||
|
{
|
||||||
|
[CultDocument("gamecult.eve.input_capability", SchemaId)]
|
||||||
|
[MessagePackObject]
|
||||||
|
public sealed class EveInputCapabilityDocument
|
||||||
|
{
|
||||||
|
public const string SchemaId = "gamecult.eve.input_capability.v1";
|
||||||
|
[Key(0)] public string Schema { get; set; } = SchemaId;
|
||||||
|
[Key(1)] public string ProviderId { get; set; } = "";
|
||||||
|
[Key(2)] public string CapabilityId { get; set; } = "";
|
||||||
|
[Key(3)] public long Version { get; set; }
|
||||||
|
[Key(4)] public EveInputActionDocument[] Actions { get; set; } = Array.Empty<EveInputActionDocument>();
|
||||||
|
[Key(5)] public EveInputProfileDocument[] DefaultProfiles { get; set; } = Array.Empty<EveInputProfileDocument>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject]
|
||||||
|
public sealed class EveInputActionDocument
|
||||||
|
{
|
||||||
|
[Key(0)] public string ActionId { get; set; } = "";
|
||||||
|
[Key(1)] public string Label { get; set; } = "";
|
||||||
|
[Key(2)] public string Operation { get; set; } = "";
|
||||||
|
[Key(3)] public string Context { get; set; } = "pilot";
|
||||||
|
[Key(4)] public string Category { get; set; } = "ship";
|
||||||
|
[Key(5)] public string Availability { get; set; } = "available";
|
||||||
|
[Key(6)] public string SourceRef { get; set; } = "";
|
||||||
|
[Key(7)] public Dictionary<string, string> Payload { get; set; } = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject]
|
||||||
|
public sealed class EveInputProfileDocument
|
||||||
|
{
|
||||||
|
[Key(0)] public string ProfileId { get; set; } = "";
|
||||||
|
[Key(1)] public string DeviceClass { get; set; } = "";
|
||||||
|
[Key(2)] public EveInputBindingDocument[] Bindings { get; set; } = Array.Empty<EveInputBindingDocument>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject]
|
||||||
|
public sealed class EveInputBindingDocument
|
||||||
|
{
|
||||||
|
[Key(0)] public string BindingId { get; set; } = "";
|
||||||
|
[Key(1)] public string ActionId { get; set; } = "";
|
||||||
|
[Key(2)] public EveInputGestureDocument Gesture { get; set; } = new EveInputGestureDocument();
|
||||||
|
[Key(3)] public bool ActionBar { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject]
|
||||||
|
public sealed class EveInputGestureDocument
|
||||||
|
{
|
||||||
|
[Key(0)] public string Kind { get; set; } = "direct";
|
||||||
|
[Key(1)] public string[] Controls { get; set; } = Array.Empty<string>();
|
||||||
|
[Key(2)] public int MaxStepIntervalMs { get; set; } = 650;
|
||||||
|
[Key(3)] public string CompletionControl { get; set; } = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4c297c7dbb64a0f49a7f805e770c5e55
|
||||||
Reference in a new issue