para module, no ACTION_TEXT while goto from life

This commit is contained in:
p.kosyh 2010-06-22 10:03:24 +00:00
parent bd2c6149c0
commit be1b9ff311
5 changed files with 13 additions and 1 deletions

View file

@ -17,6 +17,7 @@ install:
$(INSTALL) prefs.lua $(STEADPATH)/prefs.lua
$(INSTALL) snapshot.lua $(STEADPATH)/snapshot.lua
$(INSTALL) object.lua $(STEADPATH)/object.lua
$(INSTALL) para.lua $(STEADPATH)/para.lua
uninstall:
$(RM) $(STEADPATH)/stead.lua

View file

@ -14,3 +14,4 @@ install:
copy prefs.lua ..\bin\stead
copy snapshot.lua ..\bin\stead
copy object.lua ..\bin\stead
copy para.lua ..\bin\stead

View file

@ -94,5 +94,8 @@ go = hook(go, function(f, ...)
if type(r) == 'string' then
pr (r)
end
if stead.in_life_call then
ACTION_TEXT = nil
end
return r,v
end)

View file

@ -166,7 +166,7 @@ fmt = function(...)
end
for i=1,stead.table.maxn(arg) do
if type(arg[i]) == 'string' then
local s = stead.string.gsub(arg[i],'\t', ' '):gsub('[\n]+', ' '):gsub('%^','\n'):gsub('~', txtnb(' '));
local s = stead.string.gsub(arg[i],'\t', ' '):gsub('[\n]+', ' '):gsub('%^','\n');
res = stead.par('', res, s);
end
end

7
stead/para.lua Normal file
View file

@ -0,0 +1,7 @@
stead.fmt = hook(stead.fmt, function(f, ...)
local r = f(unpack(arg))
if type(r) == 'string' then
r = r:gsub('~', txtnb(' '));
end
return r;
end)