diff --git a/index.html b/index.html index f070067..a585a43 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + diff --git a/package.json b/package.json index ad019c4..643d487 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amerc-site", - "version": "0.37.0-embed", + "version": "0.38.0-npc", "private": true, "type": "module", "scripts": { diff --git a/src/Scene2D.jsx b/src/Scene2D.jsx index 45335cf..cad4280 100644 --- a/src/Scene2D.jsx +++ b/src/Scene2D.jsx @@ -7,7 +7,7 @@ import Account from './Account.jsx'; import TavernGame from './TavernGame.jsx'; import { api } from './api.js'; -const RELEASE = '0.37.0-embed'; +const RELEASE = '0.38.0-npc'; const NAV = [ { id: 'home', label: 'Tavern' }, diff --git a/src/TavernGame.jsx b/src/TavernGame.jsx index 74a6310..6ac8ed0 100644 --- a/src/TavernGame.jsx +++ b/src/TavernGame.jsx @@ -108,8 +108,20 @@ export default function TavernGame({ onHotspot }) { - + onHotspot?.('agents')} /> + onHotspot?.('booth')} /> + onHotspot?.('mansion')} /> ); } + +function Npc({ x, y, w, h, who, say, onClick }) { + const [hover, setHover] = useState(false); + return ( + + ); +} diff --git a/src/styles.css b/src/styles.css index cbad9d5..08ac781 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1181,3 +1181,10 @@ button { .ap-embed > code { display: block; color: #7fe9ff; font-family: ui-monospace, monospace; font-size: 12px; background: #07060c; padding: 10px 12px; border-radius: 8px; word-break: break-all; border: 1px solid #1d2a3a; } .ap-embed .ap-hint { margin: 8px 0 0; } .ap-embed .ap-hint code { display: inline; padding: 1px 5px; background: #162032; color: #9d8fc0; } .ap-pty-note { padding: 12px 14px; } + +/* tavern NPC speech bubbles (0.38) */ +.gm-npc { position: absolute; background: transparent; border: 0; cursor: pointer; border-radius: 8px; transition: box-shadow .14s; } +.gm-npc:hover { box-shadow: 0 0 0 2px rgba(255,220,140,0.5), 0 0 18px rgba(255,200,100,0.35); background: rgba(255,220,140,0.08); } +.gm-say { position: absolute; bottom: 102%; left: 50%; transform: translateX(-50%); width: max-content; max-width: 200px; padding: 8px 11px; font-family: Georgia, serif; font-size: 12px; line-height: 1.5; color: #1c1206; background: #fff0d7; border: 2px solid #3a2410; border-radius: 8px; box-shadow: 0 6px 16px rgba(0,0,0,0.5); z-index: 8; text-align: left; } +.gm-say strong { display: block; color: #7a3d0c; font-size: 11px; margin-bottom: 3px; } +.gm-say::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: #3a2410; }