Skip to content

fix: script reference description#89

Merged
MakinoharaShoko merged 1 commit into
OpenWebGAL:mainfrom
HardyNLee:fix/minor-issue
May 27, 2026
Merged

fix: script reference description#89
MakinoharaShoko merged 1 commit into
OpenWebGAL:mainfrom
HardyNLee:fix/minor-issue

Conversation

@HardyNLee
Copy link
Copy Markdown

介绍

修改了诸多小地方

  • 修正动画类命令的 keep 参数的示例
  • 修正部分地方的笔误
  • 修正 unlockCg unlockBgm 关于 name 参数的描述
  • 动画参考章节关于 ease 的部分复用参数描述
  • 补充了 transform 参数会被 enter 参数覆盖的描述
  • 补充了关于 choose changeScene 跳转场景后,后续语句不会被执行的描述
  • 补充了 label 命令的描述
  • 优化了 -when setVar 的代码示例

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the WebGAL script reference documentation across several markdown files, correcting typos, clarifying behavior (such as scene transitions, label definitions, and parameter overrides), and refactoring some shared argument descriptions. The review feedback points out a logical contradiction in the label.md changes regarding whether a label can be defined multiple times, suggesting a rewrite to clarify that avoiding duplicate labels is a best practice rather than a strict syntax limitation.

Comment on lines +14 to +16
每个标签在一个场景文件中只能 **定义一次** ,但不同场景文件可以使用相同的标签名称。

如果在同一场景文件中定义了多个同名标签,像 `choose` 和 `jumpLabel` 这样的命令会从场景文件的开头,从上往下搜索,跳转到第一个符合条件的标签位置。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

这两段描述在逻辑上存在轻微的矛盾。第一段提到“只能定义一次”,而第二段又解释了“如果定义了多个同名标签”时的引擎行为。为了避免给读者带来困惑,建议将“只能定义一次”修改为“建议只定义一次”或“应该只定义一次”,以表明这是一种最佳实践而非硬性语法限制。

Suggested change
每个标签在一个场景文件中只能 **定义一次** ,但不同场景文件可以使用相同的标签名称
如果在同一场景文件中定义了多个同名标签,像 `choose``jumpLabel` 这样的命令会从场景文件的开头,从上往下搜索,跳转到第一个符合条件的标签位置。
虽然技术上允许,但建议每个标签在一个场景文件中只定义一次。不同场景文件可以使用相同的标签名称
如果在同一场景文件中定义了多个同名标签,像 choose 和 jumpLabel 这样的命令会从场景文件的开头,从上往下搜索,跳转到第一个符合条件的标签位置。

@MakinoharaShoko MakinoharaShoko merged commit 398a518 into OpenWebGAL:main May 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants