From a341f3713c31e8c73c097ff49dd57ffd4eb85032 Mon Sep 17 00:00:00 2001 From: "p.kosyh" Date: Sat, 17 Jul 2010 13:47:03 +0000 Subject: [PATCH] goin/out added --- debian/changelog | 1 + stead/goto.lua | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 92c0ff0..9705e62 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,7 @@ instead (1.2.0) unstable; urgency=low * live() added; * nameof() added; * goback() added; + * goin()/out() added; * disp attribute added; * improved debugger; * save vars in _G; diff --git a/stead/goto.lua b/stead/goto.lua index 6a434ee..8bca1fb 100644 --- a/stead/goto.lua +++ b/stead/goto.lua @@ -127,10 +127,9 @@ end function back() if isDialog(here()) and not isDialog(from()) then - local r, v = me():goto(from(), true, true, false, true); - return r,v; + return stead.out(); end - return me():goto(from(), true); + return stead.goback(); end stead.back = back @@ -144,6 +143,16 @@ function goto(what, back, noenter, noexit, nodsc, ...) end stead.goto = goto +function goin(what) + return me():goto(what, false, false, true); +end +stead.goin = goin + +function out() + return me():goto(from(), true, true, false, true); +end +stead.out = out + game.ini = stead.hook(game.ini,function(f, ...) if isRoom(here()) then here().__visited = 1