feat: 标准化占位符, 增加模板

This commit is contained in:
2025-11-29 23:38:03 +08:00
parent d647e84db0
commit 8da042ccd3
13 changed files with 402 additions and 103 deletions

View File

@@ -6,5 +6,9 @@
|变量名|描述|
|:----|:----|
|`__mod_name__`|项目名|
|`__mod_name_lower__`|项目名小写驼峰|
|`{{mod_name}}`|项目名|
|`{{mod_name_lower}}`|项目名小写驼峰|
|`{{behavior_pack_uuid}}`|行为包 UUID|
|`{{resource_pack_uuid}}`|资源包 UUID|
|`{{behavior_module_uuid}}`|行为包模块 UUID|
|`{{resource_module_uuid}}`|资源包模块 UUID|

View File

@@ -1,7 +1,7 @@
ProjectName = "Circus"
ProjectName = "{{mod_name}}"
ServerSystemName = "CircusServerSystem"
ServerSystemPath = "circusScripts.modServer.serverSystem.CircusServerSystem"
ServerSystemName = "{{mod_name}}ServerSystem"
ServerSystemPath = "{{mod_name_lower}}Scripts.modServer.serverSystem.{{mod_name}}ServerSystem"
ClientSystemName = "CircusClientSystem"
ClientSystemPath = "circusScripts.modClient.clientSystem.CircusClientSystem"
ClientSystemName = "{{mod_name}}ClientSystem"
ClientSystemPath = "{{mod_name_lower}}Scripts.modClient.clientSystem.{{mod_name}}ClientSystem"

View File

@@ -3,7 +3,7 @@
{
"description": "",
"type": "data",
"uuid": "{behavior_module_uuid}",
"uuid": "{{behavior_module_uuid}}",
"version": [
0,
0,
@@ -14,7 +14,7 @@
"header": {
"description": "",
"name": "behavior_pack",
"uuid": "{behavior_pack_uuid}",
"uuid": "{{behavior_pack_uuid}}",
"version": [
0,
0,

View File

@@ -8,7 +8,7 @@
0
],
"name": "resource_pack",
"uuid": "{resource_pack_uuid}",
"uuid": "{{resource_pack_uuid}}",
"version": [
0,
0,
@@ -19,7 +19,7 @@
{
"description": "",
"type": "resources",
"uuid": "{resource_module_uuid}",
"uuid": "{{resource_module_uuid}}",
"version": [
0,
0,

View File

@@ -0,0 +1,28 @@
[template]
name = "default"
description = "默认 emod 项目模板"
[[renames]]
from = "behavior_pack/exampleScripts"
to = "behavior_pack/{{mod_name_lower}}Scripts"
[[renames]]
from = "behavior_pack"
to = "behavior_pack_{{behavior_pack_uuid_short}}"
[[renames]]
from = "resource_pack"
to = "resource_pack_{{resource_pack_uuid_short}}"
[variables]
mod_name = { required = true, description = "项目名称" }
mod_name_lower = { required = true, description = "项目名称(小写驼峰)" }
behavior_pack_uuid = { required = true, description = "行为包 UUID" }
resource_pack_uuid = { required = true, description = "资源包 UUID" }
behavior_module_uuid = { required = true, description = "行为包模块 UUID" }
resource_module_uuid = { required = true, description = "资源包模块 UUID" }
behavior_pack_uuid_short = { required = true, description = "行为包 UUID 前8位" }
resource_pack_uuid_short = { required = true, description = "资源包 UUID 前8位" }
[process]
file_extensions = ["json", "py", "lang", "txt"]

View File

@@ -1,6 +1,6 @@
[
{
"pack_id": "{behavior_pack_uuid}",
"pack_id": "{{behavior_pack_uuid}}",
"type": "Addon",
"version": [
0,

View File

@@ -1,6 +1,6 @@
[
{
"pack_id": "{resource_pack_uuid}",
"pack_id": "{{resource_pack_uuid}}",
"type": "Addon",
"version": [
0,