diff --git a/CHANGELOG.md b/CHANGELOG.md index a2036731..140f8ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,8 @@ - 设置新增四档文字大小,支持长译文换行;干员调配可逐干员选择中文、日语或跟随全局语音(#435、#436,PR #446,感谢 @7eLaryn)。 - 补齐司霆惊蛰、赤刃明霄陈等干员技能期间的攻击与命中音,保留各技能音效自己的音量与播放概率(PR #410,感谢 @Convey123)。 - AI 购买高阶卡时适当降低与队友开局盟约抢卡的倾向,并在混合对局中发送有限的表情回应(PR #407、#444,感谢 @IceCodeNew、@DDDarkstar;可用 `SP_BOT_EMOTES=0` 关闭表情)。 -- 增加本机对局恢复入口,避免同一浏览器的闲置窗口妨碍恢复已关闭窗口的席位(#431)。浏览器支持时可添加到桌面,精简包也自带安装图标(PR #413,感谢 @Cromemadnd)。 -- 确认页可由房主发起全体真人一致同意的开局重刷,保留房间与个人配置;取消恢复剩余确认时间,成功后重新确认(PR #408,感谢 @Siornya)。这是复刻版便捷功能。 +- 增加本机对局恢复入口,避免同一浏览器的闲置窗口妨碍恢复已关闭窗口的席位(#431)。浏览器支持时可添加到桌面,精简包也自带原创的系列通用要塞图标、maskable 安全区版本和 favicon(PR #413,感谢 @Cromemadnd)。 +- 确认页可由房主发起全体真人一致同意的开局重刷,保留房间与个人配置;取消恢复剩余确认时间,成功后重新确认(#77、PR #408,感谢 @Siornya)。这是复刻版便捷功能。 - 修复模型加载较慢时丢失入场动画,按经过时间接续,攻击或死亡后不再补播过期入场(PR #416 提示的加载问题,感谢 @Cromemadnd)。 ## 0.2.2 — 2026-10-09 diff --git a/docs/ASSETS.md b/docs/ASSETS.md index 303f48eb..94635acf 100644 --- a/docs/ASSETS.md +++ b/docs/ASSETS.md @@ -2,8 +2,52 @@ Owner: `tools/fetch-assets.mjs` and `tools/assets/*`. Research background: `docs/research/07-assets.md`. -All art, Spine models and audio are **downloaded at install time**. They are never committed; `public/assets/` is git-ignored. -Everything the client needs is listed in **`data/assets.json`**. The client should only request URLs that appear in that manifest. +All official game art, Spine models and audio are **downloaded at install time**. They are never committed; `public/assets/` is git-ignored. +All downloaded game assets the client needs are listed in **`data/assets.json`**. Game-art requests must use that manifest. +The original project icons below are shipped static files, not downloaded game assets. + +## Original project application icons (#413) + +`public/icons/app.svg` is the original vector master for the **卫戍协议 series**, independent of any season. +Three battlements lead into a shield-shaped wall around one square tactical cell: defending a position on a board. +The only colours are charcoal `#242424` and off-white `#f2f2f2`; the mark contains no text, gradients or fine texture. +It contains no 「盟约」 lettering, Alliance badge or season-exclusive colours / elements. + +**Originality statement (2026-10-10):** the SVG geometry was drawn from basic rectangles and polygons for this +project. No official logo, artwork, icon or font was used, downloaded, embedded, traced or redrawn to make it. +The vector and exports are project-owned work under the repository's GPL-3.0-or-later licence, separate from the +Hypergryph / Yostar game assets below. The abstract fortification / tactical-board idea does not assert official branding. + +Rebuild offline with Python 3 and Pillow (the same image library used by local-extract): + +```bash +python3 tools/export-app-icons.py +# Optional review export without replacing shipped files: +python3 tools/export-app-icons.py --out /tmp/stronghold-icons +``` + +The script reads only the master SVG's flat rectangle / polygon geometry, renders at 8× and downsamples; unsupported +SVG elements fail rather than silently disappearing. It needs no game art, fonts, browser or network. + +| Files in `public/icons/` | Use | +|---|---| +| `app-192.png`, `app-512.png` | Manifest `purpose: any`, 192 / 512 px | +| `app-maskable-192.png`, `app-maskable-512.png` | Manifest `purpose: maskable`, opaque full-bleed background | +| `favicon-16.png`, `favicon-32.png`, `favicon-48.png`, `favicon.ico` | Tab / legacy favicon; ICO contains 16 / 32 / 48 px frames | +| `apple-touch-icon.png` | 180 px home-screen icon | +| `app.svg` | Scalable favicon and editable source | + +The maskable mark is scaled to 87.5% around the canvas centre. Its outermost vertex is about 34.8% of the canvas +width from that centre; even antialiased edge pixels stay inside the **40%-radius safe circle** specified by +[Web Application Manifest §2.3](https://www.w3.org/TR/appmanifest/#icon-masks). +The background remains opaque to every edge; launcher masks may remove the background outside the safe zone. +Normal icons and favicons retain the larger mark for readability. `public/index.html` links the SVG / ICO / PNG +favicons and Apple icon; `public/manifest.json` lists all four install icons. All these static files must be tracked +and included by the full and lite package allowlist; no changes to `data/assets.json` are needed. + +`test/ui/pwa-install-023.test.js` checks decoded pixels, mask safety and references; `test/package.test.js` checks +packaging inclusion. The local handoff holds old/new light/dark, small-size and phone-layout previews with their +render script. These are offline review renders, not evidence of browser or native OS installation. ## Running diff --git a/docs/design/client.md b/docs/design/client.md index 572ff17e..40abede9 100644 --- a/docs/design/client.md +++ b/docs/design/client.md @@ -115,8 +115,13 @@ refused recovery can return to the previous identity and nickname. It does not i Without BroadcastChannel it refuses shared recovery. Server restart / expiry clears obsolete metadata on the next welcome. A spectator never registers a recoverable player seat. -`manifest.json` enables browser installation; its original fortress favicon is packaged as actual 192/512 px icons in -`public/icons/`, including lite packages. The install button appears only for a live browser install offer and hides +`manifest.json` enables browser installation. The original season-independent fortress / shield mark in +`public/icons/app.svg` uses neutral greys and no official art, logos, icons, fonts or season-specific insignia. +`tools/export-app-icons.py` exports 192/512 px PNGs for `any` and separate opaque `maskable` icons: the latter scale +only the mark to 87.5%, keeping every foreground pixel inside the central circle of radius 40% of the canvas. +The same master supplies 16/32/48 px PNG / ICO favicons and the 180 px Apple touch icon linked from `index.html`. +These project-owned assets live in `public/icons/` and ship in full and lite packages; ASSETS.md records their provenance. +The install button appears only for a live browser install offer and hides in standalone/fullscreen windows or after installation. Every offer is consumed before awaiting the prompt, including cancellation or failure. No service worker, offline cache or persistent server is introduced; HTTPS or localhost and browser support still govern installation. diff --git a/docs/design/overview.md b/docs/design/overview.md index f00b972f..875b7e69 100644 --- a/docs/design/overview.md +++ b/docs/design/overview.md @@ -15,6 +15,10 @@ In scope: - Rendering with the real Spine battle chibis (PixiJS 7 + pixi-spine 4), procedural tiles, VFX, damage numbers, real BGM/SFX, emotes, broadcast ticker. - Reconnect, AI take-over of disconnected players, robust validation of every client intent. +New features require explicit maintainer approval before implementation. The 2026-10-10 review approved retaining +the existing PWA installation, unanimous opening reroll, teammate emotes and cooperative purchasing heuristic +(DESIGN §28.15, §28.16, §28.19, §28.21); this is not blanket approval for future additions. + Out of scope v1: matchmaking queue, training/tutorial, DIY (甄选) slots (the 4 DIY chess are removed from the shared pool — 0.2.0 plays them as 自选编队: the picks of the 干员调配 overlay's 自选编队 tab, each sold only in its player's shop; DATA.md §18, shared/diy.js, server/match/player/diy.js), trophies/progression persistence, reporting. --- diff --git a/docs/history/0.2.3.md b/docs/history/0.2.3.md index a39d971e..ed3510da 100644 --- a/docs/history/0.2.3.md +++ b/docs/history/0.2.3.md @@ -215,6 +215,8 @@ English overflow; the corrected browser suite passes. Current behavior is in des ### 28.15 Cooperative card purchasing — PR #407 +维护者 2026-10-10 审核后同意保留。此前未获明确批准,本次审核追认仅适用于本节已有功能;以后新增功能必须先取得维护者明确同意。 + Adapted from @IceCodeNew. [ASSUMED] A tier V/VI shared-pool card matching another living teammate's active opening bond receives one 18-point buying-score penalty. It is a soft preference, not reserved stock; normal/elite and DIY stock semantics remain unchanged. Humans and bots receive the same cooperation. This does not add persona presets. @@ -225,6 +227,8 @@ measurement of the purchasing heuristic. Current rule: design/match.md §6.6 and ### 28.16 AI teammate emotes — PR #444 +维护者 2026-10-10 审核后同意保留。此前未获明确批准,本次审核追认仅适用于本节已有功能;以后新增功能必须先取得维护者明确同意。 + Event wiring from @DDDarkstar, with corrected dispatch semantics. [ASSUMED] Cosmetic reactions are enabled only in mixed human/AI matches, under the existing emote whitelist and cooldown; `SP_BOT_EMOTES=0` disables all hooks. Responses skip cooling bots and stop after one reply. MVP uses this round's kills and damage, with stable order for @@ -265,20 +269,30 @@ a real phone-sized browser changes the control, reloads and resets it. Current c ### 28.19 Browser installation — PR #413 +维护者 2026-10-10 审核后同意保留。此前未获明确批准,本次审核追认仅适用于本节已有功能;以后新增功能必须先取得维护者明确同意。 + Based on @Cromemadnd's proposal, with a one-use install controller. Buttons appear only after a browser install offer; standalone/fullscreen and installed sessions hide them. Accept, dismiss, failure and duplicate clicks all consume the same offer once. See [the prompt API](https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent/prompt) and [installability requirements](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable). -The existing original fortress favicon supplies correctly sized 192/512 px icons, shipped outside optional game art. +The 2026-10-10 icon revision replaces the previous mint rook with an original, season-independent fortress / shield +and defended square. Its neutral grey palette and geometry use no official logos, artwork, icons or fonts and no +Alliance lettering or seasonal insignia. `public/icons/app.svg` is the master; `tools/export-app-icons.py` exports +192/512 px `any` and separate opaque `maskable` PNGs (the mark stays inside the central 40%-radius safe circle), +16/32/48 px PNG / ICO favicons and a 180 px Apple touch icon. All ship outside optional game art, including lite +packages. See ASSETS.md for the source, reproduction command and originality statement. No service worker or offline cache is installed; the server is still required. The lobby keeps Settings immediately before How to Play even when the optional install/recovery buttons appear; the full browser run caught and corrected an initial insertion between that established pair. The settings-entry check tests the absent board-style/background-music option labels, allowing the text-size help to explain that the board keeps its scale. -Tests: offer lifecycle/disposal, actual PNG dimensions, real Chrome manifest and installability checks, and a synthetic +Tests: offer lifecycle/disposal, decoded PNG dimensions / opacity / maskable safe zone, favicon references and packaging inclusion. +The initial feature also had real Chrome manifest and installability checks, and a synthetic dismissed offer through the actual button. Initial incognito rejection was a test-environment limitation; the real installability check runs in Chrome's ordinary temporary profile. Native OS installation itself is not performed. +The icon revision is verified offline; browser / OS validation of these replacement assets is deferred to the follow-up +review environment (this sandbox cannot listen on a port). ### 28.20 Recover a closed local match window — #431 @@ -294,6 +308,8 @@ the match tab. The existing identity/static suite also passes. Current contract: ### 28.21 Unanimous opening reroll — #77 / PR #408 +维护者 2026-10-10 审核后同意保留。此前未获明确批准,本次审核追认仅适用于本节已有功能;以后新增功能必须先取得维护者明确同意。 + Adapted from @Siornya, excluding the unrelated result-screen redesign. [ASSUMED] This remake feature is host-proposed, requires every connected human's consent, and pauses confirmation while voting. Bots/spectators do not vote; autoplay humans still do. Single-human matches refresh immediately. Refusal, cancellation, disconnect or leave restores the diff --git a/public/icons/app-192.png b/public/icons/app-192.png index 7dfdf600..4db28a88 100644 Binary files a/public/icons/app-192.png and b/public/icons/app-192.png differ diff --git a/public/icons/app-512.png b/public/icons/app-512.png index 0cb0d97f..6facc901 100644 Binary files a/public/icons/app-512.png and b/public/icons/app-512.png differ diff --git a/public/icons/app-maskable-192.png b/public/icons/app-maskable-192.png new file mode 100644 index 00000000..28a1338f Binary files /dev/null and b/public/icons/app-maskable-192.png differ diff --git a/public/icons/app-maskable-512.png b/public/icons/app-maskable-512.png new file mode 100644 index 00000000..9752fb4e Binary files /dev/null and b/public/icons/app-maskable-512.png differ diff --git a/public/icons/app.svg b/public/icons/app.svg index 2dab0e6c..eebb6f02 100644 --- a/public/icons/app.svg +++ b/public/icons/app.svg @@ -1 +1,10 @@ - + diff --git a/public/icons/apple-touch-icon.png b/public/icons/apple-touch-icon.png new file mode 100644 index 00000000..066f6cdc Binary files /dev/null and b/public/icons/apple-touch-icon.png differ diff --git a/public/icons/favicon-16.png b/public/icons/favicon-16.png new file mode 100644 index 00000000..caf86ffd Binary files /dev/null and b/public/icons/favicon-16.png differ diff --git a/public/icons/favicon-32.png b/public/icons/favicon-32.png new file mode 100644 index 00000000..4d0f5fbe Binary files /dev/null and b/public/icons/favicon-32.png differ diff --git a/public/icons/favicon-48.png b/public/icons/favicon-48.png new file mode 100644 index 00000000..22cac1e4 Binary files /dev/null and b/public/icons/favicon-48.png differ diff --git a/public/icons/favicon.ico b/public/icons/favicon.ico new file mode 100644 index 00000000..1b3ebeee Binary files /dev/null and b/public/icons/favicon.ico differ diff --git a/public/index.html b/public/index.html index 0c28b759..0e44c46f 100644 --- a/public/index.html +++ b/public/index.html @@ -16,7 +16,11 @@