[Coldstuff] Command Overrides

coldstuff@cold.org coldstuff@cold.org
Wed, 13 Feb 2002 21:23:28 -0500

So I was thinking tonight about command overrides, and how they functioned
in the last environment I worked in, and how to implemented them in my
current environment. Here's an example of that I mean.

If a user types "get cookie from table" it calls upon the $body.get_from_cmd
"get|take <any> from <descendant of $location>"          $body.get_from_cmd

But what if I made a new descendat of $location called $tray, and I made
$tray.get_from_cmd that I wanted to be called instead of $body.get_from_cmd
when someone tries to take something from a $tray or one of its descendants.
Can I simply @ac the following:

"get|take <any> from <descendant of $tray>"          $tray.get_from_cmd

or is there a better way to do that? Also, what is the best way to do it for
a specific object, say $thing_23, as opposed to a parent object that will
have many children. You know, you try to 'get' a ball ($thing_23) and
instead of you picking it up, it rolls away.

Any help is appreciated in advance.