fix in inv and ways

This commit is contained in:
p.kosyh@gmail.com 2010-11-04 06:32:43 +00:00
parent dceb9fd804
commit 83103a415d
2 changed files with 6 additions and 4 deletions

View file

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

View file

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