goto form exit
This commit is contained in:
parent
22c533ea42
commit
0f538b8238
|
@ -27,7 +27,7 @@ go = function (self, where, back)
|
||||||
error ("Do not use goto from left/entered action! Use exit/enter action instead:" .. self.where);
|
error ("Do not use goto from left/entered action! Use exit/enter action instead:" .. self.where);
|
||||||
end
|
end
|
||||||
|
|
||||||
local v, r;
|
local v, r, jump;
|
||||||
|
|
||||||
if not isVroom(ref(where)) and not stead.in_exit_call then
|
if not isVroom(ref(where)) and not stead.in_exit_call then
|
||||||
stead.in_exit_call = true -- to break recurse
|
stead.in_exit_call = true -- to break recurse
|
||||||
|
@ -36,6 +36,10 @@ go = function (self, where, back)
|
||||||
if r == false then
|
if r == false then
|
||||||
return v, ret(r)
|
return v, ret(r)
|
||||||
end
|
end
|
||||||
|
if self.where ~= was then
|
||||||
|
where = deref(self.where) -- jump
|
||||||
|
jump = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local res = v;
|
local res = v;
|
||||||
|
@ -45,7 +49,7 @@ go = function (self, where, back)
|
||||||
self.where = deref(where);
|
self.where = deref(where);
|
||||||
end
|
end
|
||||||
|
|
||||||
if not back or not isDialog(ref(was)) or isDialog(ref(where)) then
|
if not jump and (not back or not isDialog(ref(was)) or isDialog(ref(where))) then
|
||||||
v, r = call(ref(where), 'enter', deref(was));
|
v, r = call(ref(where), 'enter', deref(was));
|
||||||
if r == false then
|
if r == false then
|
||||||
self.where = was;
|
self.where = was;
|
||||||
|
|
Loading…
Reference in a new issue