plugins/data: fix version for gameinit (nw)

This commit is contained in:
cracyc 2018-01-15 09:09:13 -06:00
parent 7667013605
commit cc7ccbd9b5
3 changed files with 4 additions and 3 deletions

View File

@ -2,7 +2,7 @@ local dat = {}
local ver, info local ver, info
local datread = require("data/load_dat") local datread = require("data/load_dat")
datread, ver = datread.open("gameinit.dat", "# GAMEINIT.DAT") datread, ver = datread.open("gameinit.dat", "# .-GAMEINIT.DAT")
function dat.check(set, softlist) function dat.check(set, softlist)
if softlist or not datread then if softlist or not datread then

View File

@ -66,7 +66,8 @@ function datfile.open(file, vertag, fixupcb)
break break
end end
end end
else end
if not ver then
-- use file ctime for version -- use file ctime for version
ver = tostring(lfs.attributes(filepath, "change")) ver = tostring(lfs.attributes(filepath, "change"))
end end

View File

@ -140,7 +140,7 @@ function portname.startplugin()
file:write("msgid \"" .. def .."\"\nmsgstr \"" .. custom .. "\"\n\n") file:write("msgid \"" .. def .."\"\nmsgstr \"" .. custom .. "\"\n\n")
end end
file:close() file:close()
manager:machine():popmessage(_("Input port name file saved to ") .. ctrlrpath .. "/portname/" .. filename) manager:machine():popmessage(string.format(_("Input port name file saved to %s")), ctrlrpath .. "/portname/" .. filename)
end end
return false return false
end end