adjust global namespaces carpet vs. carpets

This commit is contained in:
Alexander Weber 2016-11-05 01:48:07 +01:00
parent efe8db3717
commit 556008b68f
2 changed files with 4 additions and 6 deletions

@ -1,5 +1,3 @@
carpet = {}
local config = Settings(minetest.get_modpath("carpets").."/settings.txt")
local carpet_proto = {
@ -19,7 +17,7 @@ if config:get_bool("WoolFeeling") then
end
function carpet.register(recipe, def)
function carpets.register(recipe, def)
local node = {}
if def then

@ -6,7 +6,7 @@ dofile(minetest.get_modpath("carpets").."/modutils.lua")
depmod = carpets.modutils.get_depmod("carpets")
function carpet.enabledfilter(name, def)
local function enabledfilter(name, def)
-- disable carpets from loaded modules but not defined in dependency
if depmod:check_depmod(name) == false then
return false
@ -40,7 +40,7 @@ end
------------------------------------------------
-- main execution
for name, def in pairs(minetest.registered_nodes) do
if carpet.enabledfilter(name, def) == true then
carpet.register(name)
if enabledfilter(name, def) then
carpets.register(name)
end
end