Skip to content

Commit c4ad8ac

Browse files
Merge branch 'dev' into pr/764
2 parents 205dab7 + a2109ba commit c4ad8ac

File tree

34 files changed

+417
-278
lines changed

34 files changed

+417
-278
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ https://demo.openwebgal.com
2424

2525
#### 完整的游戏
2626

27-
[铃色☆记忆](http://hoshinasuzu.cn/) by 星奈组 [备用链接](http://hoshinasuzu.cc/)
27+
[WebGAL 官方游戏展示页](https://www.openwebgal.com/games/)
2828

2929
[Elf of Era Idols Project](https://store.steampowered.com/app/2414730/Elf_of_Era_Idols_Project/) (通过 Steam 获取)
3030

README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ https://demo.openwebgal.com
2626

2727
A complete game:
2828

29-
[铃色☆记忆](http://hoshinasuzu.cn/) by Hoshinasuzu [备用链接](http://hoshinasuzu.cc/)
29+
[WebGAL games showcase](https://www.openwebgal.com/games/)
3030

3131
### Creating Games with WebGAL
3232

README_FR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ https://demo.openwebgal.com
2727

2828
Un jeu complet :
2929

30-
[铃色☆记忆](http://hoshinasuzu.cn/) de Hoshinasuzu [Lien de secours](http://hoshinasuzu.cc/)
30+
[Présentation officielle des jeux WebGAL](https://www.openwebgal.com/games/)
3131

3232
### Créer des jeux avec WebGAL
3333

README_JP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ https://webgal-jp-demo.onrender.com/
2626

2727
現在公開されているゲーム(中国語):
2828

29-
[ベルカラー☆メモリー](http://hoshinasuzu.cn/suzu.html) by Hoshinasuzu [代替リンク](http://hoshinasuzu.cc/)
29+
[WebGAL公式ゲーム紹介ページ](https://www.openwebgal.com/games/)
3030

3131
### WebGALでゲームを作成
3232

README_KO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ https://demo.openwebgal.com
2626

2727
완성된 게임:
2828

29-
[铃色☆记忆](http://hoshinasuzu.cn/) by Hoshinasuzu [백업 링크](http://hoshinasuzu.cc/)
29+
[WebGAL 공식 게임 소개 페이지](https://www.openwebgal.com/games/)
3030

3131
### WebGAL로 게임 만들기
3232

packages/parser/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "webgal-parser",
3-
"version": "4.5.13",
3+
"version": "4.5.16",
44
"description": "WebGAL script parser",
55
"scripts": {
66
"test": "vitest",
77
"coverage": "vitest run --coverage",
88
"build": "rimraf -rf ./build && rollup --config",
9+
"prepublishOnly": "npm run build",
910
"build-ci": "rollup --config",
1011
"debug": "tsx test/debug.ts",
1112
"debug-scss-parser": "tsx test/debugCssParser.ts",

packages/parser/src/sceneParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const sceneParser = (
2929
ADD_NEXT_ARG_LIST: commandType[],
3030
SCRIPT_CONFIG_MAP: ConfigMap,
3131
): IScene => {
32-
const rawSentenceList = rawScene.split('\n'); // 原始句子列表
32+
const rawSentenceList = rawScene.replaceAll('\r', '').split('\n'); // 原始句子列表
3333

3434
// 去分号留到后面去做了,现在注释要单独处理
3535
const rawSentenceListWithoutEmpty = rawSentenceList;

packages/parser/src/scriptParser/argsParser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export function argsParser(
2323
});
2424
rawArgsList.forEach((e) => {
2525
const equalSignIndex = e.indexOf('=');
26-
let argName = e.slice(0, equalSignIndex);
27-
let argValue: string | undefined = e.slice(equalSignIndex + 1);
26+
let argName = e.slice(0, equalSignIndex).trim();
27+
let argValue: string | undefined = e.slice(equalSignIndex + 1).trim();
2828
if (equalSignIndex < 0) {
29-
argName = e;
29+
argName = e.trim();
3030
argValue = undefined;
3131
}
3232
// 判断是不是语音参数

packages/parser/src/scriptParser/scriptParser.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ export const scriptParser = (
3636
// 正式开始解析
3737

3838
// 去分号
39-
let newSentenceRaw = sentenceRaw.split(/(?<!\\);/)[0];
39+
const commentSplit = sentenceRaw.split(/(?<!\\);/);
40+
let newSentenceRaw = commentSplit[0].trim();
4041
newSentenceRaw = newSentenceRaw.replaceAll('\\;',';');
42+
const sentenceComment = commentSplit[1] ?? '';
4143
if (newSentenceRaw === '') {
4244
// 注释提前返回
4345
return {
4446
command: commandType.comment, // 语句类型
4547
commandRaw: 'comment', // 命令原始内容,方便调试
46-
content: sentenceRaw.split(';')[1] ?? '', // 语句内容
48+
content: sentenceComment.trim(), // 语句内容
4749
args: [{ key: 'next', value: true }], // 参数列表
4850
sentenceAssets: [], // 语句携带的资源列表
4951
subScene: [], // 语句携带的子场景

packages/webgal/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
22
"name": "webgal-engine",
3-
"version": "4.5.14",
3+
"version": "4.5.16",
44
"scripts": {
55
"dev": "vite --host --port 3000",
66
"build": "cross-env NODE_ENV=production tsc && vite build --base=./",
77
"preview": "vite preview",
8-
"lint": "eslint src/** --fix"
8+
"lint": "eslint src/** --fix",
9+
"prepublishOnly": "npm run build"
910
},
1011
"dependencies": {
1112
"@emotion/css": "^11.11.2",
1213
"@icon-park/react": "^1.4.2",
1314
"@reduxjs/toolkit": "^1.8.1",
1415
"angular-expressions": "^1.4.3",
15-
"axios": "^0.28.0",
16+
"axios": "^0.30.2",
1617
"cloudlogjs": "^1.0.9",
18+
"gifuct-js": "^2.1.2",
1719
"i18next": "^22.4.15",
1820
"localforage": "^1.10.0",
1921
"lodash": "^4.17.21",

0 commit comments

Comments
 (0)