Added AND block basic code + textures

This commit is contained in:
Whiskers75 - 2012-06-21 17:08:55 +01:00
parent 11ae41f119
commit 3a1bc021e3
3 changed files with 9 additions and 1 deletions

@ -1,5 +1,13 @@
--Whiskers75's code
--AND block
-- Make the block:
minetest.register_node("mesecons_whiskers75:andblock", {
tile_images = {"whiskers75andblock.png"},
material = minetest.digprop_constanttime(1),
})
local update = function(pos)
local node = minetest.env:get_node(pos)
if node.name=="mesecons_whiskers75:andblock" then
@ -8,4 +16,4 @@ local update = function(pos)
lnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z})
if lnode.name=="mesecons:mesecon_on" then set_node_on({x=pos.x, y=pos.y+1, z=pos.z}) end
-- This SHOULD detect mesecons on x+ or -1 and turn a node y+1 on...
-- This SHOULD detect mesecons on x+ or -1 and turn a node y+1 on...

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B