mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2024-12-22 16:10:18 +01:00
register white octagon glass only if unified dyes available
This commit is contained in:
parent
5102ad7a39
commit
211dcff770
11
nodes.lua
11
nodes.lua
@ -1,3 +1,5 @@
|
|||||||
|
local has_unifieddyes_mod = minetest.get_modpath("unifieddyes")
|
||||||
|
local has_moreblocks_mod = minetest.get_modpath("moreblocks")
|
||||||
|
|
||||||
--nodes
|
--nodes
|
||||||
|
|
||||||
@ -402,7 +404,8 @@ minetest.register_node("scifi_nodes:octppl", {
|
|||||||
sounds = scifi_nodes.node_sound_glass_defaults(),
|
sounds = scifi_nodes.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("scifi_nodes:octwht", {
|
if has_unifieddyes_mod then
|
||||||
|
minetest.register_node("scifi_nodes:octwht", {
|
||||||
description = "Octagon Glass",
|
description = "Octagon Glass",
|
||||||
sunlight_propagates = false,
|
sunlight_propagates = false,
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
@ -422,7 +425,8 @@ minetest.register_node("scifi_nodes:octwht", {
|
|||||||
sounds = scifi_nodes.node_sound_glass_defaults(),
|
sounds = scifi_nodes.node_sound_glass_defaults(),
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
on_dig = unifieddyes.on_dig
|
on_dig = unifieddyes.on_dig
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node("scifi_nodes:tower", {
|
minetest.register_node("scifi_nodes:tower", {
|
||||||
description = "Wind tower",
|
description = "Wind tower",
|
||||||
@ -541,9 +545,6 @@ local f = assert(io.open(minetest.get_modpath("scifi_nodes") .. "/nodes.json", "
|
|||||||
local nodes = assert(minetest.parse_json(f:read("*all")))
|
local nodes = assert(minetest.parse_json(f:read("*all")))
|
||||||
f:close()
|
f:close()
|
||||||
|
|
||||||
local has_unifieddyes_mod = minetest.get_modpath("unifieddyes")
|
|
||||||
local has_moreblocks_mod = minetest.get_modpath("moreblocks")
|
|
||||||
|
|
||||||
-- register all nodes
|
-- register all nodes
|
||||||
for name, def in pairs(nodes) do
|
for name, def in pairs(nodes) do
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user