diff --git a/LICENSE b/mesecons_stealthnode/LICENSE similarity index 100% rename from LICENSE rename to mesecons_stealthnode/LICENSE diff --git a/README.md b/mesecons_stealthnode/README.md similarity index 100% rename from README.md rename to mesecons_stealthnode/README.md diff --git a/depends.txt b/mesecons_stealthnode/depends.txt similarity index 100% rename from depends.txt rename to mesecons_stealthnode/depends.txt diff --git a/mesecons_stealthnode/init.lua b/mesecons_stealthnode/init.lua new file mode 100644 index 0000000..3a014f7 --- /dev/null +++ b/mesecons_stealthnode/init.lua @@ -0,0 +1,17 @@ +--[[ + ******************************************** + *** Mesecons Stealthnodes ** + ******************************************** + + A mod for Minetest to register various Ghoststones. + +]]-- + +stealthnode = {} +stealthnode.version = "1" +stealthnode.revision = "3" + +dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/register.lua") + +print("[MOD] " .. minetest.get_current_modname() .. " loaded.") +minetest.log("info", "[MOD] " .. minetest.get_current_modname() .. " loaded.") diff --git a/mod.conf b/mesecons_stealthnode/mod.conf similarity index 100% rename from mod.conf rename to mesecons_stealthnode/mod.conf diff --git a/register.lua b/mesecons_stealthnode/register.lua similarity index 94% rename from register.lua rename to mesecons_stealthnode/register.lua index 02769b5..6c48990 100644 --- a/register.lua +++ b/mesecons_stealthnode/register.lua @@ -28,7 +28,7 @@ function stealthnode.register_stealthnode(modname, node) local newgroup = {} newgroup = stealthnode.table_clone(minetest.registered_nodes[modname .. ":" .. node].groups) - minetest.register_node("mesecons_stealthnode:" .. modname .. "_" .. node, { + minetest.register_node(":mesecons_stealthnode:" .. modname .. "_" .. node, { description="Stealthnode " .. minetest.registered_nodes[modname .. ":" .. node].description, tiles = tile, is_ground_content = false, @@ -43,7 +43,7 @@ function stealthnode.register_stealthnode(modname, node) on_blast = mesecon.on_blastnode, }) - minetest.register_node("mesecons_stealthnode:" .. modname .. "_" .. node .. "_active", { + minetest.register_node(":mesecons_stealthnode:" .. modname .. "_" .. node .. "_active", { drawtype = "airlike", pointable = false, walkable = false, diff --git a/scrshot_1.jpg b/mesecons_stealthnode/scrshot_1.jpg similarity index 100% rename from scrshot_1.jpg rename to mesecons_stealthnode/scrshot_1.jpg diff --git a/scrshot_2.jpg b/mesecons_stealthnode/scrshot_2.jpg similarity index 100% rename from scrshot_2.jpg rename to mesecons_stealthnode/scrshot_2.jpg diff --git a/modpack.txt b/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/register_stealthnodes/depends.txt b/register_stealthnodes/depends.txt new file mode 100644 index 0000000..978516b --- /dev/null +++ b/register_stealthnodes/depends.txt @@ -0,0 +1,3 @@ +default +mesecons_stealthnode +moretores? diff --git a/init.lua b/register_stealthnodes/init.lua similarity index 66% rename from init.lua rename to register_stealthnodes/init.lua index dcf6330..a59f6f6 100644 --- a/init.lua +++ b/register_stealthnodes/init.lua @@ -1,18 +1,14 @@ --[[ - ******************************************** - *** Mesecons Stealthnodes ** - ******************************************** - - A mod for Minetest to register various Ghoststones. - + ******************************************** + ** ** + ** Stealthnode-Register ** + ** ** + ** Helpmod for Stealthnode to ** + ** easy Register new Stealthnodes ** + ** ** + ******************************************** ]]-- -stealthnode = {} -stealthnode.version = "1" -stealthnode.revision = "0" - -dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/register.lua") - local snodes = { {"default", "cobble"}, {"default", "stone"}, @@ -54,14 +50,17 @@ local snodes = { {"default", "acacia_wood"}, {"default", "acacia_tree"}, + + {"moreores", "mithril_block"}, } local register = stealthnode.register_stealthnode for i,value in pairs(snodes) do - register(value[1], value[2]) - -end - -print("[MOD] " .. minetest.get_current_modname() .. " loaded.") -minetest.log("info", "[MOD] " .. minetest.get_current_modname() .. " loaded.") + if(minetest.registered_nodes[value[1]..":"..value[2]]) then + register(value[1], value[2]) + else + minetest.log("info","[MOD]stealthnode: Node " .. value[1]..":"..value[2].." not found to register a Stealthnode.") + end -- if(mintest.registered_nodes + +end -- for i,value diff --git a/register_stealthnodes/mod.conf b/register_stealthnodes/mod.conf new file mode 100644 index 0000000..e471f18 --- /dev/null +++ b/register_stealthnodes/mod.conf @@ -0,0 +1,4 @@ +name = register_stealthnode +description = A helpmod to register Ghoststones. +depends = default, mesecons_stealthnode +optional_depends = moreores