New command: 'find'

Started by Tisiphone, January 04, 2016, 07:38:54 AM

The 'find' command is my proposed solution for how to deal with rooms full of stuff. Are you in a clan? You probably have a room full of stuff you have to deal with somewhere.

'find' would take a keyword, and search among the room and all containers in the room (preferably recursively) until finding something that meets the keyword. It would open containers that are closed, though not ones that are locked, and would not find any hidden items. It would be accompanied by an appropriate delay, like the 'empty' command, as your character searches through everything.

Once something is found, all other items would be in their original state. Things opened by the 'find' command would be closed again, nothing else would be taken out of containers, etc.

Example syntax and echoes (subject to change, of course):

A room full of stuff [N]
  This room is chock full of things because it's where House Kadius likes to put everything it would rather forget about, including orders from those pesky nobles who bother its Agents too much.
A bahamet-carved chest is here, closed and full of who knows what.
A bunch of other chests are here that I'm too lazy to describe.
A whole slew of baskets is also here, because who doesn't love more containers?
Craploads of bags are here, because the hunters have been getting lazy about putting things away.
A burned large black bag is here, containing the blue MacGuffin you don't want, though you don't know that for sure.
A wooden bench carved with cavorting duskhorns is here, piled high with stuff.
A carpet is surrounded by twenty other carpets, all with heaps of all kinds of things on them.
An airtight bin is here, closed and containing the red MacGuffin you do want, though you don't know that either.

>find red.MacGuffin
You rummage through the things here, looking to find something.
(Everyone else sees: the figure in a black hooded cloak rummages through the things here, looking to find something)

(Wait five or ten or twenty or thirty or I-don't-care seconds)
You rummage through the things here, looking to find something.

You rummage through the things here, looking to find something.

You find a red MacGuffin in a bag in an airtight bin and pull it out.
There is no general doctrine which is not capable of eating out our morality if unchecked by the deep-seated habit of direct fellow-feeling with individual fellow-men. -George Eliot

Private me, reporting for sploosh.

I imagine the actual "find" command is probably already in use for the code, though.  It has been on every MUD I've staffed (which doesn't include Armageddon), so it might need a different moniker.  Also, could I suggest an optional third syntax, something like 'find red.Macguffin chest' for when you know something is in a chest but just not which chest in The Room With Twelve Chests?  Maybe with less delay than searching the entire room.
Former player as of 2/27/23, sending love.