generic colorful screen #263

Parent #5Owner #361Flags readSource hellcore/hellcore.db

Aliases: generic colorful screen, screen, gcs

7 verbs · 36 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
look_selfthis none thisrxd#2631
_display_width_forthis none thisrxd#2635
_tell_bodythis none thisrxd#2636
tell_screenthis none thisrxd#26315
tell_screen_autowrapthis none thisrxd#2635
wrap_for_screenthis none thisrxd#2636
footer headerthis none thisrxd#2631

Properties

PropertyDefinerFlagsOwnerValue
border_bgcolor#263rc#361"~1b[46m"
title_color#263rc#361"~1b[30m"
main_color#263rc#361"~1b[36m"
footer#263rc#361"a Care Dog joint"
border_width#263rc#3611
header#263rc#361"Generic Colorful Screen"
handed#5rc#361<clear>
wield_msg#5rc#361<clear>
unwield_msg#5rc#361<clear>
size#5rc#361<clear>
look_place_msg#5rc#361<clear>
value#5rc#361<clear>
get_msg#5rc#361<clear>
drop_msg#5rc#361<clear>
get_fail_msg#5rc#361<clear>
junk_ok#5rc#361<clear>
floats#5rc#361<clear>
long_name_msg#5rc#361<clear>
article#5rc#361<clear>
setup_list#5rc#361<clear>
health#5rc#361<clear>
health_max#5rc#361<clear>
min_skill#5rc#361<clear>
skill#5rc#361<clear>
recipe_for#5rc#361<clear>
carried_msg#5rc#361<clear>
aliases#1rc#361{"generic colorful screen", "screen", "gcs"}
description#1rc#361<clear>
object_size#1r#29{5107, 1298434481}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361<clear>
weight#1rwc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #5 generic thing#1 root

Children: none

Call graph

calls n263_0 #263:look_self n263_4 #263:tell_screen_autowrap n263_0->n263_4 n263_3 #263:tell_screen n263_4->n263_3 n263_5 #263:wrap_for_screen n263_4->n263_5 n263_2 #263:_tell_body n263_1 #263:_display_width_for n263_2->n263_1 n20_0 #20:space n263_2->n20_0 n107_43 #107:tell n263_2->n107_43 n20_1 #20:left n263_2->n20_1 n263_3->n263_1 n263_3->n20_0 n263_3->n107_43 n263_3->n20_1 n263_6 #263:footer n263_3->n263_6 n20_2 #20:right n263_3->n20_2 n263_5->n263_1 n20_95 #20:word_wrap n263_5->n20_95

Source

look_self

Spec this none thisFlags rxdOwner #361Definer #263

Referenced by

none

Source

1this:tell_screen_autowrap(player, {"This is a generic colorful screen. Someone should do something with it maybe, I dunno. Some code would probably help."});

_display_width_for

Spec this none thisFlags rxdOwner #361Definer #263

Referenced by

Source

1who = args[1];
2len = `who.linelen ! ANY => 80';
3"make positive";
4len = (len > 0) ? len | (-len);
5return len;

_tell_body

Spec this none thisFlags rxdOwner #361Definer #263

Referenced by

none

Source

1{who, @stuff} = args;
2len = this:_display_width_for(who);
3bdr = this.border_width;
4border = (this.border_bgcolor + $su:space(bdr)) + $ansi.reset;
5string = (this.main_color + tostr(@stuff)) + $ansi.reset;
6player:tell(border, " ", $su:left(string, -((len - (bdr * 2)) - 2)), " ", border);

tell_screen

Spec this none thisFlags rxdOwner #361Definer #263

Referenced by

Source

1":tell_screen(OBJ who, LIST lines) => tell 'who' lines, displayed in the screen. lines are not wrapped! (use tell_screen_autowrap for that) so make sure they're formatted properly.";
2{who, lines} = args;
3len = this:_display_width_for(who);
4bdr = this.border_width;
5dsp = (len - (bdr * 2)) - 2;
6border = (this.border_bgcolor + $su:space(bdr)) + $ansi.reset;
7header = ((this.border_bgcolor + this.title_color) + $su:left("        " + this:header(), -len)) + $ansi.reset;
8player:tell(header);
9for l in ({"", @lines, ""})
10l = (typeof(l) == LIST) ? l | {l};
11string = (this.main_color + tostr(@l)) + $ansi.reset;
12player:tell(border, " ", $su:left(string, -dsp), " ", border);
13endfor
14footer = (((this.border_bgcolor + this.title_color) + $su:right(this:footer(), len - 4)) + "    ") + $ansi.reset;
15player:tell(footer);

tell_screen_autowrap

Spec this none thisFlags rxdOwner #361Definer #263

Referenced by

Source

1":tell_screen_autowrap(OBJ who, LIST lines, STR color) => tell 'who' lines, wrapped to fit, in the screen. Optionally add color.";
2"equivalent to :tell_screen(who, :wrap_for_screen(who, lines [,color]))";
3{who, lines, ?color = ""} = args;
4lines = this:wrap_for_screen(who, lines);
5this:tell_screen(player, lines);

wrap_for_screen

Spec this none thisFlags rxdOwner #361Definer #263

Referenced by

Source

1":wrap_for_screen(OBJ who, LIST lines [, STR color]) => LIST wrapped_lines. wraps with the proper width for this screen as viewed by who. Optionally add color (& reset properly.)";
2{who, lines, ?color = ""} = args;
3len = this:_display_width_for(who);
4bdr = this.border_width;
5dsp = (len - (bdr * 2)) - 2;
6return $su:word_wrap(lines, dsp, color);

Spec this none thisFlags rxdOwner #361Definer #263

Referenced by

Source

1return this.(verb);