LRPG Recycler #4489
Aliases: LRPG Recycler, LRPGR, recycler
4 verbs · 4 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
ok_to_recycle | this none this | rx | #4489 | 5 |
_recycle | this none this | | #4489 | 17 |
_create | this none this | rx | #4489 | 48 |
trust_to_recycle trust_to_create | this none this | | #4489 | 19 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
key | #4489 | | — | not readable (E_PERM) |
aliases | #4489 | | — | {"LRPG Recycler", "LRPGR", "recycler"} |
description | #4489 | | — | "A chugging mass of wires and pistons, throwing sparks and belching mechanical grunts of displeasure with the LambdaMOO Quota System." |
object_size | #4489 | | — | {6201, 1141286558} |
Ancestry
Ancestors (nearest first): none
Children: none
Call graph
Source
ok_to_recycle
Referenced by
- #4489:_recycle line 5:
this:ok_to_recycle
Source
1":ok_to_recycle(object)"; 2"Return false if the object has verbs or properties defined, or kids."; 3"This recycler is intended for public use, and the public has no cause to recycle developed G_M-owned objects."; 4o = args[1]; 5return !((children(o) || verbs(o)) || properties(o));
_recycle
Referenced by
- #4489:_recycle line 9:
$recycler:_recycle - #4489:_create line 28:
this:_recycle
Source
1":_recycle(object) - Pass to $recycler if perms are secure."; 2{o} = args; 3if (!this:trust_to_recycle(caller_perms(), o)) 4 return E_PERM; 5elseif (!this:ok_to_recycle(o)) 6 return E_NACC; 7endif 8(rpg = $local.rpg):s_i_n(); 9recycled = (o.owner == this.owner) ? $recycler:_recycle(o) | $nothing; 10if (o in this.owner.owned_objects) 11 this.rotten = {@this.rotten, {o, callers()}}; 12endif 13return recycled; 14"DR 08-MAY-95 -- Changed to pass obj to trust_to_recycle."; 15"GMs are allowed to recycle killable things using this verb now."; 16"Slither 6/7/95 -- Added suspend_if_needed call"; 17"THX1138 4-June-1997 -- Added a check after the suspend to make sure G_M still owns before attempting a recycle.";
_create
Referenced by
- #4489:_create line 16:
$recycler:_create - #4489:_create line 36:
$recycler:_create - #22023:@addskill line 18:
$recycler:_create
Source
1":_create(parent-object[, announce-to])"; 2"Pass to $recycler if perms are secure. If E_QUOTA is returned, find the bad object in our .owned_objects and re-recycle it."; 3"If announce-to is given, tell that player when we suspend."; 4if (!this:trust_to_create(caller_perms())) 5 return E_PERM; 6endif 7{o, @extra} = args; 8rpg = $local.rpg; 9rpg:s_i_n(); 10if ((o.owner != this.owner) && (!o.f)) 11 o:make_fertile(); 12elseif ((((o.owner == this.owner) && (!(o in {rpg.doll, @rpg.object_db.generic_corpses, @this.exceptions, @rpg.dispenser.dispenses}))) && (parent(o) != rpg.doll)) && (!(parent(o) in {@rpg.object_db.generic_corpses}))) 13 "Extra bit about doll for zombies and conjurables."; 14 this.owner:report_error(tostr("~recycler: making child of non-dispensed object.", $string_utils:nn(o), " Callers: ", $string_utils:print(callers(1)))); 15endif 16created = $recycler:_create(o); 17if (created != E_QUOTA) 18 return created; 19endif 20if (!$code_utils:task_valid(this.summarize_task)) 21 this.summarize_task = task_id(); 22 for o in (this.owner.owned_objects) 23 if ($command_utils:suspend_if_needed(0, "~recycler:_create() suspending...")) 24 player:tell("~recycler:_create() resuming..."); 25 endif 26 if ((typeof(o.object_size) == ERR) && $recycler:valid(o)) 27 this.owner:report_error(((("~recycler -> " + tostr(this)) + ":_recycle(") + tostr(o)) + ");"); 28 this:_recycle(o); 29 endif 30 endfor 31 "Last attempt at trying to fixie the problem."; 32 $quota_utils:summarize_one_user(this.owner, -1); 33 if ((o.owner != this.owner) && (!o.f)) 34 o:make_fertile(); 35 endif 36 return $recycler:_create(o); 37else 38 player:tell("Grand_Master is in the process of attempting to compensate for a $recycler bug. Please be patient and hold off playing for a bit."); 39 return E_QUOTA; 40endif 41"Quinn 11-May-94: Added summarize_task so as not to over-burden the MOO with multiple surveys."; 42"Quinn 11-May-94: If we can't create using the preferred $recycler method, do a raw create and return that."; 43"08-NOV-94 DR: Reinstated above hacks, just return errors when summarize_task is running, no raw create (will not work)."; 44"Profane 16-MAR-95 12:47EST - Added :make_fertile() calls, mostly so #259:check_mine() calls don't bomb out on non-G_M owned equipment."; 45"Slither 6/10/95 -- Changed test for no-object-size objects from being"; 46" (!o.object_size) && (!$recycler:valid(o)), which doesn't work."; 47"Slither 6/11/95 -- Added suspend_if_needed before creation starts"; 48"Slither 6/22/95 -- made it print error message if was making non-grabber GM owned object";
trust_to_recycle trust_to_create
Referenced by
- #4489:_recycle line 3:
this:trust_to_recycle - #4489:_create line 4:
this:trust_to_create
Source
1":trust_to_recycle(OBJ who [, OBJ what)"; 2"Is WHO allowed to recycle WHAT. If there is no WHAT, is WHO allowed"; 3"to recycle anthing that this.owner owns?"; 4{who, ?what = $nothing} = args; 5ok = 0; 6rpg = $local.rpg; 7if (rpg:is_grandmaster(who)) 8 ok = 1; 9elseif ((verb[10] == "r") && rpg:trusted(who)) 10 if (rpg.vacuum:killable(what)) 11 ok = 1; 12 elseif ((parent(what) == rpg.doll) && (what.character.owner == who)) 13 ok = 1; 14 endif 15endif 16return ok; 17"DR 08-MAY-95 -- Trust GMs to manually recycle what the vacuum cleaner would consider food anyway."; 18"Profane 6-JAN-97 2003PST -- rewrote, added bit allowing GM's to reyclce dolls of their own monsters."; 19"Profane 14-APR-96 1550PST -- Put in bit to check killable only if we're checking recycle rights.";