diff --git a/PATCH_NOTES.md b/PATCH_NOTES.md index 0529b91..c17894a 100644 --- a/PATCH_NOTES.md +++ b/PATCH_NOTES.md @@ -1,23 +1,17 @@ -# v15.24.2 needs compliance fix +# Patch Notes 15.24.12 -This patch focuses on making the implementation closer to the need-system prompt. +- Added `activeBehavior` as the authoritative runtime behavior layer above legacy state timers. +- Added `forcedBehaviorQueue` and `forceBehavior()` hook for external forced actions such as love mochi, fight mochi, and drugs. +- Re-routed love mochi, fight mochi, and sleep drug effects through forced need actions. +- Converted eating, panic, fighting, intimidation, and birth ritual display/scheduling to behavior-backed actions. +- Split social need pressure internally into bond/family/mate/conflict/fear parts and used those parts in social action selection. +- Weighted fulfill action selection by its internal reason parts. +- Reduced direct old-style birth starts: proximity now raises mate pressure; ritual starts when mate behavior is active or forced. +- UI action text now prefers `activeBehavior` over stale thoughts or intent strings. -## Fixed - -- Kept the six-need system as the behavior driver. -- Kept needs clamped/quantized and displayed as 0-10 values. -- Kept tied top-need random selection and tie reason text. -- Kept StructureRegistry and both buildable structures: grass_bed and plushie. -- Removed remaining mojibake strings in the main need/action implementation file. -- Changed safety fleeing so normal safety behavior no longer directly enters panic. -- Reworked stress so direct stress mutation is removed from the main behavior files. -- Stress is now recalculated from needs or projected needs via calculateStressFromNeeds. -- Added applyNeedShock/applyNeedRelief helpers and converted shock/relief events into need changes. -- Reworked enterPanic as a legacy adapter that converts old calls into need shock first. -- Panic/intimidate are now short reaction states triggered through need shock logic. -- Updated cache/version strings to 15.24.2. - -## Notes - -- Old save compatibility is intentionally not provided. -- Some legacy fields such as loneliness, affection, mood, and fearTimer still exist as compatibility/input/display fields, but the main action selection now uses the six needs. +## 15.24.14 +- 外部強制行動を強化。薬・餅から `forceBehavior()` 経由で優先割込み、対象再探索、失敗時再試行を行うようにした。 +- へこ餅、けんか餅、ねむり薬の強制行動優先度を更新。 +- 喧嘩対象が Item 等になった場合の `relationTo is not a function` エラーを防止。 +- 睡眠欲求を概日圧 `circadianSleepPressure` 中心に変更。夜は大きく上昇、昼下がりは微増、それ以外は減衰。 +- 初期生成時、夜なら睡眠欲求が高めになるよう初期エネルギーと概日圧を調整。 diff --git a/app_manifest.json b/app_manifest.json index b9cdf68..8619e89 100644 --- a/app_manifest.json +++ b/app_manifest.json @@ -1,5 +1,5 @@ { - "version": "15.24.2", + "version": "15.24.14", "css": [ "css/base.css", "css/layout.css", diff --git a/assets/ui/tool_duplicator.webp b/assets/ui/tool_duplicator.webp new file mode 100644 index 0000000..2651d13 Binary files /dev/null and b/assets/ui/tool_duplicator.webp differ diff --git a/assets/ui/tool_oshibyo.webp b/assets/ui/tool_oshibyo.webp new file mode 100644 index 0000000..ddea47f Binary files /dev/null and b/assets/ui/tool_oshibyo.webp differ diff --git a/assets/ui/tool_signboard.webp b/assets/ui/tool_signboard.webp new file mode 100644 index 0000000..5d53fda Binary files /dev/null and b/assets/ui/tool_signboard.webp differ diff --git a/css/base.css b/css/base.css index cb7924c..16b0a80 100644 --- a/css/base.css +++ b/css/base.css @@ -384,6 +384,20 @@ h1 { opacity: 0.10; pointer-events: none; } + +.tool.tool-has-canvas-icon { padding-left: 42px; --tool-icon: none; } +.tool.tool-has-canvas-icon::before, +.tool.tool-has-canvas-icon::after { background: none !important; } +.tool-sprite-preview { + position: absolute; + left: 3px; + top: 50%; + width: 36px; + height: 36px; + transform: translateY(-50%); + pointer-events: none; + filter: drop-shadow(0 2px 3px rgba(52,40,26,0.12)); +} .tool > span:not(.tool-size-badge) { display: none; } .tool[data-tool="observe"] { --tool-icon: url("../assets/ui/tool_observe.webp"); } .tool[data-tool="zunchi"] { --tool-icon: url("../assets/ui/tool_zunchi.webp"); } @@ -399,6 +413,11 @@ h1 { .tool[data-tool="fight_mochi"] { --tool-icon: url("../assets/ui/tool_fight_mochi.webp"); } .tool[data-tool="water_bowl"] { --tool-icon: url("../assets/ui/tool_water_bowl.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?v=15.20.16"); } .tool[data-tool="protein"] { --tool-icon: url("../assets/ui/tool_protein.webp?v=15.20.16"); } @@ -409,12 +428,81 @@ h1 { .tool[data-tool="giant_drug"] { --tool-icon: url("../assets/ui/tool_giant_drug.webp?v=15.20.16"); } .tool[data-tool="dwarf_drug"] { --tool-icon: url("../assets/ui/tool_dwarf_drug.webp?v=15.20.16"); } .tool[data-tool="zunda_juice"] { --tool-icon: url("../assets/ui/tool_zunda_juice.webp?v=15.20.16"); } -.tool[data-tool="freeze"] { --tool-icon: none; } -.tool[data-tool="freeze"]::before { - content: "🧊"; - background: none; - font-size: 24px; - line-height: 1; - text-align: center; + + +.signboard-editor { + position: fixed; + inset: 0; + z-index: 42; + display: grid; + place-items: center; + padding: 18px; + background: rgba(34, 29, 22, 0.34); + backdrop-filter: blur(3px); } -.tool[data-tool="freeze"]::after { content: "🧊"; background: none; font-size: 52px; right: -10px; left: auto; opacity: 0.08; display:flex; align-items:center; justify-content:flex-end; } +.signboard-editor.hidden { display: none; } +.signboard-editor-panel { + width: min(430px, calc(100vw - 28px)); + border-radius: 18px; + padding: 14px; + background: linear-gradient(180deg, rgba(255,253,247,0.98), rgba(245,237,221,0.96)); + border: 1px solid rgba(94, 70, 42, 0.20); + box-shadow: 0 22px 60px rgba(36, 28, 20, 0.28), inset 0 1px 0 rgba(255,255,255,0.72); +} +.signboard-editor-titlebar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + margin: 0 0 10px; + padding-bottom: 8px; + border-bottom: 1px solid rgba(94, 70, 42, 0.13); +} +.signboard-editor-titlebar h2 { + margin: 0; + font-size: 16px; + letter-spacing: .03em; +} +.signboard-editor-close { + width: 30px; + height: 30px; + border-radius: 999px; + border: 1px solid rgba(84,68,48,0.16); + background: rgba(255,255,255,0.72); + color: var(--ink); + font-size: 19px; + line-height: 1; + cursor: pointer; +} +.signboard-editor-close:hover { background: rgba(255,248,232,0.96); } +#signboardEditorText { + width: 100%; + box-sizing: border-box; + resize: vertical; + min-height: 88px; + border-radius: 12px; + border: 1px solid rgba(84,68,48,0.18); + background: rgba(255,255,255,0.84); + padding: 10px 11px; + color: var(--ink); + font: 14px/1.55 ui-rounded, "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif; + outline: none; +} +#signboardEditorText:focus { + border-color: rgba(112,178,66,0.54); + box-shadow: 0 0 0 3px rgba(112,178,66,0.14); +} +.signboard-editor-meta { + display: flex; + justify-content: space-between; + color: var(--muted); + font-size: 12px; + margin: 6px 2px 0; +} +.signboard-editor-actions { + display: flex; + justify-content: flex-end; + gap: 8px; + margin-top: 12px; +} + diff --git a/css/components.css b/css/components.css index 119532a..6923ed6 100644 --- a/css/components.css +++ b/css/components.css @@ -451,13 +451,34 @@ .selected-info .info-row[data-metric="loneliness"] { background: rgba(116, 150, 214, 0.10); } .selected-info .info-row[data-metric="energy"] { background: rgba(104, 184, 96, 0.10); } .selected-info .info-row[data-metric="stress"] { background: rgba(214, 104, 88, 0.10); } -.selected-info .need-row[data-chosen-need="true"] { - border-color: rgba(65, 112, 74, 0.52); - background: rgba(106, 154, 84, 0.16); +.selected-info .need-grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 6px; + margin: 7px 0 8px; } -.selected-info .need-row[data-chosen-need="true"] strong { +.selected-info .need-cell { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + min-height: 44px; + padding: 6px 4px; + border: 1px solid rgba(84,68,48,0.12); + border-radius: 10px; + background: rgba(255,255,255,0.42); +} +.selected-info .need-cell span { font-size: 11px; color: var(--muted); } +.selected-info .need-cell strong { font-size: 16px; color: #3f3225; } +.selected-info .need-cell[data-chosen-need="true"] { + border-color: rgba(65, 112, 74, 0.58); + background: rgba(106, 154, 84, 0.20); + box-shadow: inset 0 0 0 1px rgba(65, 112, 74, 0.18); +} +.selected-info .need-cell[data-chosen-need="true"] strong { color: #315f32; } +.selected-info .action-reason-row strong { text-align: right; } .selected-info .info-row[data-metric="zunchi"] { background: rgba(112, 142, 70, 0.10); } .selected-info .info-row[data-metric="mood"] { background: rgba(222, 196, 86, 0.10); } .selected-info .info-row[data-metric="lack"] { background: rgba(142, 112, 184, 0.10); } @@ -566,19 +587,29 @@ } .save-slot-list { display: grid; - gap: 8px; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 10px; margin: 14px 0; } .save-slot-row { display: grid; - grid-template-columns: minmax(86px, 0.7fr) minmax(180px, 2fr) auto; - gap: 10px; - align-items: center; - padding: 9px 10px; + grid-template-rows: auto 1fr auto; + gap: 8px; + align-items: stretch; + min-height: 132px; + padding: 10px; border: 1px solid rgba(115, 91, 62, 0.20); border-radius: 12px; background: rgba(255, 255, 255, 0.56); } +.save-warning { + color: #8a4f2f; + font-weight: 800; + background: rgba(255, 239, 220, 0.72); + border: 1px solid rgba(190, 118, 72, 0.22); + border-radius: 10px; + padding: 7px 9px; +} .save-slot-title { font-weight: 800; color: #4f3928; @@ -590,9 +621,12 @@ .save-slot-actions { display: flex; gap: 6px; - justify-content: flex-end; + justify-content: flex-start; flex-wrap: wrap; } +@media (max-width: 720px) { + .save-slot-list { grid-template-columns: 1fr; } +} .save-slot-actions .btn[disabled] { opacity: 0.42; pointer-events: none; diff --git a/css/mobile.css b/css/mobile.css index 9fedacb..1a8853b 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -230,12 +230,3 @@ body.touch-mobile-ui.mobile-mode-family .lineage-main-card { z-index: 9; } .card.selected-card { --ui-theme-rgb: 204, 121, 167; background: linear-gradient(180deg, rgba(253, 245, 250, 0.94), rgba(249, 235, 244, 0.91)); border-color: rgba(204, 121, 167, 0.24); } .card.colony-card { --ui-theme-rgb: 0, 158, 115; background: linear-gradient(180deg, rgba(240, 250, 247, 0.94), rgba(229, 245, 239, 0.91)); border-color: rgba(0, 158, 115, 0.24); } .card.log-card { --ui-theme-rgb: 230, 159, 0; background: linear-gradient(180deg, rgba(255, 249, 236, 0.94), rgba(253, 242, 215, 0.91)); border-color: rgba(230, 159, 0, 0.24); } -.tool[data-tool="freeze"] { --tool-icon: none; } -.tool[data-tool="freeze"]::before { - content: "🧊"; - background: none; - font-size: 24px; - line-height: 1; - text-align: center; -} -.tool[data-tool="freeze"]::after { content: "🧊"; background: none; font-size: 52px; right: -10px; left: auto; opacity: 0.08; display:flex; align-items:center; justify-content:flex-end; } diff --git a/index.html b/index.html index 4ea4a73..cf92d3b 100644 --- a/index.html +++ b/index.html @@ -5,11 +5,11 @@