mirror of
https://github.com/acmgit/mesecons_stealthnode.git
synced 2024-11-25 00:33:46 +01:00
Bug fixed, splitted in 2 mods.
This commit is contained in:
parent
238c4362c9
commit
5658011d76
17
mesecons_stealthnode/init.lua
Normal file
17
mesecons_stealthnode/init.lua
Normal file
@ -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 = {}
|
local newgroup = {}
|
||||||
newgroup = stealthnode.table_clone(minetest.registered_nodes[modname .. ":" .. node].groups)
|
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,
|
description="Stealthnode " .. minetest.registered_nodes[modname .. ":" .. node].description,
|
||||||
tiles = tile,
|
tiles = tile,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
@ -43,7 +43,7 @@ function stealthnode.register_stealthnode(modname, node)
|
|||||||
on_blast = mesecon.on_blastnode,
|
on_blast = mesecon.on_blastnode,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mesecons_stealthnode:" .. modname .. "_" .. node .. "_active", {
|
minetest.register_node(":mesecons_stealthnode:" .. modname .. "_" .. node .. "_active", {
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
pointable = false,
|
pointable = false,
|
||||||
walkable = 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
modpack.txt
Normal file
3
register_stealthnodes/depends.txt
Normal file
3
register_stealthnodes/depends.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
default
|
||||||
|
mesecons_stealthnode
|
||||||
|
moretores?
|
@ -1,18 +1,14 @@
|
|||||||
--[[
|
--[[
|
||||||
********************************************
|
********************************************
|
||||||
*** Mesecons Stealthnodes **
|
** **
|
||||||
|
** Stealthnode-Register **
|
||||||
|
** **
|
||||||
|
** Helpmod for Stealthnode to **
|
||||||
|
** easy Register new Stealthnodes **
|
||||||
|
** **
|
||||||
********************************************
|
********************************************
|
||||||
|
|
||||||
A mod for Minetest to register various Ghoststones.
|
|
||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
stealthnode = {}
|
|
||||||
stealthnode.version = "1"
|
|
||||||
stealthnode.revision = "0"
|
|
||||||
|
|
||||||
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/register.lua")
|
|
||||||
|
|
||||||
local snodes = {
|
local snodes = {
|
||||||
{"default", "cobble"},
|
{"default", "cobble"},
|
||||||
{"default", "stone"},
|
{"default", "stone"},
|
||||||
@ -55,13 +51,16 @@ local snodes = {
|
|||||||
{"default", "acacia_wood"},
|
{"default", "acacia_wood"},
|
||||||
{"default", "acacia_tree"},
|
{"default", "acacia_tree"},
|
||||||
|
|
||||||
|
{"moreores", "mithril_block"},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local register = stealthnode.register_stealthnode
|
local register = stealthnode.register_stealthnode
|
||||||
for i,value in pairs(snodes) do
|
for i,value in pairs(snodes) do
|
||||||
|
if(minetest.registered_nodes[value[1]..":"..value[2]]) then
|
||||||
register(value[1], value[2])
|
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
|
end -- for i,value
|
||||||
|
|
||||||
print("[MOD] " .. minetest.get_current_modname() .. " loaded.")
|
|
||||||
minetest.log("info", "[MOD] " .. minetest.get_current_modname() .. " loaded.")
|
|
4
register_stealthnodes/mod.conf
Normal file
4
register_stealthnodes/mod.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
name = register_stealthnode
|
||||||
|
description = A helpmod to register Ghoststones.
|
||||||
|
depends = default, mesecons_stealthnode
|
||||||
|
optional_depends = moreores
|
Loading…
Reference in New Issue
Block a user