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, ...)
|
stead.fmt = stead.hook(stead.fmt, function(f, ...)
|
||||||
local r = f(unpack(arg))
|
local r = f(unpack(arg))
|
||||||
if type(r) == 'string' and stead.tick then
|
if type(r) == 'string' and stead.time() > para_mod.time then
|
||||||
r = r:gsub('\n([^\n])', '<¶>%1'):gsub('<¶>', '\n'..txtnb(' '));
|
para_mod.time = stead.time()
|
||||||
|
r = r:gsub('\n([^\n])', '<¶>%1'):gsub('<¶>[ \t]*', '\n'..txtnb(' '));
|
||||||
r = r:gsub('^',txtnb(' '))
|
r = r:gsub('^',txtnb(' '))
|
||||||
end
|
end
|
||||||
return r;
|
return r;
|
||||||
|
|
|
@ -1762,7 +1762,6 @@ iface = {
|
||||||
r,v = me():action(cmd, unpack(a));
|
r,v = me():action(cmd, unpack(a));
|
||||||
st = true;
|
st = true;
|
||||||
end
|
end
|
||||||
stead.tick = st
|
|
||||||
-- here r is action result, v - ret code value
|
-- here r is action result, v - ret code value
|
||||||
-- st -- game state changed
|
-- st -- game state changed
|
||||||
if st and r == nil and v == true then -- we do nothing
|
if st and r == nil and v == true then -- we do nothing
|
||||||
|
|
Reference in a new issue