"A dump of #1131 (Cemetary)

@create #258 named Cemetery:Cemetery
;;#1131.("free_exit") = 1
;;#1131.("blessed_exit") = {#9415, 1246785920}
"#1131.("misc_notes") => E_PERM (Permission denied)
"#1131.("magic_effects") => E_PERM (Permission denied)
"#1131.("combat_effects") => E_PERM (Permission denied)
"#1131.("unannounced") => E_PERM (Permission denied)
;;#1131.("teleport_object") = #30788
;;#1131.("teleport_task") = 829631531
"#1131.("allowed_exits") => E_PERM (Permission denied)
;;#1131.("dawn_msg") = ""
;;#1131.("night_msg") = ""
;;#1131.("dusk_msg") = ""
;;#1131.("day_msg") = ""
;;#1131.("enabled") = 0
;;#1131.("entrances") = {}
;;#1131.("exits") = {}
;;#1131.("ctype") = 0
"#1131.("key") => E_PERM (Permission denied)
;;#1131.("aliases") = {"Cemetery"}
;;#1131.("description") = "The grave of monsters not yet reborn."
;;#1131.("object_size") = {5905, 1141286558}

@verb #1131:"acceptable" none none none rxd
@program #1131:acceptable
return (args[1].owner in #46.gms) || (args[1] in this.depositors);
.

@verb #1131:"announce*_all_but notify_arrival notify_exit exitshock" this none this
@program #1131:announce_all_but
return;
.

@verb #1131:"exitfunc" this none this
@program #1131:exitfunc
{what} = args;
rpg = $local.rpg;
if (!rpg:trusted_efunc())
  return E_PERM;
endif
rpg.clock.monster_orphans = setremove(rpg.clock.monster_orphans, what);
return;
"don't need the complicated #258:exitfunc stuff here, do you?";
"Profane 20-AUG-96 0916PDT -- orphan stuff";
"THX (#105941) - Mon Jun 19, 2000 - Tossed a trusted_efunc in there just to be anal.";
.

@verb #1131:"enterfunc" this none this
@program #1131:enterfunc
":enterfunc(thing) -- Looks at 'thing'.  If it is a player or a monster with a non-zero gestate, it leaves them alone.  If it is a monster with .gestate == 0, it sends them to reside in Tartarus (with Kwathassx, etc.).  If if is an RPG item, it is unclaimed if it is currently claimed, sent to the gem dispenser if it is a gem, crushed to 0 value and sent to Tartarus if it is currency or emptied out if it is another RPG item owned by G_M.";
rpg = $local.rpg;
if ((thing = args[1]).location != this)
  return;
endif
if (is_player(thing))
  "Leave 'em alone!";
elseif (rpg:is_monster(thing))
  if (!thing.gestate)
    thing:moveto(this.turf[1]);
    "else";
    "  rpg.clock.monster_orphans = setadd(rpg.clock.monster_orphans, thing);";
    "this is handled in #259 when rebirth is scheduled.";
  endif
elseif (thing.owner in {owner = rpg.owner, money_owner = rpg.money.owner})
  if (valid(claimer = `thing:claimed_by() ! ANY => $nothing'))
    thing:unclaim_for(claimer);
  endif
  if (rpg.object_db:is_money(thing))
    thing:set_quantity(0);
    thing:moveto(this.turf[1]);
  elseif (rpg.object_db:is_gem(thing))
    thing:moveto(rpg.gem.dispenser);
    "elseif (rpg.object_db:is_scroll(thing))";
    "  thing:moveto(this.turf[1]);";
  else
    for t in ($object_utils:all_contents(thing))
      if (t.owner in {owner, money_owner})
        t:moveto(this);
      endif
      rpg:s_i_f_i_n();
    endfor
    if (rpg.gm_lag < 10)
      for junk in (this.wait_yer_turn)
        this.wait_yer_turn = setremove(this.wait_yer_turn, junk);
        if (((valid(junk) && (parent(junk) != $garbage)) && (junk.location == this)) && (junk.owner == owner))
          `junk:destroy() ! ANY';
        endif
      endfor
    endif
    this.wait_yer_turn = setadd(this.wait_yer_turn, thing);
  endif
elseif (parent(thing) in this.exemptions)
  "Special dispensation from the Governor for the Rakshasa.  - THX";
else
  thing:moveto(this.turf[1]);
endif
rpg.clock:rebirth();
"THX 05-DEC-96 -- Added a splurge to skip visiting gamemasters, particularly G_M and Susa, who would not enjoy being unclaimed nor emptied out for that matter.";
"THX 05-May-97 --  Made the cemetery destroy common rpg items on entry if the gm_lag is below 9 second (low).";
"Profane 16-MAY-97 2242PDT - fork destroy, so that it happens after the moveto task is done.";
"THX1138 (#105941) - Mon Jan  4, 1999 - Replaced the forked destroy with a queue of incoming objects that _may_ be killable.  The next object arriving will nuke it if the lag isn't too high.";
.

@verb #1131:"look_self" this none this
@program #1131:look_self
desc = this:description();
if (desc)
  player:tell_lines(desc);
else
  player:tell("You see nothing special.");
endif
.

"***finished***