diff --git a/README.en-us.md b/README.en-us.md
index 5ec5b18..c557373 100644
--- a/README.en-us.md
+++ b/README.en-us.md
@@ -322,7 +322,7 @@ Reward is a substructure containing the three fields of "int item_id; int count;
| ##var | id | shape | shape2 td> |
| ##type | int | Shape | Shape td> |
-| ##var | | __type__ | radius | width | height | | | | |
+| ##var | | $type | radius | width | height | | | | |
| 1 | Circle | 10 | | | Circle | 100 | | |
| 2 | Rectangle | | 10 | 20 | Rectangle | 10 | 20 | |
| 3 | Circle | 10 | | | Triangle | 15 | 15 | 15 |
@@ -402,14 +402,14 @@ Take the behavior tree as an example to show how to configure the behavior tree
"executor": "SERVER",
"blackboard_id": "demo",
"root": {
- "__type__": "Sequence",
+ "$type": "Sequence",
"id": 1,
"node_name": "test",
"desc": "root",
"services": [],
"decorators": [
{
- "__type__": "UeLoop",
+ "$type": "UeLoop",
"id": 3,
"node_name": "",
"flow_abort_mode": "SELF",
@@ -420,7 +420,7 @@ Take the behavior tree as an example to show how to configure the behavior tree
],
"children": [
{
- "__type__": "UeWait",
+ "$type": "UeWait",
"id": 30,
"node_name": "",
"ignore_restart_self": false,
@@ -430,7 +430,7 @@ Take the behavior tree as an example to show how to configure the behavior tree
"decorators": []
},
{
- "__type__": "MoveToRandomLocation",
+ "$type": "MoveToRandomLocation",
"id": 75,
"node_name": "",
"ignore_restart_self": false,
diff --git a/src/Luban.Job.Cfg/Source/Defs/DefBean.cs b/src/Luban.Job.Cfg/Source/Defs/DefBean.cs
index a13821d..cb7a91f 100644
--- a/src/Luban.Job.Cfg/Source/Defs/DefBean.cs
+++ b/src/Luban.Job.Cfg/Source/Defs/DefBean.cs
@@ -26,7 +26,7 @@ namespace Luban.Job.Cfg.Defs
public string JsonTypeNameKey => JSON_TYPE_NAME_KEY;
-
+ public string LuaTypeNameKey => LUA_TYPE_NAME_KEY;
public string Alias { get; }
diff --git a/src/Luban.Server/Templates/config/lua_bin/all.tpl b/src/Luban.Server/Templates/config/lua_bin/all.tpl
index 02734bf..8e1692d 100644
--- a/src/Luban.Server/Templates/config/lua_bin/all.tpl
+++ b/src/Luban.Server/Templates/config/lua_bin/all.tpl
@@ -83,7 +83,7 @@ local function InitTypes(methods)
{{~end~}}
local class = SimpleClass()
class._id = {{bean.id}}
- class._name = '{{bean.full_name}}'
+ class['{{bean.lua_type_name_key}}'] = '{{bean.full_name}}'
local id2name = { {{for c in bean.hierarchy_not_abstract_children}} [{{c.id}}] = '{{c.full_name}}', {{end}} }
{{~if bean.is_abstract_type~}}
class._deserialize = function(bs)
@@ -105,7 +105,7 @@ local function InitTypes(methods)
return o
end
{{~end~}}
- beans[class._name] = class
+ beans[class['{{bean.lua_type_name_key}}']] = class
end
{{~end~}}
diff --git a/src/Luban.Server/Templates/config/lua_lua/all.tpl b/src/Luban.Server/Templates/config/lua_lua/all.tpl
index 07eb94e..849ccab 100644
--- a/src/Luban.Server/Templates/config/lua_lua/all.tpl
+++ b/src/Luban.Server/Templates/config/lua_lua/all.tpl
@@ -9,21 +9,6 @@ local enums =
{{~end~}}
}
-local beans = {}
-{{~ for bean in beans ~}}
----@class {{bean.full_name}} {{if bean.parent_def_type}}:{{bean.parent}} {{end}}
-{{~ for field in bean.export_fields~}}
----@field public {{field.convention_name}} {{lua_comment_type field.ctype}}
-{{~end~}}
-beans['{{bean.full_name}}'] =
-{
-{{~ for field in bean.hierarchy_export_fields ~}}
- { name='{{field.convention_name}}', type='{{lua_comment_type field.ctype}}'},
-{{~end~}}
-}
-
-{{~end~}}
-
local tables =
{
{{~for table in tables ~}}
@@ -37,4 +22,4 @@ local tables =
{{~end~}}
}
-return { enums = enums, beans = beans, tables = tables }
+return { enums = enums, tables = tables }