Skip to content

Commit

Permalink
feat: game directory can be input and normalized when creating a game
Browse files Browse the repository at this point in the history
  • Loading branch information
nini22P committed Feb 18, 2025
1 parent 879526e commit 86aaa22
Show file tree
Hide file tree
Showing 12 changed files with 212 additions and 158 deletions.
8 changes: 5 additions & 3 deletions packages/origine2/src/api/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ export interface GameInfoDto {
export interface CreateGameDto {
/** The name of the game to be created */
gameName: string;
/** The dir of the game to be created */
gameDir: string;
/** The name of the derivative to be used */
derivative: string;
/** The name of the template to be applied */
templateName: string;
derivative?: string;
/** The dir of the template to be applied */
templateDir?: string;
}

export interface EditFileNameDto {
Expand Down
11 changes: 7 additions & 4 deletions packages/origine2/src/config/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1228,19 +1228,22 @@
"type": "string",
"description": "The name of the game to be created"
},
"gameDir": {
"type": "string",
"description": "The dir of the game to be created"
},
"derivative": {
"type": "string",
"description": "The name of the derivative to be used"
},
"templateName": {
"templateDir": {
"type": "string",
"description": "The name of the template to be applied"
"description": "The dir of the template to be applied"
}
},
"required": [
"gameName",
"derivative",
"templateName"
"gameDir"
]
},
"EditFileNameDto": {
Expand Down
79 changes: 43 additions & 36 deletions packages/origine2/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ msgstr "unlockBgm:;"
msgid "unlockCg:;"
msgstr "unlockCg:;"

#: src/pages/dashboard/Sidebar.tsx:60
#: src/pages/dashboard/Sidebar.tsx:65
#: src/pages/dashboard/Sidebar.tsx:62
#: src/pages/dashboard/Sidebar.tsx:67
msgid "WebGAL Classic"
msgstr "WebGAL Classic"

#: src/pages/dashboard/Sidebar.tsx:50
#: src/pages/dashboard/Sidebar.tsx:54
#: src/pages/dashboard/Sidebar.tsx:52
#: src/pages/dashboard/Sidebar.tsx:56
msgid "WebGAL Standard"
msgstr "WebGAL Standard"

Expand Down Expand Up @@ -444,7 +444,7 @@ msgid "最小高度"
msgstr "Min Height"

#: src/pages/dashboard/About.tsx:41
#: src/pages/dashboard/DashBoard.tsx:161
#: src/pages/dashboard/DashBoard.tsx:157
msgid "最新版本"
msgstr "Latest Version"

Expand Down Expand Up @@ -482,16 +482,16 @@ msgstr "Change background image"

#: src/components/Assets/Assets.tsx:209
#: src/components/Assets/Assets.tsx:249
#: src/pages/dashboard/Sidebar.tsx:106
#: src/pages/dashboard/TemplateSidebar.tsx:77
#: src/pages/dashboard/Sidebar.tsx:126
#: src/pages/dashboard/TemplateSidebar.tsx:78
msgid "创建"
msgstr "Create"

#: src/pages/dashboard/TemplateSidebar.tsx:56
#: src/pages/dashboard/TemplateSidebar.tsx:57
msgid "创建新模板"
msgstr "Create new template"

#: src/pages/dashboard/Sidebar.tsx:94
#: src/pages/dashboard/Sidebar.tsx:101
msgid "创建新游戏"
msgstr "Create new game"

Expand Down Expand Up @@ -568,7 +568,7 @@ msgstr "Single line comment"
msgid "反射电影滤镜"
msgstr "Reflection film filter"

#: src/pages/dashboard/DashBoard.tsx:156
#: src/pages/dashboard/DashBoard.tsx:152
msgid "发现新版本"
msgstr "New version detected"

Expand Down Expand Up @@ -825,7 +825,7 @@ msgstr "Left side figure"
msgid "左对齐"
msgstr "Left align"

#: src/pages/dashboard/DashBoard.tsx:112
#: src/pages/dashboard/DashBoard.tsx:108
msgid "已创建"
msgstr "Created"

Expand Down Expand Up @@ -875,15 +875,15 @@ msgid "张开嘴"
msgstr "Open mouth"

#: src/pages/dashboard/About.tsx:37
#: src/pages/dashboard/DashBoard.tsx:160
#: src/pages/dashboard/DashBoard.tsx:156
msgid "当前版本"
msgstr "Current version"

#: src/pages/editor/GraphicalEditor/SentenceEditor/Say.tsx:142
#~ msgid "快速执行"
#~ msgstr ""

#: src/pages/dashboard/DashBoard.tsx:170
#: src/pages/dashboard/DashBoard.tsx:166
msgid "忽略此版本"
msgstr "Ignore this version"

Expand Down Expand Up @@ -1125,11 +1125,11 @@ msgstr "Create new file"
msgid "新建文件夹"
msgstr "Create new folder"

#: src/pages/dashboard/TemplateSidebar.tsx:52
#: src/pages/dashboard/TemplateSidebar.tsx:53
msgid "新建模板"
msgstr "Create new template"

#: src/pages/dashboard/Sidebar.tsx:90
#: src/pages/dashboard/Sidebar.tsx:97
msgid "新建游戏"
msgstr "Create new game"

Expand All @@ -1149,22 +1149,23 @@ msgstr "Preview in new tab"
#~ msgid "新模板名"
#~ msgstr "New template name"

#: src/pages/dashboard/Sidebar.tsx:100
#: src/pages/dashboard/Sidebar.tsx:111
msgid "新游戏名"
msgstr "New game name"

#: src/pages/dashboard/TemplateSidebar.tsx:23
#: src/pages/dashboard/TemplateSidebar.tsx:24
#: src/pages/dashboard/TemplateSidebar.tsx:36
#: src/pages/dashboard/TemplateSidebar.tsx:25
#: src/pages/dashboard/TemplateSidebar.tsx:37
#: src/pages/dashboard/TemplateSidebar.tsx:65
#: src/pages/dashboard/TemplateSidebar.tsx:73
#: src/pages/dashboard/TemplateSidebar.tsx:38
#: src/pages/dashboard/TemplateSidebar.tsx:66
#: src/pages/dashboard/TemplateSidebar.tsx:74
msgid "新的模板"
msgstr "New template"

#: src/pages/dashboard/Sidebar.tsx:34
#: src/pages/dashboard/Sidebar.tsx:75
#: src/pages/dashboard/Sidebar.tsx:99
#: src/pages/dashboard/Sidebar.tsx:35
#: src/pages/dashboard/Sidebar.tsx:36
#: src/pages/dashboard/Sidebar.tsx:82
#: src/pages/dashboard/Sidebar.tsx:110
msgid "新的游戏"
msgstr "New game"

Expand Down Expand Up @@ -1286,22 +1287,22 @@ msgstr "Title background music"
msgid "根文本长度 (rem)"
msgstr "Root Font Size (rem)"

#: src/pages/dashboard/DashBoard.tsx:218
#: src/pages/dashboard/DashBoard.tsx:214
#: src/pages/editor/EditorSidebar/EditorSidebar.tsx:110
msgid "模板"
msgstr "Template"

#: src/pages/dashboard/TemplateSidebar.tsx:43
#: src/pages/dashboard/TemplateSidebar.tsx:44
msgid "模板列表"
msgstr "Template list"

#: src/pages/dashboard/TemplateSidebar.tsx:57
#: src/pages/dashboard/TemplateSidebar.tsx:66
#: src/pages/dashboard/TemplateSidebar.tsx:58
#: src/pages/dashboard/TemplateSidebar.tsx:67
msgid "模板名称"
msgstr "Template name"

#: src/pages/dashboard/TemplateSidebar.tsx:68
#: src/pages/dashboard/TemplateSidebar.tsx:74
#: src/pages/dashboard/TemplateSidebar.tsx:69
#: src/pages/dashboard/TemplateSidebar.tsx:75
msgid "模板目录"
msgstr "Template directory"

Expand Down Expand Up @@ -1391,18 +1392,19 @@ msgstr "Clear special effects of current stage"
msgid "清除特效"
msgstr "Clear effects"

#: src/pages/dashboard/DashBoard.tsx:216
#: src/pages/dashboard/DashBoard.tsx:212
msgid "游戏"
msgstr "Games"

#: src/pages/dashboard/Sidebar.tsx:81
#: src/pages/dashboard/Sidebar.tsx:88
msgid "游戏列表"
msgstr "Game list"

#: src/pages/editor/Topbar/tabs/GameConfig/GameConfig.tsx:133
msgid "游戏包名"
msgstr "Game package name"

#: src/pages/dashboard/Sidebar.tsx:102
#: src/pages/editor/Topbar/tabs/GameConfig/GameConfig.tsx:121
msgid "游戏名称"
msgstr "Game name"
Expand All @@ -1415,6 +1417,11 @@ msgstr "Game icon"
msgid "游戏控制"
msgstr "Game control"

#: src/pages/dashboard/Sidebar.tsx:113
#: src/pages/dashboard/Sidebar.tsx:119
msgid "游戏目录"
msgstr "Game directory"

#: src/pages/editor/Topbar/tabs/GameConfig/GameConfig.tsx:129
msgid "游戏简介"
msgstr "Game description"
Expand Down Expand Up @@ -1670,7 +1677,7 @@ msgid "舞台对象控制"
msgstr "Stage object control"

#: src/pages/dashboard/About.tsx:48
#: src/pages/dashboard/DashBoard.tsx:166
#: src/pages/dashboard/DashBoard.tsx:162
msgid "获取最新版本"
msgstr "Download Latest Version"

Expand Down Expand Up @@ -1780,8 +1787,8 @@ msgstr "This command is not recognized, please open script editing mode to edit
msgid "该文件类型不支持预览"
msgstr "This file type does not support preview"

#: src/pages/dashboard/DashBoard.tsx:199
#: src/pages/dashboard/DashBoard.tsx:200
#: src/pages/dashboard/DashBoard.tsx:195
#: src/pages/dashboard/DashBoard.tsx:196
#: src/pages/editor/Topbar/tabs/Settings/SettingsTab.tsx:56
#: src/pages/editor/Topbar/tabs/Settings/SettingsTab.tsx:62
msgid "语言"
Expand Down Expand Up @@ -1867,15 +1874,15 @@ msgstr "Choose Scene File"
msgid "选择小头像"
msgstr "Choose Avatar"

#: src/pages/dashboard/Sidebar.tsx:103
#: src/pages/dashboard/Sidebar.tsx:123
msgid "选择应用的模板"
msgstr "Select apply template"

#: src/pages/editor/GraphicalEditor/SentenceEditor/PlayEffect.tsx:26
msgid "选择效果音文件"
msgstr "Choose Sound Effect File"

#: src/pages/dashboard/Sidebar.tsx:101
#: src/pages/dashboard/Sidebar.tsx:121
msgid "选择游戏引擎版本"
msgstr "Select game engine version"

Expand Down
Loading

0 comments on commit 86aaa22

Please sign in to comment.