Skip to content

Tell the player what is in the captain's pockets - #49

Merged
gitosaurus merged 1 commit into
mainfrom
fix/pants-pockets-hint
Aug 12, 2026
Merged

Tell the player what is in the captain's pockets#49
gitosaurus merged 1 commit into
mainfrom
fix/pants-pockets-hint

Conversation

@gitosaurus

Copy link
Copy Markdown
Owner

"x pants" never indicated the pockets. The pants kept a stuff_in_pockets flag that only 'look in' ever set — and 'look in' is the search that empties them. The flag was therefore FALSE for exactly as long as there was something to find, and TRUE forever after.

Before:

> x pants
Nothing seems unusual about the pair of pants.     <- quarter, keys, wallet inside
> wear pants
I put on the pair of pants.
The pants give me an exaggerated sense of my own importance.
> look in pants
I'm looking... The following objects fall out:
a quarter
some keys
a wallet
> x pants
There seem to be some bulges in the pockets.       <- they are empty

After:

> x pants
There seem to be some bulges in the pockets.
> wear pants
I picked up the pair of pants.
I put on the pair of pants.
I can feel something in the pockets as I pull them on.
The pants give me an exaggerated sense of my own importance.
> look in pockets
I'm looking... The following objects fall out:
a quarter
some keys
a wallet
> x pants
The pockets are empty.

members is already the list of what an object holds, so the flag is gone entirely and the description cannot fall out of step with the contents. No new object and no lexicon change: syn : 'pockets' already makes "pockets" addressable, so look in pockets and x pockets work.

Two things worth a second look:

  • The braces around the new >> line are load-bearing. ParagraphOutputStatement::make (src/Statement.cc:509) consumes every consecutive >> literal into one statement, so an unbraced if ... then >> silently swallows the following >> line and governs it too. Without the braces the boast disappeared for any player who searched the pockets before wearing the pants.
  • 'wear' reaches this method twice when the pants have to be picked up first (wearable's 'wear' does 'get' then re-sends 'wear'). never_worn is what keeps the outer pass from echoing the inner one; both new lines sit inside that guard.

Only games/starship.arch changes — no library file, so the bare/cherry goldens are untouched.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Ui8UMgev1U8LW5iyQdSsJ

The pants kept a stuff_in_pockets flag that only 'look in' ever set, and
'look in' is the search that empties them.  So the flag was FALSE for as
long as there was something to find and TRUE forever after: examining the
pants said "Nothing seems unusual" while the quarter, the keys and the
wallet were still in them, and reported bulges once they were gone.  The
one hint the game had was printed only to a player who no longer needed
it.

Ask the question instead of remembering the answer.  'members' is already
the list of what an object holds, so the pockets can be described from it
and cannot fall out of step.  Examining the pants now names the pockets
either way, full or empty, and pulling them on says you can feel
something in them -- which is what happens when you put on a pair of
pants with a pocketful of keys, whether or not you thought to look.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Ui8UMgev1U8LW5iyQdSsJ
@gitosaurus
gitosaurus merged commit 5e6d23a into main Aug 12, 2026
2 checks passed
@gitosaurus
gitosaurus deleted the fix/pants-pockets-hint branch August 12, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant