Add comment and remove empty lines

This commit is contained in:
stujones11 2017-03-18 18:04:10 +00:00
parent 701215c22f
commit 2b840fbe38

@ -18,14 +18,12 @@ if input then
input:close() input:close()
input = nil input = nil
end end
for name, _ in pairs(armor.config) do for name, _ in pairs(armor.config) do
local global = "ARMOR_"..name:upper() local global = "ARMOR_"..name:upper()
if minetest.global_exists(global) then if minetest.global_exists(global) then
armor.config[name] = _G[global] armor.config[name] = _G[global]
end end
end end
if minetest.global_exists("ARMOR_MATERIALS") then if minetest.global_exists("ARMOR_MATERIALS") then
armor.materials = table.copy(ARMOR_MATERIALS) armor.materials = table.copy(ARMOR_MATERIALS)
end end
@ -33,6 +31,8 @@ if minetest.global_exists("ARMOR_FIRE_NODES") then
armor.fire_nodes = table.copy(ARMOR_FIRE_NODES) armor.fire_nodes = table.copy(ARMOR_FIRE_NODES)
end end
-- Load Configuration
for name, config in pairs(armor.config) do for name, config in pairs(armor.config) do
local setting = minetest.setting_get("armor_"..name) local setting = minetest.setting_get("armor_"..name)
if type(config) == "number" then if type(config) == "number" then
@ -44,7 +44,6 @@ for name, config in pairs(armor.config) do
armor.config[name] = setting armor.config[name] = setting
end end
end end
for material, _ in pairs(armor.materials) do for material, _ in pairs(armor.materials) do
local key = "material_"..material local key = "material_"..material
if armor.config[key] == false then if armor.config[key] == false then