Switch to edit mode.
Name(s): get_conj*ugation1: "get_conj(verbspec,object) => verb conjugated according to object."
2: "verbspec can be one of \"singular/plural\", \"singular\", \"singular/\", or \"/plural\", e.g., \"is/are\", \"is\", \"is/\", or \"/are\"."
3: "The object is checked to see whether it is singular or plural. This is inferred from its .gender property. If .gender doesn't exist or the object itself is invalid, we assume singular."
4: spec = args[1]
5: i = index(spec + "/", "/")
6: sing = spec[1..i - 1]
7: if (i < length(spec))
8: plur = spec[i + 1..length(spec)]
9: else
10: plur = ""
11: endif
12: cap = strcmp("a", i == 1 ? spec[2] | spec) > 0
13: if (valid(object = length(args) >= 2 ? args[2] | player) && $STR == typeof(g = object.gender) && (i = g in this.genders) && this.is_plural[i])
14: vb = plur || this:_verb_plural(sing, i)
15: else
16: vb = sing || this:_verb_singular(plur, i)
17: endif
18: if (cap)
19: return $string_utils:capitalize(vb)
20: else
21: return vb
22: endif
23: "Last modified by Dax (#789) on Mon Aug 7 21:45:45 2006 MDT."