很多全局变量名改为大写

This commit is contained in:
MrZ626
2020-10-19 01:42:27 +08:00
parent 016efe011f
commit 60c656fd38
45 changed files with 595 additions and 596 deletions

View File

@@ -71,14 +71,14 @@ function FILE.loadData()
if s then
setfenv(s,{})
local S=s()
addToTable(S,stat)
addToTable(S,STAT)
end
end
end
function FILE.saveData()
local F=files.data
F:open("w")
local _,mes=F:write(dumpTable(stat))
local _,mes=F:write(dumpTable(STAT))
F:flush()F:close()
if not _ then
LOG.print(text.statSavingError..(mes or"unknown error"),color.red)
@@ -96,14 +96,14 @@ function FILE.loadSetting()
F:close()
if s then
setfenv(s,{})
addToTable(s(),setting)
addToTable(s(),SETTING)
end
end
end
function FILE.saveSetting()
local F=files.setting
F:open("w")
local _,mes=F:write(dumpTable(setting))
local _,mes=F:write(dumpTable(SETTING))
F:flush()F:close()
if _ then LOG.print(text.settingSaved,color.green)
else LOG.print(text.settingSavingError..(mes or"unknown error"),color.red)