From 83e48778528636f205bdd7dd201ffb1738a7513b Mon Sep 17 00:00:00 2001 From: Ethan J Lewis Date: Sun, 10 May 2026 07:34:51 -0500 Subject: [PATCH] feat(content): add upper floor slice --- src/assets/noun-gear-8323294.svg | 4 ++++ src/assets/noun-gear-8323296.svg | 5 ----- src/engine/playthrough.test.ts | 21 +++++++++++++++++++++ src/pages/index.astro | 11 ++++++++--- src/ui/crt.css | 16 +++++++++++----- src/world/{ => .trash}/Untitled.base | 0 src/world/TODOs.md | 7 +++++++ src/world/buildWorld.test.ts | 9 ++++++++- src/world/encounters.ts | 22 ++++++++++++++++++++++ src/world/encounters/stair-sleeper.md | 19 +++++++++++++++++++ src/world/items/childs-drawing.md | 15 +++++++++++++++ src/world/items/music-box.md | 10 ++++++++++ src/world/items/toy-dog.md | 20 ++++++++++++++++++++ src/world/rooms/attic.md | 23 +++++++++++++++++++++++ src/world/rooms/bedroom.md | 24 ++++++++++++++++++++++++ src/world/rooms/nursery.md | 27 +++++++++++++++++++++++++++ src/world/rooms/parlor.md | 4 +++- src/world/rooms/stair-up.md | 23 +++++++++++++++++++++++ 18 files changed, 245 insertions(+), 15 deletions(-) create mode 100644 src/assets/noun-gear-8323294.svg delete mode 100644 src/assets/noun-gear-8323296.svg rename src/world/{ => .trash}/Untitled.base (100%) create mode 100644 src/world/encounters/stair-sleeper.md create mode 100644 src/world/items/childs-drawing.md create mode 100644 src/world/items/music-box.md create mode 100644 src/world/items/toy-dog.md create mode 100644 src/world/rooms/attic.md create mode 100644 src/world/rooms/bedroom.md create mode 100644 src/world/rooms/nursery.md create mode 100644 src/world/rooms/stair-up.md diff --git a/src/assets/noun-gear-8323294.svg b/src/assets/noun-gear-8323294.svg new file mode 100644 index 0000000..144eacd --- /dev/null +++ b/src/assets/noun-gear-8323294.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/noun-gear-8323296.svg b/src/assets/noun-gear-8323296.svg deleted file mode 100644 index 13fc0ee..0000000 --- a/src/assets/noun-gear-8323296.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/engine/playthrough.test.ts b/src/engine/playthrough.test.ts index 567cb64..157383b 100644 --- a/src/engine/playthrough.test.ts +++ b/src/engine/playthrough.test.ts @@ -107,4 +107,25 @@ describe('playthrough — sample world', () => { 'damp-sheet', ])) }) + + it('plays through the upper-floor slice', () => { + const state = play([ + 'n', // gate → foyer + 'n', // foyer → hallway + 'u', // hallway → parlor + 'u', // parlor → upper stair + 'wait', + 'u', // upper stair → bedroom + 'e', // bedroom → nursery + 'read drawing', + 'take dog', + 'w', + 'u', // bedroom → attic + ]) + + expect(state.flags['stair-sleeper.resolved']).toBe(true) + expect(state.flags['hallwayShifted']).toBe(true) + expect(state.location).toBe('attic') + expect(state.inventory.map((i) => i.id)).toContain('toy-dog') + }) }) diff --git a/src/pages/index.astro b/src/pages/index.astro index 7c0c8a0..7aae9a2 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,6 +1,5 @@ --- import '../ui/crt.css' -import gearIcon from '../assets/noun-gear-8323296.svg?url' --- @@ -27,9 +26,15 @@ import gearIcon from '../assets/noun-gear-8323296.svg?url' data-options-toggle aria-label="Options" aria-expanded="false" - style={`--gear-icon: url(${gearIcon})`} > - +