mirror of
https://github.com/minetest-mods/carpets.git
synced 2024-12-30 00:47:28 +01:00
adjust global namespaces carpet vs. carpets
This commit is contained in:
parent
efe8db3717
commit
556008b68f
@ -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
init.lua
6
init.lua
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user