@verb #53:"do_recycle" this none this rxdo #55 @program #53:"do_recycle" this none this "The heart of the recycling system. Wizards only!" if (!caller_perms().wizard) return E_PERM endif {toast} = args loc = `toast.location:isa($room) ! E_INVIND, E_VERBNF' ? toast.location | $junk_pile p = parent(toast) for c in (children(toast)) chparent(c, p) endfor "$building_utils:chparent(toast, $garbage);" chparent(toast, $garbage) if (is_player(toast)) $wiz_utils:unset_player(toast) endif for p in (properties(toast)) delete_property(toast, p) $cmd_utils:suspend_if_needed(0) endfor for v in (verbs(toast)) delete_verb(toast, 1) $cmd_utils:suspend_if_needed(0) endfor $command_utils:suspend_if_needed() for x in (toast.contents) `move(x, loc) ! ANY' endfor "To save time on restarting, which contains a cycle-check that is O(n^2) with the number of items in a room, randomise here..." move(toast, {this, @setremove(children($trash), toast)}[random($)]) toast.old_names = toast.name toast.owner = #-1 toast.r = toast.w = toast.f = 0 toast.name = "" toast.recycled_time = time() fork (0) `$ref_db:remove_reference(toast) ! ANY' endfork "Last modified by Lao-Tzu (#8084) on Mon Nov 25 13:24:58 2002 MST." .