feat: 标准化占位符, 增加模板
This commit is contained in:
@@ -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|
|
||||
@@ -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"
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
28
examples/default/template.toml
Normal file
28
examples/default/template.toml
Normal 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"]
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"pack_id": "{behavior_pack_uuid}",
|
||||
"pack_id": "{{behavior_pack_uuid}}",
|
||||
"type": "Addon",
|
||||
"version": [
|
||||
0,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"pack_id": "{resource_pack_uuid}",
|
||||
"pack_id": "{{resource_pack_uuid}}",
|
||||
"type": "Addon",
|
||||
"version": [
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user