MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: MUD Design doc (long)
At 06:13 PM 1/3/99 , Chris Gray wrote:
>[Emil Eifrem:]
> >The most reasonable thing is probably to have some kind of 'default
> >function' (be it via inheritance or some other construction) that handles
> >everything but the 'unusual case,' where the builder overloads this
> >'default function' with his scripting code. This should probably be done
> >regardless of whether you implement all your commands in the scripting
> >language or in your static server.
>
>If your system allows dynamic procs and the controlled calling of them,
>there are further twists that you can do to make things easier and more
>consistent. Have your 'default function' always run, and perform all
>of the checks that need to be done before anything specific to the
>object in question needs to be tested. At that point, check for the
>existence of a special processing function for this verb on that object,
>and call it if found. Otherwise do the normal default processing. In
>either case, you may or may not want to do common 'after-special-case'
>processing, depending on the result of that special case. In fact, all
>the real work may be done there, and 'normal default processing' consists
>of nothing at all.
Yes, I've had thoughts of special always-executed 'pre-' and
'post-handlers.' The advantages are obvious: you have a uniform generic
function that is always called before any actual command processing is
done. The 'prehandler' for example, could perform a lot of sanity checks
and similar stuff which would generally remove a lot of code duplication.
Same goes for the 'posthandler.'
The problem is that I just don't think it would work in practice. I mean,
the preprocessing for 'get' and 'drop' is pretty similar (is the object
there? can it be manipulated by the character?) but what about 'dodge',
'who', 'say' and 'cast'? -shrug-
I know there are people out there who have implemented or are considering
implementing this -- how did you set it up?
-EE [emil#prophecy,lu]
- Thread context:
- [MUD-Dev] Re: MUD Design doc (long), (continued)
- [MUD-Dev] Re: MUD Design doc (long),
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sun 03 Jan 1999, 17:12 GMT
- [MUD-Dev] Re: MUD Design doc (long),
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Mon 04 Jan 1999, 04:09 GMT
- [MUD-Dev] Re: MUD Design doc (long),
Caliban Tiresias Darklock caliban#darklock,com, Mon 04 Jan 1999, 19:59 GMT
- [MUD-Dev] Re: MUD Design doc (long),
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Tue 05 Jan 1999, 03:15 GMT
[ Other Periods
| Other mailing lists
| Search
]