mirror of
https://github.com/minetest-mods/carpets.git
synced 2025-01-02 02:07:31 +01:00
modutils.lua updated, whitespace-fixes
This commit is contained in:
parent
a579c1b6b9
commit
c058a4589e
@ -12,7 +12,7 @@ function modutils.get_depmod(modname)
|
||||
|
||||
-- Definition of returning object methods
|
||||
function depmod.check_depmod(checknode)
|
||||
-- check if the node (checknode) is from dependent module
|
||||
-- check if the node (checknode) is from dependent module
|
||||
local delimpos = string.find(checknode, ":")
|
||||
if delimpos then
|
||||
local checkmodname = string.sub(checknode, 1, delimpos - 1)
|
||||
@ -31,7 +31,11 @@ function modutils.get_depmod(modname)
|
||||
-- local variable definition
|
||||
local depentry = {} -- Entry in deplist
|
||||
local depmodname -- temp value
|
||||
local dependsfile = io.open(minetest.get_modpath(modname).."/depends.txt")
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
if not modpath then
|
||||
return nil -- module not found
|
||||
end
|
||||
local dependsfile = io.open(modpath.."/depends.txt")
|
||||
if dependsfile then
|
||||
for dependsline in dependsfile:lines() do
|
||||
if string.sub(dependsline, -1) == "?" then
|
||||
|
Loading…
Reference in New Issue
Block a user