Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!solaris.cc.vt.edu!news.vt.edu!feed2.onemain.com!feed1.onemain.com!cyclone2.usenetserver.com!usenetserver.com!portc03.blue.aol.com!uunet!dca.uu.net!ash.uu.net!world!buzzard
From: buzzard@world.std.com (Sean T Barrett)
Subject: Re: [Inform] Nice simple straightforward question
Message-ID: <GHrp4B.2D4@world.std.com>
Date: Wed, 8 Aug 2001 21:02:34 GMT
References: <326rk9.007.ln@127.0.0.1> <slrn9n2i69.87.cerutti@fiad06.norwich.edu> <d0qrk9.dj1.ln@127.0.0.1>
Organization: The World Public Access UNIX, Brookline, MA
Lines: 27
Xref: news.duke.edu rec.arts.int-fiction:90875

In article <d0qrk9.dj1.ln@127.0.0.1>, David Given <dg@pearl.tao.co.uk> wrote:
>It's a bit ugly, isn't it? I successfully put the item down in the chair,
>and the floor quietly whisks it away when I'm not looking.

Well, yes. Inform isn't consistent enough to do it right. I mean, you could
move the player to the room, do <Drop noun>, and then move the player back...
but that's REALLY ugly.

Using an after has the advantage that it allows all the before code to run
first and do special processing, e.g. if you had an undroppable object it
would still work. Trying to hook react_before will prevent that.

But hooking after has the disadvantage that it occurs after the "physics"
have already been run. However, you know exactly what those physics are,
since they're defined in DropSub, so while it's a hack, I think it's a
trustworthy hack (unless you have some other object with an after for ##Drop
which has some significant effect but returns FALSE to continue with normal
processing).

As noted in another thread, a more ideal solution would involve a library
that had a 'before', 'do-action', 'after', and 'final print', each of which
could be intercepted and stop the whole process early. But that's not how
Inform's library works (and in practice it's plausible to want to break it
down with even more granularity, and yet none of this necessarily copes
with interactions between overrides at different stages).

SeanB
