Rename unstring to parse

This commit is contained in:
NullBite 2023-06-21 15:18:55 -04:00
parent cc084d355b
commit 9e64a077e1
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -96,7 +96,9 @@ do
buffer[#buffer + 1] = '"???' .. _type .. '???"'
end
end
--- Dumps object as UNSAFE json, i stole this from stackoverflow so i could use json.tool to format it so it's easier to read
--- Dumps object as UNSAFE json, i stole this from stackoverflow so i could
-- use json.tool to format it so it's easier to read
-- TL;DR, do NOT use this as an actual JSON implementation
function dumpJSON(obj)
if obj == nil then return "null" else
local buffer = {}
@ -131,7 +133,7 @@ function splitstring (inputstr, sep)
end
---@param input string
function unstring(input)
function parse(input)
if input=="nil" then
return nil
elseif input == "true" or input == "false" then
@ -418,7 +420,7 @@ do
savedData=data.loadAll()
end
skin_state=mergeTable(
map(unstring,data.loadAll()),
map(parse,data.loadAll()),
defaults)
else
skin_state=defaults