View/Edit #1:owned_properties

Switch to edit mode.

Name(s): owned_properties
1:  "what:owned_properties([who])"
2:  "Return a list of all properties on WHAT owned by WHO."
3:  "Only wizardly verbs can specify WHO; mortal verbs can only search for properties owned by their own owners."
4:  {?who = caller_perms()} = args
5:  who != caller_perms() && !caller_perms().wizard && raise(E_PERM, "Mortal verbs can only search for properties owned by their own owners.")
6:  props = {}
7:  if (valid(parent(this)))
8:    for k in (properties(this))
9:      if (property_info(this, k)[1] == who)
10:       props = listappend(props, k)
11:     endif
12:   endfor
13:   return {@props, @parent(this):owned_properties(who)}
14: else
15:   for k in (properties(this))
16:     if (property_info(this, k)[1] == who)
17:       props = listappend(props, k)
18:     endif
19:   endfor
20:   return props
21: endif
22: "Last modified by Slacker (#55) on Mon Jun 21 05:46:05 1999 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]