View/Edit #12:my_huh

Switch to edit mode.

Name(s): my_huh
1:  "Extra parsing of player commands.  Called by $command_utils:do_huh."
2:  "This version of my_huh just handles features."
3:  if (caller != this && !$perm_utils:controls(caller_perms(), this))
4:    "Standard permissions check."
5:    raise(E_PERM)
6:    return E_PERM
7:  endif
8:  "verb - obvious                 pass - would be args"
9:  "plist - list of prepspecs that this command matches"
10: "dlist and ilist - likewise for dobjspecs, iobjspecs"
11: {verb, pass} = args
12: plist = {"any", prepstr ? $code_utils:full_prep(prepstr) | "none"}
13: dlist = dobjstr ? {"any"} | {"none", "any"}
14: ilist = iobjstr ? {"any"} | {"none", "any"}
15: for fobj in (this.features)
16:   if (!$recycler:valid(fobj))
17:     this:remove_feature(fobj)
18:   elseif ((loc = fobj:has_callable_verb(verb)) && valid(loc = loc[1]))
19:     vargs = verb_args(loc, verb)
20:     if (vargs[2] in plist && (vargs[1] in dlist && vargs[3] in ilist))
21:       $wiz_utils:autoextend(fobj) || "Woo, FOs are now extended upon the use of one of their verbs. - Lao"
22:       try
23:         set_task_perms(this)
24:         fobj:(verb)(@pass)
25:         "Problem with verbs of the same name. If we use which=vrb in the loop instead, we have a problem with verbs that use the variable verb."
26:       except q (ANY)
27:         this:handle_uncaught_error(q[1], q[2], 0, q[4], $code_utils:tb(q[4], q[2]))
28:       endtry
29:       return 1
30:     endif
31:   endif
32:   if ($command_utils:running_out_of_time())
33:     player:tell("You have too many features.  Parsing your command runs out of ticks while checking ", fobj.name, " (", fobj, ").")
34:     return 1
35:   endif
36: endfor
37: "Last modified by Cecil (#7407) on Tue Aug 27 12:48:43 2002 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]