Switch to edit mode.
Name(s): @ansi-o*ption1: "Copied from Cecil (#7407):@ansi-o Apr 8 14:42:33 2006"
2: if (caller != this)
3: return player:tell(E_PERM)
4: endif
5: if (!this:has_property("ansi_options"))
6: add_property(this, "ansi_options", {"all"}, {this, "r"})
7: player:tell("\".ansi_options\" property was added!")
8: endif
9: if (!argstr)
10: player:tell("Your ANSI options are: => ", toliteral(this.ansi_options))
11: elseif (argstr[1] == "+")
12: if ($ansi_utils:ansi_option(argstr[2..$]))
13: this.ansi_options = {@this.ansi_options, argstr[2..$]}
14: player:tell("Option Added.")
15: player:tell("Your ANSI options are: => ", toliteral(this.ansi_options))
16: else
17: player:tell("You can't turn that option on!")
18: endif
19: elseif (argstr[1] in {"!", "-"})
20: if (e = argstr[2..$] in this.ansi_options)
21: player:tell("Option set to off.")
22: this.ansi_options = listdelete(this.ansi_options, e)
23: else
24: player:tell("You didn't have that option set in the first place.")
25: endif
26: endif