From 8d9f51de352c326f65d98ab4111148ae3984f8b3 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Sun, 28 May 2023 08:45:39 -0700 Subject: [PATCH] handler patch I should have done this in a branch lol --- worldeditadditions_core/init.lua | 4 +--- worldeditadditions_core/utils/setting_handler.lua | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/worldeditadditions_core/init.lua b/worldeditadditions_core/init.lua index 8338da1..454ad44 100644 --- a/worldeditadditions_core/init.lua +++ b/worldeditadditions_core/init.lua @@ -27,8 +27,6 @@ wea_c.EventEmitter = dofile(modpath.."/utils/EventEmitter.lua") wea_c.Set = dofile(wea_c.modpath.."/utils/set.lua") -wea_c.setting_handler = dofile(wea_c.modpath.."/utils/setting_handler.lua") - wea_c.Vector3 = dofile(wea_c.modpath.."/utils/vector3.lua") wea_c.Mesh, wea_c.Face = dofile(wea_c.modpath.."/utils/mesh.lua") @@ -61,7 +59,7 @@ dofile(wea_c.modpath.."/utils/player.lua") -- Player info functions - +wea_c.setting_handler = dofile(wea_c.modpath.."/utils/setting_handler.lua") -- AFTER parser wea_c.pos = dofile(modpath.."/core/pos.lua") -- AFTER EventEmitter wea_c.register_command = dofile(modpath.."/core/register_command.lua") diff --git a/worldeditadditions_core/utils/setting_handler.lua b/worldeditadditions_core/utils/setting_handler.lua index e126c2d..5265c97 100644 --- a/worldeditadditions_core/utils/setting_handler.lua +++ b/worldeditadditions_core/utils/setting_handler.lua @@ -16,7 +16,8 @@ setting_handler.read = function() local file, err = io.open(path .. "/settings.conf", "rb") if err then return false end -- Split by newline - local settings = wea_c.split(file.read(),"[\n\r]+") + -- local settings = wea_c.split(file:read(),"[\n\r]+") + file:close() end --- Write setting to world settings