diff --git a/.tmp-edge-profile2/Crashpad/settings.dat b/.tmp-edge-profile2/Crashpad/settings.dat deleted file mode 100644 index 3b20fde..0000000 Binary files a/.tmp-edge-profile2/Crashpad/settings.dat and /dev/null differ diff --git a/.tmp-edge-profile2/Crashpad/throttle_store.dat b/.tmp-edge-profile2/Crashpad/throttle_store.dat deleted file mode 100644 index 9639e1b..0000000 --- a/.tmp-edge-profile2/Crashpad/throttle_store.dat +++ /dev/null @@ -1 +0,0 @@ -level=none expiry=0 diff --git a/AI_MAP.md b/AI_MAP.md index b393891..9b007a5 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.16.18`. +- Version/cache: `app_manifest.json`, `js/version.js`, and generated `service-worker.js` share `39.16.29`. - 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`. @@ -81,3 +81,16 @@ This section records current boundaries only. Version-by-version cleanup history - 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. + +## v39.16.30 routing notes + +- War preset composition: `js/world_reset_presets.js`. +- Fence restitution: `js/world_environment.js`; ball response: `js/item_dynamic_ball_system.js`. +- Ball-to-Tarinai contact, including sleepers: `js/collision_response_system.js`. +- Movable placement stacking: `js/item_tool_metadata.js`, `js/collision_footprint_system.js`, `js/world_placement_log.js`. +- Delete-tool target lookup: `js/world_tool_actions.js`. +- Nest-box tooltip offset: `js/render.js`. + +## v39.16.31 routing notes + +- Hair Trigger preset: `js/world_reset_presets.js`; physics tool icon renderer: `js/ui_tools.js`; world tooltip offset: `js/render.js`. diff --git a/BUILD_NOTE.txt b/BUILD_NOTE.txt index f988d61..8d18765 100644 --- a/BUILD_NOTE.txt +++ b/BUILD_NOTE.txt @@ -6,7 +6,7 @@ tarinai_compact_save_stage4 - 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 +- Version: 39.16.31 - CompressionStream and DecompressionStream are drained concurrently to avoid browser backpressure stalls. - Load confirmation uses the in-game dialog; fan wind is realtime; zunchi tool preview opacity, carried plushie depth, and blanket grass rules were corrected. @@ -27,3 +27,22 @@ tarinai_compact_save_stage4 - 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. + +- v39.16.19: added direct food/medicine giving by placement or pinched drop, with a give overlay, stronger food-gift personality change, and heart bursts; removed unused collision reasons and duplicate constraint projection dirty checks. + +- v39.16.20: localized the direct-feeding personality reason, normalized electrocution deaths to 「感電」, added detector-controlled gate fences, made chart legend labels fully clickable, and escaped non-ASCII runtime source. + +- v39.16.21: hid pinch overlays for rope/rod/spring/wire connection items and added detector time schedules with a dual-thumb range control, overnight ranges, and persistent copy/save state. + +- v39.16.22: shortened detector copy, removed the time-range explanatory hint, cascaded connection-item removal when any endpoint disappears, and repaired detached plushies so they return to a living owner or disappear with a missing owner. + +- v39.16.23: excluded transient splat effects from all connection endpoint selection and renamed the user-facing feeding need from 「摂餌」 to 「食欲」. +- v39.16.25: added toilet-seeking before normal defecation; renamed rain shelter to parasol; added sunny +3.5C and unsheltered rain -3.5C felt-temperature corrections; parasols neutralize both and block sunbathing. Pet food, first aid, and sedative remain included. + +- v39.16.29: replaced toilet-seeking with walkable toilet sand that immediately removes poop spawned on its surface; added a parasol ground shadow and explicit hot-sun/cold-rain temperature-seeking targets; fixed null candidate temperatures being interpreted as 0C. + +- v39.16.29: aligned parasol placement overlay with its shade, made toilet sand absorb rain water, expanded Happy/Athletic/War presets, simplified Athletic rotators, and reserved their full rotation envelope from fences. + +- v39.16.30: added a few bounce fences to War, reduced ordinary-fence restitution, restored ball collisions for visible sleeping Tarinai, moved nest-box tooltips closer, allowed movable-item placement overlap, and fixed delete-tool target lookup. + +- v39.16.31: unified in-world tooltip spacing, added the Hair Trigger preset, and replaced physics-category line-like tool icons with distinct semantic silhouettes. diff --git a/FILES.json b/FILES.json index 57d6e87..f1f8860 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.16.18", + "version": "39.16.31", "entrypoints": { "app": "index.html", "runtime": "js/main.js", diff --git a/GAME_FEATURES.md b/GAME_FEATURES.md index b3037f2..38bd88e 100644 --- a/GAME_FEATURES.md +++ b/GAME_FEATURES.md @@ -39,7 +39,7 @@ ## v39.16.13 detector and fence changes - 感圧スイッチを「検知器」へ改名し、道具UI上で通常の柵と位置を入れ替えた。 -- 検知器は軸平行の矩形範囲で対象を数える。専用UIから横幅・縦幅・対象・必要数を設定する。 +- 検知器は軸平行の矩形範囲で対象を数えるほか、時刻も検知できる。専用UIから対象・必要数・範囲、または二つまみスライダーによる作動時間帯を設定する。 - 柵の配置境界判定を実際の細長い形状に合わせ、フィールド上下端近くへ配置できるようにした。 - バウンス柵の反発係数、最低射出速度、最大速度を引き上げ、衝突直後に強く跳ねるようにした。 - ワープゲートを道具、描画、更新、信号、保存形式から削除した。 @@ -48,11 +48,13 @@ ## v39.16.11 mechanism fixes and passive spring -- 検知器は矩形範囲内の「たりない」または「アイテム」を数え、設定個数以上で電線へ信号を送る。 +- 検知器は矩形範囲内の「たりない」または「アイテム」を数えるか、設定した時刻帯に入ると電線へ信号を送る。開始時刻が終了時刻より後なら日付をまたぎ、同時刻なら終日作動する。 - 一方通行柵は矢印方向だけ通過でき、逆方向のたりない・アイテム・機構を遮る。 - バウンス柵は衝突対象へ強い即時反発を与える。 - バネは棒と同じ2点接続方式で設置する。自動伸縮はせず、外力による伸び縮みに対して受動的に反発し、弾性運動する。 - 電線と絶縁電線はアイテム同士を接続し、複数本を経由して信号を伝える。通常電線は通電中に接触したたりないへダメージを与え、絶縁電線は与えない。 +- ヒモ、棒、バネ、電線、絶縁電線は、いずれかの接続先が消滅すると連鎖的に消滅する。 +- 所有者が生存しているぬいぐるみは、投擲中やプレイヤー所持中を除き頭上へ復帰し、地面に放置されない。 - バイナリスキーマ34、スナップショット28。v39.16.10と保存形式は同じ。 ## v39.16.9 load UI and item behavior fixes @@ -298,3 +300,41 @@ Recovery depends on the disease or effect. Water, rest, food, medicine, zunda ju - 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. + +## v39.16.25 additions + +- 雨天時は未遮蔽のたりないの体感気温が3.5℃低下し、晴天時は3.5℃上昇する。 +- 雨よけをパラソルへ変更。範囲内では雨と日差しを防ぎ、天候による体感気温補正を無効化する。 +- パラソル内では日光浴を開始・継続しない。 +- ペットフード、救急薬、鎮静薬の追加内容は維持する。 + + +## v39.16.28 additions + +- トイレの砂を従来より大きな角丸矩形へ変更し、干草寝床と同じ背面レイヤーで描画する。 +- トイレの砂の外観とずんち吸収判定を共通の矩形フットプリントから生成し、見た目と有効範囲を一致させる。 +- パラソルをやや大型化し、影の中心を支柱の根元へ合わせる。 +- パラソルの影の楕円を、そのまま雨・日差し・天候由来の体感気温補正を防ぐ範囲として使用する。 +- 晴天の暑さ、または雨天の寒さを避ける際、パラソルの影の内側を気温調整行動の候補にする。 +- 扇風機の体感気温低下が風の描画・物体押し出しより短い範囲で途切れていた問題を修正し、320pxの風領域全体で最大5℃の冷却を減衰適用する。 +## v39.16.29 additions + +- Parasol placement previews use the same ellipse and center as the rendered shade and weather-protection footprint. +- Toilet sand absorbs ambient rain-water drops before they become ground water items. +- Happy preset adds parasols and water balloons, and places one toilet-sand item at every duplicator position. +- Athletic preset adds water balloons and replaces complex rotators with single-bar rotators positioned using their full rotation envelope so they do not strike fences. +- War preset adds fans with active rotating head-swing settings. + + +## v39.16.30 additions + +- 戦争プリセットに少数のバウンス柵を追加する。 +- 通常の柵は、ボールなどに対する反発を控えめにする。 +- 巣箱の外で眠っているたりないも、ボールや水風船と物理衝突する。 +- 巣箱ツールチップを巣箱へやや近づける。 +- ボール、画鋲、ずんちなどの移動可能アイテム同士は、同じ設置位置へ重ねて配置できる。 +- 削除ツールの対象探索で発生していた例外を修正する。 + +## v39.16.31 additions + +- 一触即発プリセット、ツールチップ距離の統一、物理カテゴリ専用アイコンを追加。 diff --git a/README.md b/README.md index 0527577..4013a82 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,10 @@ 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.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. +- No bundler; `index.html` loads ordered global-IIFE scripts with `?v=39.16.31`. +- v39.16.31 changes: all in-world tooltips use the closer offset; Hair Trigger adds a central bounce-fence ball enclosure with Tarinai and pet-food duplicators outside; physics tools use distinct icons. +- v39.16.29 changes: parasol placement preview now uses the exact shade center and footprint; toilet sand absorbs rain-created water drops. Happy adds parasols, water balloons, and toilet sand beneath each duplicator; Athletic uses fence-safe single-bar rotators and water balloons; War adds rotating fans. +- v39.16.19 changes: food and medicine can be given directly by placement or pinched drop, with a dedicated overlay, food heart bursts, and stronger personality effects; unused collision reasons and duplicate constraint projection dirty checks were removed. - 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`. @@ -56,3 +58,4 @@ AI-first entrypoint for a static browser simulation/game. Keep this file small; ### 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 312f41f..e04734f 100644 --- a/app_manifest.json +++ b/app_manifest.json @@ -1,5 +1,5 @@ { - "version": "39.16.18", + "version": "39.16.31", "css": [ "css/base.css", "css/layout.css", @@ -91,6 +91,7 @@ "js/tarinai_action_definitions.js", "js/tarinai_needs_items.js", "js/tarinai_food_prototype_mixin.js", + "js/tarinai_direct_feeding_system.js", "js/tarinai_need_planner_system.js", "js/tarinai_item_interaction_context.js", "js/tarinai_food_interaction_system.js", diff --git a/css/base.css b/css/base.css index 5e59647..8b88845 100644 --- a/css/base.css +++ b/css/base.css @@ -401,6 +401,7 @@ h1 { .tool[data-tool="giant_drug"] .tool-sprite-preview { width: 39px; height: 39px; left: -4px; } .tool[data-tool="dwarf_drug"] .tool-sprite-preview, .tool[data-tool="oshibyo"] .tool-sprite-preview { width: 22px; height: 22px; left: 5px; } +.tool.tool-has-physics-icon .tool-physics-preview { width: 31px; height: 31px; left: 0; filter: drop-shadow(0 1px 2px rgba(52,40,26,0.16)); } .tool[data-tool="poke"], .tool[data-tool="water_hose"] { --tool-icon-zoom: 0.92; } .signboard-editor { @@ -620,6 +621,102 @@ h1 { padding: 4px 6px; } +.pressure-time-control[hidden] { display: none; } +.pressure-spatial-control[hidden] { display: none; } +.pressure-time-control { + display: grid; + gap: 8px; + padding: 10px 10px 8px; + border-radius: 11px; + border: 1px solid rgba(84,68,48,0.13); + background: rgba(255,255,255,0.58); +} +.pressure-time-summary { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + color: var(--ink); + font-size: 13px; + font-weight: 700; +} +.pressure-time-summary output { + display: inline-block; + min-width: 42px; + text-align: center; + font-variant-numeric: tabular-nums; +} +.pressure-time-range { + position: relative; + height: 34px; + margin: 0 7px; +} +.pressure-time-track { + position: absolute; + left: 0; + right: 0; + top: 14px; + height: 6px; + border-radius: 999px; + background: rgba(94,112,128,0.22); + box-shadow: inset 0 1px 2px rgba(43,55,66,0.16); +} +.pressure-time-thumb { + position: absolute; + inset: 0; + width: 100%; + height: 34px; + margin: 0; + padding: 0; + appearance: none; + -webkit-appearance: none; + background: transparent; + pointer-events: none; +} +.pressure-time-thumb::-webkit-slider-runnable-track { + height: 6px; + background: transparent; + border: 0; +} +.pressure-time-thumb::-webkit-slider-thumb { + width: 20px; + height: 20px; + margin-top: -7px; + border-radius: 50%; + border: 2px solid rgba(42,121,172,0.88); + background: #fafdff; + box-shadow: 0 2px 6px rgba(42,78,104,0.24); + appearance: none; + -webkit-appearance: none; + pointer-events: auto; + cursor: grab; +} +.pressure-time-thumb::-moz-range-track { + height: 6px; + background: transparent; + border: 0; +} +.pressure-time-thumb::-moz-range-thumb { + width: 17px; + height: 17px; + border-radius: 50%; + border: 2px solid rgba(42,121,172,0.88); + background: #fafdff; + box-shadow: 0 2px 6px rgba(42,78,104,0.24); + pointer-events: auto; + cursor: grab; +} +.pressure-time-thumb:focus-visible::-webkit-slider-thumb { + outline: 3px solid rgba(73,157,216,0.30); + outline-offset: 2px; +} +.pressure-time-thumb:focus-visible::-moz-range-thumb { + outline: 3px solid rgba(73,157,216,0.30); + outline-offset: 2px; +} +.pressure-time-thumb-start { z-index: 2; } +.pressure-time-thumb-end { z-index: 3; } +.pressure-time-range[data-wraps="1"] .pressure-time-thumb-start { z-index: 4; } .signal-channel-label { font-size: 13px; color: var(--ink); diff --git a/css/panel.css b/css/panel.css index a77d799..766acea 100644 --- a/css/panel.css +++ b/css/panel.css @@ -344,23 +344,35 @@ body::before { color: var(--muted); line-height: 1.25; } -.colony-chart-legend span { +.colony-chart-legend .chart-series-toggle { + appearance: none; display: inline-flex; align-items: center; gap: 4px; + min-width: 0; + margin: 0; + padding: 2px 4px; + border: 0; + border-radius: 6px; + background: transparent; + color: inherit; + font: inherit; + line-height: inherit; white-space: nowrap; + cursor: pointer; + transition: opacity 120ms ease, background-color 120ms ease, transform 120ms ease; } -.colony-chart-legend i { +.colony-chart-legend .chart-series-toggle:hover { background: rgba(255,255,255,0.56); } +.colony-chart-legend .chart-series-toggle:focus-visible { outline: 2px solid rgba(103,178,44,0.58); outline-offset: 1px; } +.colony-chart-legend .chart-series-toggle:active { transform: translateY(1px); } +.colony-chart-legend .chart-series-toggle i { width: 10px; height: 10px; + flex: 0 0 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; } diff --git a/index.html b/index.html index 9144088..d5a696f 100644 --- a/index.html +++ b/index.html @@ -4,14 +4,14 @@