[Coldstuff] Command Overrides
Fri, 15 Feb 2002 16:35:40 -0700
On Fri, Feb 15, 2002 at 05:12:53PM -0500, firstname.lastname@example.org wrote:
> Thank you for this information. Not to sound like a complete dolt, but is it
> your recommendation to reorder the way commands are parsed, or was that just
> general information?
> In the last game I coded for, they put checks for remote commands inside the
> local commands, something like the following was found within
> $body.get_from_cmd before any of the normal functions of that method were
> if ((rval = (| loc.get_from_cmd(sender(), args) |)) == -1)
> And then the $tray would have its own $tray.get_from_cmd that returned -1
> when it was finished running.
> Right now, I'm just considering options, trying to find the best way to
I wouldn't reorder it without some serious consideration first. The
best thing to do would be to address the 'best match' feature of the
parser and extend its scope to also include remote commands at all
steps--not necessarily just preempt all local commands when a remote
command is matched...
However, to fix your immediate problem, I have actually just finished
rewriting get|take :) Checkout $thing.get_cmd, $thing._get and
$location.get_from_cmd on the Cold Dark.