goin/out added

This commit is contained in:
p.kosyh 2010-07-17 13:47:03 +00:00
parent 098f0c9007
commit a341f3713c
2 changed files with 13 additions and 3 deletions

1
debian/changelog vendored
View file

@ -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;

View file

@ -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