ANSI Database #122
Aliases: ANSI Database
10 verbs · 75 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
reset bold_on bold_off italics_on italics_off underline_on underline_off inverse_on inverse_off strikethrough_on strikethrough_off red black green yellow blue purple cyan white default_fg bg_black bg_red bg_green bg_yellow bg_blue bg_purple bg_cyan bg_white default_bg | this none this | rxd | #122 | 1 |
add_tag | any at/to this | rxd | #122 | 36 |
add_theme | this none this | rxd | #122 | 16 |
valid | this none this | rxd | #122 | 7 |
remove_theme | this none this | rxd | #122 | 21 |
remove_tag | this none this | rxd | #122 | 27 |
sub_text roomtitle player areatitle debug creature exit broadcast page regiontitle | this none this | rxd | #122 | 11 |
set_tag | this none this | rxd | #122 | 0 |
strip | this none this | rx | #122 | 5 |
find | this none this | rx | #122 | 7 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
bold_on | #122 | rc | #361 | "~1b[1m" |
bold_off | #122 | rc | #361 | "~1b[22m" |
red | #122 | rc | #361 | "~1b[31m" |
reset | #122 | rc | #361 | "~1b[0m" |
italics_on | #122 | rc | #361 | "~1b[3m" |
italics_off | #122 | rc | #361 | "~1b[23m" |
underline_on | #122 | rc | #361 | "~1b[4m" |
inverse_on | #122 | rc | #361 | "~1b[7m" |
strikethrough_on | #122 | rc | #361 | "~1b[9m" |
underline_off | #122 | rc | #361 | "~1b[24m" |
inverse_off | #122 | rc | #361 | "~1b[27m" |
strikethrough_off | #122 | rc | #361 | "~1b[29m" |
black | #122 | rc | #361 | "~1b[30m" |
green | #122 | rc | #361 | "~1b[32m" |
yellow | #122 | rc | #361 | "~1b[33m" |
blue | #122 | rc | #361 | "~1b[34m" |
purple | #122 | rc | #361 | "~1b[35m" |
cyan | #122 | rc | #361 | "~1b[36m" |
white | #122 | rc | #361 | "~1b[37m" |
default_fg | #122 | rc | #361 | "~1b[39m" |
bg_black | #122 | rc | #361 | "~1B[40m" |
bg_red | #122 | rc | #361 | "~1b[41m" |
bg_green | #122 | rc | #361 | "~1b[42m" |
bg_yellow | #122 | rc | #361 | "~1b[43m" |
bg_blue | #122 | rc | #361 | "~1b[44m" |
bg_purple | #122 | rc | #361 | "~1b[45m" |
bg_cyan | #122 | rc | #361 | "~1b[46m" |
bg_white | #122 | rc | #361 | "~1b[47m" |
help_msg | #122 | rc | #361 | list of 8{"There are currently the following theme tags available:", "", "roomtitle", "areatitle", "player", "creature", "debug", ""} |
default_bg | #122 | rc | #361 | "~1b[49m" |
theme_names | #122 | rc | #361 | {"default"} |
tag_index | #122 | rc | #361 | list of 9{"roomtitle", "player", "debug", "exit", "broadcast", "page", "creature", "areatitle", "regiontitle"} |
roomtitle | #122 | rc | #361 | {"~1b[33m~1b[1m"} |
player | #122 | rc | #361 | {"~1b[4m"} |
debug | #122 | rc | #361 | {"~1b[44m~1b[36m~1b[1m"} |
exit | #122 | rc | #361 | {"~1b[1m"} |
broadcast | #122 | rc | #361 | {"~1b[35m"} |
page | #122 | rc | #361 | {"~1b[1m"} |
creature | #122 | rc | #361 | {"~1b[4m"} |
areatitle | #122 | rc | #361 | {"~1b[33m"} |
debug_event | #122 | rc | #361 | "~1b[44m~1b[1m~1b[36m" |
debug_action | #122 | rc | #361 | "~1b[44m~1b[1m~1b[37m" |
debugbold | #122 | rc | #361 | "~1b[44m~1b[37m~1b[1m" |
header | #122 | rc | #361 | "~1b[4m~1b[1m~1b[44m~1b[37m" |
brown | #122 | rc | #361 | "~1b[0;33m" |
gray | #122 | rc | #361 | "~1b[0;37m" |
dark_gray | #122 | rc | #361 | "~1b[1;30m" |
reverse | #122 | rc | #361 | "~1b[7m" |
regiontitle | #122 | rc | #361 | {"~1b[33m"} |
grey | #122 | rc | #361 | "~1b[0;37m" |
orange | #122 | rc | #361 | "~1b[31m~1b[1m" |
brightblue | #122 | rc | #361 | "~1b[34m~1b[1m" |
brightgreen | #122 | rc | #361 | "~1b[32m~1b[1m" |
blink | #122 | rc | #361 | "" |
tab | #122 | rc | #361 | "~09" |
pink | #122 | rc | #361 | "~1b[35m~1b[1m" |
beep | #122 | rc | #361 | "" |
bold | #122 | rc | #361 | "~1b[1m" |
magenta | #122 | rc | #361 | "~1b[35m" |
darkgray | #122 | rc | #361 | "~1b[1;30m" |
darkgrey | #122 | rc | #361 | "~1b[1;30m" |
binary_tag | #122 | rc | #361 | "~" |
brightwhite | #122 | rc | #361 | "~1b[1m~1b[37m" |
brightyellow | #122 | rc | #361 | "~1b[33m~1b[1m" |
tilde | #122 | rc | #361 | "~~" |
aliases | #1 | rc | #361 | {"ANSI Database"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {9077, 1298433815} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rc | #361 | <clear> |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
Ancestors (nearest first): #1 root
Children: none
Call graph
Source
reset bold_on bold_off italics_on italics_off underline_on underline_off inverse_on inverse_off strikethrough_on strikethrough_off red black green yellow blue purple cyan white default_fg bg_black bg_red bg_green bg_yellow bg_blue bg_purple bg_cyan bg_white default_bg
Referenced by
- #1:examine_verbs line 25:
$ansi:bold_on - #1:examine_verbs line 25:
$ansi:bold_off - #1:examine_verbs line 32:
$ansi:cyan - #1:examine_verbs line 32:
$ansi:reset
Source
1return this.(verb);
add_tag
Referenced by
none
Source
1":add_tag(STR name[, STR default_value]) => Adds a new ANSI markup tag"; 2tag = args[1]; 3if (length(args) > 1) 4value = args[2]; 5else 6value = ""; 7endif 8if ((typeof(tag) != STR) || (typeof(value) != STR)) 9return E_INVARG; 10endif 11"before we go any further, make sure all the properties are in sync"; 12if (!this:valid()) 13player:tell("*** ANSI DB is out of sync. Can't add new tags."); 14return 1; 15endif 16"check to see if there is any conflict"; 17if (tag in $ou:all_properties(this)) 18player:tell("Can't add a \"", tag, "\" to the ANSI database: property exists"); 19return 1; 20endif 21for x in ($ou:all_verbs(this)) 22if (index(x, tag)) 23player:tell("Can't add a \"", tag, "\" tag to the ANSI database: verb exists"); 24return 1; 25endif 26endfor 27verbinfo = verb_info(this, "sub_text"); 28names = verbinfo[3]; 29names = (names + " ") + tag; 30add_property(this, tag, {}, {this.owner, "rc"}); 31set_verb_info(this, "sub_text", {verbinfo[1], verbinfo[2], names}); 32for x in [1..length(this.theme_names)] 33this.(tag) = listappend(this.(tag), value); 34endfor 35this.tag_index = listappend(this.tag_index, tag); 36return 0;
add_theme
Referenced by
none
Source
1":add_theme(STR theme_name) => Adds the theme to the ANSI database"; 2theme = args[1]; 3if (typeof(theme) != STR) 4return E_INVARG; 5endif 6if (!this:valid()) 7player:tell("*** ANSI DB is out of sync. Can't add a new theme. ***"); 8return 1; 9endif 10for x in (this.tag_index) 11"copy the initial value from the default theme"; 12default = this.(x)[1]; 13this.(x) = listappend(this.(x), default); 14endfor 15this.theme_names = listappend(this.theme_names, theme); 16return 0;
valid
Referenced by
- #122:add_tag line 12:
this:valid - #122:add_theme line 6:
this:valid - #122:remove_theme line 13:
this:valid - #122:remove_tag line 8:
this:valid
Source
1":valid() => 1 if everything is cool, 0 if not"; 2for tag in (this.tag_index) 3if (length(this.(tag)) != length(this.theme_names)) 4return 0; 5endif 6endfor 7return 1;
remove_theme
Referenced by
none
Source
1":remove_theme(STR theme_name) => removes the named theme"; 2if (!player.wizard) 3return E_PERM; 4endif 5theme = args[1]; 6if (typeof(theme) != STR) 7return E_INVARG; 8endif 9idx = theme in this.theme_names; 10if (!idx) 11return E_INVARG; 12endif 13if (!this:valid()) 14player:tell("*** ANSI DB is not in sync, can't remove themes ***"); 15return 1; 16endif 17for x in (this.tag_index) 18this.(x) = listdelete(this.(x), idx); 19endfor 20this.theme_names = listdelete(this.theme_names, idx); 21return 0;
remove_tag
Referenced by
none
Source
1":remove_tag(STR tag_name) => removes the named tag from all themes"; 2tag = args[1]; 3if (!player.wizard) 4return E_PERM; 5elseif (typeof(tag) != STR) 6return E_INVARG; 7endif 8if (!this:valid()) 9player:tell("*** ANSI DB is out of sync. Can't remove tags ***"); 10return 1; 11endif 12idx = tag in this.tag_index; 13if (!idx) 14return E_INVARG; 15endif 16this.tag_index = listdelete(this.tag_index, idx); 17delete_property(this, tag); 18verbinfo = verb_info(this, "sub_text"); 19names = $su:explode(verbinfo[3]); 20names = listdelete(names, tag in names); 21namestr = ""; 22for x in (names) 23namestr = (namestr + " ") + x; 24endfor 25namestr = namestr[2..$]; 26set_verb_info(this, "sub_text", {verbinfo[1], verbinfo[2], namestr}); 27return 0;
sub_text roomtitle player areatitle debug creature exit broadcast page regiontitle
Referenced by
- #3:title line 13:
$ansi:roomtitle - #3:title line 18:
$ansi:areatitle - #3:title line 23:
$ansi:regiontitle - #6:receive_page line 9:
$ansi:page
Source
1":sub_text(STR text) => wraps text in the proper ANSI codes based on the verb name"; 2text = args[1]; 3tag = verb; 4theme = $player.ansi; 5if (!theme) 6return text; 7endif 8if ((typeof(text) != STR) || (!(tag in this.tag_index))) 9return E_INVARG; 10endif 11return (this.(tag)[theme] + text) + this.reset;
set_tag
Referenced by
none
Source
No program (verb defined but unprogrammed).
strip
Referenced by
- #3:tell_map line 10:
$ansi:strip - #3:tell_map line 27:
$ansi:strip - #3:tell_map line 30:
$ansi:strip - #3:tell_map line 33:
$ansi:strip - #3:tell_map line 36:
$ansi:strip - #3:tell_map line 39:
$ansi:strip - #3:tell_map line 42:
$ansi:strip - #3:tell_map line 69:
$ansi:strip - #3:tell_map_backup line 9:
$ansi:strip - #3:tell_map_backup line 38:
$ansi:strip - #3:tell_map_backup line 61:
$ansi:strip - #3:_ghosticon line 2:
$ansi:strip - #3:tell_map_old line 9:
$ansi:strip - #3:tell_map_old line 31:
$ansi:strip - #3:tell_map_old line 34:
$ansi:strip - #3:tell_map_old line 37:
$ansi:strip - #3:tell_map_old line 64:
$ansi:strip - #3:_radicon line 2:
$ansi:strip - #3:_radicon line 6:
$ansi:strip - #6:notify line 58:
$ansi:strip - #6:linesplit line 3:
$ansi:strip - #6:tell_item_list line 11:
$ansi:strip - #6:revert_code_name line 7:
$ansi:strip - #6:set_code_name line 7:
$ansi:strip - #6:job*s line 66:
$ansi:strip - #20:left line 11:
$ansi:strip - #20:left line 12:
$ansi:strip - #20:right line 9:
$ansi:strip - #20:centre line 9:
$ansi:strip - #20:columnize line 15:
$ansi:strip - #20:word_wrap line 14:
$ansi:strip - #20:word_wrap line 15:
$ansi:strip - #20:word_wrap line 15:
$ansi:strip - #20:word_wrap line 23:
$ansi:strip - #20:word_wrap line 23:
$ansi:strip - #20:columnize_horiz*ontal line 23:
$ansi:strip - #21:object_audit_string line 90:
$ansi:strip - #32:load line 26:
$ansi:strip - #38:make_message line 40:
$ansi:strip - #38:display_message_improved line 16:
$ansi:strip - #38:display_message_improved line 59:
$ansi:strip - #38:display_message_improved line 63:
$ansi:strip - #48:read line 11:
$ansi:strip - #50:@task*s line 223:
$ansi:strip - #51:show_who_listing line 55:
$ansi:strip - #66:raw_sendmail line 22:
$ansi:strip - #98:jerk line 13:
$ansi:strip - #98:jerk_name line 3:
$ansi:strip - #98:superjerk line 16:
$ansi:strip - #98:superjerkname line 3:
$ansi:strip - #114:who_name line 1:
$ansi:strip - #120:hilite_topic line 6:
$ansi:strip - #120:hilite_topic line 12:
$ansi:strip - #166:add_hint line 2:
$ansi:strip - #222:render line 7:
$ansi:strip - #293:msg_summary_line line 20:
$ansi:strip - #293:msg_summary_line line 21:
$ansi:strip - #293:_@type line 55:
$ansi:strip - #293:status_msg_seq line 14:
$ansi:strip - #317:@monsters line 55:
$ansi:strip - #317:@monsters-xp line 15:
$ansi:strip - #317:@monsters-new line 16:
$ansi:strip - #334:mapicon line 41:
$ansi:strip - #334:areaicon line 42:
$ansi:strip - #356:announce_change line 11:
$ansi:strip - #357:announce_change line 11:
$ansi:strip - #357:announce_remove line 11:
$ansi:strip - #357:announce_add line 11:
$ansi:strip
Source
1s = args[1]; 2while (spec = match(s, "~1[bB]%[[0-9;]+m")) 3s = s[1..spec[1] - 1] + s[spec[2] + 1..$]; 4endwhile 5return s;
find
Referenced by
- #293:msg_summary_line line 21:
$ansi:find
Source
1s = args[1]; 2l = {}; 3while (spec = match(s, "~1[bB]%[[0-9]+m")) 4l = listappend(l, s[spec[1]..spec[2]]); 5s = s[spec[2] + 1..$]; 6endwhile 7return l;