1
0
Fork 0
polaris-task-force/src/app/(payload)/custom.scss
Z8MB1E ac6415d034 feat(npc): complete dialogue feature and fix migration snapshot base
Finish the NPC dialogue flowchart work carried over from the base commit:
- Coloured NPC dialogue text via friendly names ({red}) or hex ({#ff00ff});
  invalid names/hex render as literal text. Shared client-safe renderer
  (DialogueText.tsx) used by both the admin canvas preview and the runtime.
- Player-flags feature: condition nodes branch on flags (evaluated
  server-side), flag effects set/clear/adjust flags, PlayerFlags collection
  + migration, and event nodes can set flags.
- One-time ("once") choices: a choice flagged "Hide after picked" is hidden
  for the rest of the current conversation only (per-session, resets on
  begin()); GMs can persist across conversations with a condition flag.
- Admin editor: colour hint, once checkbox on choices, amber "once" badge.

Migration repair: the player_flags migration (20261005_185014) was sorting
before 20261006_000000, whose stale snapshot omitted player_flags, so any
future `migrate:create` re-emitted player_flags DDL. Restored 20261006_000000's
snapshot to the full current schema so it is the correct diff base.

Verified: `bun run payload migrate` clean, `migrate:create` reports no
schema changes, `tsc --noEmit` clean.
2026-10-05 16:02:53 -04:00

83 lines
1.8 KiB
SCSS

@layer theme {
@import 'tailwindcss/theme.css';
}
@layer base {
.twp {
@import 'tailwindcss/preflight.css';
}
.twp.no-twp {
*,
::after,
::before,
::backdrop,
::file-selector-button {
all: revert-layer;
}
}
}
@layer components;
@layer utilities {
@import 'tailwindcss/utilities.css';
}
/* Tech Tree canvas: dark tactical chrome for React Flow controls. */
.tech-tree-canvas .react-flow__controls {
button {
background: rgba(0, 0, 0, 0.72);
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.7);
border-radius: 0;
&:hover {
background: rgba(0, 0, 0, 0.92);
color: #ffffff;
}
svg { fill: currentColor; }
}
}
.tech-tree-canvas .react-flow__attribution {
background: transparent;
a { color: rgba(255, 255, 255, 0.35); }
}
/* NPC dialogue canvas: the default 1px grey drag line vanishes on the dark
canvas, so make the in-progress connection a bright cyan laser. */
.npc-dialogue-flow {
.react-flow__connection-path {
stroke: #22d3ee;
stroke-width: 2.5;
stroke-dasharray: 6 4;
filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.7));
}
/* Make drop-target handles obvious on hover. */
.react-flow__handle.connectionindicator:hover {
background: #22d3ee;
border-color: #22d3ee;
box-shadow: 0 0 6px rgba(34, 211, 238, 0.9);
}
}
/* Tech Tree: dark thin scrollbars for the panel and its dropdowns. */
.tech-tree-scroll {
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
&::-webkit-scrollbar {
width: 8px;
height: 8px;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.16);
border-radius: 0;
}
&::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}
}