From e897d6b5c0d498e9d763db270ea6e19056a2dfa9 Mon Sep 17 00:00:00 2001 From: Carson Lin <396098651@qq.com> Date: Thu, 22 Sep 2022 15:18:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9CS=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=A5=E9=87=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Luban.Server/Templates/config/cs_bin/tables.tpl | 4 ++-- src/Luban.Server/Templates/config/cs_dotnet_json/bean.tpl | 5 ++--- src/Luban.Server/Templates/config/cs_dotnet_json/table.tpl | 6 +++--- src/Luban.Server/Templates/config/cs_dotnet_json/tables.tpl | 6 +++--- src/Luban.Server/Templates/config/cs_unity_json/bean.tpl | 5 ++--- src/Luban.Server/Templates/config/cs_unity_json/table.tpl | 5 ++--- src/Luban.Server/Templates/config/cs_unity_json/tables.tpl | 6 +++--- 7 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/Luban.Server/Templates/config/cs_bin/tables.tpl b/src/Luban.Server/Templates/config/cs_bin/tables.tpl index 2f5516d..0ab51ba 100644 --- a/src/Luban.Server/Templates/config/cs_bin/tables.tpl +++ b/src/Luban.Server/Templates/config/cs_bin/tables.tpl @@ -7,7 +7,7 @@ using Bright.Serialization; }} -{{cs_start_name_space_grace x.namespace_with_top_module}} +{{cs_start_name_space_grace x.namespace}} public partial class {{name}} { {{~for table in tables ~}} @@ -45,4 +45,4 @@ public partial class {{name}} partial void PostResolve(); } -{{cs_end_name_space_grace x.namespace_with_top_module}} \ No newline at end of file +{{cs_end_name_space_grace x.namespace}} \ No newline at end of file diff --git a/src/Luban.Server/Templates/config/cs_dotnet_json/bean.tpl b/src/Luban.Server/Templates/config/cs_dotnet_json/bean.tpl index c649f6a..7d64df2 100644 --- a/src/Luban.Server/Templates/config/cs_dotnet_json/bean.tpl +++ b/src/Luban.Server/Templates/config/cs_dotnet_json/bean.tpl @@ -10,8 +10,7 @@ using System.Text.Json; hierarchy_export_fields = x.hierarchy_export_fields }} -namespace {{x.namespace_with_top_module}} -{ +{{cs_start_name_space_grace x.namespace_with_top_module}} {{~if x.comment != '' ~}} /// @@ -124,4 +123,4 @@ public {{x.cs_class_modifier}} partial class {{name}} : {{if parent_def_type}} { partial void PostInit(); partial void PostResolve(); } -} +{{cs_end_name_space_grace x.namespace_with_top_module}} diff --git a/src/Luban.Server/Templates/config/cs_dotnet_json/table.tpl b/src/Luban.Server/Templates/config/cs_dotnet_json/table.tpl index c6a1f0c..6b5ce0a 100644 --- a/src/Luban.Server/Templates/config/cs_dotnet_json/table.tpl +++ b/src/Luban.Server/Templates/config/cs_dotnet_json/table.tpl @@ -10,8 +10,8 @@ using System.Text.Json; value_type = x.value_ttype }} -namespace {{x.namespace_with_top_module}} -{ +{{cs_start_name_space_grace x.namespace_with_top_module}} + {{~if x.comment != '' ~}} /// @@ -170,4 +170,4 @@ public sealed partial class {{name}} partial void PostResolve(); } -} \ No newline at end of file +{{cs_end_name_space_grace x.namespace_with_top_module}} \ No newline at end of file diff --git a/src/Luban.Server/Templates/config/cs_dotnet_json/tables.tpl b/src/Luban.Server/Templates/config/cs_dotnet_json/tables.tpl index 2dcf994..d6276bd 100644 --- a/src/Luban.Server/Templates/config/cs_dotnet_json/tables.tpl +++ b/src/Luban.Server/Templates/config/cs_dotnet_json/tables.tpl @@ -5,8 +5,8 @@ using System.Text.Json; namespace = x.namespace tables = x.tables }} -namespace {{namespace}} -{ +{{cs_start_name_space_grace x.namespace}} + public sealed partial class {{name}} { @@ -45,4 +45,4 @@ public sealed partial class {{name}} partial void PostResolve(); } -} +{{cs_end_name_space_grace x.namespace}} diff --git a/src/Luban.Server/Templates/config/cs_unity_json/bean.tpl b/src/Luban.Server/Templates/config/cs_unity_json/bean.tpl index 6fee67d..e6fa16c 100644 --- a/src/Luban.Server/Templates/config/cs_unity_json/bean.tpl +++ b/src/Luban.Server/Templates/config/cs_unity_json/bean.tpl @@ -10,8 +10,7 @@ using SimpleJSON; hierarchy_export_fields = x.hierarchy_export_fields }} -namespace {{x.namespace_with_top_module}} -{ +{{cs_start_name_space_grace x.namespace_with_top_module}} {{~if x.comment != '' ~}} /// @@ -125,4 +124,4 @@ public {{x.cs_class_modifier}} partial class {{name}} : {{if parent_def_type}} { partial void PostInit(); partial void PostResolve(); } -} +{{cs_end_name_space_grace x.namespace_with_top_module}} diff --git a/src/Luban.Server/Templates/config/cs_unity_json/table.tpl b/src/Luban.Server/Templates/config/cs_unity_json/table.tpl index 13c2bd1..c4fb3f4 100644 --- a/src/Luban.Server/Templates/config/cs_unity_json/table.tpl +++ b/src/Luban.Server/Templates/config/cs_unity_json/table.tpl @@ -10,8 +10,7 @@ using SimpleJSON; value_type = x.value_ttype }} -namespace {{x.namespace_with_top_module}} -{ +{{cs_start_name_space_grace x.namespace_with_top_module}} {{~if x.comment != '' ~}} /// @@ -174,4 +173,4 @@ public sealed partial class {{name}} partial void PostResolve(); } -} \ No newline at end of file +{{cs_end_name_space_grace x.namespace_with_top_module}} \ No newline at end of file diff --git a/src/Luban.Server/Templates/config/cs_unity_json/tables.tpl b/src/Luban.Server/Templates/config/cs_unity_json/tables.tpl index 7a8d7b2..3725d1f 100644 --- a/src/Luban.Server/Templates/config/cs_unity_json/tables.tpl +++ b/src/Luban.Server/Templates/config/cs_unity_json/tables.tpl @@ -5,8 +5,8 @@ using SimpleJSON; namespace = x.namespace tables = x.tables }} -namespace {{namespace}} -{ + +{{cs_start_name_space_grace x.namespace}} public sealed partial class {{name}} { @@ -45,4 +45,4 @@ public sealed partial class {{name}} partial void PostResolve(); } -} +{{cs_end_name_space_grace x.namespace}} \ No newline at end of file From 472c912f0fb981581fb5bb3dfd7d66f72d7c3fa1 Mon Sep 17 00:00:00 2001 From: Carson Lin <396098651@qq.com> Date: Thu, 22 Sep 2022 15:22:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=A4=9A=E7=BB=B4=E6=95=B0=E7=BB=84=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Luban.Job.Common/Source/Types/TArray.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Luban.Job.Common/Source/Types/TArray.cs b/src/Luban.Job.Common/Source/Types/TArray.cs index 496eb69..eff2afa 100644 --- a/src/Luban.Job.Common/Source/Types/TArray.cs +++ b/src/Luban.Job.Common/Source/Types/TArray.cs @@ -26,6 +26,10 @@ namespace Luban.Job.Common.Types Dimension = (ElementType as TArray).Dimension + 1; FinalElementType = (ElementType as TArray).FinalElementType; } + else + { + FinalElementType = elementType; + } } public override bool TryParseFrom(string s)