diff --git a/FILES.json b/FILES.json index d4f8e57..61b1ba9 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.47", + "version": "39.15.75", "entrypoints": { "app": "index.html", "runtime": "js/main.js", @@ -9,75 +9,159 @@ "service_worker": "service-worker.js" }, "read_strategy": { - "default": ["README.md"], - "architecture": ["README.md", "AI_MAP.md"], - "exact_inventory": ["powershell -NoProfile -ExecutionPolicy Bypass -File scripts/ai_inventory.ps1 -All", "python scripts/ai_inventory.py --all"], - "machine_routing": ["FILES.json"] + "default": [ + "README.md" + ], + "architecture": [ + "README.md", + "AI_MAP.md" + ], + "exact_inventory": [ + "powershell -NoProfile -ExecutionPolicy Bypass -File scripts/ai_inventory.ps1 -All", + "python scripts/ai_inventory.py --all" + ], + "machine_routing": [ + "FILES.json" + ] }, "groups": [ { "id": "root", - "patterns": [".gitignore", ".htaccess", "app_manifest.json", "favicon.ico", "index.html", "README.md", "AI_MAP.md", "GAME_FEATURES.md", "FILES.json", "service-worker.js"], + "patterns": [ + ".gitignore", + ".htaccess", + "app_manifest.json", + "favicon.ico", + "index.html", + "README.md", + "AI_MAP.md", + "GAME_FEATURES.md", + "FILES.json", + "service-worker.js" + ], "meaning": "Repo/app shell metadata, server/static cache config, docs, manifest, entrypoint." }, { "id": "css", - "patterns": ["css/*.css"], + "patterns": [ + "css/*.css" + ], "meaning": "Base, layout, panel, component, and mobile responsive styling." }, { "id": "scripts", - "patterns": ["scripts/*.py", "scripts/*.ps1"], + "patterns": [ + "scripts/*.py", + "scripts/*.ps1" + ], "meaning": "Generators, regression checks, and token-aware AI inventory tooling." }, { "id": "core", - "patterns": ["js/version.js", "js/event_bus.js", "js/registry_base.js", "js/disease_registry.js", "js/sound_pack.js", "js/data.js", "js/ground_types.js", "js/health.js", "js/input_mode_manager.js", "js/main.js", "js/math.js", "js/perf_profiler.js", "js/debug_tools.js"], + "patterns": [ + "js/version.js", + "js/event_bus.js", + "js/registry_base.js", + "js/disease_registry.js", + "js/sound_pack.js", + "js/data.js", + "js/ground_types.js", + "js/health.js", + "js/input_mode_manager.js", + "js/main.js", + "js/math.js", + "js/perf_profiler.js", + "js/debug_tools.js" + ], "meaning": "Bootstrap, shared constants/helpers, registries, config, profiling/debug." }, { "id": "assets_runtime", - "patterns": ["js/assets.js", "js/audio.js", "js/render.js", "js/tarinai_render.js", "js/item_render_runtime.js"], + "patterns": [ + "js/assets.js", + "js/audio.js", + "js/render.js", + "js/tarinai_render.js", + "js/item_render_runtime.js" + ], "meaning": "Image/audio loading and canvas rendering." }, { "id": "simulation", - "patterns": ["js/sim_core.js", "js/simulation*.js", "js/system_order.js"], + "patterns": [ + "js/sim_core.js", + "js/simulation*.js", + "js/system_order.js" + ], "meaning": "Simulation primitives, concrete systems, phase ordering." }, { "id": "world", - "patterns": ["js/world*.js", "js/weather_system.js"], + "patterns": [ + "js/world*.js", + "js/weather_system.js" + ], "meaning": "World state/view/update/tools/environment/combat/family/social/ants." }, { "id": "physics", - "patterns": ["js/physics*.js", "js/mechanical_system.js", "js/constraint_system.js", "js/collision_footprint_system.js"], + "patterns": [ + "js/physics*.js", + "js/mechanical_system.js", + "js/constraint_system.js", + "js/collision_footprint_system.js" + ], "meaning": "Geometry, collisions, constraints, mechanical item behavior." }, { "id": "items", - "patterns": ["js/item*.js", "js/items.js", "js/structures.js", "js/structure_lifecycle.js"], + "patterns": [ + "js/item*.js", + "js/items.js", + "js/structures.js", + "js/structure_lifecycle.js" + ], "meaning": "Item/structure registry, lifecycle, dynamic behavior, rendering." }, { "id": "tarinai", - "patterns": ["js/tarinai*.js", "js/ants.js"], + "patterns": [ + "js/tarinai*.js", + "js/ants.js" + ], "meaning": "Creature state/actions/needs/social life/item effects/disease/rendering plus ant actor model." }, { "id": "save", - "patterns": ["js/save*.js", "js/snapshot_system.js", "js/restore_coordinator.js", "js/history_system.js"], + "patterns": [ + "js/save*.js", + "js/snapshot_system.js", + "js/restore_coordinator.js", + "js/history_system.js" + ], "meaning": "Snapshot schema/codec/storage/restore/history." }, { "id": "ui", - "patterns": ["js/ui*.js", "js/text_catalog.js", "js/command_dispatcher.js", "js/family_graph.js"], + "patterns": [ + "js/ui*.js", + "js/text_catalog.js", + "js/command_dispatcher.js", + "js/family_graph.js" + ], "meaning": "DOM UI, input, tools, selected panel, logs, charts, family tree, text labels, command routing." }, { "id": "assets", - "patterns": ["assets/sprites/tarinai_*.webp", "assets/ui/tool_*", "assets/ui/favicon*", "assets/ui/apple-touch-icon.png", "assets/ui/ecology_*.webp", "assets/objects/*", "assets/sounds/*"], + "patterns": [ + "assets/sprites/tarinai_*.webp", + "assets/ui/tool_*", + "assets/ui/favicon*", + "assets/ui/apple-touch-icon.png", + "assets/ui/ecology_*.webp", + "assets/objects/*", + "assets/sounds/*" + ], "meaning": "Creature sprites, UI/tool icons, field object images, voice/SFX samples." } ], diff --git a/GAME_FEATURES.md b/GAME_FEATURES.md index 9619b93..a3d0acb 100644 --- a/GAME_FEATURES.md +++ b/GAME_FEATURES.md @@ -67,7 +67,7 @@ The core loop is: ### Habitat - **ずんち / zunchi**: tarinai waste; affects disease and can fertilize grass. -- **スプリンクラー / sprinkler**: cleans one target at a time in its effective radius. +- **ロボ掃除機 / robot_cleaner**: moves through the field at fixed normal speed 60, or 120 in high-speed mode. It checks the nearest matching cleanup target every 2 seconds, keeps pursuing it between scans, and cleans every matching object it touches. The 死骸 target also covers blood traces; clicking the item opens its target settings. - **干草寝床 / bed**: placeable sleeping spot; helps HP recovery. - **巣箱 / nest box**: reduces stress nearby; improves sleep quality when used. - **ボール / ball**: toy that tarinai can play with and the player can poke. diff --git a/README.md b/README.md index 05dd14f..51fe40e 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ 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. @@ -68,12 +73,11 @@ AI-first entrypoint for a static browser simulation/game. Keep this file small; - Oshibyo lodged position is anchored to the left side of the tarinai sprite. -## v39.15.47 family / sprinkler polish +## v39.15.47 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. -- Sprinkler rendering is redesigned to a more realistic yard-sprinkler look and now emits water-like spray effects when active. ## v39.15.47 owned object panic / shoot effect diff --git a/app_manifest.json b/app_manifest.json index 89c1eab..86a315a 100644 --- a/app_manifest.json +++ b/app_manifest.json @@ -1,5 +1,5 @@ { - "version": "39.15.65", + "version": "39.15.75", "css": [ "css/base.css", "css/layout.css", diff --git a/css/base.css b/css/base.css index d07ed88..0952812 100644 --- a/css/base.css +++ b/css/base.css @@ -524,6 +524,31 @@ h1 { margin-top: 12px; } +.robot-cleaner-editor-panel { width: min(300px, calc(100vw - 28px)); } +.robot-cleaner-editor-help { + color: var(--muted); + font-size: 12px; + line-height: 1.45; + margin: 0 2px 10px; +} +.robot-cleaner-targets { + display: grid; + gap: 8px; + margin: 8px 0 2px; +} +.robot-cleaner-targets label { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 10px; + border-radius: 10px; + background: rgba(255,255,255,0.58); + border: 1px solid rgba(84,68,48,0.11); + cursor: pointer; + user-select: none; +} +.robot-cleaner-targets input { accent-color: #70b242; } + /* v16.07.08: right menu fixed quick tabs */ .panel-quick-tabs { position: sticky; diff --git a/css/panel.css b/css/panel.css index 9e0fa03..caa34bc 100644 --- a/css/panel.css +++ b/css/panel.css @@ -185,274 +185,57 @@ body::before { .family-personality-tags { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); + grid-auto-rows: minmax(13px, auto); + align-items: stretch; overflow: visible !important; text-overflow: clip !important; - gap: 2px 4px; + gap: 2px 3px; margin-top: 2px; white-space: normal !important; max-height: none; - max-width: 84px; + max-width: 100%; + width: 100%; } .family-personality-tags em { - display: block; + display: flex; + align-items: center; + justify-content: center; min-width: 0; - max-width: none; - padding: 1px 4px; + max-width: 100%; + padding: 1px 3px; border-radius: 999px; background: rgba(103,178,44,0.11); border: 1px solid rgba(103,178,44,0.20); color: rgba(64,72,48,0.86); font-size: 8.2px; font-style: normal; - line-height: 1.25; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.family-copy strong { font-size: 12.5px; } -.family-copy span { color: var(--muted); font-size: 9.6px; margin-top: 1px; } - - -.colony-card { overflow: visible; min-height: 0; flex: 0 0 auto; } -.colony-stats { - grid-template-columns: repeat(2, 1fr); - margin-bottom: 8px; -} -.colony-chart { - display: block; - width: 100%; - height: 188px; - min-height: 188px; - border: 1px solid rgba(84, 68, 48, 0.14); - border-radius: 14px; - background: linear-gradient(180deg, rgba(255,255,255,0.70), rgba(246,240,228,0.54)); - overflow: hidden; -} -.colony-card h2 { line-height: 1.45; margin-bottom: 10px; } -.colony-chart svg { display: block; width: 100%; height: 100%; } -.colony-chart-legend { - display: flex; - flex-wrap: wrap; - gap: 4px 8px; - align-items: center; - margin: 4px 0 8px; - font-size: 11px; - color: var(--muted); - line-height: 1.25; -} -.colony-chart-legend span { - display: inline-flex; - align-items: center; - gap: 4px; - white-space: nowrap; -} -.colony-chart-legend i { - width: 8px; - height: 8px; - border-radius: 999px; - display: inline-block; - box-shadow: 0 0 0 1px rgba(70, 52, 36, 0.10); -} - -.relation-row strong { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; } -.relation-face { - width: 24px; - height: 24px; - object-fit: contain; - border-radius: 999px; - background: rgba(255,255,255,0.66); - border: 1px solid rgba(84,68,48,0.12); - vertical-align: middle; - flex: 0 0 auto; -} - - -.lineage-family { - padding: 10px; - margin: 0 0 12px; - border-radius: 15px; - background: rgba(255,253,248,0.62); - border: 1px solid rgba(84,68,48,0.12); -} -.lineage-family h3 { - margin: 0 0 8px; - font-size: 13px; - color: rgba(64,52,38,0.86); -} -/* Family archive: actual top-down tree diagram. */ -.lineage-family-tree { - overflow-x: auto; - overflow-y: visible; - padding: 10px 10px 22px; - -webkit-overflow-scrolling: touch; - overscroll-behavior-x: contain; -} -.lineage-family-tree h3 { - position: sticky; - left: 0; - z-index: 3; - width: max-content; - padding-right: 12px; - background: rgba(255,253,248,0.82); - border-radius: 8px; -} -.lineage-family-tree .lineage-tree-panel { - position: relative; + line-height: 1.18; overflow: visible; - min-width: 360px; - margin-top: 6px; - border-radius: 14px; - background: - linear-gradient(90deg, rgba(84,68,48,0.045) 1px, transparent 1px), - linear-gradient(180deg, rgba(84,68,48,0.040) 1px, transparent 1px), - rgba(255,250,244,0.48); - background-size: 34px 34px, 34px 34px, auto; - border: 1px solid rgba(84,68,48,0.10); -} -.lineage-family-tree .lineage-links { - position: absolute; - inset: 0; - width: 100%; - height: 100%; - overflow: visible; - pointer-events: none; - z-index: 1; - isolation: isolate; -} - -.lineage-actions { - display: flex; - align-items: center; - gap: 8px; - flex-wrap: wrap; - justify-content: flex-end; -} -.btn.active { - background: #efffde; - border-color: rgba(103,178,44,0.46); - font-weight: 700; -} - -.lineage-render-status { - position: sticky; - top: 0; - left: 0; - z-index: 6; - width: max-content; - margin: 0 0 8px; - padding: 6px 10px; - border-radius: 999px; - font-size: 12px; - color: var(--muted); - background: rgba(255,255,255,0.88); - border: 1px solid rgba(84,68,48,0.10); - box-shadow: 0 4px 10px rgba(64,48,32,0.06); -} -.lineage-stale-status { - position: sticky; - top: 0; - left: 0; - z-index: 6; - width: max-content; - max-width: calc(100% - 12px); - margin: 0 0 8px; - padding: 6px 10px; - border-radius: 999px; - font-size: 12px; - color: rgba(92, 75, 52, 0.82); - background: rgba(255, 249, 232, 0.92); - border: 1px solid rgba(150, 115, 46, 0.16); - box-shadow: 0 4px 10px rgba(64,48,32,0.05); -} -.lineage-family-tree .lineage-links path { - fill: none; - stroke: rgba(107, 88, 61, 0.58); - stroke-width: 2; - stroke-linecap: round; - stroke-linejoin: round; -} -.lineage-family-tree .lineage-links .partner-link { - stroke-width: 2.4; - stroke: rgba(98, 80, 56, 0.68); - stroke-dasharray: 5 4; -} -.lineage-family-tree .lineage-links .child-link { - stroke-width: 2; - stroke: rgba(107, 88, 61, 0.58); -} -.lineage-family-tree .tree-node { - position: absolute; - width: 150px; - height: 104px; - min-height: 104px; - box-sizing: border-box; - align-items: flex-start; - background: linear-gradient(180deg, #fffdf8, #f8f1e5); - box-shadow: 0 2px 5px rgba(64,48,32,0.035); - contain: layout paint style; - z-index: 2; - isolation: isolate; -} -.lineage-family-tree .tree-node.child { - border-color: rgba(103,178,44,0.34); -} -.lineage-family-tree .tree-node.dead { - opacity: 1; - filter: none; -} -.lineage-family-tree .tree-node[data-family-tarinai-id]:hover { - transform: none; -} -.lineage-family-tree .tree-node .family-portrait { - right: 4px; - top: 4px; - bottom: auto; - width: 48px; - height: 48px; -} -.lineage-family-tree .tree-generation-label { - position: absolute; - left: 10px; - width: 54px; - padding: 3px 0; - border-radius: 999px; - font-size: 11px; - color: var(--muted); - text-align: center; - background: rgba(255,255,255,0.70); - border: 1px solid rgba(84,68,48,0.08); - z-index: 2; -} -.lineage-family-tree .lineage-empty-family { - position: absolute; - left: 72px; - bottom: 8px; - padding: 5px 8px; - border-radius: 9px; - background: rgba(255,255,255,0.70); -} - -@media (max-width: 720px) { - .ecology-grid { grid-template-columns: 1fr; } - .ecology-card { grid-template-columns: 68px minmax(0, 1fr); } - .ecology-card img { width: 68px; height: 68px; } -} - -@media (max-width: 720px) { - .lineage-main-content { - height: 70vh; - min-height: 420px; - max-height: none; - } + text-overflow: clip; + white-space: normal; + overflow-wrap: anywhere; + word-break: keep-all; } .tool[data-tip] { position: relative; } .lineage-family-tree .tree-node .family-copy { - max-width: calc(100% - 46px); + max-width: calc(100% - 8px); + width: 100%; } .lineage-family-tree .tree-node .family-copy strong, .lineage-family-tree .tree-node .family-copy > span:not(.family-genetic-stats):not(.family-fight-stat):not(.family-personality-tags) { max-width: 100%; } + + +.lineage-family-tree .tree-node .family-personality-tags { + max-width: 100%; + width: 100%; +} +.lineage-family-tree .tree-node .family-personality-tags em { + overflow: visible; + text-overflow: clip; + white-space: normal; +} diff --git a/index.html b/index.html index 045871b..0d8fa5a 100644 --- a/index.html +++ b/index.html @@ -7,11 +7,11 @@ - - - - - + + + + +