mirror of
https://gitlab.com/Oreolek/duel.git
synced 2024-06-30 13:55:10 +03:00
25 lines
496 B
Lua
25 lines
496 B
Lua
|
local std = stead
|
||
|
local filename = "game.log"
|
||
|
|
||
|
function writelog(s)
|
||
|
local f = io.open(filename, "a")
|
||
|
f:seek("end", 0)
|
||
|
f:write("\n", s, "\n")
|
||
|
return f:flush()
|
||
|
end
|
||
|
game.onwalk = function(f, inwalk)
|
||
|
local dsc = std.call(inwalk, 'dsc')
|
||
|
if dsc then
|
||
|
writelog(dsc)
|
||
|
end
|
||
|
local decor = std.call(inwalk, 'decor')
|
||
|
if decor then
|
||
|
writelog(decor)
|
||
|
end
|
||
|
return true
|
||
|
end
|
||
|
|
||
|
game.afteract = function(this, that)
|
||
|
writelog("Использование "..this.nam.." на "..that.nam)
|
||
|
end
|