electronic scoreboard #223
Aliases: electronic scoreboard, scoreboard, board, top ten, top 10, topten, top10, screen, display
11 verbs · 48 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
calculate | this none this | rxd | #223 | 27 |
display | this none this | rxd | #223 | 1 |
press set push click touch | any on top of/on/onto/upon this | rxd | #223 | 37 |
set_chip | this none this | rxd | #223 | 17 |
text | this none this | rxd | #223 | 9 |
read view | this none none | rxd | #223 | 29 |
look_self | this none this | rxd | #223 | 1 |
creature_heartbeat | this none this | rxd | #223 | 7 |
random_chip | this none this | rxd | #223 | 1 |
chips | this none this | rxd | #223 | 1 |
acceptable | this none this | rxd | #223 | 1 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
opress_msg | #223 | rc | #361 | "%DN presses a button on %dt." |
press_msg | #223 | rc | #361 | "You press a button on %dt." |
failure_msg | #223 | rc | #361 | "%DT quickly flashes an error message." |
success_msg | #223 | rc | #361 | "The display of %dt flickers as it changes to another screen." |
updating | #223 | rc | #361 | 0 |
cache_display | #223 | rc | #361 | {} |
active_chip | #223 | rc | #361 | #-1 |
use_cache | #223 | rc | #361 | 1 |
last_random_flicker | #223 | rc | #361 | 0 |
update_msg | #223 | rc | #361 | "%DT whirs loudly." |
chips | #223 | rwc | #361 | {} |
never_update | #223 | rc | #361 | 1 |
master_scoreboard | #223 | rc | #361 | #223 |
hold_to_read | #133 | rc | #361 | 0 |
read_msg | #133 | rc | #361 | "On the killer technicolor display, you see:" |
oread_msg | #133 | rc | #361 | "%DN takes a gander at %dt." |
text | #133 | rc | #361 | <clear> |
junk_on_read | #133 | rc | #361 | <clear> |
handed | #5 | rc | #361 | <clear> |
wield_msg | #5 | rc | #361 | <clear> |
unwield_msg | #5 | rc | #361 | <clear> |
size | #5 | rc | #361 | <clear> |
look_place_msg | #5 | rc | #361 | "%IT is mounted up on the wall." |
value | #5 | rc | #361 | <clear> |
get_msg | #5 | rc | #361 | <clear> |
drop_msg | #5 | rc | #361 | <clear> |
get_fail_msg | #5 | rc | #361 | "that would be too naughty, even for you" |
junk_ok | #5 | rc | #361 | <clear> |
floats | #5 | rc | #361 | <clear> |
long_name_msg | #5 | rc | #361 | "huge bitchin' electronic scoreboard" |
article | #5 | rc | #361 | <clear> |
setup_list | #5 | rc | #361 | <clear> |
health | #5 | rc | #361 | <clear> |
health_max | #5 | rc | #361 | <clear> |
min_skill | #5 | rc | #361 | <clear> |
skill | #5 | rc | #361 | <clear> |
recipe_for | #5 | rc | #361 | <clear> |
carried_msg | #5 | rc | #361 | <clear> |
aliases | #1 | rc | #361 | list of 9{"electronic scoreboard", "scoreboard", "board", "top ten", "top 10", "topten", "top10", "screen", "display"} |
description | #1 | rc | #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 | #1 | r | #29 | {8729, 1298434106} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rwc | #361 | -1 |
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): #133 generic note → #5 generic thing → #1 root
Children: none
Call graph
Source
calculate
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
Referenced by
none
Source
1
press set push click touch
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
Referenced by
- #223:press line 32:
this:set_chip - #223:creature_heartbeat line 6:
this:set_chip
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
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
Referenced by
- #223:press line 35:
this:read - #223:look_self line 1:
this:read
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
Referenced by
none
Source
1this:read();
creature_heartbeat
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
Referenced by
- #223:press line 10:
this:random_chip - #223:creature_heartbeat line 6:
this:random_chip
Source
1return this:chips()[random($)];
chips
Referenced by
- #223:calculate line 12:
this:chips - #223:press line 12:
this:chips - #223:random_chip line 1:
this:chips
Source
1return this.master_scoreboard:occupants(#98590);
acceptable
Referenced by
none
Source
1return is_a(args[1], $scorechip) && (!args[1].f);