para module fix
This commit is contained in:
parent
d065df3d2f
commit
22c533ea42
|
@ -1,7 +1,15 @@
|
|||
para_mod = obj {
|
||||
nam = 'para',
|
||||
ini = function(s)
|
||||
s.time = stead.time()
|
||||
end
|
||||
}
|
||||
|
||||
stead.fmt = stead.hook(stead.fmt, function(f, ...)
|
||||
local r = f(unpack(arg))
|
||||
if type(r) == 'string' and stead.tick then
|
||||
r = r:gsub('\n([^\n])', '<¶>%1'):gsub('<¶>', '\n'..txtnb(' '));
|
||||
if type(r) == 'string' and stead.time() > para_mod.time then
|
||||
para_mod.time = stead.time()
|
||||
r = r:gsub('\n([^\n])', '<¶>%1'):gsub('<¶>[ \t]*', '\n'..txtnb(' '));
|
||||
r = r:gsub('^',txtnb(' '))
|
||||
end
|
||||
return r;
|
||||
|
|
|
@ -1762,7 +1762,6 @@ iface = {
|
|||
r,v = me():action(cmd, unpack(a));
|
||||
st = true;
|
||||
end
|
||||
stead.tick = st
|
||||
-- here r is action result, v - ret code value
|
||||
-- st -- game state changed
|
||||
if st and r == nil and v == true then -- we do nothing
|
||||
|
|
Loading…
Reference in a new issue