mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 18:26:23 +00:00
update
This commit is contained in:
11
luban_examples/Projects/CfgValidator/AssertExtensions.cs
Normal file
11
luban_examples/Projects/CfgValidator/AssertExtensions.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using CfgCheck;
|
||||
|
||||
namespace CfgCheck
|
||||
{
|
||||
public static class AssertExtensions
|
||||
{
|
||||
|
||||
}
|
||||
}
|
39
luban_examples/Projects/CfgValidator/CfgValidator.csproj
Normal file
39
luban_examples/Projects/CfgValidator/CfgValidator.csproj
Normal file
@@ -0,0 +1,39 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<NoWarn>8669</NoWarn>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Misc\**" />
|
||||
<EmbeddedResource Remove="Misc\**" />
|
||||
<None Remove="Misc\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove=".cache.meta" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bright.Core" Version="1.1.0.35" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
|
||||
<PackageReference Include="coverlet.collector" Version="1.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
25
luban_examples/Projects/CfgValidator/CfgValidator.sln
Normal file
25
luban_examples/Projects/CfgValidator/CfgValidator.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30104.148
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CfgValidator", "CfgValidator.csproj", "{F1B77CC1-CAEF-44A8-9AA2-F3B485BA8201}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F1B77CC1-CAEF-44A8-9AA2-F3B485BA8201}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F1B77CC1-CAEF-44A8-9AA2-F3B485BA8201}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F1B77CC1-CAEF-44A8-9AA2-F3B485BA8201}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F1B77CC1-CAEF-44A8-9AA2-F3B485BA8201}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {6E9D8CDD-0F67-4703-89F0-A4E03F4D9FFF}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
52
luban_examples/Projects/CfgValidator/ConfigSetUp.cs
Normal file
52
luban_examples/Projects/CfgValidator/ConfigSetUp.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Bright.Serialization;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using CfgCheck;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace CfgCheck
|
||||
{
|
||||
[TestClass]
|
||||
public class ConfigSetUp
|
||||
{
|
||||
public static cfg.Tables Configs { get; set; }
|
||||
|
||||
[AssemblyInitialize]
|
||||
public static void Initialize(TestContext testContext)
|
||||
{
|
||||
LoadConfig();
|
||||
}
|
||||
|
||||
public static void LoadConfig()
|
||||
{
|
||||
Configs = new cfg.Tables(LoadJson);
|
||||
}
|
||||
|
||||
private static JsonElement LoadJson(string file)
|
||||
{
|
||||
var configDir = "../../../../../Projects/GenerateDatas/json";
|
||||
return JsonDocument.Parse(File.ReadAllBytes(Path.Combine(configDir, file + ".json"))).RootElement;
|
||||
}
|
||||
|
||||
[AssemblyCleanup]
|
||||
public static void CleanUp()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
22
luban_examples/Projects/CfgValidator/Gen/AudioType.cs
Normal file
22
luban_examples/Projects/CfgValidator/Gen/AudioType.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg
|
||||
{
|
||||
public enum AudioType
|
||||
{
|
||||
UNKNOWN = 0,
|
||||
ACC = 1,
|
||||
AIFF = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
120
luban_examples/Projects/CfgValidator/Gen/DefineFromExcel2.cs
Normal file
120
luban_examples/Projects/CfgValidator/Gen/DefineFromExcel2.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg
|
||||
{
|
||||
public sealed partial class DefineFromExcel2 : Luban.BeanBase
|
||||
{
|
||||
public DefineFromExcel2(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
X1 = _buf.GetProperty("x1").GetBoolean();
|
||||
X5 = _buf.GetProperty("x5").GetInt64();
|
||||
X6 = _buf.GetProperty("x6").GetSingle();
|
||||
X8 = _buf.GetProperty("x8").GetInt32();
|
||||
X10 = _buf.GetProperty("x10").GetString();
|
||||
X13 = (test.DemoEnum)_buf.GetProperty("x13").GetInt32();
|
||||
X132 = (test.DemoFlag)_buf.GetProperty("x13_2").GetInt32();
|
||||
X14 = test.DemoDynamic.DeserializeDemoDynamic(_buf.GetProperty("x14"));
|
||||
X15 = test.Shape.DeserializeShape(_buf.GetProperty("x15"));
|
||||
V2 = vec2.Deserializevec2(_buf.GetProperty("v2"));
|
||||
T1 = _buf.GetProperty("t1").GetInt64();
|
||||
{ var __json0 = _buf.GetProperty("k1"); int _n0 = __json0.GetArrayLength(); K1 = new int[_n0]; int __index0=0; foreach(JsonElement __e0 in __json0.EnumerateArray()) { int __v0; __v0 = __e0.GetInt32(); K1[__index0++] = __v0; } }
|
||||
{ var __json0 = _buf.GetProperty("k2"); int _n0 = __json0.GetArrayLength(); K2 = new int[_n0]; int __index0=0; foreach(JsonElement __e0 in __json0.EnumerateArray()) { int __v0; __v0 = __e0.GetInt32(); K2[__index0++] = __v0; } }
|
||||
{ var __json0 = _buf.GetProperty("k8"); K8 = new System.Collections.Generic.Dictionary<int, int>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { int _k0; _k0 = __e0[0].GetInt32(); int _v0; _v0 = __e0[1].GetInt32(); K8.Add(_k0, _v0); } }
|
||||
{ var __json0 = _buf.GetProperty("k9"); K9 = new System.Collections.Generic.List<test.DemoE2>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { test.DemoE2 __v0; __v0 = test.DemoE2.DeserializeDemoE2(__e0); K9.Add(__v0); } }
|
||||
{ var __json0 = _buf.GetProperty("k10"); K10 = new System.Collections.Generic.List<vec3>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { vec3 __v0; __v0 = vec3.Deserializevec3(__e0); K10.Add(__v0); } }
|
||||
{ var __json0 = _buf.GetProperty("k11"); K11 = new System.Collections.Generic.List<vec4>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { vec4 __v0; __v0 = vec4.Deserializevec4(__e0); K11.Add(__v0); } }
|
||||
}
|
||||
|
||||
public static DefineFromExcel2 DeserializeDefineFromExcel2(JsonElement _buf)
|
||||
{
|
||||
return new DefineFromExcel2(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 这是id
|
||||
/// </summary>
|
||||
public readonly int Id;
|
||||
/// <summary>
|
||||
/// 字段x1
|
||||
/// </summary>
|
||||
public readonly bool X1;
|
||||
public readonly long X5;
|
||||
public readonly float X6;
|
||||
public readonly int X8;
|
||||
public readonly string X10;
|
||||
public readonly test.DemoEnum X13;
|
||||
public readonly test.DemoFlag X132;
|
||||
public readonly test.DemoDynamic X14;
|
||||
public readonly test.Shape X15;
|
||||
public readonly vec2 V2;
|
||||
public readonly long T1;
|
||||
public readonly int[] K1;
|
||||
public readonly int[] K2;
|
||||
public readonly System.Collections.Generic.Dictionary<int, int> K8;
|
||||
public readonly System.Collections.Generic.List<test.DemoE2> K9;
|
||||
public readonly System.Collections.Generic.List<vec3> K10;
|
||||
public readonly System.Collections.Generic.List<vec4> K11;
|
||||
|
||||
public const int __ID__ = 482045152;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
X14?.ResolveRef(tables);
|
||||
X15?.ResolveRef(tables);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "x1:" + X1 + ","
|
||||
+ "x5:" + X5 + ","
|
||||
+ "x6:" + X6 + ","
|
||||
+ "x8:" + X8 + ","
|
||||
+ "x10:" + X10 + ","
|
||||
+ "x13:" + X13 + ","
|
||||
+ "x132:" + X132 + ","
|
||||
+ "x14:" + X14 + ","
|
||||
+ "x15:" + X15 + ","
|
||||
+ "v2:" + V2 + ","
|
||||
+ "t1:" + T1 + ","
|
||||
+ "k1:" + Luban.StringUtil.CollectionToString(K1) + ","
|
||||
+ "k2:" + Luban.StringUtil.CollectionToString(K2) + ","
|
||||
+ "k8:" + Luban.StringUtil.CollectionToString(K8) + ","
|
||||
+ "k9:" + Luban.StringUtil.CollectionToString(K9) + ","
|
||||
+ "k10:" + Luban.StringUtil.CollectionToString(K10) + ","
|
||||
+ "k11:" + Luban.StringUtil.CollectionToString(K11) + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
145
luban_examples/Projects/CfgValidator/Gen/Tables.cs
Normal file
145
luban_examples/Projects/CfgValidator/Gen/Tables.cs
Normal file
@@ -0,0 +1,145 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace cfg
|
||||
{
|
||||
public partial class Tables
|
||||
{
|
||||
public ai.TbBlackboard TbBlackboard {get; }
|
||||
public ai.TbBehaviorTree TbBehaviorTree {get; }
|
||||
public common.TbGlobalConfig TbGlobalConfig {get; }
|
||||
/// <summary>
|
||||
/// 道具表
|
||||
/// </summary>
|
||||
public item.TbItem TbItem {get; }
|
||||
public l10n.TbL10NDemo TbL10NDemo {get; }
|
||||
public l10n.TbPatchDemo TbPatchDemo {get; }
|
||||
public tag.TbTestTag TbTestTag {get; }
|
||||
public test.TbFullTypes TbFullTypes {get; }
|
||||
public test.TbSingleton TbSingleton {get; }
|
||||
public test.TbNotIndexList TbNotIndexList {get; }
|
||||
public test.TbMultiUnionIndexList TbMultiUnionIndexList {get; }
|
||||
public test.TbMultiIndexList TbMultiIndexList {get; }
|
||||
public test.TbDataFromMisc TbDataFromMisc {get; }
|
||||
public test.TbMultiRowRecord TbMultiRowRecord {get; }
|
||||
public test.TbTestMultiColumn TbTestMultiColumn {get; }
|
||||
public test.TbMultiRowTitle TbMultiRowTitle {get; }
|
||||
public test.TbTestNull TbTestNull {get; }
|
||||
public test.TbDemoPrimitive TbDemoPrimitive {get; }
|
||||
public test.TbTestString TbTestString {get; }
|
||||
public test.TbDemoGroup TbDemoGroup {get; }
|
||||
public test.TbTestGlobal TbTestGlobal {get; }
|
||||
public test.TbTestBeRef TbTestBeRef {get; }
|
||||
public test.TbTestBeRef2 TbTestBeRef2 {get; }
|
||||
public test.TbTestRef TbTestRef {get; }
|
||||
public test.TbTestSize TbTestSize {get; }
|
||||
public test.TbTestSet TbTestSet {get; }
|
||||
public test.TbDetectCsvEncoding TbDetectCsvEncoding {get; }
|
||||
public test.TbItem2 TbItem2 {get; }
|
||||
public test.TbTestIndex TbTestIndex {get; }
|
||||
public test.TbTestMap TbTestMap {get; }
|
||||
public test.TbExcelFromJson TbExcelFromJson {get; }
|
||||
public test.TbCompositeJsonTable1 TbCompositeJsonTable1 {get; }
|
||||
public test.TbCompositeJsonTable2 TbCompositeJsonTable2 {get; }
|
||||
public test.TbCompositeJsonTable3 TbCompositeJsonTable3 {get; }
|
||||
public test.TbExcelFromJsonMultiRow TbExcelFromJsonMultiRow {get; }
|
||||
public test.TbTestScriptableObject TbTestScriptableObject {get; }
|
||||
public test.TbTestMapper TbTestMapper {get; }
|
||||
public test.TbDefineFromExcel2 TbDefineFromExcel2 {get; }
|
||||
|
||||
public Tables(System.Func<string, JsonElement> loader)
|
||||
{
|
||||
TbBlackboard = new ai.TbBlackboard(loader("ai_tbblackboard"));
|
||||
TbBehaviorTree = new ai.TbBehaviorTree(loader("ai_tbbehaviortree"));
|
||||
TbGlobalConfig = new common.TbGlobalConfig(loader("common_tbglobalconfig"));
|
||||
TbItem = new item.TbItem(loader("item_tbitem"));
|
||||
TbL10NDemo = new l10n.TbL10NDemo(loader("l10n_tbl10ndemo"));
|
||||
TbPatchDemo = new l10n.TbPatchDemo(loader("l10n_tbpatchdemo"));
|
||||
TbTestTag = new tag.TbTestTag(loader("tag_tbtesttag"));
|
||||
TbFullTypes = new test.TbFullTypes(loader("test_tbfulltypes"));
|
||||
TbSingleton = new test.TbSingleton(loader("test_tbsingleton"));
|
||||
TbNotIndexList = new test.TbNotIndexList(loader("test_tbnotindexlist"));
|
||||
TbMultiUnionIndexList = new test.TbMultiUnionIndexList(loader("test_tbmultiunionindexlist"));
|
||||
TbMultiIndexList = new test.TbMultiIndexList(loader("test_tbmultiindexlist"));
|
||||
TbDataFromMisc = new test.TbDataFromMisc(loader("test_tbdatafrommisc"));
|
||||
TbMultiRowRecord = new test.TbMultiRowRecord(loader("test_tbmultirowrecord"));
|
||||
TbTestMultiColumn = new test.TbTestMultiColumn(loader("test_tbtestmulticolumn"));
|
||||
TbMultiRowTitle = new test.TbMultiRowTitle(loader("test_tbmultirowtitle"));
|
||||
TbTestNull = new test.TbTestNull(loader("test_tbtestnull"));
|
||||
TbDemoPrimitive = new test.TbDemoPrimitive(loader("test_tbdemoprimitive"));
|
||||
TbTestString = new test.TbTestString(loader("test_tbteststring"));
|
||||
TbDemoGroup = new test.TbDemoGroup(loader("test_tbdemogroup"));
|
||||
TbTestGlobal = new test.TbTestGlobal(loader("test_tbtestglobal"));
|
||||
TbTestBeRef = new test.TbTestBeRef(loader("test_tbtestberef"));
|
||||
TbTestBeRef2 = new test.TbTestBeRef2(loader("test_tbtestberef2"));
|
||||
TbTestRef = new test.TbTestRef(loader("test_tbtestref"));
|
||||
TbTestSize = new test.TbTestSize(loader("test_tbtestsize"));
|
||||
TbTestSet = new test.TbTestSet(loader("test_tbtestset"));
|
||||
TbDetectCsvEncoding = new test.TbDetectCsvEncoding(loader("test_tbdetectcsvencoding"));
|
||||
TbItem2 = new test.TbItem2(loader("test_tbitem2"));
|
||||
TbTestIndex = new test.TbTestIndex(loader("test_tbtestindex"));
|
||||
TbTestMap = new test.TbTestMap(loader("test_tbtestmap"));
|
||||
TbExcelFromJson = new test.TbExcelFromJson(loader("test_tbexcelfromjson"));
|
||||
TbCompositeJsonTable1 = new test.TbCompositeJsonTable1(loader("test_tbcompositejsontable1"));
|
||||
TbCompositeJsonTable2 = new test.TbCompositeJsonTable2(loader("test_tbcompositejsontable2"));
|
||||
TbCompositeJsonTable3 = new test.TbCompositeJsonTable3(loader("test_tbcompositejsontable3"));
|
||||
TbExcelFromJsonMultiRow = new test.TbExcelFromJsonMultiRow(loader("test_tbexcelfromjsonmultirow"));
|
||||
TbTestScriptableObject = new test.TbTestScriptableObject(loader("test_tbtestscriptableobject"));
|
||||
TbTestMapper = new test.TbTestMapper(loader("test_tbtestmapper"));
|
||||
TbDefineFromExcel2 = new test.TbDefineFromExcel2(loader("test_tbdefinefromexcel2"));
|
||||
ResolveRef();
|
||||
}
|
||||
|
||||
private void ResolveRef()
|
||||
{
|
||||
TbBlackboard.ResolveRef(this);
|
||||
TbBehaviorTree.ResolveRef(this);
|
||||
TbGlobalConfig.ResolveRef(this);
|
||||
TbItem.ResolveRef(this);
|
||||
TbL10NDemo.ResolveRef(this);
|
||||
TbPatchDemo.ResolveRef(this);
|
||||
TbTestTag.ResolveRef(this);
|
||||
TbFullTypes.ResolveRef(this);
|
||||
TbSingleton.ResolveRef(this);
|
||||
TbNotIndexList.ResolveRef(this);
|
||||
TbMultiUnionIndexList.ResolveRef(this);
|
||||
TbMultiIndexList.ResolveRef(this);
|
||||
TbDataFromMisc.ResolveRef(this);
|
||||
TbMultiRowRecord.ResolveRef(this);
|
||||
TbTestMultiColumn.ResolveRef(this);
|
||||
TbMultiRowTitle.ResolveRef(this);
|
||||
TbTestNull.ResolveRef(this);
|
||||
TbDemoPrimitive.ResolveRef(this);
|
||||
TbTestString.ResolveRef(this);
|
||||
TbDemoGroup.ResolveRef(this);
|
||||
TbTestGlobal.ResolveRef(this);
|
||||
TbTestBeRef.ResolveRef(this);
|
||||
TbTestBeRef2.ResolveRef(this);
|
||||
TbTestRef.ResolveRef(this);
|
||||
TbTestSize.ResolveRef(this);
|
||||
TbTestSet.ResolveRef(this);
|
||||
TbDetectCsvEncoding.ResolveRef(this);
|
||||
TbItem2.ResolveRef(this);
|
||||
TbTestIndex.ResolveRef(this);
|
||||
TbTestMap.ResolveRef(this);
|
||||
TbExcelFromJson.ResolveRef(this);
|
||||
TbCompositeJsonTable1.ResolveRef(this);
|
||||
TbCompositeJsonTable2.ResolveRef(this);
|
||||
TbCompositeJsonTable3.ResolveRef(this);
|
||||
TbExcelFromJsonMultiRow.ResolveRef(this);
|
||||
TbTestScriptableObject.ResolveRef(this);
|
||||
TbTestMapper.ResolveRef(this);
|
||||
TbDefineFromExcel2.ResolveRef(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
64
luban_examples/Projects/CfgValidator/Gen/ai.BehaviorTree.cs
Normal file
64
luban_examples/Projects/CfgValidator/Gen/ai.BehaviorTree.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class BehaviorTree : Luban.BeanBase
|
||||
{
|
||||
public BehaviorTree(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
Name = _buf.GetProperty("name").GetString();
|
||||
Desc = _buf.GetProperty("desc").GetString();
|
||||
BlackboardId = _buf.GetProperty("blackboard_id").GetString();
|
||||
BlackboardId_Ref = null;
|
||||
Root = ai.ComposeNode.DeserializeComposeNode(_buf.GetProperty("root"));
|
||||
}
|
||||
|
||||
public static BehaviorTree DeserializeBehaviorTree(JsonElement _buf)
|
||||
{
|
||||
return new ai.BehaviorTree(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly string Name;
|
||||
public readonly string Desc;
|
||||
public readonly string BlackboardId;
|
||||
public ai.Blackboard BlackboardId_Ref;
|
||||
public readonly ai.ComposeNode Root;
|
||||
|
||||
public const int __ID__ = 159552822;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
BlackboardId_Ref = tables.TbBlackboard.GetOrDefault(BlackboardId);
|
||||
Root?.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "name:" + Name + ","
|
||||
+ "desc:" + Desc + ","
|
||||
+ "blackboardId:" + BlackboardId + ","
|
||||
+ "root:" + Root + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class BinaryOperator : ai.KeyQueryOperator
|
||||
{
|
||||
public BinaryOperator(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Oper = (ai.EOperator)_buf.GetProperty("oper").GetInt32();
|
||||
Data = ai.KeyData.DeserializeKeyData(_buf.GetProperty("data"));
|
||||
}
|
||||
|
||||
public static BinaryOperator DeserializeBinaryOperator(JsonElement _buf)
|
||||
{
|
||||
return new ai.BinaryOperator(_buf);
|
||||
}
|
||||
|
||||
public readonly ai.EOperator Oper;
|
||||
public readonly ai.KeyData Data;
|
||||
|
||||
public const int __ID__ = -979891605;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
Data?.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "oper:" + Oper + ","
|
||||
+ "data:" + Data + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
58
luban_examples/Projects/CfgValidator/Gen/ai.Blackboard.cs
Normal file
58
luban_examples/Projects/CfgValidator/Gen/ai.Blackboard.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class Blackboard : Luban.BeanBase
|
||||
{
|
||||
public Blackboard(JsonElement _buf)
|
||||
{
|
||||
Name = _buf.GetProperty("name").GetString();
|
||||
Desc = _buf.GetProperty("desc").GetString();
|
||||
ParentName = _buf.GetProperty("parent_name").GetString();
|
||||
{ var __json0 = _buf.GetProperty("keys"); Keys = new System.Collections.Generic.List<ai.BlackboardKey>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { ai.BlackboardKey __v0; __v0 = ai.BlackboardKey.DeserializeBlackboardKey(__e0); Keys.Add(__v0); } }
|
||||
}
|
||||
|
||||
public static Blackboard DeserializeBlackboard(JsonElement _buf)
|
||||
{
|
||||
return new ai.Blackboard(_buf);
|
||||
}
|
||||
|
||||
public readonly string Name;
|
||||
public readonly string Desc;
|
||||
public readonly string ParentName;
|
||||
public readonly System.Collections.Generic.List<ai.BlackboardKey> Keys;
|
||||
|
||||
public const int __ID__ = 1576193005;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
foreach (var _e in Keys) { _e?.ResolveRef(tables); }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "name:" + Name + ","
|
||||
+ "desc:" + Desc + ","
|
||||
+ "parentName:" + ParentName + ","
|
||||
+ "keys:" + Luban.StringUtil.CollectionToString(Keys) + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
62
luban_examples/Projects/CfgValidator/Gen/ai.BlackboardKey.cs
Normal file
62
luban_examples/Projects/CfgValidator/Gen/ai.BlackboardKey.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class BlackboardKey : Luban.BeanBase
|
||||
{
|
||||
public BlackboardKey(JsonElement _buf)
|
||||
{
|
||||
Name = _buf.GetProperty("name").GetString();
|
||||
Desc = _buf.GetProperty("desc").GetString();
|
||||
IsStatic = _buf.GetProperty("is_static").GetBoolean();
|
||||
Type = (ai.EKeyType)_buf.GetProperty("type").GetInt32();
|
||||
TypeClassName = _buf.GetProperty("type_class_name").GetString();
|
||||
}
|
||||
|
||||
public static BlackboardKey DeserializeBlackboardKey(JsonElement _buf)
|
||||
{
|
||||
return new ai.BlackboardKey(_buf);
|
||||
}
|
||||
|
||||
public readonly string Name;
|
||||
public readonly string Desc;
|
||||
public readonly bool IsStatic;
|
||||
public readonly ai.EKeyType Type;
|
||||
public readonly string TypeClassName;
|
||||
|
||||
public const int __ID__ = -511559886;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "name:" + Name + ","
|
||||
+ "desc:" + Desc + ","
|
||||
+ "isStatic:" + IsStatic + ","
|
||||
+ "type:" + Type + ","
|
||||
+ "typeClassName:" + TypeClassName + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class BlackboardKeyData : ai.KeyData
|
||||
{
|
||||
public BlackboardKeyData(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Value = _buf.GetProperty("value").GetString();
|
||||
}
|
||||
|
||||
public static BlackboardKeyData DeserializeBlackboardKeyData(JsonElement _buf)
|
||||
{
|
||||
return new ai.BlackboardKeyData(_buf);
|
||||
}
|
||||
|
||||
public readonly string Value;
|
||||
|
||||
public const int __ID__ = 1517269500;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "value:" + Value + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
56
luban_examples/Projects/CfgValidator/Gen/ai.ChooseSkill.cs
Normal file
56
luban_examples/Projects/CfgValidator/Gen/ai.ChooseSkill.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class ChooseSkill : ai.Task
|
||||
{
|
||||
public ChooseSkill(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
TargetActorKey = _buf.GetProperty("target_actor_key").GetString();
|
||||
ResultSkillIdKey = _buf.GetProperty("result_skill_id_key").GetString();
|
||||
}
|
||||
|
||||
public static ChooseSkill DeserializeChooseSkill(JsonElement _buf)
|
||||
{
|
||||
return new ai.ChooseSkill(_buf);
|
||||
}
|
||||
|
||||
public readonly string TargetActorKey;
|
||||
public readonly string ResultSkillIdKey;
|
||||
|
||||
public const int __ID__ = -918812268;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "ignoreRestartSelf:" + IgnoreRestartSelf + ","
|
||||
+ "targetActorKey:" + TargetActorKey + ","
|
||||
+ "resultSkillIdKey:" + ResultSkillIdKey + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
49
luban_examples/Projects/CfgValidator/Gen/ai.ChooseTarget.cs
Normal file
49
luban_examples/Projects/CfgValidator/Gen/ai.ChooseTarget.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class ChooseTarget : ai.Service
|
||||
{
|
||||
public ChooseTarget(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
ResultTargetKey = _buf.GetProperty("result_target_key").GetString();
|
||||
}
|
||||
|
||||
public static ChooseTarget DeserializeChooseTarget(JsonElement _buf)
|
||||
{
|
||||
return new ai.ChooseTarget(_buf);
|
||||
}
|
||||
|
||||
public readonly string ResultTargetKey;
|
||||
|
||||
public const int __ID__ = 1601247918;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "resultTargetKey:" + ResultTargetKey + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
51
luban_examples/Projects/CfgValidator/Gen/ai.ComposeNode.cs
Normal file
51
luban_examples/Projects/CfgValidator/Gen/ai.ComposeNode.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public abstract partial class ComposeNode : ai.FlowNode
|
||||
{
|
||||
public ComposeNode(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
}
|
||||
|
||||
public static ComposeNode DeserializeComposeNode(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "Sequence": return new ai.Sequence(_buf);
|
||||
case "Selector": return new ai.Selector(_buf);
|
||||
case "SimpleParallel": return new ai.SimpleParallel(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
52
luban_examples/Projects/CfgValidator/Gen/ai.DebugPrint.cs
Normal file
52
luban_examples/Projects/CfgValidator/Gen/ai.DebugPrint.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class DebugPrint : ai.Task
|
||||
{
|
||||
public DebugPrint(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Text = _buf.GetProperty("text").GetString();
|
||||
}
|
||||
|
||||
public static DebugPrint DeserializeDebugPrint(JsonElement _buf)
|
||||
{
|
||||
return new ai.DebugPrint(_buf);
|
||||
}
|
||||
|
||||
public readonly string Text;
|
||||
|
||||
public const int __ID__ = 1357409728;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "ignoreRestartSelf:" + IgnoreRestartSelf + ","
|
||||
+ "text:" + Text + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
57
luban_examples/Projects/CfgValidator/Gen/ai.Decorator.cs
Normal file
57
luban_examples/Projects/CfgValidator/Gen/ai.Decorator.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public abstract partial class Decorator : ai.Node
|
||||
{
|
||||
public Decorator(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
FlowAbortMode = (ai.EFlowAbortMode)_buf.GetProperty("flow_abort_mode").GetInt32();
|
||||
}
|
||||
|
||||
public static Decorator DeserializeDecorator(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "UeLoop": return new ai.UeLoop(_buf);
|
||||
case "UeCooldown": return new ai.UeCooldown(_buf);
|
||||
case "UeTimeLimit": return new ai.UeTimeLimit(_buf);
|
||||
case "UeBlackboard": return new ai.UeBlackboard(_buf);
|
||||
case "UeForceSuccess": return new ai.UeForceSuccess(_buf);
|
||||
case "IsAtLocation": return new ai.IsAtLocation(_buf);
|
||||
case "DistanceLessThan": return new ai.DistanceLessThan(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
public readonly ai.EFlowAbortMode FlowAbortMode;
|
||||
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "flowAbortMode:" + FlowAbortMode + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,62 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class DistanceLessThan : ai.Decorator
|
||||
{
|
||||
public DistanceLessThan(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Actor1Key = _buf.GetProperty("actor1_key").GetString();
|
||||
Actor2Key = _buf.GetProperty("actor2_key").GetString();
|
||||
Distance = _buf.GetProperty("distance").GetSingle();
|
||||
ReverseResult = _buf.GetProperty("reverse_result").GetBoolean();
|
||||
}
|
||||
|
||||
public static DistanceLessThan DeserializeDistanceLessThan(JsonElement _buf)
|
||||
{
|
||||
return new ai.DistanceLessThan(_buf);
|
||||
}
|
||||
|
||||
public readonly string Actor1Key;
|
||||
public readonly string Actor2Key;
|
||||
public readonly float Distance;
|
||||
public readonly bool ReverseResult;
|
||||
|
||||
public const int __ID__ = -1207170283;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "flowAbortMode:" + FlowAbortMode + ","
|
||||
+ "actor1Key:" + Actor1Key + ","
|
||||
+ "actor2Key:" + Actor2Key + ","
|
||||
+ "distance:" + Distance + ","
|
||||
+ "reverseResult:" + ReverseResult + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
21
luban_examples/Projects/CfgValidator/Gen/ai.EExecutor.cs
Normal file
21
luban_examples/Projects/CfgValidator/Gen/ai.EExecutor.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public enum EExecutor
|
||||
{
|
||||
CLIENT = 0,
|
||||
SERVER = 1,
|
||||
}
|
||||
|
||||
}
|
||||
|
21
luban_examples/Projects/CfgValidator/Gen/ai.EFinishMode.cs
Normal file
21
luban_examples/Projects/CfgValidator/Gen/ai.EFinishMode.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public enum EFinishMode
|
||||
{
|
||||
IMMEDIATE = 0,
|
||||
DELAYED = 1,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,23 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public enum EFlowAbortMode
|
||||
{
|
||||
NONE = 0,
|
||||
LOWER_PRIORITY = 1,
|
||||
SELF = 2,
|
||||
BOTH = 3,
|
||||
}
|
||||
|
||||
}
|
||||
|
29
luban_examples/Projects/CfgValidator/Gen/ai.EKeyType.cs
Normal file
29
luban_examples/Projects/CfgValidator/Gen/ai.EKeyType.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public enum EKeyType
|
||||
{
|
||||
BOOL = 1,
|
||||
INT = 2,
|
||||
FLOAT = 3,
|
||||
STRING = 4,
|
||||
VECTOR = 5,
|
||||
ROTATOR = 6,
|
||||
NAME = 7,
|
||||
CLASS = 8,
|
||||
ENUM = 9,
|
||||
OBJECT = 10,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,21 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public enum ENotifyObserverMode
|
||||
{
|
||||
ON_VALUE_CHANGE = 0,
|
||||
ON_RESULT_CHANGE = 1,
|
||||
}
|
||||
|
||||
}
|
||||
|
27
luban_examples/Projects/CfgValidator/Gen/ai.EOperator.cs
Normal file
27
luban_examples/Projects/CfgValidator/Gen/ai.EOperator.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public enum EOperator
|
||||
{
|
||||
IS_EQUAL_TO = 0,
|
||||
IS_NOT_EQUAL_TO = 1,
|
||||
IS_LESS_THAN = 2,
|
||||
IS_LESS_THAN_OR_EQUAL_TO = 3,
|
||||
IS_GREAT_THAN = 4,
|
||||
IS_GREAT_THAN_OR_EQUAL_TO = 5,
|
||||
CONTAINS = 6,
|
||||
NOT_CONTAINS = 7,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,45 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class ExecuteTimeStatistic : ai.Service
|
||||
{
|
||||
public ExecuteTimeStatistic(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
}
|
||||
|
||||
public static ExecuteTimeStatistic DeserializeExecuteTimeStatistic(JsonElement _buf)
|
||||
{
|
||||
return new ai.ExecuteTimeStatistic(_buf);
|
||||
}
|
||||
|
||||
|
||||
public const int __ID__ = 990693812;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
47
luban_examples/Projects/CfgValidator/Gen/ai.FloatKeyData.cs
Normal file
47
luban_examples/Projects/CfgValidator/Gen/ai.FloatKeyData.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class FloatKeyData : ai.KeyData
|
||||
{
|
||||
public FloatKeyData(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Value = _buf.GetProperty("value").GetSingle();
|
||||
}
|
||||
|
||||
public static FloatKeyData DeserializeFloatKeyData(JsonElement _buf)
|
||||
{
|
||||
return new ai.FloatKeyData(_buf);
|
||||
}
|
||||
|
||||
public readonly float Value;
|
||||
|
||||
public const int __ID__ = -719747885;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "value:" + Value + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
64
luban_examples/Projects/CfgValidator/Gen/ai.FlowNode.cs
Normal file
64
luban_examples/Projects/CfgValidator/Gen/ai.FlowNode.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public abstract partial class FlowNode : ai.Node
|
||||
{
|
||||
public FlowNode(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
{ var __json0 = _buf.GetProperty("decorators"); Decorators = new System.Collections.Generic.List<ai.Decorator>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { ai.Decorator __v0; __v0 = ai.Decorator.DeserializeDecorator(__e0); Decorators.Add(__v0); } }
|
||||
{ var __json0 = _buf.GetProperty("services"); Services = new System.Collections.Generic.List<ai.Service>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { ai.Service __v0; __v0 = ai.Service.DeserializeService(__e0); Services.Add(__v0); } }
|
||||
}
|
||||
|
||||
public static FlowNode DeserializeFlowNode(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "Sequence": return new ai.Sequence(_buf);
|
||||
case "Selector": return new ai.Selector(_buf);
|
||||
case "SimpleParallel": return new ai.SimpleParallel(_buf);
|
||||
case "UeWait": return new ai.UeWait(_buf);
|
||||
case "UeWaitBlackboardTime": return new ai.UeWaitBlackboardTime(_buf);
|
||||
case "MoveToTarget": return new ai.MoveToTarget(_buf);
|
||||
case "ChooseSkill": return new ai.ChooseSkill(_buf);
|
||||
case "MoveToRandomLocation": return new ai.MoveToRandomLocation(_buf);
|
||||
case "MoveToLocation": return new ai.MoveToLocation(_buf);
|
||||
case "DebugPrint": return new ai.DebugPrint(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
public readonly System.Collections.Generic.List<ai.Decorator> Decorators;
|
||||
public readonly System.Collections.Generic.List<ai.Service> Services;
|
||||
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
foreach (var _e in Decorators) { _e?.ResolveRef(tables); }
|
||||
foreach (var _e in Services) { _e?.ResolveRef(tables); }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,49 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class GetOwnerPlayer : ai.Service
|
||||
{
|
||||
public GetOwnerPlayer(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
PlayerActorKey = _buf.GetProperty("player_actor_key").GetString();
|
||||
}
|
||||
|
||||
public static GetOwnerPlayer DeserializeGetOwnerPlayer(JsonElement _buf)
|
||||
{
|
||||
return new ai.GetOwnerPlayer(_buf);
|
||||
}
|
||||
|
||||
public readonly string PlayerActorKey;
|
||||
|
||||
public const int __ID__ = -999247644;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "playerActorKey:" + PlayerActorKey + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
47
luban_examples/Projects/CfgValidator/Gen/ai.IntKeyData.cs
Normal file
47
luban_examples/Projects/CfgValidator/Gen/ai.IntKeyData.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class IntKeyData : ai.KeyData
|
||||
{
|
||||
public IntKeyData(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Value = _buf.GetProperty("value").GetInt32();
|
||||
}
|
||||
|
||||
public static IntKeyData DeserializeIntKeyData(JsonElement _buf)
|
||||
{
|
||||
return new ai.IntKeyData(_buf);
|
||||
}
|
||||
|
||||
public readonly int Value;
|
||||
|
||||
public const int __ID__ = -342751904;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "value:" + Value + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
58
luban_examples/Projects/CfgValidator/Gen/ai.IsAtLocation.cs
Normal file
58
luban_examples/Projects/CfgValidator/Gen/ai.IsAtLocation.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class IsAtLocation : ai.Decorator
|
||||
{
|
||||
public IsAtLocation(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
AcceptableRadius = _buf.GetProperty("acceptable_radius").GetSingle();
|
||||
KeyboardKey = _buf.GetProperty("keyboard_key").GetString();
|
||||
InverseCondition = _buf.GetProperty("inverse_condition").GetBoolean();
|
||||
}
|
||||
|
||||
public static IsAtLocation DeserializeIsAtLocation(JsonElement _buf)
|
||||
{
|
||||
return new ai.IsAtLocation(_buf);
|
||||
}
|
||||
|
||||
public readonly float AcceptableRadius;
|
||||
public readonly string KeyboardKey;
|
||||
public readonly bool InverseCondition;
|
||||
|
||||
public const int __ID__ = 1255972344;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "flowAbortMode:" + FlowAbortMode + ","
|
||||
+ "acceptableRadius:" + AcceptableRadius + ","
|
||||
+ "keyboardKey:" + KeyboardKey + ","
|
||||
+ "inverseCondition:" + InverseCondition + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
43
luban_examples/Projects/CfgValidator/Gen/ai.IsNotSet.cs
Normal file
43
luban_examples/Projects/CfgValidator/Gen/ai.IsNotSet.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class IsNotSet : ai.KeyQueryOperator
|
||||
{
|
||||
public IsNotSet(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
}
|
||||
|
||||
public static IsNotSet DeserializeIsNotSet(JsonElement _buf)
|
||||
{
|
||||
return new ai.IsNotSet(_buf);
|
||||
}
|
||||
|
||||
|
||||
public const int __ID__ = 790736255;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
43
luban_examples/Projects/CfgValidator/Gen/ai.IsSet.cs
Normal file
43
luban_examples/Projects/CfgValidator/Gen/ai.IsSet.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class IsSet : ai.KeyQueryOperator
|
||||
{
|
||||
public IsSet(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
}
|
||||
|
||||
public static IsSet DeserializeIsSet(JsonElement _buf)
|
||||
{
|
||||
return new ai.IsSet(_buf);
|
||||
}
|
||||
|
||||
|
||||
public const int __ID__ = 1635350898;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,49 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class KeepFaceTarget : ai.Service
|
||||
{
|
||||
public KeepFaceTarget(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
TargetActorKey = _buf.GetProperty("target_actor_key").GetString();
|
||||
}
|
||||
|
||||
public static KeepFaceTarget DeserializeKeepFaceTarget(JsonElement _buf)
|
||||
{
|
||||
return new ai.KeepFaceTarget(_buf);
|
||||
}
|
||||
|
||||
public readonly string TargetActorKey;
|
||||
|
||||
public const int __ID__ = 1195270745;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "targetActorKey:" + TargetActorKey + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
47
luban_examples/Projects/CfgValidator/Gen/ai.KeyData.cs
Normal file
47
luban_examples/Projects/CfgValidator/Gen/ai.KeyData.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public abstract partial class KeyData : Luban.BeanBase
|
||||
{
|
||||
public KeyData(JsonElement _buf)
|
||||
{
|
||||
}
|
||||
|
||||
public static KeyData DeserializeKeyData(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "FloatKeyData": return new ai.FloatKeyData(_buf);
|
||||
case "IntKeyData": return new ai.IntKeyData(_buf);
|
||||
case "StringKeyData": return new ai.StringKeyData(_buf);
|
||||
case "BlackboardKeyData": return new ai.BlackboardKeyData(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public virtual void ResolveRef(Tables tables)
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public abstract partial class KeyQueryOperator : Luban.BeanBase
|
||||
{
|
||||
public KeyQueryOperator(JsonElement _buf)
|
||||
{
|
||||
}
|
||||
|
||||
public static KeyQueryOperator DeserializeKeyQueryOperator(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "IsSet": return new ai.IsSet(_buf);
|
||||
case "IsNotSet": return new ai.IsNotSet(_buf);
|
||||
case "BinaryOperator": return new ai.BinaryOperator(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public virtual void ResolveRef(Tables tables)
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class MoveToLocation : ai.Task
|
||||
{
|
||||
public MoveToLocation(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
AcceptableRadius = _buf.GetProperty("acceptable_radius").GetSingle();
|
||||
}
|
||||
|
||||
public static MoveToLocation DeserializeMoveToLocation(JsonElement _buf)
|
||||
{
|
||||
return new ai.MoveToLocation(_buf);
|
||||
}
|
||||
|
||||
public readonly float AcceptableRadius;
|
||||
|
||||
public const int __ID__ = -969953113;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "ignoreRestartSelf:" + IgnoreRestartSelf + ","
|
||||
+ "acceptableRadius:" + AcceptableRadius + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class MoveToRandomLocation : ai.Task
|
||||
{
|
||||
public MoveToRandomLocation(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
OriginPositionKey = _buf.GetProperty("origin_position_key").GetString();
|
||||
Radius = _buf.GetProperty("radius").GetSingle();
|
||||
}
|
||||
|
||||
public static MoveToRandomLocation DeserializeMoveToRandomLocation(JsonElement _buf)
|
||||
{
|
||||
return new ai.MoveToRandomLocation(_buf);
|
||||
}
|
||||
|
||||
public readonly string OriginPositionKey;
|
||||
public readonly float Radius;
|
||||
|
||||
public const int __ID__ = -2140042998;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "ignoreRestartSelf:" + IgnoreRestartSelf + ","
|
||||
+ "originPositionKey:" + OriginPositionKey + ","
|
||||
+ "radius:" + Radius + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
56
luban_examples/Projects/CfgValidator/Gen/ai.MoveToTarget.cs
Normal file
56
luban_examples/Projects/CfgValidator/Gen/ai.MoveToTarget.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class MoveToTarget : ai.Task
|
||||
{
|
||||
public MoveToTarget(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
TargetActorKey = _buf.GetProperty("target_actor_key").GetString();
|
||||
AcceptableRadius = _buf.GetProperty("acceptable_radius").GetSingle();
|
||||
}
|
||||
|
||||
public static MoveToTarget DeserializeMoveToTarget(JsonElement _buf)
|
||||
{
|
||||
return new ai.MoveToTarget(_buf);
|
||||
}
|
||||
|
||||
public readonly string TargetActorKey;
|
||||
public readonly float AcceptableRadius;
|
||||
|
||||
public const int __ID__ = 514987779;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "ignoreRestartSelf:" + IgnoreRestartSelf + ","
|
||||
+ "targetActorKey:" + TargetActorKey + ","
|
||||
+ "acceptableRadius:" + AcceptableRadius + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
74
luban_examples/Projects/CfgValidator/Gen/ai.Node.cs
Normal file
74
luban_examples/Projects/CfgValidator/Gen/ai.Node.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public abstract partial class Node : Luban.BeanBase
|
||||
{
|
||||
public Node(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
NodeName = _buf.GetProperty("node_name").GetString();
|
||||
}
|
||||
|
||||
public static Node DeserializeNode(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "UeSetDefaultFocus": return new ai.UeSetDefaultFocus(_buf);
|
||||
case "ExecuteTimeStatistic": return new ai.ExecuteTimeStatistic(_buf);
|
||||
case "ChooseTarget": return new ai.ChooseTarget(_buf);
|
||||
case "KeepFaceTarget": return new ai.KeepFaceTarget(_buf);
|
||||
case "GetOwnerPlayer": return new ai.GetOwnerPlayer(_buf);
|
||||
case "UpdateDailyBehaviorProps": return new ai.UpdateDailyBehaviorProps(_buf);
|
||||
case "UeLoop": return new ai.UeLoop(_buf);
|
||||
case "UeCooldown": return new ai.UeCooldown(_buf);
|
||||
case "UeTimeLimit": return new ai.UeTimeLimit(_buf);
|
||||
case "UeBlackboard": return new ai.UeBlackboard(_buf);
|
||||
case "UeForceSuccess": return new ai.UeForceSuccess(_buf);
|
||||
case "IsAtLocation": return new ai.IsAtLocation(_buf);
|
||||
case "DistanceLessThan": return new ai.DistanceLessThan(_buf);
|
||||
case "Sequence": return new ai.Sequence(_buf);
|
||||
case "Selector": return new ai.Selector(_buf);
|
||||
case "SimpleParallel": return new ai.SimpleParallel(_buf);
|
||||
case "UeWait": return new ai.UeWait(_buf);
|
||||
case "UeWaitBlackboardTime": return new ai.UeWaitBlackboardTime(_buf);
|
||||
case "MoveToTarget": return new ai.MoveToTarget(_buf);
|
||||
case "ChooseSkill": return new ai.ChooseSkill(_buf);
|
||||
case "MoveToRandomLocation": return new ai.MoveToRandomLocation(_buf);
|
||||
case "MoveToLocation": return new ai.MoveToLocation(_buf);
|
||||
case "DebugPrint": return new ai.DebugPrint(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly string NodeName;
|
||||
|
||||
|
||||
public virtual void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
51
luban_examples/Projects/CfgValidator/Gen/ai.Selector.cs
Normal file
51
luban_examples/Projects/CfgValidator/Gen/ai.Selector.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class Selector : ai.ComposeNode
|
||||
{
|
||||
public Selector(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
{ var __json0 = _buf.GetProperty("children"); Children = new System.Collections.Generic.List<ai.FlowNode>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { ai.FlowNode __v0; __v0 = ai.FlowNode.DeserializeFlowNode(__e0); Children.Add(__v0); } }
|
||||
}
|
||||
|
||||
public static Selector DeserializeSelector(JsonElement _buf)
|
||||
{
|
||||
return new ai.Selector(_buf);
|
||||
}
|
||||
|
||||
public readonly System.Collections.Generic.List<ai.FlowNode> Children;
|
||||
|
||||
public const int __ID__ = -1946981627;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
foreach (var _e in Children) { _e?.ResolveRef(tables); }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "children:" + Luban.StringUtil.CollectionToString(Children) + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
51
luban_examples/Projects/CfgValidator/Gen/ai.Sequence.cs
Normal file
51
luban_examples/Projects/CfgValidator/Gen/ai.Sequence.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class Sequence : ai.ComposeNode
|
||||
{
|
||||
public Sequence(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
{ var __json0 = _buf.GetProperty("children"); Children = new System.Collections.Generic.List<ai.FlowNode>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { ai.FlowNode __v0; __v0 = ai.FlowNode.DeserializeFlowNode(__e0); Children.Add(__v0); } }
|
||||
}
|
||||
|
||||
public static Sequence DeserializeSequence(JsonElement _buf)
|
||||
{
|
||||
return new ai.Sequence(_buf);
|
||||
}
|
||||
|
||||
public readonly System.Collections.Generic.List<ai.FlowNode> Children;
|
||||
|
||||
public const int __ID__ = -1789006105;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
foreach (var _e in Children) { _e?.ResolveRef(tables); }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "children:" + Luban.StringUtil.CollectionToString(Children) + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
52
luban_examples/Projects/CfgValidator/Gen/ai.Service.cs
Normal file
52
luban_examples/Projects/CfgValidator/Gen/ai.Service.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public abstract partial class Service : ai.Node
|
||||
{
|
||||
public Service(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
}
|
||||
|
||||
public static Service DeserializeService(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "UeSetDefaultFocus": return new ai.UeSetDefaultFocus(_buf);
|
||||
case "ExecuteTimeStatistic": return new ai.ExecuteTimeStatistic(_buf);
|
||||
case "ChooseTarget": return new ai.ChooseTarget(_buf);
|
||||
case "KeepFaceTarget": return new ai.KeepFaceTarget(_buf);
|
||||
case "GetOwnerPlayer": return new ai.GetOwnerPlayer(_buf);
|
||||
case "UpdateDailyBehaviorProps": return new ai.UpdateDailyBehaviorProps(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class SimpleParallel : ai.ComposeNode
|
||||
{
|
||||
public SimpleParallel(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
FinishMode = (ai.EFinishMode)_buf.GetProperty("finish_mode").GetInt32();
|
||||
MainTask = ai.Task.DeserializeTask(_buf.GetProperty("main_task"));
|
||||
BackgroundNode = ai.FlowNode.DeserializeFlowNode(_buf.GetProperty("background_node"));
|
||||
}
|
||||
|
||||
public static SimpleParallel DeserializeSimpleParallel(JsonElement _buf)
|
||||
{
|
||||
return new ai.SimpleParallel(_buf);
|
||||
}
|
||||
|
||||
public readonly ai.EFinishMode FinishMode;
|
||||
public readonly ai.Task MainTask;
|
||||
public readonly ai.FlowNode BackgroundNode;
|
||||
|
||||
public const int __ID__ = -1952582529;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
MainTask?.ResolveRef(tables);
|
||||
BackgroundNode?.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "finishMode:" + FinishMode + ","
|
||||
+ "mainTask:" + MainTask + ","
|
||||
+ "backgroundNode:" + BackgroundNode + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
47
luban_examples/Projects/CfgValidator/Gen/ai.StringKeyData.cs
Normal file
47
luban_examples/Projects/CfgValidator/Gen/ai.StringKeyData.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class StringKeyData : ai.KeyData
|
||||
{
|
||||
public StringKeyData(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Value = _buf.GetProperty("value").GetString();
|
||||
}
|
||||
|
||||
public static StringKeyData DeserializeStringKeyData(JsonElement _buf)
|
||||
{
|
||||
return new ai.StringKeyData(_buf);
|
||||
}
|
||||
|
||||
public readonly string Value;
|
||||
|
||||
public const int __ID__ = -307888654;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "value:" + Value + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
59
luban_examples/Projects/CfgValidator/Gen/ai.Task.cs
Normal file
59
luban_examples/Projects/CfgValidator/Gen/ai.Task.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public abstract partial class Task : ai.FlowNode
|
||||
{
|
||||
public Task(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
IgnoreRestartSelf = _buf.GetProperty("ignore_restart_self").GetBoolean();
|
||||
}
|
||||
|
||||
public static Task DeserializeTask(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "UeWait": return new ai.UeWait(_buf);
|
||||
case "UeWaitBlackboardTime": return new ai.UeWaitBlackboardTime(_buf);
|
||||
case "MoveToTarget": return new ai.MoveToTarget(_buf);
|
||||
case "ChooseSkill": return new ai.ChooseSkill(_buf);
|
||||
case "MoveToRandomLocation": return new ai.MoveToRandomLocation(_buf);
|
||||
case "MoveToLocation": return new ai.MoveToLocation(_buf);
|
||||
case "DebugPrint": return new ai.DebugPrint(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
public readonly bool IgnoreRestartSelf;
|
||||
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "ignoreRestartSelf:" + IgnoreRestartSelf + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public partial class TbBehaviorTree
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<int, ai.BehaviorTree> _dataMap;
|
||||
private readonly System.Collections.Generic.List<ai.BehaviorTree> _dataList;
|
||||
|
||||
public TbBehaviorTree(JsonElement _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<int, ai.BehaviorTree>();
|
||||
_dataList = new System.Collections.Generic.List<ai.BehaviorTree>();
|
||||
|
||||
foreach(JsonElement _ele in _buf.EnumerateArray())
|
||||
{
|
||||
ai.BehaviorTree _v;
|
||||
_v = ai.BehaviorTree.DeserializeBehaviorTree(_ele);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.Id, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<int, ai.BehaviorTree> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<ai.BehaviorTree> DataList => _dataList;
|
||||
|
||||
public ai.BehaviorTree GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public ai.BehaviorTree Get(int key) => _dataMap[key];
|
||||
public ai.BehaviorTree this[int key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
foreach(var _v in _dataList)
|
||||
{
|
||||
_v.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
52
luban_examples/Projects/CfgValidator/Gen/ai.TbBlackboard.cs
Normal file
52
luban_examples/Projects/CfgValidator/Gen/ai.TbBlackboard.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public partial class TbBlackboard
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<string, ai.Blackboard> _dataMap;
|
||||
private readonly System.Collections.Generic.List<ai.Blackboard> _dataList;
|
||||
|
||||
public TbBlackboard(JsonElement _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<string, ai.Blackboard>();
|
||||
_dataList = new System.Collections.Generic.List<ai.Blackboard>();
|
||||
|
||||
foreach(JsonElement _ele in _buf.EnumerateArray())
|
||||
{
|
||||
ai.Blackboard _v;
|
||||
_v = ai.Blackboard.DeserializeBlackboard(_ele);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.Name, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<string, ai.Blackboard> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<ai.Blackboard> DataList => _dataList;
|
||||
|
||||
public ai.Blackboard GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public ai.Blackboard Get(string key) => _dataMap[key];
|
||||
public ai.Blackboard this[string key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
foreach(var _v in _dataList)
|
||||
{
|
||||
_v.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
58
luban_examples/Projects/CfgValidator/Gen/ai.UeBlackboard.cs
Normal file
58
luban_examples/Projects/CfgValidator/Gen/ai.UeBlackboard.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class UeBlackboard : ai.Decorator
|
||||
{
|
||||
public UeBlackboard(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
NotifyObserver = (ai.ENotifyObserverMode)_buf.GetProperty("notify_observer").GetInt32();
|
||||
BlackboardKey = _buf.GetProperty("blackboard_key").GetString();
|
||||
KeyQuery = ai.KeyQueryOperator.DeserializeKeyQueryOperator(_buf.GetProperty("key_query"));
|
||||
}
|
||||
|
||||
public static UeBlackboard DeserializeUeBlackboard(JsonElement _buf)
|
||||
{
|
||||
return new ai.UeBlackboard(_buf);
|
||||
}
|
||||
|
||||
public readonly ai.ENotifyObserverMode NotifyObserver;
|
||||
public readonly string BlackboardKey;
|
||||
public readonly ai.KeyQueryOperator KeyQuery;
|
||||
|
||||
public const int __ID__ = -315297507;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
|
||||
KeyQuery?.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "flowAbortMode:" + FlowAbortMode + ","
|
||||
+ "notifyObserver:" + NotifyObserver + ","
|
||||
+ "blackboardKey:" + BlackboardKey + ","
|
||||
+ "keyQuery:" + KeyQuery + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
50
luban_examples/Projects/CfgValidator/Gen/ai.UeCooldown.cs
Normal file
50
luban_examples/Projects/CfgValidator/Gen/ai.UeCooldown.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class UeCooldown : ai.Decorator
|
||||
{
|
||||
public UeCooldown(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
CooldownTime = _buf.GetProperty("cooldown_time").GetSingle();
|
||||
}
|
||||
|
||||
public static UeCooldown DeserializeUeCooldown(JsonElement _buf)
|
||||
{
|
||||
return new ai.UeCooldown(_buf);
|
||||
}
|
||||
|
||||
public readonly float CooldownTime;
|
||||
|
||||
public const int __ID__ = -951439423;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "flowAbortMode:" + FlowAbortMode + ","
|
||||
+ "cooldownTime:" + CooldownTime + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class UeForceSuccess : ai.Decorator
|
||||
{
|
||||
public UeForceSuccess(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
}
|
||||
|
||||
public static UeForceSuccess DeserializeUeForceSuccess(JsonElement _buf)
|
||||
{
|
||||
return new ai.UeForceSuccess(_buf);
|
||||
}
|
||||
|
||||
|
||||
public const int __ID__ = 195054574;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "flowAbortMode:" + FlowAbortMode + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
58
luban_examples/Projects/CfgValidator/Gen/ai.UeLoop.cs
Normal file
58
luban_examples/Projects/CfgValidator/Gen/ai.UeLoop.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class UeLoop : ai.Decorator
|
||||
{
|
||||
public UeLoop(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
NumLoops = _buf.GetProperty("num_loops").GetInt32();
|
||||
InfiniteLoop = _buf.GetProperty("infinite_loop").GetBoolean();
|
||||
InfiniteLoopTimeoutTime = _buf.GetProperty("infinite_loop_timeout_time").GetSingle();
|
||||
}
|
||||
|
||||
public static UeLoop DeserializeUeLoop(JsonElement _buf)
|
||||
{
|
||||
return new ai.UeLoop(_buf);
|
||||
}
|
||||
|
||||
public readonly int NumLoops;
|
||||
public readonly bool InfiniteLoop;
|
||||
public readonly float InfiniteLoopTimeoutTime;
|
||||
|
||||
public const int __ID__ = -513308166;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "flowAbortMode:" + FlowAbortMode + ","
|
||||
+ "numLoops:" + NumLoops + ","
|
||||
+ "infiniteLoop:" + InfiniteLoop + ","
|
||||
+ "infiniteLoopTimeoutTime:" + InfiniteLoopTimeoutTime + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,49 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class UeSetDefaultFocus : ai.Service
|
||||
{
|
||||
public UeSetDefaultFocus(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
KeyboardKey = _buf.GetProperty("keyboard_key").GetString();
|
||||
}
|
||||
|
||||
public static UeSetDefaultFocus DeserializeUeSetDefaultFocus(JsonElement _buf)
|
||||
{
|
||||
return new ai.UeSetDefaultFocus(_buf);
|
||||
}
|
||||
|
||||
public readonly string KeyboardKey;
|
||||
|
||||
public const int __ID__ = 1812449155;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "keyboardKey:" + KeyboardKey + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
50
luban_examples/Projects/CfgValidator/Gen/ai.UeTimeLimit.cs
Normal file
50
luban_examples/Projects/CfgValidator/Gen/ai.UeTimeLimit.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class UeTimeLimit : ai.Decorator
|
||||
{
|
||||
public UeTimeLimit(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
LimitTime = _buf.GetProperty("limit_time").GetSingle();
|
||||
}
|
||||
|
||||
public static UeTimeLimit DeserializeUeTimeLimit(JsonElement _buf)
|
||||
{
|
||||
return new ai.UeTimeLimit(_buf);
|
||||
}
|
||||
|
||||
public readonly float LimitTime;
|
||||
|
||||
public const int __ID__ = 338469720;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "flowAbortMode:" + FlowAbortMode + ","
|
||||
+ "limitTime:" + LimitTime + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
56
luban_examples/Projects/CfgValidator/Gen/ai.UeWait.cs
Normal file
56
luban_examples/Projects/CfgValidator/Gen/ai.UeWait.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class UeWait : ai.Task
|
||||
{
|
||||
public UeWait(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
WaitTime = _buf.GetProperty("wait_time").GetSingle();
|
||||
RandomDeviation = _buf.GetProperty("random_deviation").GetSingle();
|
||||
}
|
||||
|
||||
public static UeWait DeserializeUeWait(JsonElement _buf)
|
||||
{
|
||||
return new ai.UeWait(_buf);
|
||||
}
|
||||
|
||||
public readonly float WaitTime;
|
||||
public readonly float RandomDeviation;
|
||||
|
||||
public const int __ID__ = -512994101;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "ignoreRestartSelf:" + IgnoreRestartSelf + ","
|
||||
+ "waitTime:" + WaitTime + ","
|
||||
+ "randomDeviation:" + RandomDeviation + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class UeWaitBlackboardTime : ai.Task
|
||||
{
|
||||
public UeWaitBlackboardTime(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
BlackboardKey = _buf.GetProperty("blackboard_key").GetString();
|
||||
}
|
||||
|
||||
public static UeWaitBlackboardTime DeserializeUeWaitBlackboardTime(JsonElement _buf)
|
||||
{
|
||||
return new ai.UeWaitBlackboardTime(_buf);
|
||||
}
|
||||
|
||||
public readonly string BlackboardKey;
|
||||
|
||||
public const int __ID__ = 1215378271;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "decorators:" + Luban.StringUtil.CollectionToString(Decorators) + ","
|
||||
+ "services:" + Luban.StringUtil.CollectionToString(Services) + ","
|
||||
+ "ignoreRestartSelf:" + IgnoreRestartSelf + ","
|
||||
+ "blackboardKey:" + BlackboardKey + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.ai
|
||||
{
|
||||
public sealed partial class UpdateDailyBehaviorProps : ai.Service
|
||||
{
|
||||
public UpdateDailyBehaviorProps(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
SatietyKey = _buf.GetProperty("satiety_key").GetString();
|
||||
EnergyKey = _buf.GetProperty("energy_key").GetString();
|
||||
MoodKey = _buf.GetProperty("mood_key").GetString();
|
||||
SatietyLowerThresholdKey = _buf.GetProperty("satiety_lower_threshold_key").GetString();
|
||||
SatietyUpperThresholdKey = _buf.GetProperty("satiety_upper_threshold_key").GetString();
|
||||
EnergyLowerThresholdKey = _buf.GetProperty("energy_lower_threshold_key").GetString();
|
||||
EnergyUpperThresholdKey = _buf.GetProperty("energy_upper_threshold_key").GetString();
|
||||
MoodLowerThresholdKey = _buf.GetProperty("mood_lower_threshold_key").GetString();
|
||||
MoodUpperThresholdKey = _buf.GetProperty("mood_upper_threshold_key").GetString();
|
||||
}
|
||||
|
||||
public static UpdateDailyBehaviorProps DeserializeUpdateDailyBehaviorProps(JsonElement _buf)
|
||||
{
|
||||
return new ai.UpdateDailyBehaviorProps(_buf);
|
||||
}
|
||||
|
||||
public readonly string SatietyKey;
|
||||
public readonly string EnergyKey;
|
||||
public readonly string MoodKey;
|
||||
public readonly string SatietyLowerThresholdKey;
|
||||
public readonly string SatietyUpperThresholdKey;
|
||||
public readonly string EnergyLowerThresholdKey;
|
||||
public readonly string EnergyUpperThresholdKey;
|
||||
public readonly string MoodLowerThresholdKey;
|
||||
public readonly string MoodUpperThresholdKey;
|
||||
|
||||
public const int __ID__ = -61887372;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "nodeName:" + NodeName + ","
|
||||
+ "satietyKey:" + SatietyKey + ","
|
||||
+ "energyKey:" + EnergyKey + ","
|
||||
+ "moodKey:" + MoodKey + ","
|
||||
+ "satietyLowerThresholdKey:" + SatietyLowerThresholdKey + ","
|
||||
+ "satietyUpperThresholdKey:" + SatietyUpperThresholdKey + ","
|
||||
+ "energyLowerThresholdKey:" + EnergyLowerThresholdKey + ","
|
||||
+ "energyUpperThresholdKey:" + EnergyUpperThresholdKey + ","
|
||||
+ "moodLowerThresholdKey:" + MoodLowerThresholdKey + ","
|
||||
+ "moodUpperThresholdKey:" + MoodUpperThresholdKey + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.common
|
||||
{
|
||||
public enum EBoolOperator
|
||||
{
|
||||
AND = 0,
|
||||
OR = 1,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,73 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.common
|
||||
{
|
||||
public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
{
|
||||
public GlobalConfig(JsonElement _buf)
|
||||
{
|
||||
X1 = _buf.GetProperty("x1").GetInt32();
|
||||
X2 = _buf.GetProperty("x2").GetInt32();
|
||||
X3 = _buf.GetProperty("x3").GetInt32();
|
||||
X4 = _buf.GetProperty("x4").GetInt32();
|
||||
X5 = _buf.GetProperty("x5").GetInt32();
|
||||
X6 = _buf.GetProperty("x6").GetInt32();
|
||||
{ var __json0 = _buf.GetProperty("x7"); X7 = new System.Collections.Generic.List<int>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { int __v0; __v0 = __e0.GetInt32(); X7.Add(__v0); } }
|
||||
}
|
||||
|
||||
public static GlobalConfig DeserializeGlobalConfig(JsonElement _buf)
|
||||
{
|
||||
return new common.GlobalConfig(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 背包容量
|
||||
/// </summary>
|
||||
public readonly int X1;
|
||||
public readonly int X2;
|
||||
public readonly int X3;
|
||||
public readonly int X4;
|
||||
public readonly int X5;
|
||||
public readonly int X6;
|
||||
public readonly System.Collections.Generic.List<int> X7;
|
||||
|
||||
public const int __ID__ = -848234488;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "x1:" + X1 + ","
|
||||
+ "x2:" + X2 + ","
|
||||
+ "x3:" + X3 + ","
|
||||
+ "x4:" + X4 + ","
|
||||
+ "x5:" + X5 + ","
|
||||
+ "x6:" + X6 + ","
|
||||
+ "x7:" + Luban.StringUtil.CollectionToString(X7) + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.common
|
||||
{
|
||||
public partial class TbGlobalConfig
|
||||
{
|
||||
|
||||
private readonly common.GlobalConfig _data;
|
||||
|
||||
public TbGlobalConfig(JsonElement _buf)
|
||||
{
|
||||
int n = _buf.GetArrayLength();
|
||||
if (n != 1) throw new SerializationException("table mode=one, but size != 1");
|
||||
_data = common.GlobalConfig.DeserializeGlobalConfig(_buf[0]);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 背包容量
|
||||
/// </summary>
|
||||
public int X1 => _data.X1;
|
||||
public int X2 => _data.X2;
|
||||
public int X3 => _data.X3;
|
||||
public int X4 => _data.X4;
|
||||
public int X5 => _data.X5;
|
||||
public int X6 => _data.X6;
|
||||
public System.Collections.Generic.List<int> X7 => _data.X7;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
_data.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
public enum EClothersStarQualityType
|
||||
{
|
||||
/// <summary>
|
||||
/// 一星
|
||||
/// </summary>
|
||||
ONE = 1,
|
||||
/// <summary>
|
||||
/// 二星
|
||||
/// </summary>
|
||||
TWO = 2,
|
||||
/// <summary>
|
||||
/// 三星
|
||||
/// </summary>
|
||||
THREE = 3,
|
||||
/// <summary>
|
||||
/// 四星
|
||||
/// </summary>
|
||||
FOUR = 4,
|
||||
/// <summary>
|
||||
/// 五星
|
||||
/// </summary>
|
||||
FIVE = 5,
|
||||
/// <summary>
|
||||
/// 六星
|
||||
/// </summary>
|
||||
SIX = 6,
|
||||
/// <summary>
|
||||
/// 七星
|
||||
/// </summary>
|
||||
SEVEN = 7,
|
||||
/// <summary>
|
||||
/// 八星
|
||||
/// </summary>
|
||||
EIGHT = 8,
|
||||
/// <summary>
|
||||
/// 九星
|
||||
/// </summary>
|
||||
NINE = 9,
|
||||
/// <summary>
|
||||
/// 十星
|
||||
/// </summary>
|
||||
TEN = 10,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,27 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
public enum EClothersTag
|
||||
{
|
||||
/// <summary>
|
||||
/// 防晒
|
||||
/// </summary>
|
||||
FANG_SHAI = 1,
|
||||
/// <summary>
|
||||
/// 舞者
|
||||
/// </summary>
|
||||
WU_ZHE = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,51 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
public enum EClothesHidePartType
|
||||
{
|
||||
/// <summary>
|
||||
/// 胸部
|
||||
/// </summary>
|
||||
CHEST = 0,
|
||||
/// <summary>
|
||||
/// 手
|
||||
/// </summary>
|
||||
HEAD = 1,
|
||||
/// <summary>
|
||||
/// 脊柱上
|
||||
/// </summary>
|
||||
SPINE_UPPER = 2,
|
||||
/// <summary>
|
||||
/// 脊柱下
|
||||
/// </summary>
|
||||
SPINE_LOWER = 3,
|
||||
/// <summary>
|
||||
/// 臀部
|
||||
/// </summary>
|
||||
HIP = 4,
|
||||
/// <summary>
|
||||
/// 腿上
|
||||
/// </summary>
|
||||
LEG_UPPER = 5,
|
||||
/// <summary>
|
||||
/// 腿中
|
||||
/// </summary>
|
||||
LEG_MIDDLE = 6,
|
||||
/// <summary>
|
||||
/// 腿下
|
||||
/// </summary>
|
||||
LEG_LOWER = 7,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,59 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
public enum EClothesPropertyType
|
||||
{
|
||||
/// <summary>
|
||||
/// 简约
|
||||
/// </summary>
|
||||
JIAN_YUE = 1,
|
||||
/// <summary>
|
||||
/// 华丽
|
||||
/// </summary>
|
||||
HUA_LI = 2,
|
||||
/// <summary>
|
||||
/// 可爱
|
||||
/// </summary>
|
||||
KE_AI = 3,
|
||||
/// <summary>
|
||||
/// 成熟
|
||||
/// </summary>
|
||||
CHENG_SHU = 4,
|
||||
/// <summary>
|
||||
/// 活泼
|
||||
/// </summary>
|
||||
HUO_PO = 5,
|
||||
/// <summary>
|
||||
/// 优雅
|
||||
/// </summary>
|
||||
YOU_YA = 6,
|
||||
/// <summary>
|
||||
/// 清纯
|
||||
/// </summary>
|
||||
QING_CHUN = 7,
|
||||
/// <summary>
|
||||
/// 性感
|
||||
/// </summary>
|
||||
XING_GAN = 8,
|
||||
/// <summary>
|
||||
/// 清凉
|
||||
/// </summary>
|
||||
QING_LIANG = 9,
|
||||
/// <summary>
|
||||
/// 保暖
|
||||
/// </summary>
|
||||
BAO_NUAN = 10,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,39 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
public enum ECurrencyType
|
||||
{
|
||||
/// <summary>
|
||||
/// 钻石
|
||||
/// </summary>
|
||||
DIAMOND = 1,
|
||||
/// <summary>
|
||||
/// 金币
|
||||
/// </summary>
|
||||
GOLD = 2,
|
||||
/// <summary>
|
||||
/// 银币
|
||||
/// </summary>
|
||||
SILVER = 3,
|
||||
/// <summary>
|
||||
/// 经验
|
||||
/// </summary>
|
||||
EXP = 4,
|
||||
/// <summary>
|
||||
/// 能量点
|
||||
/// </summary>
|
||||
POWER_POINT = 5,
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,42 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
/// <summary>
|
||||
/// 道具品质
|
||||
/// </summary>
|
||||
public enum EItemQuality
|
||||
{
|
||||
/// <summary>
|
||||
/// 白
|
||||
/// </summary>
|
||||
WHITE = 0,
|
||||
/// <summary>
|
||||
/// 绿
|
||||
/// </summary>
|
||||
GREEN = 1,
|
||||
/// <summary>
|
||||
/// 蓝
|
||||
/// </summary>
|
||||
BLUE = 2,
|
||||
/// <summary>
|
||||
/// 紫
|
||||
/// </summary>
|
||||
PURPLE = 3,
|
||||
/// <summary>
|
||||
/// 金
|
||||
/// </summary>
|
||||
GOLDEN = 4,
|
||||
}
|
||||
|
||||
}
|
||||
|
63
luban_examples/Projects/CfgValidator/Gen/item.EMajorType.cs
Normal file
63
luban_examples/Projects/CfgValidator/Gen/item.EMajorType.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
public enum EMajorType
|
||||
{
|
||||
/// <summary>
|
||||
/// 货币
|
||||
/// </summary>
|
||||
CURRENCY = 1,
|
||||
/// <summary>
|
||||
/// 服装
|
||||
/// </summary>
|
||||
CLOTH = 2,
|
||||
/// <summary>
|
||||
/// 任务
|
||||
/// </summary>
|
||||
QUEST = 3,
|
||||
/// <summary>
|
||||
/// 消耗品
|
||||
/// </summary>
|
||||
CONSUMABLES = 4,
|
||||
/// <summary>
|
||||
/// 宝箱
|
||||
/// </summary>
|
||||
TREASURE_BOX = 5,
|
||||
/// <summary>
|
||||
/// 成就和称谓
|
||||
/// </summary>
|
||||
ACHIEVEMENT_AND_TITLE = 6,
|
||||
/// <summary>
|
||||
/// 头像框
|
||||
/// </summary>
|
||||
HEAD_FRAME = 7,
|
||||
/// <summary>
|
||||
/// 语音
|
||||
/// </summary>
|
||||
VOICE = 8,
|
||||
/// <summary>
|
||||
/// 动作
|
||||
/// </summary>
|
||||
ACTION = 9,
|
||||
/// <summary>
|
||||
/// 扩容道具
|
||||
/// </summary>
|
||||
EXPANSION = 10,
|
||||
/// <summary>
|
||||
/// 制作材料
|
||||
/// </summary>
|
||||
MATERIAL = 11,
|
||||
}
|
||||
|
||||
}
|
||||
|
215
luban_examples/Projects/CfgValidator/Gen/item.EMinorType.cs
Normal file
215
luban_examples/Projects/CfgValidator/Gen/item.EMinorType.cs
Normal file
@@ -0,0 +1,215 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
public enum EMinorType
|
||||
{
|
||||
/// <summary>
|
||||
/// 钻石
|
||||
/// </summary>
|
||||
DIAMOND = 101,
|
||||
/// <summary>
|
||||
/// 金币
|
||||
/// </summary>
|
||||
GOLD = 102,
|
||||
/// <summary>
|
||||
/// 银币
|
||||
/// </summary>
|
||||
SILVER = 103,
|
||||
/// <summary>
|
||||
/// 经验
|
||||
/// </summary>
|
||||
EXP = 104,
|
||||
/// <summary>
|
||||
/// 能量点
|
||||
/// </summary>
|
||||
POWER_POINT = 105,
|
||||
/// <summary>
|
||||
/// 发型
|
||||
/// </summary>
|
||||
HAIR_STYLE = 210,
|
||||
/// <summary>
|
||||
/// 外套
|
||||
/// </summary>
|
||||
COAT = 220,
|
||||
/// <summary>
|
||||
/// 上衣
|
||||
/// </summary>
|
||||
UPPER_JACKET = 230,
|
||||
/// <summary>
|
||||
/// 裤子
|
||||
/// </summary>
|
||||
TROUSERS = 241,
|
||||
/// <summary>
|
||||
/// 裙子
|
||||
/// </summary>
|
||||
SKIRT = 242,
|
||||
/// <summary>
|
||||
/// 袜子
|
||||
/// </summary>
|
||||
SOCKS = 250,
|
||||
/// <summary>
|
||||
/// 鞋子
|
||||
/// </summary>
|
||||
SHOES = 260,
|
||||
/// <summary>
|
||||
/// 发饰
|
||||
/// </summary>
|
||||
HAIR_ACCESSORY = 271,
|
||||
/// <summary>
|
||||
/// 帽子
|
||||
/// </summary>
|
||||
HAT = 272,
|
||||
/// <summary>
|
||||
/// 耳饰
|
||||
/// </summary>
|
||||
EARRING = 273,
|
||||
/// <summary>
|
||||
/// 颈饰
|
||||
/// </summary>
|
||||
NECKLACE = 274,
|
||||
/// <summary>
|
||||
/// 腕饰
|
||||
/// </summary>
|
||||
BRACELET = 275,
|
||||
/// <summary>
|
||||
/// 发箍
|
||||
/// </summary>
|
||||
HAIR_CLASP = 276,
|
||||
/// <summary>
|
||||
/// 手套
|
||||
/// </summary>
|
||||
GLOVE = 277,
|
||||
/// <summary>
|
||||
/// 手持物
|
||||
/// </summary>
|
||||
HANDHELD_OBJECT = 278,
|
||||
/// <summary>
|
||||
/// 特殊
|
||||
/// </summary>
|
||||
SPECIAL = 279,
|
||||
/// <summary>
|
||||
/// 底妆
|
||||
/// </summary>
|
||||
BASE_COSMETIC = 281,
|
||||
/// <summary>
|
||||
/// 眉妆
|
||||
/// </summary>
|
||||
EYEBROW_COSMETIC = 282,
|
||||
/// <summary>
|
||||
/// 睫毛
|
||||
/// </summary>
|
||||
EYELASH = 283,
|
||||
/// <summary>
|
||||
/// 美瞳
|
||||
/// </summary>
|
||||
COSMETIC_CONTACT_LENSES = 284,
|
||||
/// <summary>
|
||||
/// 唇妆
|
||||
/// </summary>
|
||||
LIP_COSMETIC = 285,
|
||||
/// <summary>
|
||||
/// 肤色
|
||||
/// </summary>
|
||||
SKIN_COLOR = 286,
|
||||
/// <summary>
|
||||
/// 连衣裙
|
||||
/// </summary>
|
||||
ONE_PIECE_DRESS = 290,
|
||||
/// <summary>
|
||||
/// 换装场景
|
||||
/// </summary>
|
||||
SWITCH_CLOTHES_SCENE = 291,
|
||||
/// <summary>
|
||||
/// 任务道具
|
||||
/// </summary>
|
||||
QUEST = 301,
|
||||
/// <summary>
|
||||
/// 投掷物
|
||||
/// </summary>
|
||||
CAST = 401,
|
||||
/// <summary>
|
||||
/// 刀剑
|
||||
/// </summary>
|
||||
SWORD = 421,
|
||||
/// <summary>
|
||||
/// 弓箭
|
||||
/// </summary>
|
||||
BOW_ARROW = 422,
|
||||
/// <summary>
|
||||
/// 法杖
|
||||
/// </summary>
|
||||
WANDS = 423,
|
||||
/// <summary>
|
||||
/// 特殊工具
|
||||
/// </summary>
|
||||
SPECIAL_TOOL = 424,
|
||||
/// <summary>
|
||||
/// 食物
|
||||
/// </summary>
|
||||
FOOD = 403,
|
||||
/// <summary>
|
||||
/// 宝箱
|
||||
/// </summary>
|
||||
TREASURE_BOX = 501,
|
||||
/// <summary>
|
||||
/// 钥匙
|
||||
/// </summary>
|
||||
KEY = 502,
|
||||
/// <summary>
|
||||
/// 多选一宝箱
|
||||
/// </summary>
|
||||
MULTI_CHOOSE_TREASURE_BOX = 503,
|
||||
/// <summary>
|
||||
/// 成就相关
|
||||
/// </summary>
|
||||
ACHIEVEMENT = 601,
|
||||
/// <summary>
|
||||
/// 称谓相关
|
||||
/// </summary>
|
||||
TITLE = 602,
|
||||
/// <summary>
|
||||
/// 头像框
|
||||
/// </summary>
|
||||
AVATAR_FRAME = 701,
|
||||
/// <summary>
|
||||
/// 语音
|
||||
/// </summary>
|
||||
VOICE = 801,
|
||||
/// <summary>
|
||||
/// 特殊待机动作
|
||||
/// </summary>
|
||||
IDLE_POSE = 901,
|
||||
/// <summary>
|
||||
/// 拍照动作
|
||||
/// </summary>
|
||||
PHOTO_POSE = 902,
|
||||
/// <summary>
|
||||
/// 背包
|
||||
/// </summary>
|
||||
BAG = 1001,
|
||||
/// <summary>
|
||||
/// 好友数量
|
||||
/// </summary>
|
||||
FRIEND_CAPACITY = 1002,
|
||||
/// <summary>
|
||||
/// 制作材料
|
||||
/// </summary>
|
||||
CONSTRUCTION_MATERIAL = 1101,
|
||||
/// <summary>
|
||||
/// 设计图纸
|
||||
/// </summary>
|
||||
DESIGN_DRAWING = 1102,
|
||||
}
|
||||
|
||||
}
|
||||
|
27
luban_examples/Projects/CfgValidator/Gen/item.EUseType.cs
Normal file
27
luban_examples/Projects/CfgValidator/Gen/item.EUseType.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
public enum EUseType
|
||||
{
|
||||
/// <summary>
|
||||
/// 手动
|
||||
/// </summary>
|
||||
MANUAL = 0,
|
||||
/// <summary>
|
||||
/// 自动
|
||||
/// </summary>
|
||||
AUTO = 1,
|
||||
}
|
||||
|
||||
}
|
||||
|
80
luban_examples/Projects/CfgValidator/Gen/item.Item.cs
Normal file
80
luban_examples/Projects/CfgValidator/Gen/item.Item.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
/// <summary>
|
||||
/// 道具
|
||||
/// </summary>
|
||||
public sealed partial class Item : Luban.BeanBase
|
||||
{
|
||||
public Item(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
Name = _buf.GetProperty("name").GetString();
|
||||
MinorType = (item.EMinorType)_buf.GetProperty("minor_type").GetInt32();
|
||||
Quality = (item.EItemQuality)_buf.GetProperty("quality").GetInt32();
|
||||
IconBackgroud = _buf.GetProperty("icon_backgroud").GetString();
|
||||
IconMask = _buf.GetProperty("icon_mask").GetString();
|
||||
Desc = _buf.GetProperty("desc").GetString();
|
||||
ShowOrder = _buf.GetProperty("show_order").GetInt32();
|
||||
}
|
||||
|
||||
public static Item DeserializeItem(JsonElement _buf)
|
||||
{
|
||||
return new item.Item(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 道具id
|
||||
/// </summary>
|
||||
public readonly int Id;
|
||||
public readonly string Name;
|
||||
public readonly item.EMinorType MinorType;
|
||||
public readonly item.EItemQuality Quality;
|
||||
public readonly string IconBackgroud;
|
||||
public readonly string IconMask;
|
||||
public readonly string Desc;
|
||||
public readonly int ShowOrder;
|
||||
|
||||
public const int __ID__ = 2107285806;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "name:" + Name + ","
|
||||
+ "minorType:" + MinorType + ","
|
||||
+ "quality:" + Quality + ","
|
||||
+ "iconBackgroud:" + IconBackgroud + ","
|
||||
+ "iconMask:" + IconMask + ","
|
||||
+ "desc:" + Desc + ","
|
||||
+ "showOrder:" + ShowOrder + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
55
luban_examples/Projects/CfgValidator/Gen/item.TbItem.cs
Normal file
55
luban_examples/Projects/CfgValidator/Gen/item.TbItem.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.item
|
||||
{
|
||||
/// <summary>
|
||||
/// 道具表
|
||||
/// </summary>
|
||||
public partial class TbItem
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<int, item.Item> _dataMap;
|
||||
private readonly System.Collections.Generic.List<item.Item> _dataList;
|
||||
|
||||
public TbItem(JsonElement _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<int, item.Item>();
|
||||
_dataList = new System.Collections.Generic.List<item.Item>();
|
||||
|
||||
foreach(JsonElement _ele in _buf.EnumerateArray())
|
||||
{
|
||||
item.Item _v;
|
||||
_v = item.Item.DeserializeItem(_ele);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.Id, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<int, item.Item> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<item.Item> DataList => _dataList;
|
||||
|
||||
public item.Item GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public item.Item Get(int key) => _dataMap[key];
|
||||
public item.Item this[int key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
foreach(var _v in _dataList)
|
||||
{
|
||||
_v.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
50
luban_examples/Projects/CfgValidator/Gen/l10n.L10NDemo.cs
Normal file
50
luban_examples/Projects/CfgValidator/Gen/l10n.L10NDemo.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.l10n
|
||||
{
|
||||
public sealed partial class L10NDemo : Luban.BeanBase
|
||||
{
|
||||
public L10NDemo(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
Text = _buf.GetProperty("text").GetString();
|
||||
}
|
||||
|
||||
public static L10NDemo DeserializeL10NDemo(JsonElement _buf)
|
||||
{
|
||||
return new l10n.L10NDemo(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly string Text;
|
||||
|
||||
public const int __ID__ = -331195887;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "text:" + Text + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
50
luban_examples/Projects/CfgValidator/Gen/l10n.PatchDemo.cs
Normal file
50
luban_examples/Projects/CfgValidator/Gen/l10n.PatchDemo.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.l10n
|
||||
{
|
||||
public sealed partial class PatchDemo : Luban.BeanBase
|
||||
{
|
||||
public PatchDemo(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
Value = _buf.GetProperty("value").GetInt32();
|
||||
}
|
||||
|
||||
public static PatchDemo DeserializePatchDemo(JsonElement _buf)
|
||||
{
|
||||
return new l10n.PatchDemo(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly int Value;
|
||||
|
||||
public const int __ID__ = -1707294656;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "value:" + Value + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
52
luban_examples/Projects/CfgValidator/Gen/l10n.TbL10NDemo.cs
Normal file
52
luban_examples/Projects/CfgValidator/Gen/l10n.TbL10NDemo.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.l10n
|
||||
{
|
||||
public partial class TbL10NDemo
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<int, l10n.L10NDemo> _dataMap;
|
||||
private readonly System.Collections.Generic.List<l10n.L10NDemo> _dataList;
|
||||
|
||||
public TbL10NDemo(JsonElement _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<int, l10n.L10NDemo>();
|
||||
_dataList = new System.Collections.Generic.List<l10n.L10NDemo>();
|
||||
|
||||
foreach(JsonElement _ele in _buf.EnumerateArray())
|
||||
{
|
||||
l10n.L10NDemo _v;
|
||||
_v = l10n.L10NDemo.DeserializeL10NDemo(_ele);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.Id, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<int, l10n.L10NDemo> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<l10n.L10NDemo> DataList => _dataList;
|
||||
|
||||
public l10n.L10NDemo GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public l10n.L10NDemo Get(int key) => _dataMap[key];
|
||||
public l10n.L10NDemo this[int key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
foreach(var _v in _dataList)
|
||||
{
|
||||
_v.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
52
luban_examples/Projects/CfgValidator/Gen/l10n.TbPatchDemo.cs
Normal file
52
luban_examples/Projects/CfgValidator/Gen/l10n.TbPatchDemo.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.l10n
|
||||
{
|
||||
public partial class TbPatchDemo
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<int, l10n.PatchDemo> _dataMap;
|
||||
private readonly System.Collections.Generic.List<l10n.PatchDemo> _dataList;
|
||||
|
||||
public TbPatchDemo(JsonElement _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<int, l10n.PatchDemo>();
|
||||
_dataList = new System.Collections.Generic.List<l10n.PatchDemo>();
|
||||
|
||||
foreach(JsonElement _ele in _buf.EnumerateArray())
|
||||
{
|
||||
l10n.PatchDemo _v;
|
||||
_v = l10n.PatchDemo.DeserializePatchDemo(_ele);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.Id, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<int, l10n.PatchDemo> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<l10n.PatchDemo> DataList => _dataList;
|
||||
|
||||
public l10n.PatchDemo GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public l10n.PatchDemo Get(int key) => _dataMap[key];
|
||||
public l10n.PatchDemo this[int key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
foreach(var _v in _dataList)
|
||||
{
|
||||
_v.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
52
luban_examples/Projects/CfgValidator/Gen/tag.TbTestTag.cs
Normal file
52
luban_examples/Projects/CfgValidator/Gen/tag.TbTestTag.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.tag
|
||||
{
|
||||
public partial class TbTestTag
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<int, tag.TestTag> _dataMap;
|
||||
private readonly System.Collections.Generic.List<tag.TestTag> _dataList;
|
||||
|
||||
public TbTestTag(JsonElement _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<int, tag.TestTag>();
|
||||
_dataList = new System.Collections.Generic.List<tag.TestTag>();
|
||||
|
||||
foreach(JsonElement _ele in _buf.EnumerateArray())
|
||||
{
|
||||
tag.TestTag _v;
|
||||
_v = tag.TestTag.DeserializeTestTag(_ele);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.Id, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<int, tag.TestTag> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<tag.TestTag> DataList => _dataList;
|
||||
|
||||
public tag.TestTag GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public tag.TestTag Get(int key) => _dataMap[key];
|
||||
public tag.TestTag this[int key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
foreach(var _v in _dataList)
|
||||
{
|
||||
_v.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
50
luban_examples/Projects/CfgValidator/Gen/tag.TestTag.cs
Normal file
50
luban_examples/Projects/CfgValidator/Gen/tag.TestTag.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.tag
|
||||
{
|
||||
public sealed partial class TestTag : Luban.BeanBase
|
||||
{
|
||||
public TestTag(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
Value = _buf.GetProperty("value").GetString();
|
||||
}
|
||||
|
||||
public static TestTag DeserializeTestTag(JsonElement _buf)
|
||||
{
|
||||
return new tag.TestTag(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly string Value;
|
||||
|
||||
public const int __ID__ = 1742933812;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "value:" + Value + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
25
luban_examples/Projects/CfgValidator/Gen/test.AccessFlag.cs
Normal file
25
luban_examples/Projects/CfgValidator/Gen/test.AccessFlag.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
[System.Flags]
|
||||
public enum AccessFlag
|
||||
{
|
||||
WRITE = 1,
|
||||
READ = 2,
|
||||
TRUNCATE = 4,
|
||||
NEW = 8,
|
||||
READ_WRITE = WRITE|READ,
|
||||
}
|
||||
|
||||
}
|
||||
|
53
luban_examples/Projects/CfgValidator/Gen/test.Circle.cs
Normal file
53
luban_examples/Projects/CfgValidator/Gen/test.Circle.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
/// <summary>
|
||||
/// 圆
|
||||
/// </summary>
|
||||
public sealed partial class Circle : Shape
|
||||
{
|
||||
public Circle(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Radius = _buf.GetProperty("radius").GetSingle();
|
||||
}
|
||||
|
||||
public static Circle DeserializeCircle(JsonElement _buf)
|
||||
{
|
||||
return new test.Circle(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 半径
|
||||
/// </summary>
|
||||
public readonly float Radius;
|
||||
|
||||
public const int __ID__ = 2131829196;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "radius:" + Radius + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class CompactString : Luban.BeanBase
|
||||
{
|
||||
public CompactString(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
S2 = _buf.GetProperty("s2").GetString();
|
||||
S3 = _buf.GetProperty("s3").GetString();
|
||||
}
|
||||
|
||||
public static CompactString DeserializeCompactString(JsonElement _buf)
|
||||
{
|
||||
return new test.CompactString(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly string S2;
|
||||
public readonly string S3;
|
||||
|
||||
public const int __ID__ = 1968089240;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "s2:" + S2 + ","
|
||||
+ "s3:" + S3 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class CompositeJsonTable1 : Luban.BeanBase
|
||||
{
|
||||
public CompositeJsonTable1(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
X = _buf.GetProperty("x").GetString();
|
||||
}
|
||||
|
||||
public static CompositeJsonTable1 DeserializeCompositeJsonTable1(JsonElement _buf)
|
||||
{
|
||||
return new test.CompositeJsonTable1(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly string X;
|
||||
|
||||
public const int __ID__ = 1566207894;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "x:" + X + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class CompositeJsonTable2 : Luban.BeanBase
|
||||
{
|
||||
public CompositeJsonTable2(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
Y = _buf.GetProperty("y").GetInt32();
|
||||
}
|
||||
|
||||
public static CompositeJsonTable2 DeserializeCompositeJsonTable2(JsonElement _buf)
|
||||
{
|
||||
return new test.CompositeJsonTable2(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly int Y;
|
||||
|
||||
public const int __ID__ = 1566207895;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "y:" + Y + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class CompositeJsonTable3 : Luban.BeanBase
|
||||
{
|
||||
public CompositeJsonTable3(JsonElement _buf)
|
||||
{
|
||||
A = _buf.GetProperty("a").GetInt32();
|
||||
B = _buf.GetProperty("b").GetInt32();
|
||||
}
|
||||
|
||||
public static CompositeJsonTable3 DeserializeCompositeJsonTable3(JsonElement _buf)
|
||||
{
|
||||
return new test.CompositeJsonTable3(_buf);
|
||||
}
|
||||
|
||||
public readonly int A;
|
||||
public readonly int B;
|
||||
|
||||
public const int __ID__ = 1566207896;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "a:" + A + ","
|
||||
+ "b:" + B + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DateTimeRange : Luban.BeanBase
|
||||
{
|
||||
public DateTimeRange(JsonElement _buf)
|
||||
{
|
||||
StartTime = _buf.GetProperty("start_time").GetInt64();
|
||||
EndTime = _buf.GetProperty("end_time").GetInt64();
|
||||
}
|
||||
|
||||
public static DateTimeRange DeserializeDateTimeRange(JsonElement _buf)
|
||||
{
|
||||
return new test.DateTimeRange(_buf);
|
||||
}
|
||||
|
||||
public readonly long StartTime;
|
||||
public readonly long EndTime;
|
||||
|
||||
public const int __ID__ = 495315430;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "startTime:" + StartTime + ","
|
||||
+ "endTime:" + EndTime + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
50
luban_examples/Projects/CfgValidator/Gen/test.Decorator.cs
Normal file
50
luban_examples/Projects/CfgValidator/Gen/test.Decorator.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class Decorator : test.ItemBase
|
||||
{
|
||||
public Decorator(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Duration = _buf.GetProperty("duration").GetInt32();
|
||||
}
|
||||
|
||||
public static Decorator DeserializeDecorator(JsonElement _buf)
|
||||
{
|
||||
return new test.Decorator(_buf);
|
||||
}
|
||||
|
||||
public readonly int Duration;
|
||||
|
||||
public const int __ID__ = -625155649;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "name:" + Name + ","
|
||||
+ "desc:" + Desc + ","
|
||||
+ "duration:" + Duration + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
48
luban_examples/Projects/CfgValidator/Gen/test.DemoD2.cs
Normal file
48
luban_examples/Projects/CfgValidator/Gen/test.DemoD2.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DemoD2 : test.DemoDynamic
|
||||
{
|
||||
public DemoD2(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
X2 = _buf.GetProperty("x2").GetInt32();
|
||||
}
|
||||
|
||||
public static DemoD2 DeserializeDemoD2(JsonElement _buf)
|
||||
{
|
||||
return new test.DemoD2(_buf);
|
||||
}
|
||||
|
||||
public readonly int X2;
|
||||
|
||||
public const int __ID__ = -2138341747;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "x1:" + X1 + ","
|
||||
+ "x2:" + X2 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
51
luban_examples/Projects/CfgValidator/Gen/test.DemoD3.cs
Normal file
51
luban_examples/Projects/CfgValidator/Gen/test.DemoD3.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public abstract partial class DemoD3 : test.DemoDynamic
|
||||
{
|
||||
public DemoD3(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
X3 = _buf.GetProperty("x3").GetInt32();
|
||||
}
|
||||
|
||||
public static DemoD3 DeserializeDemoD3(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "DemoE1": return new test.DemoE1(_buf);
|
||||
case "test.login.RoleInfo": return new test.login.RoleInfo(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
public readonly int X3;
|
||||
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "x1:" + X1 + ","
|
||||
+ "x3:" + X3 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
48
luban_examples/Projects/CfgValidator/Gen/test.DemoD5.cs
Normal file
48
luban_examples/Projects/CfgValidator/Gen/test.DemoD5.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DemoD5 : test.DemoDynamic
|
||||
{
|
||||
public DemoD5(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
Time = test.DateTimeRange.DeserializeDateTimeRange(_buf.GetProperty("time"));
|
||||
}
|
||||
|
||||
public static DemoD5 DeserializeDemoD5(JsonElement _buf)
|
||||
{
|
||||
return new test.DemoD5(_buf);
|
||||
}
|
||||
|
||||
public readonly test.DateTimeRange Time;
|
||||
|
||||
public const int __ID__ = -2138341744;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
Time?.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "x1:" + X1 + ","
|
||||
+ "time:" + Time + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
51
luban_examples/Projects/CfgValidator/Gen/test.DemoDynamic.cs
Normal file
51
luban_examples/Projects/CfgValidator/Gen/test.DemoDynamic.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public abstract partial class DemoDynamic : Luban.BeanBase
|
||||
{
|
||||
public DemoDynamic(JsonElement _buf)
|
||||
{
|
||||
X1 = _buf.GetProperty("x1").GetInt32();
|
||||
}
|
||||
|
||||
public static DemoDynamic DeserializeDemoDynamic(JsonElement _buf)
|
||||
{
|
||||
switch (_buf.GetProperty("$type").GetString())
|
||||
{
|
||||
case "DemoD2": return new test.DemoD2(_buf);
|
||||
case "DemoE1": return new test.DemoE1(_buf);
|
||||
case "test.login.RoleInfo": return new test.login.RoleInfo(_buf);
|
||||
case "DemoD5": return new test.DemoD5(_buf);
|
||||
default: throw new SerializationException();
|
||||
}
|
||||
}
|
||||
|
||||
public readonly int X1;
|
||||
|
||||
|
||||
public virtual void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "x1:" + X1 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
49
luban_examples/Projects/CfgValidator/Gen/test.DemoE1.cs
Normal file
49
luban_examples/Projects/CfgValidator/Gen/test.DemoE1.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DemoE1 : test.DemoD3
|
||||
{
|
||||
public DemoE1(JsonElement _buf) : base(_buf)
|
||||
{
|
||||
X4 = _buf.GetProperty("x4").GetInt32();
|
||||
}
|
||||
|
||||
public static DemoE1 DeserializeDemoE1(JsonElement _buf)
|
||||
{
|
||||
return new test.DemoE1(_buf);
|
||||
}
|
||||
|
||||
public readonly int X4;
|
||||
|
||||
public const int __ID__ = -2138341717;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public override void ResolveRef(Tables tables)
|
||||
{
|
||||
base.ResolveRef(tables);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "x1:" + X1 + ","
|
||||
+ "x3:" + X3 + ","
|
||||
+ "x4:" + X4 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
48
luban_examples/Projects/CfgValidator/Gen/test.DemoE2.cs
Normal file
48
luban_examples/Projects/CfgValidator/Gen/test.DemoE2.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public partial struct DemoE2
|
||||
{
|
||||
public DemoE2(JsonElement _buf)
|
||||
{
|
||||
{if (_buf.TryGetProperty("y1", out var _j) && _j.ValueKind != JsonValueKind.Null) { Y1 = _j.GetInt32(); } else { Y1 = null; } }
|
||||
Y2 = _buf.GetProperty("y2").GetBoolean();
|
||||
}
|
||||
|
||||
public static DemoE2 DeserializeDemoE2(JsonElement _buf)
|
||||
{
|
||||
return new test.DemoE2(_buf);
|
||||
}
|
||||
|
||||
public readonly int? Y1;
|
||||
public readonly bool Y2;
|
||||
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "y1:" + Y1 + ","
|
||||
+ "y2:" + Y2 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
36
luban_examples/Projects/CfgValidator/Gen/test.DemoEnum.cs
Normal file
36
luban_examples/Projects/CfgValidator/Gen/test.DemoEnum.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public enum DemoEnum
|
||||
{
|
||||
NONE = 0,
|
||||
/// <summary>
|
||||
/// aa
|
||||
/// </summary>
|
||||
A = 1,
|
||||
/// <summary>
|
||||
/// bb
|
||||
/// </summary>
|
||||
B = 2,
|
||||
/// <summary>
|
||||
/// cc
|
||||
/// </summary>
|
||||
C = 4,
|
||||
/// <summary>
|
||||
/// dd
|
||||
/// </summary>
|
||||
D = 5,
|
||||
}
|
||||
|
||||
}
|
||||
|
24
luban_examples/Projects/CfgValidator/Gen/test.DemoFlag.cs
Normal file
24
luban_examples/Projects/CfgValidator/Gen/test.DemoFlag.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
[System.Flags]
|
||||
public enum DemoFlag
|
||||
{
|
||||
A = 1,
|
||||
B = 2,
|
||||
C = 4,
|
||||
D = 8,
|
||||
}
|
||||
|
||||
}
|
||||
|
50
luban_examples/Projects/CfgValidator/Gen/test.DemoGroup.cs
Normal file
50
luban_examples/Projects/CfgValidator/Gen/test.DemoGroup.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DemoGroup : Luban.BeanBase
|
||||
{
|
||||
public DemoGroup(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
X5 = test.InnerGroup.DeserializeInnerGroup(_buf.GetProperty("x5"));
|
||||
}
|
||||
|
||||
public static DemoGroup DeserializeDemoGroup(JsonElement _buf)
|
||||
{
|
||||
return new test.DemoGroup(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly test.InnerGroup X5;
|
||||
|
||||
public const int __ID__ = -379263008;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
X5?.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "x5:" + X5 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,94 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DemoPrimitiveTypesTable : Luban.BeanBase
|
||||
{
|
||||
public DemoPrimitiveTypesTable(JsonElement _buf)
|
||||
{
|
||||
X1 = _buf.GetProperty("x1").GetBoolean();
|
||||
X2 = _buf.GetProperty("x2").GetByte();
|
||||
X3 = _buf.GetProperty("x3").GetInt16();
|
||||
X4 = _buf.GetProperty("x4").GetInt32();
|
||||
X5 = _buf.GetProperty("x5").GetInt64();
|
||||
X6 = _buf.GetProperty("x6").GetSingle();
|
||||
X7 = _buf.GetProperty("x7").GetDouble();
|
||||
S1 = _buf.GetProperty("s1").GetString();
|
||||
S2 = _buf.GetProperty("s2").GetString();
|
||||
V2 = vec2.Deserializevec2(_buf.GetProperty("v2"));
|
||||
V3 = vec3.Deserializevec3(_buf.GetProperty("v3"));
|
||||
V4 = vec4.Deserializevec4(_buf.GetProperty("v4"));
|
||||
T1 = _buf.GetProperty("t1").GetInt64();
|
||||
}
|
||||
|
||||
public static DemoPrimitiveTypesTable DeserializeDemoPrimitiveTypesTable(JsonElement _buf)
|
||||
{
|
||||
return new test.DemoPrimitiveTypesTable(_buf);
|
||||
}
|
||||
|
||||
public readonly bool X1;
|
||||
public readonly byte X2;
|
||||
public readonly short X3;
|
||||
public readonly int X4;
|
||||
public readonly long X5;
|
||||
public readonly float X6;
|
||||
public readonly double X7;
|
||||
public readonly string S1;
|
||||
public readonly string S2;
|
||||
public readonly vec2 V2;
|
||||
public readonly vec3 V3;
|
||||
public readonly vec4 V4;
|
||||
public readonly long T1;
|
||||
|
||||
public const int __ID__ = -370934083;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "x1:" + X1 + ","
|
||||
+ "x2:" + X2 + ","
|
||||
+ "x3:" + X3 + ","
|
||||
+ "x4:" + X4 + ","
|
||||
+ "x5:" + X5 + ","
|
||||
+ "x6:" + X6 + ","
|
||||
+ "x7:" + X7 + ","
|
||||
+ "s1:" + S1 + ","
|
||||
+ "s2:" + S2 + ","
|
||||
+ "v2:" + V2 + ","
|
||||
+ "v3:" + V3 + ","
|
||||
+ "v4:" + V4 + ","
|
||||
+ "t1:" + T1 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DemoSingletonType : Luban.BeanBase
|
||||
{
|
||||
public DemoSingletonType(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
Name = _buf.GetProperty("name").GetString();
|
||||
Date = test.DemoDynamic.DeserializeDemoDynamic(_buf.GetProperty("date"));
|
||||
}
|
||||
|
||||
public static DemoSingletonType DeserializeDemoSingletonType(JsonElement _buf)
|
||||
{
|
||||
return new test.DemoSingletonType(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly string Name;
|
||||
public readonly test.DemoDynamic Date;
|
||||
|
||||
public const int __ID__ = 539196998;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
Date?.ResolveRef(tables);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "name:" + Name + ","
|
||||
+ "date:" + Date + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
46
luban_examples/Projects/CfgValidator/Gen/test.DemoType1.cs
Normal file
46
luban_examples/Projects/CfgValidator/Gen/test.DemoType1.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DemoType1 : Luban.BeanBase
|
||||
{
|
||||
public DemoType1(JsonElement _buf)
|
||||
{
|
||||
X1 = _buf.GetProperty("x1").GetInt32();
|
||||
}
|
||||
|
||||
public static DemoType1 DeserializeDemoType1(JsonElement _buf)
|
||||
{
|
||||
return new test.DemoType1(_buf);
|
||||
}
|
||||
|
||||
public readonly int X1;
|
||||
|
||||
public const int __ID__ = -367048296;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "x1:" + X1 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
130
luban_examples/Projects/CfgValidator/Gen/test.DemoType2.cs
Normal file
130
luban_examples/Projects/CfgValidator/Gen/test.DemoType2.cs
Normal file
@@ -0,0 +1,130 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DemoType2 : Luban.BeanBase
|
||||
{
|
||||
public DemoType2(JsonElement _buf)
|
||||
{
|
||||
X4 = _buf.GetProperty("x4").GetInt32();
|
||||
X1 = _buf.GetProperty("x1").GetBoolean();
|
||||
X2 = _buf.GetProperty("x2").GetByte();
|
||||
X3 = _buf.GetProperty("x3").GetInt16();
|
||||
X5 = _buf.GetProperty("x5").GetInt64();
|
||||
X6 = _buf.GetProperty("x6").GetSingle();
|
||||
X7 = _buf.GetProperty("x7").GetDouble();
|
||||
X80 = _buf.GetProperty("x8_0").GetInt16();
|
||||
X8 = _buf.GetProperty("x8").GetInt32();
|
||||
X9 = _buf.GetProperty("x9").GetInt64();
|
||||
X10 = _buf.GetProperty("x10").GetString();
|
||||
X12 = test.DemoType1.DeserializeDemoType1(_buf.GetProperty("x12"));
|
||||
X13 = (test.DemoEnum)_buf.GetProperty("x13").GetInt32();
|
||||
X14 = test.DemoDynamic.DeserializeDemoDynamic(_buf.GetProperty("x14"));
|
||||
S1 = _buf.GetProperty("s1").GetString();
|
||||
T1 = _buf.GetProperty("t1").GetInt64();
|
||||
{ var __json0 = _buf.GetProperty("k1"); int _n0 = __json0.GetArrayLength(); K1 = new int[_n0]; int __index0=0; foreach(JsonElement __e0 in __json0.EnumerateArray()) { int __v0; __v0 = __e0.GetInt32(); K1[__index0++] = __v0; } }
|
||||
{ var __json0 = _buf.GetProperty("k2"); K2 = new System.Collections.Generic.List<int>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { int __v0; __v0 = __e0.GetInt32(); K2.Add(__v0); } }
|
||||
{ var __json0 = _buf.GetProperty("k5"); K5 = new System.Collections.Generic.HashSet<int>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { int __v0; __v0 = __e0.GetInt32(); K5.Add(__v0); } }
|
||||
{ var __json0 = _buf.GetProperty("k8"); K8 = new System.Collections.Generic.Dictionary<int, int>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { int _k0; _k0 = __e0[0].GetInt32(); int _v0; _v0 = __e0[1].GetInt32(); K8.Add(_k0, _v0); } }
|
||||
{ var __json0 = _buf.GetProperty("k9"); K9 = new System.Collections.Generic.List<test.DemoE2>(__json0.GetArrayLength()); foreach(JsonElement __e0 in __json0.EnumerateArray()) { test.DemoE2 __v0; __v0 = test.DemoE2.DeserializeDemoE2(__e0); K9.Add(__v0); } }
|
||||
{ var __json0 = _buf.GetProperty("k15"); int _n0 = __json0.GetArrayLength(); K15 = new test.DemoDynamic[_n0]; int __index0=0; foreach(JsonElement __e0 in __json0.EnumerateArray()) { test.DemoDynamic __v0; __v0 = test.DemoDynamic.DeserializeDemoDynamic(__e0); K15[__index0++] = __v0; } }
|
||||
}
|
||||
|
||||
public static DemoType2 DeserializeDemoType2(JsonElement _buf)
|
||||
{
|
||||
return new test.DemoType2(_buf);
|
||||
}
|
||||
|
||||
public readonly int X4;
|
||||
public readonly bool X1;
|
||||
public readonly byte X2;
|
||||
public readonly short X3;
|
||||
public readonly long X5;
|
||||
public readonly float X6;
|
||||
public readonly double X7;
|
||||
public readonly short X80;
|
||||
public readonly int X8;
|
||||
public readonly long X9;
|
||||
public readonly string X10;
|
||||
public readonly test.DemoType1 X12;
|
||||
public readonly test.DemoEnum X13;
|
||||
public readonly test.DemoDynamic X14;
|
||||
public readonly string S1;
|
||||
public readonly long T1;
|
||||
public readonly int[] K1;
|
||||
public readonly System.Collections.Generic.List<int> K2;
|
||||
public readonly System.Collections.Generic.HashSet<int> K5;
|
||||
public readonly System.Collections.Generic.Dictionary<int, int> K8;
|
||||
public readonly System.Collections.Generic.List<test.DemoE2> K9;
|
||||
public readonly test.DemoDynamic[] K15;
|
||||
|
||||
public const int __ID__ = -367048295;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
X12?.ResolveRef(tables);
|
||||
|
||||
X14?.ResolveRef(tables);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var _e in K15) { _e?.ResolveRef(tables); }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "x4:" + X4 + ","
|
||||
+ "x1:" + X1 + ","
|
||||
+ "x2:" + X2 + ","
|
||||
+ "x3:" + X3 + ","
|
||||
+ "x5:" + X5 + ","
|
||||
+ "x6:" + X6 + ","
|
||||
+ "x7:" + X7 + ","
|
||||
+ "x80:" + X80 + ","
|
||||
+ "x8:" + X8 + ","
|
||||
+ "x9:" + X9 + ","
|
||||
+ "x10:" + X10 + ","
|
||||
+ "x12:" + X12 + ","
|
||||
+ "x13:" + X13 + ","
|
||||
+ "x14:" + X14 + ","
|
||||
+ "s1:" + S1 + ","
|
||||
+ "t1:" + T1 + ","
|
||||
+ "k1:" + Luban.StringUtil.CollectionToString(K1) + ","
|
||||
+ "k2:" + Luban.StringUtil.CollectionToString(K2) + ","
|
||||
+ "k5:" + Luban.StringUtil.CollectionToString(K5) + ","
|
||||
+ "k8:" + Luban.StringUtil.CollectionToString(K8) + ","
|
||||
+ "k9:" + Luban.StringUtil.CollectionToString(K9) + ","
|
||||
+ "k15:" + Luban.StringUtil.CollectionToString(K15) + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public sealed partial class DetectEncoding : Luban.BeanBase
|
||||
{
|
||||
public DetectEncoding(JsonElement _buf)
|
||||
{
|
||||
Id = _buf.GetProperty("id").GetInt32();
|
||||
Name = _buf.GetProperty("name").GetString();
|
||||
}
|
||||
|
||||
public static DetectEncoding DeserializeDetectEncoding(JsonElement _buf)
|
||||
{
|
||||
return new test.DetectEncoding(_buf);
|
||||
}
|
||||
|
||||
public readonly int Id;
|
||||
public readonly string Name;
|
||||
|
||||
public const int __ID__ = -1154609646;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "name:" + Name + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public enum ETestEmptyEnum
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,22 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cfg.test
|
||||
{
|
||||
public enum ETestEmptyEnum2
|
||||
{
|
||||
SMALL_THAN_256 = 255,
|
||||
X_256 = 256,
|
||||
X_257 = 257,
|
||||
}
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user