Skip to content

Take item actions and the command list from the MOO - #167

Merged
ctoth merged 1 commit into
masterfrom
feat/object-verbs
Oct 5, 2026
Merged

ctoth merged 1 commit into
masterfrom
feat/object-verbs

Conversation

@ctoth

@ctoth ctoth commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

What changes

Item cards. The card offered Get, Drop, Wear and Remove from strings written into the client. The MOO now sends, on every Char.Items item, the verbs the player can use on it (verbs), and the card shows one button per verb.

  • A verb that takes only the item (take #5) is sent on click.
  • A verb that needs more text (put … in chest) fills the command input, with the cursor in the gap, and is not sent.
  • An item with no verbs gets no buttons. There is no built-in fallback.

Command list. The MOO now answers dns-com-awns-rehash-getcommands (it used to drop the request). The client stored every abbreviation of a command (r, re, rea, read) as its own command; it now stores the full name. Prefix completion already covers the abbreviations.

Things you will notice

  • The g/w/r/d access keys on the old four buttons are gone, since the buttons are no longer fixed.
  • Buttons are listed for verbs that may not apply right now (Drop on something on the floor). The MOO has no per-verb "applies now" test; using one gives the MOO's usual refusal.
  • An item can have many buttons (a table in the Parlor has 18). They wrap.
  • The command list is long (949 names for a guest) and includes every name the parser would accept.

MOO side (already live)

$interface_utils:all_verbs_for / visible_commands, Char.Items item_for, and handle_getcommands on the rehash package. Wire format is in docs/GMCP/mongoose-additions.md.

Tested

  • npm test: 130 files, 1527 tests pass. npm run typecheck clean.
  • Against the live MOO as a guest, from this branch's dev server: 7 room items arrived with verbs; the coffee table's card showed 18 actions; "Put … on" filled the input with put on #4665, cursor at 4; the command list held 949 names, with look and without l/lo.

Item cards offered get, drop, wear and remove from strings written into the
client. The MOO now lists, on each Char.Items item, the verbs the player can
use on it, and the card offers one action per verb. A verb that needs more
text (put ... in chest) fills the command input with the cursor in the gap
instead of sending.

The rehash command list stored every abbreviation of a command (r, re, rea,
read) as a command of its own. It now stores the full name; prefix completion
already covers the abbreviations.
@ctoth
ctoth merged commit ff897e6 into master Oct 5, 2026
2 checks passed
@ctoth
ctoth deleted the feat/object-verbs branch October 5, 2026 21:23
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