From 83103a415dd5c81b56933f165959180f06bd0a27 Mon Sep 17 00:00:00 2001
From: "p.kosyh@gmail.com"
Date: Thu, 4 Nov 2010 06:32:43 +0000
Subject: [PATCH] fix in inv and ways
---
stead/gui.lua | 6 ++++--
stead/stead.lua | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/stead/gui.lua b/stead/gui.lua
index 602f17c..9c9f621 100644
--- a/stead/gui.lua
+++ b/stead/gui.lua
@@ -136,7 +136,8 @@ iface.ways = function(self, str)
end;
function get_inv(horiz)
- local str = me():inv();
+ RAW_TEXT = true
+ local str = iface:cmd("inv");
if str then
str = stead.string.gsub(str, '\n$','');
if not horiz then
@@ -152,7 +153,8 @@ end
instead.get_inv = get_inv;
function get_ways()
- local str = me():ways();
+ RAW_TEXT = true
+ local str = iface:cmd("way");
if str and str ~= '' then
str = stead.string.gsub(str, '\n$','');
str = stead.string.gsub(str, '\\?[\\'.. stead.delim ..']', { [stead.delim] = game.gui.ways_delim });
diff --git a/stead/stead.lua b/stead/stead.lua
index 61bde89..d689ca4 100644
--- a/stead/stead.lua
+++ b/stead/stead.lua
@@ -2019,7 +2019,6 @@ iface = {
stead.state = false; -- changed state (main screen)
local a = { };
local cmd;
- RAW_TEXT = nil
PLAYER_MOVED = nil
cmd,a = stead.getcmd(inp);
if cmd == '' then cmd = 'look' end
@@ -2078,6 +2077,7 @@ iface = {
end
if v == false then
+ RAW_TEXT = nil
return stead.cat(r, '\n'), false;
end
@@ -2098,7 +2098,7 @@ iface = {
if stead.state then
game._lastdisp = vv
end
-
+ RAW_TEXT = nil
if vv == nil then -- nil is error
return ''
end