tomb #186
Aliases: tomb
11 verbs · 17 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
accept | this none this | rxd | #186 | 9 |
_clean | this none this | rxd | #186 | 41 |
_clean_start | this none this | rxd | #186 | 7 |
tell_contents | this none this | rxd | #186 | 38 |
tell_contents_sub | this none this | rxd | #186 | 56 |
_exitfunc | this none this | rxd | #186 | 15 |
_new_clean | this none this | rxd | #186 | 73 |
enterfunc | this none this | rxd | #186 | 18 |
@clean clean | this none none | rxd | #186 | 1 |
tell_listeners | this none this | rxd | #186 | 3 |
acceptable | this none this | rxd | #186 | 1 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
pipe | #186 | rc | #361 | #227087 |
olds | #186 | rc | #361 | list of 88{#649476, #574158, #279059, #32749, #523872, #117082, #23135, #31179, #621783, #242325, #321775, #148613, #216324, #421343, #15790, #621204, #557822, #209044, #72207, #158893, #594003, #418599, #576217, #612594, #550134, #51538, #258870, #140702, #359585, #512657, #182139, #43142, #407981, #504045, #595231, #7577, #640516, #24688, #265793, #104088, #215529, #504701, #607870, #304955, #620660, #424399, #446511, #225561, #668574, #108075, #23377, #665566, #254758, #627381, #508827, #448359, #473181, #640300, #135492, #40641, #638303, #221721, #164216, #587343, #651887, #616133, #581551, #632800, #534456, #36374, #623715, #482659, #195010, #392639, #659916, #83748, #588250, #248410, #313272, #626947, #20867, #445034, #207510, #602893, #671135, #561717, #664539, #89249} |
news | #186 | rc | #361 | list of 37{#475710, #376272, #633989, #390449, #443690, #668818, #417886, #49278, #133435, #498638, #451059, #337026, #376226, #307860, #669733, #169942, #172368, #578755, #649399, #602544, #206427, #427162, #382508, #173156, #13722, #196114, #590428, #487848, #581080, #326691, #444899, #387125, #135370, #95123, #113984, #252126, #282279} |
clean_interval | #186 | rc | #361 | 150 |
listeners | #186 | r | #361 | {#413632, #7195} |
always_ok_to_junk | #186 | rc | #361 | {#10497, #1031} |
clean_task | #345 | rc | #361 | 198602989 |
aliases | #1 | rc | #361 | {"tomb"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {11790, 1298434517} |
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): #345 generic holding tank → #1 root
Children: none
Call graph
Source
accept
Referenced by
- #186:acceptable line 1:
this:accept
Source
1what = args[1]; 2if (is_player(what)) 3$rpg:report_error({E_INVARG, "Players can't go to $tomb!", what, callers(1)}, {}, $nets.heartnet); 4return 0; 5endif 6if ((what.f || children(what)) || verbs(what)) 7return 0; 8endif 9return 1;
_clean
Referenced by
- #186:_clean line 39:
this:_clean - #186:_clean_start line 5:
this:_clean
Source
1return 0; 2goats = this.contents; 3"suspend for a little bit just to make extra sure nothing is still trying to use any of the garbage"; 4suspend(5); 5for t in (queued_tasks()) 6id = t[1]; 7cl = t[6]; 8vn = t[7]; 9if (((cl == this) && (vn == verb)) && (id != task_id())) 10$nets.lostnet:announce(#-1, tostr("Extra $tomb:_clean task ", id, " found and killed."), 1); 11`kill_task(id) ! E_INVARG'; 12endif 13$cu:sin(); 14endfor 15kills = 0; 16while (goats) 17goat = goats[1]; 18"The following line seems unsafe..."; 19"`goat.junk_ok = 1 ! ANY => 0';"; 20if ((is_a(goat, $thing) && (!goat.f)) && (goat.owner != #984)) 21goat.owner = #984; 22endif 23if ((is_a(goat, $creature) && (!goat.f)) || `goat:junk_ok() ! E_VERBNF') 24$recycler:_recycle(goat); 25else 26`$rpg:junk(goat) ! ANY => 0'; 27endif 28if (!is_a(goat, $garbage)) 29#419139:announce(this, ((($ansi.cyan + " $tomb couldn't junk ") + $su:nn(goat)) + "! Moved to $lostnfound") + $ansi.reset, 1); 30move(goat, $lostnfound); 31else 32kills = kills + 1; 33endif 34goats = setremove(goats, goat); 35$cu:sin(4) && #419139:announce(this, ((($ansi.cyan + " Killed ") + tostr(kills)) + "...") + $ansi.reset, 1); 36endwhile 37#419139:announce(this, ("Cleaned $tomb, junked " + tostr(kills)) + " objects.", 1); 38fork newclean (this.clean_interval) 39this:_clean(); 40endfork 41this.clean_task = newclean;
_clean_start
Referenced by
none
Source
1if (task_valid(this.clean_task)) 2return E_INVARG; 3endif 4fork task_id (1) 5this:_clean(player); 6endfork 7this.clean_task = task_id;
tell_contents
Referenced by
none
Source
1gn = {"Weapons", "Ammo", "Clothing", "Medical", "Consumables", "Artifacts", "Misc"}; 2g = {{}, {}, {}, {}, {}, {}, {}}; 3total_weight = 0; 4for x in (this.contents) 5if (is_a(x, $weapon)) 6g[1] = setadd(g[1], x); 7elseif (is_a(x, $ammo)) 8g[2] = setadd(g[2], x); 9elseif (is_a(x, $clothing)) 10g[3] = setadd(g[3], x); 11elseif (is_a(x, #804)) 12g[4] = setadd(g[4], x); 13elseif (is_a(x, #723)) 14g[4] = setadd(g[4], x); 15elseif (is_a(x, #835)) 16g[4] = setadd(g[4], x); 17elseif (is_a(x, $food)) 18g[5] = setadd(g[5], x); 19elseif (is_a(x, #868)) 20g[5] = setadd(g[5], x); 21elseif (is_a(x, #890)) 22g[5] = setadd(g[5], x); 23elseif (is_a(x, #877)) 24g[5] = setadd(g[5], x); 25elseif (is_a(x, $treasure)) 26g[6] = setadd(g[6], x); 27else 28g[7] = setadd(g[7], x); 29endif 30$cu:sin(); 31endfor 32$cu:sin(5); 33for x in [1..length(g)] 34if (g[x]) 35player:tell($ansi.bold_on, gn[x], ":", $ansi.reset); 36this:tell_contents_sub(g[x]); 37endif 38endfor
tell_contents_sub
Referenced by
- #186:tell_contents line 36:
this:tell_contents_sub
Source
1"Copied from generic player (#6):tell_contents_sub by Necanthrope (#142) Sun Sep 2 18:02:15 2007 CDT"; 2"Copied from Necanthrope (#142):tell_contents_sub Wed Sep 20 16:16:51 2006 PDT"; 3"Copied from generic container (#931):tell_contents by Satan (#2) Sat Jul 22 18:45:06 2006 PDT"; 4"Copied from generic player (#6):tell_contents by Satan (#2) Sat Jul 22 18:39:37 2006 PDT"; 5msg_db = {}; 6names = {}; 7if (args) 8things = args[1]; 9else 10things = this:contents(); 11endif 12for x in (things) 13if (is_a(x, $decal)) 14things = setremove(things, x); 15endif 16endfor 17weights = player:check_pref("weights"); 18total_weight = 0; 19if (things) 20for x in (things) 21added = 0; 22iname = x:iname(); 23if (weights) 24iname = ((((iname + $ansi.cyan) + " [") + $su:english_weight_short(weight = x:weight())) + "]") + $ansi.reset; 25total_weight = total_weight + weight; 26endif 27if (msg_db) 28for y in [1..length(msg_db)] 29if (msg_db[y][2] == iname) 30msg_db[y][3] = msg_db[y][3] + 1; 31msg_db[y][1] = setadd(msg_db[y][1], x); 32added = 1; 33endif 34endfor 35endif 36if (!added) 37msg_db = setadd(msg_db, {{x}, iname, 1}); 38endif 39endfor 40for x in (msg_db) 41if (x[3] > 1) 42name = ($string_utils:aggregate_number(x[3]) + " ") + x[1][1]:plural_name(); 43if (weights) 44wt = 0; 45for z in (x[1]) 46wt = wt + z:weight(); 47endfor 48name = ((((name + $ansi.cyan) + " [") + $su:english_weight_short(wt)) + "]") + $ansi.reset; 49endif 50else 51name = x[2]; 52endif 53names = {@names, name}; 54endfor 55player:tell_item_list(names); 56endif
_exitfunc
Referenced by
none
Source
1what = args[1]; 2if (what == player) 3"Seraph is stupid"; 4elseif (valid(cp = caller_perms()) && cp.wizard) 5"Let my people go!"; 6elseif (!`what:junk_ok() ! ANY => 0') 7"Just get it OUT!"; 8elseif (what.f) 9"Whoever put fertile objects into $tomb is stupid."; 10elseif (is_a(what, $interface)) 11"Stupid interfaces."; 12elseif (!(what.location in {$recycler, $lostnfound})) 13$nets.lostnet:announce(#2, (("Stopped " + $su:nn(what)) + " from leaving $tomb! It wanted to go to ") + $su:nn(what.location), 1); 14what:moveto(this); 15endif
_new_clean
Referenced by
- #186:@clean line 1:
this:_new_clean
Source
1if ($stop_everything) 2return; 3endif 4kills = 0; 5for t in (queued_tasks()) 6id = t[1]; 7cl = t[6]; 8vn = t[7]; 9if (((cl == this) && (vn == verb)) && (id != task_id())) 10$nets.lostnet:sys_announce("Extra $tomb:_new_clean task ", id, " found and killed."); 11`kill_task(id) ! E_INVARG'; 12endif 13endfor 14for goat in (this.olds) 15(ticks_left() < 10000) && suspend(0); 16if (goat.location == this) 17if (goat.f) 18$nets.lostnet:sys_announce("Fertile object in tomb, sending to lostnfound: ", $su:nn(goat)); 19move(goat, $lostnfound); 20this.olds = setremove(this.olds, goat); 21continue; 22endif 23if (is_player(goat)) 24$nets.prognet:sys_announce("Player in $tomb! Not recycling ", $su:nn(goat), " and trying to move out."); 25move(goat, #171672); 26if (goat.location != this) 27$nets.prognet:sys_announce("Moved successfully to ", $su:nn(goat.location)); 28else 29$nets.prognet:sys_announce("Couldn't move out!"); 30endif 31this.olds = setremove(this.olds, goat); 32continue; 33endif 34owner = goat.owner; 35try 36`goat.junk_ok = 1 ! ANY'; 37if (is_a(goat, $thing) && (owner != #984)) 38$nets.lostnet:sys_announce("Tomb had to change ownership of ", $su:nn(goat), " from ", $su:nn(goat.owner), "."); 39$wiz_utils:set_owner(goat, #984); 40endif 41if (`goat:junk_ok() ! E_VERBNF => 0') 42if (is_a(goat, $area)) 43goat:uninstantiate($tomb); 44endif 45$recycler:_recycle(goat); 46else 47for class in (this.always_ok_to_junk) 48if (is_a(goat, class)) 49$recycler:_recycle(goat); 50endif 51endfor 52endif 53except e (ANY) 54$rpg:report_error(e); 55endtry 56if (!is_a(goat, $garbage)) 57$nets.lostnet:sys_announce("Tomb couldn't junk ", $su:nn(goat), "."); 58$wiz_utils:set_owner(goat, owner); 59move(goat, $lostnfound); 60else 61kills = kills + 1; 62endif 63this.olds = setremove(this.olds, goat); 64endif 65yield; 66endfor 67this.olds = this.news; 68this.news = {}; 69$nets.lostnet:sys_announce("Cleaned $tomb, junked ", kills, " objects."); 70fork newclean (this.clean_interval) 71this:(verb)(); 72endfork 73this.clean_task = newclean;
enterfunc
Referenced by
none
Source
1"We must succeed - no tickouts!"; 2yield; 3what = args[1]; 4if (is_player(what)) 5$nets.prognet:sys_announce("Player discovered in $tomb! (", $su:nn(what), ")"); 6move(what, #171672); 7if (what.location != this) 8$nets.prognet:sys_announce("Successfully moved to ", $su:nn(what.location), "."); 9else 10$nets.prognet:sys_announce("Couldn't move out of $tomb!"); 11endif 12return; 13endif 14this.news = listappend(this.news, what); 15if ($api.heart:is_on(what)) 16$heart:unregister(what); 17endif 18`what:entomb() ! E_VERBNF => 0';
@clean clean
Referenced by
none
Source
1this:_new_clean(player);
tell_listeners
Referenced by
none
Source
1for dude in (this.listeners) 2dude:tell(@args); 3endfor
acceptable
Referenced by
none
Source
1return this:accept(@args);