View/Edit #40:pronoun

Switch to edit mode.

Name(s): pronoun
1:  ":pronoun([<object or gender>,] <ps/po/pp/... or he/him/his/...>)"
2:  "Eg. $gender_utils:pronoun(#789, 'ps')  =>  'she'"
3:  "    $gender_utils:pronoun('neuter', 'psc')  =>  'It'"
4:  "    $gender_utils:pronoun('his')  =>  'her'"
5:  "The object or gender defaults to the player's gender."
6:  {?gender = player, pronoun} = args
7:  gender = typeof(gender) == $STR ? gender | `gender.gender ! E_PROPNF => "splat"'
8:  if (!(i = gender in this.genders))
9:    "Unknown gender.  Default to 'splat' if it exists."
10:   if (!(i = "splat" in this.genders))
11:     return "*"
12:   endif
13: endif
14: if (this:has_property(pronoun))
15:   return typeof(p = this.(pronoun)) != $LIST ? p | p[i]
16: else
17:   for x in (properties(this))
18:     if (x[1] == "p" && typeof(this.(x)) == $LIST && is_member(pronoun, this.(x)))
19:       return this.(x)[i]
20:     endif
21:   endfor
22:   return "*"
23: endif
24: "Last modified by Dax (#789) on Mon Aug  7 21:46:46 2006 MDT."

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

You are not logged in.

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