"A dump of #1131 on Sun Dec 17 13:41:17 1995 PST @create #258 named Cemetery:Cemetery ;;#1131.("free_exit") = 1 ;;#1131.("dawn_msg") = "" ;;#1131.("night_msg") = "" ;;#1131.("dusk_msg") = "" ;;#1131.("day_msg") = "" ;;#1131.("enabled") = 0 ;;#1131.("entrances") = {} ;;#1131.("exits") = {} ;;#1131.("ctype") = 0 ;;#1131.("key") = 0 ;;#1131.("aliases") = {"Cemetery"} ;;#1131.("description") = "The grave of monsters not yet reborn." ;;#1131.("object_size") = {3615, 819192265} @verb #1131:"acceptable" none none none rxd @program #1131:acceptable return args[1].owner in #46.gms; . @verb #1131:"enterfunc" this none this @verb #1131:"announce*_all_but" this none this @program #1131:announce_all_but return; . @verb #1131:"sort_alist_suspended" this none this @program #1131:sort_alist_suspended "sort_alist_suspended(interval,alist[,n]) sorts a list of tuples by n-th element. n defaults to 1. Calls suspend(interval) as necessary."; set_task_perms(caller_perms()); "... so it can be killed..."; interval = args[1]; if ((alist_length = length(alist = args[2])) < 25) "insertion sort on short lists"; return $list_utils:sort(alist, #1131:slice(@listdelete(args, 1))); endif "variables specially expanded for the anal-retentive"; sort_on = {@args, 1}[3]; left_index = alist_length / 2; right_index = (alist_length + 1) / 2; left_sublist = this:sort_alist_suspended(interval, alist[1..left_index], sort_on); right_sublist = this:sort_alist_suspended(interval, alist[left_index + 1..alist_length], sort_on); left_element = left_sublist[left_index]; right_element = right_sublist[right_index]; merged_list = {}; while (1) $command_utils:suspend_if_needed(interval); if (left_element[sort_on] > right_element[sort_on]) merged_list = {left_element, @merged_list}; if (left_index = left_index - 1) left_element = left_sublist[left_index]; else return {@right_sublist[1..right_index], @merged_list}; endif else merged_list = {right_element, @merged_list}; if (right_index = right_index - 1) right_element = right_sublist[right_index]; else return {@left_sublist[1..left_index], @merged_list}; endif endif endwhile . @verb #1131:"slice" this none this @program #1131:slice "slice(alist[,index]) returns a list of the index-th elements of the elements of alist, e.g., "; " slice({{\"z\",1},{\"y\",2},{\"x\",5}},2) => {1,2,5}."; "index defaults to 1 and may also be a nonempty list, e.g., "; " slice({{\"z\",1,3},{\"y\",2,4}},{2,1}) => {{1,\"z\"},{2,\"y\"}}"; slice = {}; ind = (length(args) >= 2) ? args[2] | 1; if (typeof(ind) == LIST) for elt in (args[1]) $command_utils:suspend_if_needed(0); s = {elt[ind[1]]}; for i in (listdelete(ind, 1)) s = listappend(s, elt[i]); endfor slice = listappend(slice, s); endfor else for elt in (args[1]) slice = listappend(slice, elt[ind]); endfor endif return slice; . @verb #1131:"exitfunc" this none this rxd #49853 @program #1131:exitfunc return; "don't need the complicated #258:exitfunc stuff here, do you?"; . "***finished***