diff options
author | Whiskers75 - <whiskers75@yopmail.com> | 2012-06-21 17:26:17 +0100 |
---|---|---|
committer | Whiskers75 - <whiskers75@yopmail.com> | 2012-06-21 17:26:17 +0100 |
commit | bd3bd4cf48914f505710bc9b2e16d6de47c2b618 (patch) | |
tree | 6c738c1784779e4576f6d89862404f1002b9d1ca | |
parent | 3a1bc021e30d4e63cc29a2e266e01e2fa4b91ca0 (diff) | |
download | mesecons-bd3bd4cf48914f505710bc9b2e16d6de47c2b618.tar mesecons-bd3bd4cf48914f505710bc9b2e16d6de47c2b618.tar.gz mesecons-bd3bd4cf48914f505710bc9b2e16d6de47c2b618.tar.bz2 mesecons-bd3bd4cf48914f505710bc9b2e16d6de47c2b618.tar.xz mesecons-bd3bd4cf48914f505710bc9b2e16d6de47c2b618.zip |
Added AND block textures and code - it works! No functionality though...
-rw-r--r-- | mesecons_whiskers75/init.lua | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mesecons_whiskers75/init.lua b/mesecons_whiskers75/init.lua index 51423cf..7fb7a70 100644 --- a/mesecons_whiskers75/init.lua +++ b/mesecons_whiskers75/init.lua @@ -3,10 +3,17 @@ -- Make the block:
-minetest.register_node("mesecons_whiskers75:andblock", {
- tile_images = {"whiskers75andblock.png"},
- material = minetest.digprop_constanttime(1),
-})
+minetest.register_node ("mesecons_whiskers75:andblock", {
+ drawtype = signlike,
+ description = "AND block",
+ tile_images = {"whiskers75andblock.png"},
+ 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 node = minetest.env:get_node(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
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
-
+ end
+end
-- This SHOULD detect mesecons on x+ or -1 and turn a node y+1 on...
|