Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- resources/Main.lua
- +++ resources/Main.indent.lua
- @@ -30,13 +30,13 @@ function main(args)
- local configuration_options = manager:get("configuration_options")
- -- Setup mod table
- logger:lua(name .. " | " .. workshop)
- - r = concat(r, "--" .. name)
- - r = concat(r, "[\"" .. workshop .. "\"] = {enabled = true,")
- + r = concat(r, "\t--" .. name)
- + r = concat(r, "\t[\"" .. workshop .. "\"] = {enabled = true,")
- -- We have config options. Parse them.
- if (configuration_options ~= nil) then
- -- Is this table actually valid?
- if (isTable(configuration_options)) then
- - r = concat(r, "configuration_options = {")
- + r = concat(r, "\t\tconfiguration_options = {")
- for k, v in pairs(configuration_options) do
- -- Check for missing elements.
- if (contains(v, "name") ~= true or contains(v, "default") ~= true) then
- @@ -71,7 +71,7 @@ function main(args)
- if (string.match(o_name, "\"")) then
- o_name = factory:replace(o_name, "\"", "\\\"")
- end
- - r = concat2(r, "[\"" .. o_name .. "\"] = ")
- + r = concat2(r, "\t\t\t[\"" .. o_name .. "\"] = ")
- -- Check variable type. See Utils.lua.
- if (isString(o_default)) then
- r = concat(r, "\"" .. o_default .. "\",")
- @@ -81,15 +81,15 @@ function main(args)
- end
- end
- end
- - r = concat(r, "},")
- + r = concat(r, "\t\t},")
- else
- logger:lua("Invalid configuration_options value in " .. name)
- end
- else
- -- No options. Make a blank table.
- - r = concat(r, "configuration_options = {},")
- + r = concat(r, "\t\tconfiguration_options = {},")
- end
- - r = concat(r, "},")
- + r = concat(r, "\t},")
- else
- logger:lua("modinfo.lua for " .. value .. " is invalid.")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement