1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-09-27 13:50:19 +02:00

removed obsolete glowlight ABMs

This commit is contained in:
Vanessa Ezekowitz 2017-01-28 22:11:18 -05:00
parent 428729a43d
commit 1ce7d2b24d

View File

@ -9,67 +9,18 @@ local function N_(x) return x end
local colors = { N_("yellow"), N_("white") } local colors = { N_("yellow"), N_("white") }
for i in ipairs(colors) do for i in ipairs(colors) do
local color = colors[i] local color = colors[i]
local glowlight_nodebox = {
minetest.register_abm({
nodenames = { "homedecor:glowlight_thin_"..color },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.set_node(pos, {name = "homedecor:glowlight_quarter_"..color, param2 = 20})
end,
})
minetest.register_abm({
nodenames = { "homedecor:glowlight_thick_"..color },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.set_node(pos, {name = "homedecor:glowlight_half_"..color, param2 = 20})
end,
})
minetest.register_abm({
nodenames = { "homedecor:glowlight_thin_"..color.."_wall" },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2 or 0
local nfdir = dirs2[fdir+1]
minetest.set_node(pos, {name = "homedecor:glowlight_quarter_"..color, param2 = nfdir})
end,
})
minetest.register_abm({
nodenames = { "homedecor:glowlight_thick_"..color.."_wall" },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2 or 0
local nfdir = dirs2[fdir+1]
minetest.set_node(pos, {name = "homedecor:glowlight_half_"..color, param2 = nfdir})
end,
})
minetest.register_abm({
nodenames = { "homedecor:glowlight_small_cube_"..color.."_ceiling" },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.set_node(pos, {name = "homedecor:glowlight_small_cube_"..color, param2 = 20})
end,
})
local glowlight_nodebox = {
half = homedecor.nodebox.slab_y(1/2), half = homedecor.nodebox.slab_y(1/2),
quarter = homedecor.nodebox.slab_y(1/4), quarter = homedecor.nodebox.slab_y(1/4),
small_cube = { small_cube = {
type = "fixed", type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
}, },
} }
homedecor.register("glowlight_half_"..color, { homedecor.register("glowlight_half_"..color, {
description = S("Thick Glowlight (@1)", S(color)), description = S("Thick Glowlight (@1)", S(color)),
tiles = { tiles = {
"homedecor_glowlight_"..color.."_top.png", "homedecor_glowlight_"..color.."_top.png",
@ -85,9 +36,9 @@ homedecor.register("glowlight_half_"..color, {
light_source = default.LIGHT_MAX, light_source = default.LIGHT_MAX,
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
on_place = minetest.rotate_node on_place = minetest.rotate_node
}) })
homedecor.register("glowlight_quarter_"..color, { homedecor.register("glowlight_quarter_"..color, {
description = S("Thin Glowlight (@1)", S(color)), description = S("Thin Glowlight (@1)", S(color)),
tiles = { tiles = {
"homedecor_glowlight_"..color.."_top.png", "homedecor_glowlight_"..color.."_top.png",
@ -103,11 +54,11 @@ homedecor.register("glowlight_quarter_"..color, {
light_source = default.LIGHT_MAX-1, light_source = default.LIGHT_MAX-1,
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
on_place = minetest.rotate_node on_place = minetest.rotate_node
}) })
-- Glowlight "cubes" -- Glowlight "cubes"
homedecor.register("glowlight_small_cube_"..color, { homedecor.register("glowlight_small_cube_"..color, {
description = S("Small Glowlight Cube (@1)", S(color)), description = S("Small Glowlight Cube (@1)", S(color)),
tiles = { tiles = {
"homedecor_glowlight_cube_"..color.."_tb.png", "homedecor_glowlight_cube_"..color.."_tb.png",
@ -123,7 +74,7 @@ homedecor.register("glowlight_small_cube_"..color, {
light_source = default.LIGHT_MAX-1, light_source = default.LIGHT_MAX-1,
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
on_place = minetest.rotate_node on_place = minetest.rotate_node
}) })
end end