Fix scripts/forum-dwarves.lua to work with 0.40.13

develop
Mchl 2014-09-27 01:36:12 +02:00
parent b0b6a82c92
commit 7bf46b1584
1 changed files with 7 additions and 6 deletions

@ -1,7 +1,7 @@
-- scripts/forum-dwarves.lua
-- Save a copy of a text screen for the DF forums. Use 'forumdwarves help' for more details.
-- original author: Caldfir
-- edited by expwnent
-- edited by expwnent, Mchl
local args = {...}
@ -101,19 +101,20 @@ end
if flerb == 'textviewer' then
print(scrn)
printall(scrn)
local lines = scrn.formatted_text
local lines = scrn.src_text
local line = ""
if lines ~= nil then
local log = io.open('forumdwarves.txt', 'a')
log:write("[color=silver]")
log:write(scrn.title)
for n,x in ipairs(lines) do
print(x)
printall(x)
print(x.text)
printall(x.text)
if (x ~= nil) and (x.text ~= nil) then
log:write(format_for_forum(x.text), ' ')
print(x.value)
printall(x.value)
if (x ~= nil) and (x.value ~= nil) then
log:write(format_for_forum(x.value), ' ')
--log:write(x[0],'\n')
end
end