



If I'm on, let's say, a couch, in an Inform game, and I type
LEAVE NOUN, where NOUN can be anything in the room, the game replies "You get
off the couch." It should, should it not, reply something similar to, "You
aren't inside or atop ", (the) noun, "!"? I mean, it doesn't make sense to
try exiting from an object inside of which the player is NOT, right? I've added the third line below: Then add entry 4 to Exit in English.h: Also, a change to the "exit" verb's definition (I've added the third line
here):
About Patches
Issue L61017
LEAVE tries too hard
Submitted by: Andrew Merenbach
Appeared in: Library 6/10 or before
Fixed in: Library 6/11
Problem
Solution (by Andrew Merenbach and Joe Mason)
[ ExitSub p;
p=parent(player);
if (noun ~= nothing && noun ~= p) return L__M(##Exit,4,noun);
if (p==location || (location==thedark && p==real_location))
{ if ((location.out_to~=0)
|| (location==thedark && real_location.out_to~=0)) <<Go out_obj>>;
return L__M(##Exit,1);
}
if (p has container && p hasnt open)
return L__M(##Exit,2,p);
move player to parent(p);
if (AfterRoutines()==1) rtrue;
if (keep_silent==1) rtrue;
L__M(##Exit,3,p); LookSub(1);
];
Exit: switch(n)
{ 1: "But you aren't in anything at the moment.";
2: "You can't get out of the closed ", (name) x1, ".";
3: print "You get ";
if (x1 has supporter) print "off "; else print "out of ";
print_ret (the) x1, ".";
4: print "But you aren't ";
if (x1 has supporter) print "on "; else print "in ";
print_ret (the) x1, ".";
}
Verb 'exit' 'out' 'outside'
* -> Exit
* noun -> Exit;
Last updated 2 May 2008. The librarian in charge of this page is Roger Firth. Please email any comments, suggestions or corrections to roger@firthworks.com.