clean_up

lfun
LFUN
  int clean_up (int ref)

DESCRIPTION
  Clean up (selfdestruct) the object if its no longer needed (called
  mainly by the gamedriver).

  Arguments:
    ref < 0: the objects environment likes this object to clean up.
        = 0: this is a clone, or blueprint with replaced program.
        = 1: this is a swapped and/or unreferenced blueprint.
        > 1: this is a non-swapped blueprint in use.

  Result:
    0: if the object should never be considered for clean up again
       (for example it just destructed itself).
    1: if the object continues to exist, but wants to be asked later
       again.

  The actual handling depends heavily on the actual object the
  function is implemented in.
  /std/base checks the value of property P_CLEAN_UP: if it is
    zero, the object may not clean up (but try again later).
  /std/thing/moving: Objects carried by interactive players, carried
    or used blueprints, or blueprints with contents are not cleaned
    up (but may try again later).

IMPLEMENTED
  /std/base, /std/thing, /std/thing/moving

SEE ALSO
  base(S), thing(S), room(S)