Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!stern.fokus.gmd.de!zib-berlin.de!Germany.EU.net!wizard.pn.com!mozo.cc.purdue.edu!news.cs.indiana.edu!shulick@guava.ucs.indiana.edu
From: "Sam Hulick" <shulick@guava.ucs.indiana.edu>
Subject: Inform: RemoveSub replacement
Message-ID: <1995Sep30.232720.23807@news.cs.indiana.edu>
Organization: Vallen Software
Date: Sat, 30 Sep 1995 23:27:14 -0500
Lines: 37


I'm sure Graham has plans to fix this, but for now, here is the
ReplaceSub fix for the buggy 5/11 ReplaceSub.  It fixes a very icky
problem!:

>get lever
That seems to be a part of the water pump.

>get lever from pump
Removed.

---cut here---
[ RemoveSub i;

  i=parent(noun);
  if (i has container && i hasnt open) return L__M(##Remove,1);
  if (i~=second) return L__M(##Remove,2);
  if (i hasnt container && i hasnt supporter)
  {
     if (i has animate) { print "That seems to belong to ", (the) i;
     "."; }
     if (i has transparent) { print "That seems to be a part of ", (the) i;
     "."; }
  }
  if (RTakeSub(second)~=0) rtrue;
  action=##Take;   if (AfterRoutines()==1) rtrue;
  action=##Remove; if (AfterRoutines()==1) rtrue;

  if (keep_silent==1) rtrue;
  return L__M(##Remove,4);
];

-- 
--- Sam Hulick ------------- shulick@indiana.edu ---------------------
Systems Consultant        | Homepage:
Indiana College Placement |    http://copper.ucs.indiana.edu/~shulick/
  and Assessment Center   | PGP public key available on request
