Create a static scene #1

Closed
kornerr wants to merge 37 commits from mahjong/mahjong:scn into master
pull from: mahjong/mahjong:scn
3 changed files with 13 additions and 4 deletions
Showing only changes of commit 32d4059d62 - Show all commits

No files matched your search

+9
View File
@@ -121,6 +121,15 @@ util/rm-mac-geom # reset the app's saved window geometry
otherwise the build fails on `F.<field>` being unresolved.
- `dialect.swift` is generated — edits there are overwritten on the next
`util/build-mac`. Change the source (`dialect.yml` / `components/`) instead.
- **Validate `dialect.yml` after edits** (e.g. `ruby -ryaml -e 'YAML.load_file("dialect.yml")'`).
Every should-branch label (`1. Upon each ...`) MUST end with a colon — the
parser (`components/yml/ymlFun.swift`) blindly `dropLast()`s it, so a missing
colon silently eats the label's last character in the generated `about`
comment. Note the file can never pass a *strict* YAML parser: condition and
reaction lines (under `if:` / `then:`) contain unquoted `: ` (e.g.
`c.countText = "Count: '\(c.count)'"`), which standard YAML rejects. So treat
a parser complaint pointing *inside* an `if:`/`then:` block as expected; any
complaint elsewhere (like a missing branch-label colon) is a real bug.
## Swift 6
+2 -2
View File
@@ -23,12 +23,12 @@ RootComponent:
then:
c.count += 1
countText:
1. Upon each count change
1. Upon each count change:
if:
c.recentField == F.count
then:
c.countText = "Count: '\(c.count)'"
2. Upon launch
2. Upon launch:
if:
c.recentField == F.didLaunch
then:
+2 -2
View File
@@ -215,7 +215,7 @@ func rootShouldResetCount(_ c: RootContext) -> RootContext {
func rootShouldResetCountText(_ c: RootContext) -> RootContext {
var c = c
/* 1. Upon each count chang */
/* 1. Upon each count change */
if
c.recentField == F.count
{
@@ -224,7 +224,7 @@ func rootShouldResetCountText(_ c: RootContext) -> RootContext {
return c
}
/* 2. Upon launc */
/* 2. Upon launch */
if
c.recentField == F.didLaunch
{