mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-25 18:30:23 +01:00
close the file handle after checking if the config file exists, add a comment
This commit is contained in:
parent
01e76e1ea7
commit
177966013a
2
init.lua
2
init.lua
@ -17,8 +17,10 @@ pipeworks.modpath = minetest.get_modpath("pipeworks")
|
||||
|
||||
dofile(pipeworks.modpath.."/default_settings.txt")
|
||||
|
||||
-- Read the external config file if it exists.
|
||||
if io.open(pipeworks.worldpath.."/pipeworks_settings.txt","r") then
|
||||
dofile(pipeworks.worldpath.."/pipeworks_settings.txt")
|
||||
io.close()
|
||||
end
|
||||
|
||||
-- Random variables
|
||||
|
Loading…
Reference in New Issue
Block a user