Bug fixed, splitted in 2 mods.

This commit is contained in:
A.C.M 2019-07-21 13:32:56 +02:00
parent 238c4362c9
commit 5658011d76
12 changed files with 43 additions and 20 deletions

@ -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.")

@ -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,

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 115 KiB

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB

0
modpack.txt Normal file

@ -0,0 +1,3 @@
default
mesecons_stealthnode
moretores?

@ -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

@ -0,0 +1,4 @@
name = register_stealthnode
description = A helpmod to register Ghoststones.
depends = default, mesecons_stealthnode
optional_depends = moreores