diff --git a/.tmp-edge-profile2/Crashpad/settings.dat b/.tmp-edge-profile2/Crashpad/settings.dat new file mode 100644 index 0000000..3b20fde Binary files /dev/null and b/.tmp-edge-profile2/Crashpad/settings.dat differ diff --git a/.tmp-edge-profile2/Crashpad/throttle_store.dat b/.tmp-edge-profile2/Crashpad/throttle_store.dat new file mode 100644 index 0000000..9639e1b --- /dev/null +++ b/.tmp-edge-profile2/Crashpad/throttle_store.dat @@ -0,0 +1 @@ +level=none expiry=0 diff --git a/AI_MAP.md b/AI_MAP.md index f801193..b393891 100644 --- a/AI_MAP.md +++ b/AI_MAP.md @@ -6,7 +6,7 @@ Purpose: static Japanese browser simulation/game. Optimize context by reading th - Entrypoint: `index.html` defines the app shell, canvas, dialogs, right panels, and exact script order. - Runtime style: plain browser JS, global IIFEs, exports on `window`, no bundler/module loader. -- Version/cache: `app_manifest.json`, `js/version.js`, and generated `service-worker.js` share `39.15.103`. +- Version/cache: `app_manifest.json`, `js/version.js`, and generated `service-worker.js` share `39.16.18`. - Main loop: `js/main.js` initializes assets/audio/world/UI/save, then drives update/render. - Performance/display settings: `js/perf_profiler.js` owns manual visual settings and profiler buckets; display tiers affect rendering/visuals, not simulation-quality branches. - Update order: `js/system_order.js` calls phase facades from `js/simulation_systems.js`. @@ -59,4 +59,25 @@ Purpose: static Japanese browser simulation/game. Optimize context by reading th - Keep intentional global exports for compatibility with regression checks and browser runtime; remove public facades only after repo-wide caller checks. - Prefer focused edits in the owning subsystem; split modules are intentional compatibility boundaries. - Avoid reintroducing `simulationQualityTier` branches unless a real simulation-quality setting is restored; current quality controls are visual/detail controls. +- `High` display quality may include quality-preserving optimizations, but should not reduce simulation cadence, object limits, or visible fidelity in a noticeable way. +- Save format compatibility with old text saves is not required when intentionally shortening/replacing save hash text; keep current save/load internally consistent instead. - Run `node --check js/*.js` and `python scripts/regression_check.py` for behavior changes. + +## Current Maintenance Notes + +This section records current boundaries only. Version-by-version cleanup history and completed work logs are intentionally omitted. + +### Live Compatibility Surfaces + +- Ordered global-IIFE loading is still part of the app contract; check repo-wide callers before removing bare globals or facade objects. +- Keep public event names with active listeners: `audio:play`, `selection:changed`, `tool:selected`, `world:phase`, `log:entry`, and `tool:placed`. Telemetry-only emit calls should stay removed. +- Save compatibility with old exported text is not required, but the current save/load round-trip must remain internally consistent. +- Tool icon ownership is `TOOL_DEFINITIONS.icon`; UI code converts asset paths for CSS variables. Avoid restoring CSS-local `url(...)` definitions. +- Shared geometry/display/domain helpers should stay in their owning helper modules unless a dedicated namespace migration is being done. + +### Open Architecture Candidates + +- Full namespace migration for behavior/action/needs/tool helpers. This requires rewriting many bare global call sites and updating regression contracts. +- Effect-specific spatial indexing, fuller delta-history storage, and high-speed collision partitioning. These need new indexes or semantics beyond cleanup. +- UI/text-side meaning consolidation, including labels, wrapping/measurement helpers, and duplicated scalar helpers such as `num`, `finiteOr`, `isObject`, and `clonePlain`. +- Further `World.prototype` reduction is possible, but only for helpers proven not to be runtime-facing canvas/UI/tool APIs. diff --git a/BUILD_NOTE.txt b/BUILD_NOTE.txt index 2809c20..f988d61 100644 --- a/BUILD_NOTE.txt +++ b/BUILD_NOTE.txt @@ -1,13 +1,29 @@ -tarinai_water_balloon_fan_ui_v1 -- Fan drawing now shows the actual forward wind cone/range. -- Mobile rotator/reciprocator editor dialogs are scrollable; reciprocator canvas shares editor sizing. -- Balloon tool is replaced by water balloon visuals/text. -- Water balloons splash water when popped; low-openness tarinai panic and flee with behavior text: 水風船が割れておどろいている。 -- Version: 39.15.116 +tarinai_compact_save_stage4 +- Save schema 33 omits standard item amounts and stores only an optional non-standard block base plus per-item differences. +- Relationship targets are sorted and delta-encoded within each Tarinai row. +- World seeds use a canonical 64-bit hexadecimal identity and occupy exactly 8 bytes in the binary save. +- The binary header contains one schema byte; its high bit signals whether a string table follows. Empty string tables and the duplicate snapshot version are omitted. +- Deflate state is folded into the low bit of the frame-length varuint, eliminating the separate compression byte. +- 15-bit text conversion uses arithmetic Unicode range mapping instead of a 32768-character string and reverse Map. +- Previous binary schemas are intentionally unsupported. +- Version: 39.16.18 +- CompressionStream and DecompressionStream are drained concurrently to avoid browser backpressure stalls. -tarinai_king_fix_v10 -- Fire tool button hidden; flames spawn only from flame firecracker. -- Burning tarinai and ants draw lightweight flame-shaped overlays. -- Flame firecracker is redder and shows a countdown timer; normal firecracker is darker. -- Standalone flame and fire particles use a simpler flame silhouette. -- Version: 39.15.102 +- Load confirmation uses the in-game dialog; fan wind is realtime; zunchi tool preview opacity, carried plushie depth, and blanket grass rules were corrected. + +- Passive spring: removed time-driven oscillation; force now depends on extension/compression and relative endpoint velocity. +- Signal effects use the exported TarinaiEffect constructor. +- Pressure-switch placement/editor overlays display the configured detection radius. + +- v39.16.18: removed redundant physics normalization, dirty-marking, compaction, pickup, and collision bookkeeping; unified one-way-fence and bounce corrections while retaining debug diagnostics and defensive recovery paths. + +- Earlier mechanism pass: stronger passive spring, persistent detector ranges, robot-cleaner signal power, and electric shock effect. + +- v39.16.17: fixed the undefined bodyFor reference in mechanical one-way-fence contact handling by using the canonical body velocity helper. + +- v39.16.16: link rendering no longer depends on midpoint spatial visibility; bounce fences launch Tarinai without shock damage; passive springs are more under-damped and elastic. + +- v39.16.16: population chart includes per-bucket births/deaths; rotators accept signed motor speed; champion personality bonuses inherit through descendants; champion-pair mate weighting is moderately reduced. +- v39.16.16: colony population chart records births/deaths, rotators accept negative motor speed, champion personality boosts inherit through descendants, champion-pair mating is slightly reduced, and one-way fence previews/pathfinding honor the passable direction. + +- v39.16.16: one-way fences allow Tarinai forward crossing in swept collision; chart legend dots toggle series; wire tools attach to Tarinai/ants; energized living endpoints panic and take damage; selected data reports electrocution. diff --git a/FILES.json b/FILES.json index 376200a..57d6e87 100644 --- a/FILES.json +++ b/FILES.json @@ -1,6 +1,6 @@ { "purpose": "Token-efficient machine-readable routing for tarinai_. Use scripts/ai_inventory.py for exact current file expansion.", - "version": "39.15.103", + "version": "39.16.18", "entrypoints": { "app": "index.html", "runtime": "js/main.js", diff --git a/GAME_FEATURES.md b/GAME_FEATURES.md index 0907f3a..b3037f2 100644 --- a/GAME_FEATURES.md +++ b/GAME_FEATURES.md @@ -1,7 +1,129 @@ +## v39.16.17 mechanical one-way fence runtime fix + +- Mechanical objects now query their canonical physics-body velocity when resolving one-way-fence contacts. +- This removes the `bodyFor is not defined` runtime failure while preserving the existing directional fence behavior. + +## v39.16.16 directional fences, chart controls, and living wire endpoints + +- Tarinai can physically cross one-way fences in the arrow direction, including swept/high-speed movement. +- Colony chart color dots toggle individual series. +- Wire and insulated wire can attach to Tarinai and ants. Energized living endpoints take damage and panic regardless of insulation; only bare wire damages incidental contact. +- Selected Tarinai data shows `感電している。` while shocked. + + +## v39.16.16 colony lineage and directional routing + +- Population history overlays interval birth and death counts. +- Rotators preserve negative motor speed and rotate in reverse. +- Tarinai Champion boosts to aggression, openness, and sociability pass to descendants with generational damping. +- Champion-pair mating preference is slightly reduced. +- One-way fence placement previews show the allowed direction. +- Pathfinding treats one-way fences as passable only along their arrow direction. + +## v39.16.16 colony graph, reverse rotator, and champion lineage + +- コロニー統計の個体数グラフへ、2時間区間ごとの誕生数と死亡数を追加した。 +- 回転体のモーター速度は負値を保持し、負の角度方向へ逆回転できる。 +- たりない王の攻撃性・開放性・社交性補正は子孫の誕生時性格へ減衰継承される。 +- たりない王同士の繁殖優先倍率を5.0から4.0へ下げ、繁殖確率をやや抑えた。 +- 保存形式は変更しない。 + # tarinai_ Game Features +## v39.16.16 link, bounce-fence, and spring fixes + +- ヒモ、棒、バネ、電線、絶縁電線は、接続線が画面内を横切る場合、中点の空間セルが画面外でも描画される。 +- バウンス柵はたりないを外力インパルスで確実に吹き飛ばし、柵自身が作る急激な速度変化では衝撃ダメージを与えない。 +- バネは受動式のまま剛性を高め、減衰と強制位置補正を下げ、より大きく長く往復する。 + +## v39.16.13 detector and fence changes + +- 感圧スイッチを「検知器」へ改名し、道具UI上で通常の柵と位置を入れ替えた。 +- 検知器は軸平行の矩形範囲で対象を数える。専用UIから横幅・縦幅・対象・必要数を設定する。 +- 柵の配置境界判定を実際の細長い形状に合わせ、フィールド上下端近くへ配置できるようにした。 +- バウンス柵の反発係数、最低射出速度、最大速度を引き上げ、衝突直後に強く跳ねるようにした。 +- ワープゲートを道具、描画、更新、信号、保存形式から削除した。 +- 一方通行柵を追加した。矢印方向には通過でき、逆方向のみ衝突する。 +- バイナリスキーマ36、スナップショット30。旧形式との読み込み互換は持たない。 + +## v39.16.11 mechanism fixes and passive spring + +- 検知器は矩形範囲内の「たりない」または「アイテム」を数え、設定個数以上で電線へ信号を送る。 +- 一方通行柵は矢印方向だけ通過でき、逆方向のたりない・アイテム・機構を遮る。 +- バウンス柵は衝突対象へ強い即時反発を与える。 +- バネは棒と同じ2点接続方式で設置する。自動伸縮はせず、外力による伸び縮みに対して受動的に反発し、弾性運動する。 +- 電線と絶縁電線はアイテム同士を接続し、複数本を経由して信号を伝える。通常電線は通電中に接触したたりないへダメージを与え、絶縁電線は与えない。 +- バイナリスキーマ34、スナップショット28。v39.16.10と保存形式は同じ。 + +## v39.16.9 load UI and item behavior fixes + +- Replaced browser-native load confirmations with an in-game confirmation window. +- Kept fans in the realtime scheduler lane so wind applies continuously instead of as periodic gusts. +- Made the zunchi tool preview use the fresh, fully opaque stage. +- Rendered carried plushies at the same depth position as their owner. +- Disabled grass spawning, growth, placement capacity, and existing grass on the fluffy blanket ground. + +## v39.16.8 compact amount, relationship, seed, and framing save + +- アイテム種類の標準amountは保存せず、標準値と異なる共通値または個別差分だけを保存する。共通値候補は実バイト数で選択する。 +- 個体関係の対象インデックスを昇順に並べ、前の対象との差分として保存する。 +- worldSeedを固定16進64bitへ統一し、バイナリ上では8バイト固定で保存する。 +- バイナリ先頭はスキーマ1バイトへ統合し、上位bitで文字列テーブルの有無を示す。空の文字列テーブルと重複したスナップショット版番号は保存しない。 +- 圧縮フラグをフレーム長の下位bitへ統合し、独立した1バイトを削除する。 +- 15bit文字化の32768文字テーブルと逆引きMapを廃止し、Unicodeコードポイントの算術変換へ変更する。 +- バイナリスキーマ33、スナップショット27。旧形式との読み込み互換は持たない。 + +## v39.16.7 column-oriented creature save and packed item flags + +- 個体の固定情報を項目別の列指向ビットプレーンへ変更し、全個体で0の列は保存しない。 +- 睡眠状態、遺伝差分、戦績差分の存在は各ID・差分マスクから直接判定し、重複していた3bit/個体を削除する。 +- アイテムの共通追加状態、amount差分、追加状態差分のフラグを全ブロック共通の連続ビット列へ格納する。 +- 共通追加状態は候補ごとに専用バイナリを試算し、全件個別保存より実際に小さい場合だけ採用する。 +- バイナリスキーマ32、スナップショット26。旧形式との読み込み互換は持たない。 + +## v39.16.4 compact identity and normal-item binary save + +- 個体のbirthSeed文字列を保存せず、出生番号と32bitハッシュへ分解する。`worldSeed + birthSerial`で再現できる個体はハッシュも省略する。 +- 新規出生のbirthSeedは親文字列を含めず、親子関係と遺伝情報は既存の専用フィールドで保持する。 +- 通常アイテムの追加情報を型別専用バイナリへ移行し、JSONテキストを保存しない。未知の追加配列も数値・文字列の型付きバイナリで保存する。 +- 同じ種類のアイテムはamountの最頻値をブロックに1回だけ保存し、同一追加状態が複数ある場合も共有する。個別アイテムには差分だけを保存する。 +- バイナリスキーマ30、スナップショット24。旧形式との読み込み互換は持たない。 + +## v39.16.3 physics binary save and reciprocator cargo contacts + +- 回転体・毒ブロック・往復体・ロープ・ロッドの追加情報を、JSON文字列ではなく専用バイナリで保存する。型名、キー名、デフォルト値、重複座標、標準輪郭、インデックス参照済み接続先の文字列情報を省略する。 +- バイナリスキーマは29。v39.16.2のスキーマ28は読み込み互換を維持する。 +- 往復体はボール、石、画鋲などの可動物理アイテムを押し出すが、それらとの接触では方向、レール位相、モーター速度を変更しない。 + +## v39.16.2 reciprocator collision and placement alignment + +- 往復体は、進行方向にある機構、静的障害物、物理アイテムへ衝突した時点で方向転換する。接触分離によって重なりが解消されても反転判定を失わない。 +- 静的障害物との判定から往復体を除外しない。高速移動時は障害物付近でサブステップ判定を増やし、すり抜けを抑える。 +- 往復体の設置前オーバーレイと実配置は同じ角度初期化処理を使用し、物理ボディー角度とレール軸を同じ順序で確定する。 +- セーブ形式は変更しない。 + +## v39.16.1 debug save-size breakdown + +- `?debug=1` でセーブまたは呪文出力を実行すると、デバッグオーバーレイにバイナリ内訳、文字数、エンコード時間が表示される。 +- 内訳は形式情報、文字列テーブル、ワールド、個体基本情報、個体シード、個体関係、アイテム索引、通常アイテム、物理アイテムに分けて実占有バイトを集計する。 +- 通常アイテム・物理アイテムの追加情報について、バイナリ内の占有量とJSON UTF-8元サイズを併記する。ロード後は直近のデコード時間も表示する。 + This document describes the playable features of `tarinai_`: what the player sees, what tools do, and how tarinai behave. It is intentionally player/design-facing, not an implementation map. +## v39.16.0 mechanical interaction and limit audit + +- 回転体・往復体・毒ブロックは、双方の「当たり判定ON」時にSAT矩形判定で相互作用する。当たり判定OFFの機構は機構同士の衝突対象から除外される。 +- 3種類の輪郭編集は20px間隔のグリッド格子点へスナップする。直線、自由描画、消去位置、テンプレート、再編集時の既存端点に同じ規則を適用する。 +- コロニー上限は中央生成APIで常時適用され、通常実行時に上限を迂回するオプションは持たない。既存要素やセーブ復元要素は削除せず、その後の新規生成のみを抑止する。 + +## v39.15.165 behavior and colony controls + +- たりない王は、繁殖可能な別のたりない王を広い範囲から優先して探し、通常より強い繁殖欲求と短い再繁殖待機時間を持つ。 +- 往復体の新規配置時の標準方向は90度。 +- 毒ブロックの新規配置時の標準輪郭は小型(半径44、輪郭104×40、太さ11)。 +- コロニーパネルで、たりない個体数と生存オブジェクト総数の上限を設定できる。空欄または0は上限なし。既存要素は削除せず、新規追加だけを抑止する。 +- 上限値はスナップショットとバイナリセーブに保存される。 + ## Game Overview `tarinai_` is an observation sandbox about small creatures called tarinai. The player places food, furniture, hazards, machines, and environment tools, then watches how individuals live, move, eat, sleep, panic, fight, reproduce, get sick, recover, and leave family records. @@ -76,10 +198,10 @@ The core loop is: ### Physics -- **ヒモ / rope**: connect two targets with a flexible link. +- **ヒモ / rope**: connect two targets with a flexible, inextensible link that may go slack but does not lengthen. - **棒 / rod**: connect two targets with a rigid link. - **柵 / fence**: blocks tarinai movement; Q/E rotate by 45 degrees, Shift+Q/E by 5 degrees. -- **バウンス柵 / bounce fence**: fence that rebounds things that hit it. +- **バウンス柵 / bounce fence**: high-restitution fence that strongly launches things that hit it. - **ゲート柵 / gate fence**: click to open or close. - **回転体 / rotator**: custom mechanical shape that rotates; click to edit shape and speed. - **毒ブロック / poison block**: custom hazard block; touching it damages skin; click to edit shape. @@ -143,6 +265,11 @@ Tarinai can be pushed by physics objects, carried or affected by ants, dragged b - **Grass ecology**: grass grows, feeds tarinai, comforts them, can become bed material, and has a small chance to reduce fire before burning. - **Dirt and corpses**: zunchi, splats, corpses, and ant corpses affect hygiene, disease, and observation results. - **Day/light conditions**: lighting and sun influence rendering and sunbath behavior. +- **Season temperature**: automatic summer climate is roughly 5℃ hotter than the previous baseline; manual temperature control remains exact to the slider value. + +## Crowded Scene Performance + +Crowded fields are an intended sandbox outcome. Performance work should prefer cached, typed, spatial, dirty, or incremental lookups over lowering object limits. High display quality should preserve visible fidelity and simulation rules while avoiding repeated hidden scans in render, tooltip, family tree, collision, effect, fire, and maintenance paths. ## Disease And Recovery @@ -168,25 +295,6 @@ Recovery depends on the disease or effect. Water, rest, food, medicine, zunda ju ## Save, Reset, And Persistence - The app supports manual save and restore through browser storage. +- Current saves are allowed to use compact/hash-style text. Old save text does not need to remain loadable when the save format is intentionally shortened or replaced, so load failure is acceptable after intentional save-format changes as long as the current save/load path stays internally consistent. - Reset opens field selection and starts a new field state. - Service worker caching allows the static app shell to remain available after load, depending on browser support. - - -## 39.15.116 土管外観・内部温度 - -- 土管の外観を、丸い口と側面が見える斜め上からの視点に変更。 -- 土管内の体感温度を20℃へ近づける内部温度補正を追加。補正幅は最大7℃。 -- 土管ツールチップの内部気温表示にも、土管内補正後の温度を反映。 - -## 39.15.115 水風船の飛散強化・扇風機首振り設定 -- 水風船破裂時に水滴が放射状に飛び、短時間移動してから水たまり状に落ち着く。 -- 配置済み扇風機をクリックすると首振り設定UIを開ける。個別に首振りON/OFF、向き、振り幅、速度を設定可能。 -- 首振り中の扇風機は風の範囲表示と実際の風判定が現在角度に追従する。 - -## 39.15.115 土管 - -- 生活カテゴリに「土管」を追加。丸い口が見える配置アイテムとして表示。 -- たりないが巣箱のように土管の中へ入り、内部の個体は巣箱系ツールチップで確認可能。 -- 土管から出る時は、複数ある場合は別のランダムな土管から出る。 -- 土管内でも眠れるが、寝心地と睡眠優先順位は干草寝床の一段下。 - diff --git a/README.md b/README.md index b85e8c8..0527577 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,6 @@ AI-first entrypoint for a static browser simulation/game. Keep this file small; read deeper docs only when needed. -## v39.15.70 robot cleaner tuning -- Tuned ロボ掃除機 targeting: normal speed is 60, high-speed mode is 120, and speed no longer changes based on the selected cleanup targets. -- The cleaner checks the nearest matching target every 2 seconds, then keeps trying to clean that target between scans. Contact cleanup still removes every matching object it touches. -- The 死骸 target also covers blood traces. When たりない is enabled, nearby Tarinai panic while chased and are cleaned on contact. - ## Read Strategy - Start here for architecture, script order constraints, and where to look next. @@ -18,16 +13,18 @@ AI-first entrypoint for a static browser simulation/game. Keep this file small; ## Runtime Shape -- No bundler; `index.html` loads ordered global-IIFE scripts with `?v=39.15.103`. +- No bundler; `index.html` loads ordered global-IIFE scripts with `?v=39.16.18`. +- v39.16.18 changes: redundant physics normalization, dirty-marking, compaction, pickup, and collision bookkeeping were removed; one-way-fence and bounce corrections now use shared canonical helpers. - Mutable runtime lives on `window`; primary entities are `World`, `Tarinai`, items, structures, ants, family graph, weather, and save snapshots. - Update loop: `main.js` creates the world/UI loop; `World.update` delegates to `TarinaiSystemOrder.update`; `system_order.js` runs named phases. - UI loop: pointer/tool/UI intents go through `command_dispatcher.js`; canvas drawing is in render modules; side panels are `ui_*.js`. -- Generated/static app shell: `app_manifest.json`, `service-worker.js`, and `js/version.js` must stay version-aligned. +- Generated/static app shell: `app_manifest.json`, `service-worker.js`, `FILES.json`, and `js/version.js` must stay version-aligned. ## File Routing - `index.html`: DOM shell, CSS/JS load order, panels/dialogs/canvas. - `css/*.css`: base/layout/panel/components/mobile styling. +- `js/domain_ids.js`, `js/item_type_catalog.js`, `js/data.js`, `js/ground_types.js`: stable domain ids, current item-type save catalog, core config, field/ground definitions. - `js/world*.js`: world state, view, update phases, tools, placement, combat, environment, family/social, ants. - `js/tarinai*.js`: creature state, needs, actions, behavior, social life, item effects, update pipeline, rendering. - `js/item*.js`, `js/structures*.js`: item registry/runtime/lifecycle/dynamic behavior/rendering plus structures. @@ -57,31 +54,5 @@ AI-first entrypoint for a static browser simulation/game. Keep this file small; - Inventory sanity: `powershell -NoProfile -ExecutionPolicy Bypass -File scripts/ai_inventory.ps1 -All` -## UI media isolation / scroll repair - -- PC / smartphone UI override rules are separated into `@media (min-width: 981px)` and `@media (max-width: 980px)`. -- PC family tree card is restored below the main game layout, not inside the right menu. -- Smartphone manual scroll no longer uses internal vertical scroll traps for event log / family tree content. -- Auto-scroll does not open collapsed cards. - - -## Event/family/oshibyo UI fixes - -- Event UI hides direct player item placement records while keeping those records in the internal log. -- Collapsed Event UI no longer leaves a large blank area from the log-card min-height. -- Family tree nodes show inherited stats in a 2x2 grid and move the tarinai portrait to the upper-right. -- Oshibyo lodged position is anchored to the left side of the tarinai sprite. - - -## Family polish - -- Family tree generation row spacing is tightened. -- Family tree personality tags also use a 2x2 grid (up to 4 visible tags). -- Sprinkler effective cleaning radius is increased to 3x the previous value and still filters targets by actual distance. - - -## Owned object panic / shoot effect - -- Tarinai panic when their own plushie or simple grass bed is destroyed. -- The selected Tarinai data behavior text explicitly shows the owned-object panic reason. -- Shooting impact effects are larger and remain visible for slightly longer. +### v39.16.16 +Colony birth/death chart lines, reverse rotators, champion-trait inheritance, reduced champion-pair mating, and directional one-way-fence routing. diff --git a/app_manifest.json b/app_manifest.json index a7f37e2..312f41f 100644 --- a/app_manifest.json +++ b/app_manifest.json @@ -1,5 +1,5 @@ { - "version": "39.15.116", + "version": "39.16.18", "css": [ "css/base.css", "css/layout.css", @@ -10,6 +10,7 @@ "js": [ "js/version.js", "js/event_bus.js", + "js/domain_ids.js", "js/registry_base.js", "js/disease_registry.js", "js/sound_pack.js", @@ -35,13 +36,16 @@ "js/constraint_system.js", "js/physics_world_system.js", "js/physics_projection_system.js", + "js/signal_system.js", "js/assets.js", "js/audio.js", "js/perf_profiler.js", + "js/display_helpers.js", "js/render.js", "js/sim_core.js", "js/tarinai_seed_factory.js", "js/structures.js", + "js/item_type_catalog.js", "js/items.js", "js/item_type_initializers.js", "js/item_lifecycle_support.js", diff --git a/css/base.css b/css/base.css index f87ca66..5e59647 100644 --- a/css/base.css +++ b/css/base.css @@ -402,35 +402,6 @@ h1 { .tool[data-tool="dwarf_drug"] .tool-sprite-preview, .tool[data-tool="oshibyo"] .tool-sprite-preview { width: 22px; height: 22px; left: 5px; } .tool[data-tool="poke"], .tool[data-tool="water_hose"] { --tool-icon-zoom: 0.92; } -.tool[data-tool="observe"] { --tool-icon: url("../assets/ui/tool_observe.webp"); } -.tool[data-tool="zunchi"] { --tool-icon: url("../assets/ui/tool_zunchi.webp"); } -.tool[data-tool="sweet"] { --tool-icon: url("../assets/ui/tool_sweet.webp"); } -.tool[data-tool="grass"] { --tool-icon: url("../assets/ui/tool_grass.webp"); } -.tool[data-tool="stone"] { --tool-icon: url("../assets/ui/tool_stone.webp"); } -.tool[data-tool="genkotsu"] { --tool-icon: url("../assets/ui/tool_genkotsu.webp"); } -.tool[data-tool="firecracker"] { --tool-icon: url("../assets/ui/tool_firecracker.webp"); } -.tool[data-tool="shoot"] { --tool-icon: url("../assets/ui/tool_shoot.png"); --tool-icon-zoom: 1.48; } -.tool[data-tool="fence_v"] { --tool-icon: url("../assets/ui/tool_fence_v.webp"); } -.tool[data-tool="fence_h"] { --tool-icon: url("../assets/ui/tool_fence_h.webp"); } -.tool[data-tool="bed"] { --tool-icon: url("../assets/ui/tool_bed.webp"); } -.tool[data-tool="love_mochi"] { --tool-icon: url("../assets/ui/tool_love_mochi.webp"); } -.tool[data-tool="fight_mochi"] { --tool-icon: url("../assets/ui/tool_fight_mochi.webp"); } - -.tool[data-tool="signboard"] { --tool-icon: url("../assets/ui/tool_signboard.webp"); } -.tool[data-tool="duplicator"] { --tool-icon: url("../assets/ui/tool_duplicator.webp"); } -.tool[data-tool="pushpin"] { --tool-icon: url("../assets/ui/tool_pushpin.webp"); } -.tool[data-tool="oshibyo"] { --tool-icon: url("../assets/ui/tool_oshibyo.webp"); } - -/* Generated parameter item tool icons. */ -.tool[data-tool="laxative"] { --tool-icon: url("../assets/ui/tool_laxative.webp"); } -.tool[data-tool="protein"] { --tool-icon: url("../assets/ui/tool_protein.webp"); } -.tool[data-tool="niteropu"] { --tool-icon: url("../assets/ui/tool_niteropu.webp"); } -.tool[data-tool="ammo"] { --tool-icon: url("../assets/ui/tool_ammo.webp"); } -.tool[data-tool="mystery_drug"] { --tool-icon: url("../assets/ui/tool_mystery_drug.webp"); } -.tool[data-tool="mercury"] { --tool-icon: url("../assets/ui/tool_mercury.webp"); } -.tool[data-tool="giant_drug"] { --tool-icon: url("../assets/ui/tool_giant_drug.webp"); } -.tool[data-tool="dwarf_drug"] { --tool-icon: url("../assets/ui/tool_dwarf_drug.webp"); } -.tool[data-tool="zunda_juice"] { --tool-icon: url("../assets/ui/tool_zunda_juice.webp"); } .signboard-editor { position: fixed; @@ -648,6 +619,32 @@ h1 { background: rgba(255,255,255,0.84); padding: 4px 6px; } + +.signal-channel-label { + font-size: 13px; + color: var(--ink); + font-weight: 700; +} +.signal-channel-picker { + display: grid; + grid-template-columns: repeat(3, minmax(44px, 1fr)); + gap: 7px; +} +.signal-channel-picker button { + min-height: 38px; + border-radius: 10px; + border: 1px solid rgba(84,68,48,0.18); + background: rgba(255,255,255,0.78); + color: var(--ink); + font: 700 14px ui-rounded, sans-serif; + cursor: pointer; +} +.signal-channel-picker button:hover { background: rgba(255,248,232,0.98); } +.signal-channel-picker button.active { + background: rgba(78,179,224,0.22); + border-color: rgba(42,133,184,0.58); + box-shadow: inset 0 0 0 1px rgba(42,133,184,0.18); +} .rotator-editor-tools { display: flex; flex-wrap: wrap; @@ -732,3 +729,32 @@ h1 { .fan-editor-controls label { grid-template-columns: 1fr; align-items: stretch; } .fan-editor-panel { width: calc(100vw - 16px); } } + +/* v39.15.130: only in-game overlay windows scroll when they exceed the viewport. + Right-panel cards and tool categories intentionally keep the older stable layout. */ +.field-dialog, +.signboard-editor, +.rotator-editor { + overflow: auto; + overscroll-behavior: contain; + -webkit-overflow-scrolling: touch; + align-items: flex-start; + justify-items: center; + box-sizing: border-box; + padding: 12px; +} + +.field-dialog-panel, +.signboard-editor-panel, +.rotator-editor-panel { + max-height: calc(100dvh - 24px); + overflow-y: auto; + overflow-x: hidden; + overscroll-behavior: contain; + -webkit-overflow-scrolling: touch; + box-sizing: border-box; +} + +.save-confirm-dialog { z-index: 36; } +.save-confirm-panel { width: min(390px, 100%); } +.save-confirm-message { margin-bottom: 8px; color: var(--ink); font-size: 14px; } diff --git a/css/components.css b/css/components.css index 9d4c636..240b0f3 100644 --- a/css/components.css +++ b/css/components.css @@ -790,19 +790,24 @@ top: 50%; transform: translate(-50%, -50%); } -@media (max-width: 980px) { - .tool-category[data-tool-category="operate"]:not(.collapsed) { top: 58px; } +.tool-category[data-tool-category="operate"] .tool-shortcut { + position: absolute; + right: 3px; + bottom: 2px; + min-width: 13px; + height: 13px; + box-sizing: border-box; + padding: 0 3px; + border: 1px solid rgba(82,128,190,0.26); + border-radius: 5px; + background: rgba(255,255,255,0.88); + color: rgba(48,74,112,0.86); + font: 700 9px/12px system-ui, sans-serif; + text-align: center; + pointer-events: none; } - -@media (max-width: 980px) { - body.touch-mobile-ui .tool-tip-popover { - max-width: min(280px, calc(100vw - 24px)); - } -} - /* Collapsed event card must shrink to its header. layout.css gives .log-card a min-height, which left a large blank panel when folded. */ -.collapsible-card.collapsed { min-height: 0 !important; } .log-card.collapsed { min-height: 0 !important; height: auto !important; flex: 0 0 auto !important; flex-basis: auto !important; } .log-card.collapsed .panel-card-body { display: none !important; } @@ -839,3 +844,42 @@ .temperature-slider:disabled { opacity: 0.52; } + +.colony-limit-control { + margin: 8px 0 4px; + padding: 10px 11px; + border: 1px solid rgba(118, 92, 61, 0.16); + border-radius: 14px; + background: rgba(255, 251, 244, 0.56); +} +.colony-limit-head { + display: flex; + align-items: baseline; + justify-content: space-between; + gap: 8px; + color: rgba(68, 55, 41, 0.84); + font-size: 12px; +} +.colony-limit-head small { color: var(--muted); font-size: 10px; } +.colony-limit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 8px; } +.colony-limit-row { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 5px 7px; align-items: center; min-width: 0; font-size: 11px; color: var(--muted); } +.colony-limit-row span { grid-column: 1 / -1; min-width: 0; } +.colony-limit-slider { width: 100%; min-width: 0; accent-color: rgba(84, 138, 72, 0.92); } +.colony-limit-number { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid rgba(100, 78, 52, 0.22); border-radius: 8px; padding: 5px 6px; background: rgba(255,255,255,0.78); color: var(--ink); font: inherit; text-align: right; } +.colony-limit-status { margin-top: 7px; color: rgba(68, 55, 41, 0.78); font-size: 10px; line-height: 1.35; } + + +/* v39.15.131: keep the folded tool card usable when other right-side cards are expanded. */ +.tool-card.collapsed { + min-height: 64px !important; + height: auto !important; + flex: 0 0 auto !important; + flex-basis: auto !important; + overflow: visible !important; +} +.tool-card.collapsed .panel-card-toggle { + min-height: 46px; +} +.tool-card.collapsed .panel-card-body { + display: none !important; +} diff --git a/css/layout.css b/css/layout.css index 07707eb..6515c70 100644 --- a/css/layout.css +++ b/css/layout.css @@ -1,12 +1,6 @@ -/* CSS split file; preserve manifest load order. */ -.tool[data-tool="sleep_drug"] { --tool-icon: url("../assets/ui/tool_sleep_drug.webp"); } -.tool[data-tool="nest_box"] { --tool-icon: url("../assets/ui/tool_nest_box.webp"); } -.tool[data-tool="ant_nest"] { --tool-icon: url("../assets/ui/tool_ant_nest.webp"); } -.tool[data-tool="ball"] { --tool-icon: url("../assets/ui/tool_ball.webp"); --tool-icon-zoom: 1.36; } -.tool[data-tool="delete"] { --tool-icon: url("../assets/ui/tool_delete.webp"); } -.tool[data-tool="area_delete"] { --tool-icon: url("../assets/ui/tool_delete.webp"); } -.tool[data-tool="new"] { --tool-icon: url("../assets/ui/tool_new.webp"); } -.tool[data-tool="shoot"] { --tool-icon: url("../assets/ui/tool_shoot.png"); --tool-icon-zoom: 1.48; } +/* CSS split file; preserve manifest load order. Tool image paths come from TOOL_DEFINITIONS. */ +.tool[data-tool="ball"] { --tool-icon-zoom: 1.36; } +.tool[data-tool="shoot"] { --tool-icon-zoom: 1.48; } .tool.tool-emoji-icon { --tool-icon: none; } .tool.tool-emoji-icon::before { @@ -28,13 +22,13 @@ .tool[data-tool="reciprocator"].tool-emoji-icon::before, .tool[data-tool="undo"].tool-emoji-icon::before, .tool[data-tool="redo"].tool-emoji-icon::before { font-size: 29px; font-family: var(--font, sans-serif); } -.tool[data-tool="delete"], -.tool[data-tool="area_delete"] { --tool-icon-zoom: 1.42; } +.tool[data-tool="delete"] { --tool-icon-zoom: 1.42; } +.tool[data-tool="area_delete"] { --tool-icon-zoom: 1.20; } .tool[data-tool="pinch"].tool-emoji-icon::before { font-size: 22px; } .tool[data-tool="area_delete"].tool-emoji-icon::before { font-size: 31px; line-height: 1; - color: #f3a7aa; + color: #5d7fb9; text-shadow: 0 1px 0 rgba(255,255,255,0.65), 0 2px 5px rgba(146,54,62,0.16); filter: none; transform: translateY(-54%) scale(var(--tool-icon-zoom, 1)); @@ -303,24 +297,6 @@ meter { .log-observe { border-left-color: rgba(175, 146, 86, 0.62); } .log-event { border-left-color: rgba(132, 120, 210, 0.62); } -@media (max-width: 980px) { - #app { padding: 10px; } - .topbar { align-items: flex-start; flex-direction: column; } - .top-left { align-items: flex-start; flex-direction: column; } - .brand { align-items: center; flex-direction: row; gap: 10px; } - .layout { grid-template-columns: 1fr; } - .panel { max-height: none; overflow: visible; } - #gameCanvas { height: var(--field-mobile-height, 66vh); min-height: var(--field-mobile-min-height, 460px); } - .stage-wrap { min-height: var(--field-mobile-min-height, 460px); } - .field-choice-grid { grid-template-columns: 1fr; } - .reset-preset-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } -} - - - - - - /* Clearer tool category grouping. */ .tool-category[data-tool-category="operate"] { --tool-cat-a: rgba(224,239,255,0.82); --tool-cat-b: rgba(203,226,255,0.74); --tool-cat-line: rgba(82,128,190,0.26); } .tool-category[data-tool-category="food"] { --tool-cat-a: rgba(236,252,219,0.82); --tool-cat-b: rgba(214,244,194,0.74); --tool-cat-line: rgba(96,156,72,0.26); } diff --git a/css/mobile.css b/css/mobile.css index 9fa63f2..ca86dcc 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -227,7 +227,16 @@ body.touch-mobile-ui.mobile-mode-tool #gameCanvas { cursor: crosshair; } align-items: stretch; gap: 8px; } - .top-left { gap: 8px; } + .top-left { + align-items: flex-start; + flex-direction: column; + gap: 8px; + } + .brand { + align-items: center; + flex-direction: row; + gap: 10px; + } .brand h1, h1 { max-width: 100%; @@ -265,9 +274,16 @@ body.touch-mobile-ui.mobile-mode-tool #gameCanvas { cursor: crosshair; } gap: 10px; overflow: visible; } + .field-choice-grid { grid-template-columns: 1fr; } + .reset-preset-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } + #gameCanvas { + height: var(--field-mobile-height, 66vh); + min-height: var(--field-mobile-min-height, 460px); + } .stage-wrap { position: relative; width: 100%; + min-height: var(--field-mobile-min-height, 460px); overflow: hidden; } .panel { diff --git a/css/panel.css b/css/panel.css index 0dc1763..a77d799 100644 --- a/css/panel.css +++ b/css/panel.css @@ -137,22 +137,10 @@ body::before { min-width: 0; white-space: nowrap; } -.family-genetic-stats b, -.family-fight-stat b { +.family-genetic-stats b { font-weight: 800; color: rgba(120, 86, 30, 0.92); } -.family-fight-stat { - display: block; - margin-top: 1px; - max-width: 82px; - font-size: 9.7px; - line-height: 1.13; - color: rgba(88, 70, 48, 0.82); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} .lineage-family-tree .tree-node.champion { border-color: rgba(202, 146, 33, 0.58); box-shadow: inset 0 0 0 1px rgba(247, 200, 64, 0.30), 0 3px 8px rgba(120, 78, 12, 0.09); @@ -363,12 +351,18 @@ body::before { white-space: nowrap; } .colony-chart-legend i { - width: 8px; - height: 8px; + width: 10px; + height: 10px; border-radius: 999px; display: inline-block; box-shadow: 0 0 0 1px rgba(70, 52, 36, 0.10); + cursor: pointer; + transition: opacity 120ms ease, transform 120ms ease; } +.colony-chart-legend i:hover, +.colony-chart-legend i:focus-visible { transform: scale(1.18); outline: none; } +.colony-chart-legend .series-hidden { opacity: 0.42; text-decoration: line-through; } +.colony-chart-legend .series-hidden i { background: transparent !important; box-shadow: inset 0 0 0 2px currentColor; } /* Family tree personality tags: consolidated final cascade. */ diff --git a/index.html b/index.html index f017603..9144088 100644 --- a/index.html +++ b/index.html @@ -4,14 +4,14 @@ たりない観察 - - - - - - - - + + + + + + + +
@@ -71,7 +71,7 @@