Add ugly mirror, detector, emitter

This commit is contained in:
Wuzzy 2021-12-21 16:15:17 +01:00
parent 25cba4a685
commit e651c2757b
17 changed files with 88 additions and 1 deletions

86
mods/lzr_laser/blocks.lua Normal file
View File

@ -0,0 +1,86 @@
local S = minetest.get_translator("lzr_laser")
minetest.register_node("lzr_laser:mirror", {
description = S("Mirror"),
paramtype2 = "facedir",
tiles = {
"lzr_laser_mirror_top.png",
"lzr_laser_mirror_top.png",
"lzr_laser_mirror_hole.png",
"lzr_laser_mirror_block.png",
"lzr_laser_mirror_block.png",
"lzr_laser_mirror_hole.png",
},
groups = { mirror = 1, dig_immediate = 2 },
})
minetest.register_node("lzr_laser:mirror_on", {
description = S("Mirror (active)"),
paramtype2 = "facedir",
tiles = {
"lzr_laser_mirror_on_top.png",
"lzr_laser_mirror_on_top.png^[transformFY",
"lzr_laser_mirror_on_hole.png",
"lzr_laser_mirror_on_block.png",
"lzr_laser_mirror_on_block.png",
"lzr_laser_mirror_on_hole.png",
},
groups = { mirror = 2, laser = 2, dig_immediate = 2, not_in_creative_inventory = 1 },
})
minetest.register_node("lzr_laser:emitter", {
description = S("Emitter"),
paramtype2 = "facedir",
tiles = {
"lzr_laser_emitter.png",
"lzr_laser_emitter.png",
"lzr_laser_emitter.png",
"lzr_laser_emitter.png",
"lzr_laser_emitter.png",
"lzr_laser_emitter_front.png",
},
groups = { emitter = 1, dig_immediate = 2 },
})
minetest.register_node("lzr_laser:emitter_on", {
description = S("Emitter (active)"),
paramtype2 = "facedir",
tiles = {
"lzr_laser_emitter_on.png",
"lzr_laser_emitter_on.png",
"lzr_laser_emitter_on.png",
"lzr_laser_emitter_on.png",
"lzr_laser_emitter_on.png",
"lzr_laser_emitter_on_front.png",
},
groups = { emitter = 2, dig_immediate = 2, not_in_creative_inventory = 1 },
})
minetest.register_node("lzr_laser:detector", {
description = S("Detector"),
paramtype2 = "facedir",
tiles = {
"lzr_laser_detector.png",
"lzr_laser_detector.png",
"lzr_laser_detector.png",
"lzr_laser_detector.png",
"lzr_laser_detector.png",
"lzr_laser_detector_front.png",
},
groups = { detector = 1, dig_immediate = 2 },
})
minetest.register_node("lzr_laser:detector_on", {
description = S("Detector (active)"),
paramtype2 = "facedir",
tiles = {
"lzr_laser_detector_on.png",
"lzr_laser_detector_on.png",
"lzr_laser_detector_on.png",
"lzr_laser_detector_on.png",
"lzr_laser_detector_on.png",
"lzr_laser_detector_on_front.png",
},
groups = { detector = 2, dig_immediate = 2, not_in_creative_inventory = 1 },
})

View File

@ -2,3 +2,4 @@ lzr_laser = {}
dofile(minetest.get_modpath("lzr_laser").."/util.lua")
dofile(minetest.get_modpath("lzr_laser").."/laser.lua")
dofile(minetest.get_modpath("lzr_laser").."/blocks.lua")

View File

@ -65,6 +65,6 @@ for i=1, 64 do
type = "fixed",
fixed = dirs_to_nodebox(dirs),
},
groups = { laser = 1, not_in_creative_inventory = 1 },
groups = { laser = 1, dig_immediate = 3, not_in_creative_inventory = 1 },
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B