flywheel #227
Aliases: flywheel, fly, wheel
9 verbs · 37 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
start | this none none | rxd | #227 | 10 |
squeal | this none this | rxd | #227 | 22 |
_www | this none this | rxd | #227 | 1 |
look_self | this none this | rxd | #227 | 2 |
lagstr | this none this | rxd | #227 | 3 |
beepwatch | this none this | rxd | #227 | 10 |
@unhear | this none none | rxd | #227 | 10 |
@hear | this none none | rxd | #227 | 10 |
server_started | this none this | rxd | #227 | 5 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
look_place_msg | #227 | rc | #361 | "An enormous flywheel is mounted vertically between two steel beams." |
last_tick | #227 | rc | #361 | 1337755516 |
action | #227 | rc | #361 | #180 |
cycle | #227 | rc | #361 | 3 |
cycle_max | #227 | rc | #361 | 30 |
blue | #227 | rc | #361 | 0.2 |
yellow | #227 | rc | #361 | 0.55 |
orange | #227 | rc | #361 | 0.825 |
red | #227 | rc | #361 | 1.5 |
ema | #227 | rc | #361 | 2.918056650962856e-07 |
window_size | #227 | rc | #361 | 30 |
prev_values | #227 | rc | #361 | list of 30{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
valid_ema | #227 | rc | #361 | 1 |
smoothing | #227 | rc | #361 | 0.0645 |
made_noise | #227 | rc | #361 | 0 |
current_reading | #227 | rc | #361 | "0.000" |
beep_receivers | #227 | rc | #361 | {#361} |
no_action_warn | #227 | rc | #361 | 1 |
queue | #92 | r | #361 | {{#180, {}, 1, ""}} |
preemptible | #92 | r | #361 | 0 |
executing | #92 | r | #361 | {} |
process_queue | #92 | r | #361 | 243733785 |
help_msg | #92 | rc | #361 | <clear> |
last_action | #92 | r | #361 | {#180, {}, 1, ""} |
article | #92 | rc | #361 | <clear> |
last_last_action | #92 | rc | #361 | {#180, {}, 1, ""} |
action_count | #92 | rc | #361 | 948002748 |
aliases | #1 | r | #362 | {"flywheel", "fly", "wheel"} |
description | #1 | rc | #361 | "A huge ten-foot flywheel of some dark gray composite, suspended between two thick vertical steel beams. A gridwork of blue lasers shoots into the flywheel from various angles, bouncing beams off it in complex flickering patterns through small ampules of swirling gas." |
object_size | #1 | r | #29 | {7250, 1298434471} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rc | #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): #92 generic actor → #1 root
Children: none
Call graph
Source
start
Referenced by
none
Source
1if (!task_valid(this.process_queue)) 2this.executing = {}; 3endif 4if (this:is_doing(this.action)) 5player:tell("It's already spinning -- you don't dare touch it."); 6return; 7endif 8player:aat(player:dnamec(), " throws the 'START' switch on ", this:dname(), "."); 9this.valid_ema = 0; 10this:queue_action(this.action, {});
squeal
Referenced by
none
Source
1if (this.ema < this.yellow) 2return; 3endif 4if (this.made_noise >= 2) 5return; 6endif 7if (this.ema >= this.red) 8this.location:broadcast_noise("You hear a %vol screech of metallic friction from %dir.", 7); 9this:beepwatch(2); 10this:aat("The flywheel spins and screeches madly, vibrating against the wall."); 11this.made_noise = 2; 12elseif ((this.ema >= this.orange) && (this.made_noise < 1)) 13this.location:broadcast_noise("You hear a %vol metallic whine from %dir.", 5); 14this:beepwatch(1); 15this:aat("The flywheel whines."); 16this.made_noise = 1; 17elseif (this.made_noise < 1) 18this.location:broadcast_noise("A %vol high-pitched hum comes from %dir.", 3); 19this:beepwatch(1); 20this:aat("The flywheel hums at high speed."); 21this.made_noise = 1; 22endif
_www
Referenced by
none
Source
1return {"lag:" + floatstr(this.ema, 3)};
look_self
Referenced by
none
Source
1pass(@args); 2player:tell("A meter on one of the beams reads: ", $ansi.bold_on, this:lagstr(), $ansi.reset);
lagstr
Referenced by
- #50:paramedic line 88:
$flywheel:lagstr - #100:time line 28:
$flywheel:lagstr - #100:time line 30:
$flywheel:lagstr - #130:look_self line 3:
$flywheel:lagstr - #227:look_self line 2:
this:lagstr - #227:beepwatch line 5:
this:lagstr - #227:beepwatch line 7:
this:lagstr
Source
1lag = this.ema; 2color = (lag >= this.red) ? "red" | ((lag >= this.orange) ? "orange" | ((lag >= this.yellow) ? "yellow" | ((lag >= this.blue) ? "brightblue" | "green"))); 3return tostr($ansi.(color), floatstr(lag, 3, 0), "s", $ansi.reset);
beepwatch
Referenced by
- #227:squeal line 9:
this:beepwatch - #227:squeal line 14:
this:beepwatch - #227:squeal line 19:
this:beepwatch
Source
1severe = args && (args[1] >= 2); 2for p in (this.beep_receivers) 3if (p.location != this.location) 4if (severe) 5p:tell($ansi.red, "Lag ", this:lagstr(), $ansi.red, ".", $ansi.reset); 6else 7p:tell($ansi.yellow, "Lag ", this:lagstr(), $ansi.yellow, ".", $ansi.reset); 8endif 9endif 10endfor
@unhear
Referenced by
none
Source
1if (!player.programmer) 2player:tell("Away with you!"); 3return; 4endif 5if (player in this.beep_receivers) 6this.beep_receivers = setremove(this.beep_receivers, player); 7player:tell("You will no longer receive lag alerts."); 8else 9player:tell("You already weren't receiving lag alerts."); 10endif
@hear
Referenced by
none
Source
1if (!player.programmer) 2player:tell("Away with you!"); 3return; 4endif 5if (player in this.beep_receivers) 6player:tell("You were already receiving lag alerts."); 7else 8this.beep_receivers = setadd(this.beep_receivers, player); 9player:tell("You will now receive lag alerts."); 10endif
server_started
Referenced by
none
Source
1if (caller != #0) 2raise(E_PERM); 3endif 4this.ema = 0.0; 5this.last_tick = time();