electronic scoreboard #223

Parent #133Owner #361Flags read, fertileSource hellcore/hellcore.db

Aliases: electronic scoreboard, scoreboard, board, top ten, top 10, topten, top10, screen, display

11 verbs · 48 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
calculatethis none thisrxd#22327
displaythis none thisrxd#2231
press set push click touchany on top of/on/onto/upon thisrxd#22337
set_chipthis none thisrxd#22317
textthis none thisrxd#2239
read viewthis none nonerxd#22329
look_selfthis none thisrxd#2231
creature_heartbeatthis none thisrxd#2237
random_chipthis none thisrxd#2231
chipsthis none thisrxd#2231
acceptablethis none thisrxd#2231

Properties

PropertyDefinerFlagsOwnerValue
opress_msg#223rc#361"%DN presses a button on %dt."
press_msg#223rc#361"You press a button on %dt."
failure_msg#223rc#361"%DT quickly flashes an error message."
success_msg#223rc#361"The display of %dt flickers as it changes to another screen."
updating#223rc#3610
cache_display#223rc#361{}
active_chip#223rc#361#-1
use_cache#223rc#3611
last_random_flicker#223rc#3610
update_msg#223rc#361"%DT whirs loudly."
chips#223rwc#361{}
never_update#223rc#3611
master_scoreboard#223rc#361#223
hold_to_read#133rc#3610
read_msg#133rc#361"On the killer technicolor display, you see:"
oread_msg#133rc#361"%DN takes a gander at %dt."
text#133rc#361<clear>
junk_on_read#133rc#361<clear>
handed#5rc#361<clear>
wield_msg#5rc#361<clear>
unwield_msg#5rc#361<clear>
size#5rc#361<clear>
look_place_msg#5rc#361"%IT is mounted up on the wall."
value#5rc#361<clear>
get_msg#5rc#361<clear>
drop_msg#5rc#361<clear>
get_fail_msg#5rc#361"that would be too naughty, even for you"
junk_ok#5rc#361<clear>
floats#5rc#361<clear>
long_name_msg#5rc#361"huge bitchin' electronic scoreboard"
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
list of 9{"electronic scoreboard", "scoreboard", "board", "top ten", "top 10", "topten", "top10", "screen", "display"}
description#1rc#361"Nearly the entire wall is covered by this jumbotron screen, obviously salvaged from the remains of some sports arena. The individual pixels are obnoxiously large, but even at close range the display remains remarkably readable. A transparent splash guard protects the bottom of the display from stray liquids."
object_size#1r#29{8729, 1298434106}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361<clear>
weight#1rwc#361-1
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

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

Children: none

Call graph

calls n223_0 #223:calculate n45_23 #45:leaves n223_0->n45_23 n20_34 #20:pronoun_sub n223_0->n20_34 n223_9 #223:chips n223_0->n223_9 n103_24 #103:report_error n223_0->n103_24 n45_26 #45:leaves_suspended n223_0->n45_26 n223_2 #223:press n223_2->n20_34 n223_2->n223_9 n107_43 #107:tell n223_2->n107_43 n20_14 #20:uppercase n223_2->n20_14 n223_8 #223:random_chip n223_2->n223_8 n20_6 #20:english_list n223_2->n20_6 n47_14 #47:sort n223_2->n47_14 n6_38 #6:announce n223_2->n6_38 n223_3 #223:set_chip n223_2->n223_3 n223_5 #223:read n223_2->n223_5 n223_8->n223_9 n223_3->n20_34 n223_5->n20_34 n223_5->n107_43 n1_31 #1:dname n223_5->n1_31 n107_0 #107:_wield n223_5->n107_0 n5_4 #5:description n223_5->n5_4 n1_11 #1:tell_lines n223_5->n1_11 n6_102 #6:client_tell n223_5->n6_102 n223_4 #223:text n223_5->n223_4 n6_140 #6:hear_rumor n223_5->n6_140 n223_6 #223:look_self n223_6->n223_5 n223_7 #223:creature_heartbeat n223_7->n223_8 n223_7->n223_3

Source

calculate

Spec this none thisFlags rxdOwner #361Definer #223

Referenced by

none

Source

1for board in ($ou:leaves(this.master_scoreboard))
2if (board.never_update)
3continue;
4endif
5board.updating = 1;
6if (is_a(board.location, $room))
7board.location:announce_all($su:ps(board.update_msg, #2, board, board.location));
8endif
9board.cache_display = {tostr("Large blue lettering that bounces on the screen reads \"", $ansi.blue, $ansi.bold_on, "UPDATING", $ansi.reset, "\".")};
10yield;
11endfor
12for chip in (this:chips())
13try
14chip:calculate();
15except e (ANY)
16$rpg:report_error(e);
17endtry
18if (ticks_left() < 20000)
19suspend(10);
20endif
21endfor
22for board in ($ou:leaves_suspended($scoreboard))
23yield;
24board:set_chip(board.active_chip, 1);
25board.updating = 0;
26board.last_random_flicker = time();
27endfor

display

Spec this none thisFlags rxdOwner #361Definer #223

Referenced by

none

Source

1

press set push click touch

Spec any on top of/on/onto/upon thisFlags rxdOwner #361Definer #223

Referenced by

none

Source

1"Change the information currently being displayed.";
2if (this.f)
3player:tell("That won't work.");
4return;
5endif
6name = $su:lowercase(dobjstr);
7chips = {};
8active = #-1;
9if (name == "random")
10active = this:random_chip();
11else
12for chip in (this:chips())
13if (chip.button_name)
14if (chip.button_name == name)
15active = chip;
16break;
17endif
18chips = setadd(chips, chip.button_name);
19endif
20endfor
21endif
22if (!is_a(active, #98590))
23chips = setadd(chips, "random");
24player:tell("The following buttons are available: ", $su:english_list($lu:sort(chips)), ".");
25return;
26endif
27player:announce_all_but({player}, $su:ps(this.opress_msg, player, this, this.location));
28player:tell($su:ps(this.press_msg, player, this, this.location));
29if (0 && this.updating)
30player:announce_all($su:ps(this.failure_msg, player, this, this.location));
31else
32if (!this:set_chip(active))
33player:announce_all($su:ps(this.failure_msg, player, this, this.location));
34else
35this:read();
36endif
37endif

set_chip

Spec this none thisFlags rxdOwner #361Definer #223

Referenced by

Source

1if (this.f)
2return 0;
3endif
4chip = args[1];
5force = (length(args) >= 2) ? args[2] | 0;
6if (is_a(chip, #98590))
7if (((force || (!this.use_cache)) || (!this.cache_display)) || (this.active_chip != chip))
8this.active_chip = chip;
9this.cache_display = this.active_chip:display();
10this.location:announce_all($su:ps(this.success_msg, #2, this, this.location));
11return 1;
12else
13return 0;
14endif
15else
16return 0;
17endif

text

Spec this none thisFlags rxdOwner #361Definer #223

Referenced by

Source

1if ((this.f || (!this.cache_display)) || (typeof(this.cache_display) != LIST))
2return {"An empty display."};
3else
4lines = this.cache_display;
5lines = listinsert(lines, "");
6lines = listappend(lines, "");
7lines = listappend(lines, "There are several buttons at the bottom of the display.");
8return lines;
9endif

read view

Spec this none noneFlags rxdOwner #361Definer #223

Referenced by

Source

1"Check out what is on the display.";
2if (this.hold_to_read)
3if (!(this in player.contents))
4player:tell("You're not carrying ", this:dname(), ".  You could try taking it.");
5return;
6endif
7if (!(this in player.wielding))
8player:_wield(this);
9endif
10endif
11desc = this:description();
12if (desc)
13player:tell_lines(desc);
14player:tell("");
15endif
16player:tell($su:ps(this.read_msg, player, this, this));
17player.location:announce($su:ps(this.oread_msg, player, this, this));
18if (player.client)
19player:client_tell("#$#info");
20for x in (this:text())
21player:client_tell(x);
22endfor
23player:client_tell("#$#/info");
24else
25player:tell_lines(this:text());
26endif
27if (is_a(this.rumor, $rumor))
28player:hear_rumor(this.rumor);
29endif

look_self

Spec this none thisFlags rxdOwner #361Definer #223

Referenced by

none

Source

1this:read();

creature_heartbeat

Spec this none thisFlags rxdOwner #361Definer #223

Referenced by

none

Source

1if (this.f || this.never_update)
2return;
3endif
4if (((!this.updating) && ((time() - this.last_random_flicker) > 180)) && (random(100) <= 20))
5this.last_random_flicker = time();
6this:set_chip(this:random_chip());
7endif

random_chip

Spec this none thisFlags rxdOwner #361Definer #223

Referenced by

Source

1return this:chips()[random($)];

chips

Spec this none thisFlags rxdOwner #361Definer #223

Referenced by

Source

1return this.master_scoreboard:occupants(#98590);

acceptable

Spec this none thisFlags rxdOwner #361Definer #223

Referenced by

none

Source

1return is_a(args[1], $scorechip) && (!args[1].f);