From 0bf05ebd90845356068df9ae1e80f8b2111ff352 Mon Sep 17 00:00:00 2001 From: "p.kosyh" Date: Mon, 12 Jul 2010 08:20:41 +0000 Subject: [PATCH] disp in gui mode only, enter/entered in main --- debian/changelog | 2 ++ stead/goto.lua | 3 +++ stead/object.lua | 10 ++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 41e2d6c..ca913e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ instead (1.2.0) unstable; urgency=low * visited() added; * live() added; * nameof() added; + * goback() added; + * disp attribute added; * improved debugger; * save vars in _G; * no duplicated games while looking gamespaths; diff --git a/stead/goto.lua b/stead/goto.lua index f4fa522..25a8765 100644 --- a/stead/goto.lua +++ b/stead/goto.lua @@ -204,6 +204,9 @@ end) player = stead.inherit(player, function(v) v.look = function(s) + if game._time == 0 then + return stead.goto(here(), false, false, true); + end NEED_SCENE = true end return v diff --git a/stead/object.lua b/stead/object.lua index 981e959..a03d3db 100644 --- a/stead/object.lua +++ b/stead/object.lua @@ -169,7 +169,10 @@ function list_str(self) for i,o in opairs(self) do o = ref(o); if isObject(o) and not isDisabled(o) then - vv = call(o, 'disp'); + vv = nil + if game.gui then + vv = call(o, 'disp'); + end if type(vv) ~= 'string' then vv = call(o, 'nam'); end @@ -191,7 +194,10 @@ function obj_str(self) for i,o in opairs(self.obj) do o = ref(o); if isObject(o) and not isDisabled(o) then - vv = call(o, 'disp'); + vv = nil + if game.gui then + vv = call(o, 'disp'); + end if type(vv) ~= 'string' then vv = call(o, 'nam'); end