From c8a94e5a0accd87489bf5930c486a2e6900f49f5 Mon Sep 17 00:00:00 2001 From: Mahiru Date: Fri, 30 Aug 2024 19:51:08 +0800 Subject: [PATCH 1/2] fix: return {key} when did not get value from state --- packages/webgal/package.json | 2 +- packages/webgal/public/game/template/template.json | 2 +- packages/webgal/src/Core/gameScripts/setVar.ts | 4 ++-- packages/webgal/src/config/info.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/webgal/package.json b/packages/webgal/package.json index 1d2f930a2..ed59ae5ac 100644 --- a/packages/webgal/package.json +++ b/packages/webgal/package.json @@ -1,7 +1,7 @@ { "name": "webgal", "private": true, - "version": "4.5.5", + "version": "4.5.6", "scripts": { "dev": "vite --host --port 3000", "build": "cross-env NODE_ENV=production tsc && vite build --base=./", diff --git a/packages/webgal/public/game/template/template.json b/packages/webgal/public/game/template/template.json index 742428439..8a398b19a 100644 --- a/packages/webgal/public/game/template/template.json +++ b/packages/webgal/public/game/template/template.json @@ -1,4 +1,4 @@ { "name":"Default Template", - "webgal-version":"4.5.5" + "webgal-version":"4.5.6" } diff --git a/packages/webgal/src/Core/gameScripts/setVar.ts b/packages/webgal/src/Core/gameScripts/setVar.ts index 3bc391ff5..a1f8d18f6 100644 --- a/packages/webgal/src/Core/gameScripts/setVar.ts +++ b/packages/webgal/src/Core/gameScripts/setVar.ts @@ -111,13 +111,13 @@ export function getValueFromState(key: string) { } /** - * 取不到时返回 key + * 取不到时返回 {key} */ export function getValueFromStateElseKey(key: string) { const valueFromState = getValueFromState(key); if (valueFromState === null || valueFromState === undefined) { logger.warn('valueFromState result null, key = ' + key); - return key; + return `{${key}}`; } return valueFromState; } diff --git a/packages/webgal/src/config/info.ts b/packages/webgal/src/config/info.ts index 0cac928f3..ec3046f15 100644 --- a/packages/webgal/src/config/info.ts +++ b/packages/webgal/src/config/info.ts @@ -1,5 +1,5 @@ export const __INFO = { - version: 'WebGAL 4.5.5', + version: 'WebGAL 4.5.6', contributors: [ // 现在改为跳转到 GitHub 了 ], From 85a62558cc4180626fca4c20e52378d5121b1c2f Mon Sep 17 00:00:00 2001 From: Mahiru Date: Fri, 30 Aug 2024 19:53:36 +0800 Subject: [PATCH 2/2] Update releasenote.md --- releasenote.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/releasenote.md b/releasenote.md index f1ff0bcff..9bcccc0aa 100644 --- a/releasenote.md +++ b/releasenote.md @@ -12,6 +12,8 @@ #### 修复 +4.5.6 修复:无法从状态中获取到对应 key 的变量时,返回 {key} 以避免变换不生效 + 修复了 `-concat` 选项动画在新行中的错误。 修复了样式定义时 ruby 不显示的问题。 @@ -52,6 +54,8 @@ Added a new parameter to control "execute the next statement after the performan #### Bug Fixes +4.5.6 Fix: When the corresponding key variable cannot be obtained from the state, return {key} to avoid ineffective transformation. + Fixed an animation error with the `-concat` option in a new line. Fixed an issue where ruby was not displayed when a style was defined. @@ -92,6 +96,8 @@ Fixed the logo image issue. #### 修正 +4.5.6 修正:状態から対応する key の変数が取得できない場合、{key} を返すようにし、変換が無効になるのを回避しました + `-concat` オプションのアニメーションが新しい行でエラーになる問題を修正しました。 スタイルが定義されているときにルビが表示されない問題を修正しました。