Added AND block textures and code - it works! No functionality though...

This commit is contained in:
Whiskers75 - 2012-06-21 17:26:17 +01:00
parent 3a1bc021e3
commit bd3bd4cf48

@ -4,8 +4,15 @@
-- Make the block: -- Make the block:
minetest.register_node ("mesecons_whiskers75:andblock", { minetest.register_node ("mesecons_whiskers75:andblock", {
drawtype = signlike,
description = "AND block",
tile_images = {"whiskers75andblock.png"}, tile_images = {"whiskers75andblock.png"},
material = minetest.digprop_constanttime(1), inventory_image = {"whiskers75andblock.png"},
sunlight_propagates = true,
paramtype = 'light',
walkable = true,
groups = {dig_immediate=2},
material = minetest.digprop_constanttime(1.0),
}) })
local update = function(pos) local update = function(pos)
@ -15,5 +22,6 @@ local update = function(pos)
if lnode.name=="mesecons:mesecon_on" then set_node_on({x=pos.x, y=pos.y+1, z=pos.z}) end if lnode.name=="mesecons:mesecon_on" then set_node_on({x=pos.x, y=pos.y+1, z=pos.z}) end
lnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z}) 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 if lnode.name=="mesecons:mesecon_on" then set_node_on({x=pos.x, y=pos.y+1, z=pos.z}) end
end
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...