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 config = Settings(minetest.get_modpath("carpets").."/settings.txt")
|
||||||
|
|
||||||
local carpet_proto = {
|
local carpet_proto = {
|
||||||
@ -19,7 +17,7 @@ if config:get_bool("WoolFeeling") then
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function carpet.register(recipe, def)
|
function carpets.register(recipe, def)
|
||||||
local node = {}
|
local node = {}
|
||||||
|
|
||||||
if def then
|
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")
|
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
|
-- disable carpets from loaded modules but not defined in dependency
|
||||||
if depmod:check_depmod(name) == false then
|
if depmod:check_depmod(name) == false then
|
||||||
return false
|
return false
|
||||||
@ -40,7 +40,7 @@ end
|
|||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
-- main execution
|
-- main execution
|
||||||
for name, def in pairs(minetest.registered_nodes) do
|
for name, def in pairs(minetest.registered_nodes) do
|
||||||
if carpet.enabledfilter(name, def) == true then
|
if enabledfilter(name, def) then
|
||||||
carpet.register(name)
|
carpets.register(name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user