Switch to edit mode.
Name(s): get_contents1: {contents, ctype, show} = {@args, {}}
2: if (!this.dark && contents != {})
3: if (ctype == 0)
4: show = {@show, "Contents:"}
5: for thing in (contents)
6: show = {@show, tostr(" ", thing:title())}
7: endfor
8: elseif (ctype == 1)
9: for thing in (contents)
10: if (is_player(thing))
11: show = {@show, tostr($string_utils:pronoun_sub(tostr("%N ", $gender_utils:get_conj("is", thing), " here."), thing))}
12: else
13: show = {@show, tostr("You see ", thing:title(), " here.")}
14: endif
15: endfor
16: elseif (ctype == 2)
17: show = {@show, tostr("You see ", $string_utils:title_list(contents), " here.")}
18: elseif (ctype == 3)
19: players = things = {}
20: for x in (contents)
21: if (is_player(x))
22: players = {@players, x}
23: else
24: things = {@things, x}
25: endif
26: endfor
27: if (things)
28: show = {@show, tostr("You see ", $string_utils:title_list(things), " here.")}
29: endif
30: if (players)
31: show = {@show, tostr($string_utils:title_listc_with_status(players), length(players) == 1 ? " " + $gender_utils:get_conj("is", players[1]) | " are", " here.")}
32: endif
33: endif
34: endif
35: return show