Make laser blocks glow in the dark
parent
d710934023
commit
aaf16736d2
|
@ -162,6 +162,7 @@ local register_element = function(subname, def, options)
|
|||
def_core_on.tiles = def.tiles_on
|
||||
def_core_on.drop = "lzr_laser:"..subname
|
||||
def_core_on.groups[subname] = 2
|
||||
def_core_on.light_source = def.light_source_on
|
||||
|
||||
if not options then options = {} end
|
||||
|
||||
|
@ -176,6 +177,7 @@ local register_element = function(subname, def, options)
|
|||
def_takable._lzr_active = "lzr_laser:"..subname.."_takable_on"
|
||||
local def_takable_on = table.copy(def_core_on)
|
||||
def_takable_on.tiles = def.tiles_takable_on
|
||||
def_takable_on.light_source = def.light_source_on
|
||||
def_takable_on.groups.takable = 1
|
||||
def_takable_on.description = S("@1 (takable, active)", def.description)
|
||||
def_takable_on.drop = "lzr_laser:"..subname.."_takable"
|
||||
|
@ -187,6 +189,7 @@ end
|
|||
|
||||
register_element("mirror", {
|
||||
description = S("Mirror"),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles_off = {
|
||||
"lzr_laser_mirror_top.png^lzr_laser_fixed.png",
|
||||
|
@ -221,6 +224,7 @@ register_element("mirror", {
|
|||
"lzr_laser_mirror_on_hole.png",
|
||||
},
|
||||
|
||||
light_source_on = 3,
|
||||
groups = { rotatable = 1, laser_block = 1 },
|
||||
sounds = lzr_sounds.node_sound_glass_defaults({
|
||||
_rotate = {name = "lzr_laser_mirror_rotate", gain = 1.0},
|
||||
|
@ -229,6 +233,7 @@ register_element("mirror", {
|
|||
|
||||
register_element("transmissive_mirror", {
|
||||
description = S("Transmissive Mirror"),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles_takable_off = {
|
||||
"lzr_laser_transmissive_mirror_top.png",
|
||||
|
@ -262,6 +267,7 @@ register_element("transmissive_mirror", {
|
|||
"lzr_laser_transmissive_mirror_on_block.png^lzr_laser_fixed.png",
|
||||
"lzr_laser_transmissive_mirror_on_hole.png^lzr_laser_fixed.png",
|
||||
},
|
||||
light_source_on = 3,
|
||||
groups = { rotatable = 1, laser_block = 1 },
|
||||
sounds = lzr_sounds.node_sound_glass_defaults({
|
||||
_rotate = {name = "lzr_laser_mirror_rotate", gain = 1.0},
|
||||
|
@ -270,6 +276,7 @@ register_element("transmissive_mirror", {
|
|||
|
||||
register_element("crystal", {
|
||||
description = S("Crystal"),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles_takable_off = {
|
||||
"lzr_laser_crystal.png",
|
||||
|
@ -283,6 +290,7 @@ register_element("crystal", {
|
|||
tiles_on = {
|
||||
"lzr_laser_crystal_on.png^lzr_laser_fixed.png",
|
||||
},
|
||||
light_source_on = 3,
|
||||
groups = { laser_block = 1 },
|
||||
sounds = lzr_sounds.node_sound_glass_defaults({
|
||||
_rotate = {name = "lzr_laser_mirror_rotate", gain = 1.0},
|
||||
|
@ -329,6 +337,7 @@ register_element("emitter", {
|
|||
"lzr_laser_emitter_on_front.png^lzr_laser_fixed.png",
|
||||
|
||||
},
|
||||
light_source_on = 7,
|
||||
on_rightclick = function(pos, node)
|
||||
if lzr_gamestate.get_state() == lzr_gamestate.LEVEL_COMPLETE then
|
||||
return
|
||||
|
@ -393,6 +402,7 @@ register_element("detector", {
|
|||
"lzr_laser_detector_on.png",
|
||||
"lzr_laser_detector_on_front.png",
|
||||
},
|
||||
light_source_on = 5,
|
||||
groups = { laser_block = 1 },
|
||||
sounds = lzr_sounds.node_sound_wood_defaults(),
|
||||
}, { allow_take = true, is_detector = true })
|
||||
|
|
|
@ -96,6 +96,7 @@ for i=1, 7 do
|
|||
minetest.register_node("lzr_laser:laser_"..dirstring, {
|
||||
description = S("Laser (@1)", dirstring),
|
||||
paramtype = "light",
|
||||
light_source = 3,
|
||||
drawtype = "nodebox",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
|
|
Loading…
Reference in New Issue