forked from Mirrorlandia_minetest/mesecons
Merge branch 'master' of https://github.com/Jeija/minetest-mod-mesecons
This commit is contained in:
commit
2c36520a91
@ -1,5 +1,20 @@
|
|||||||
--Whiskers75's code
|
--Whiskers75's code
|
||||||
--AND block
|
--AND block
|
||||||
|
|
||||||
|
-- Make the block:
|
||||||
|
|
||||||
|
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 update = function(pos)
|
||||||
local node = minetest.env:get_node(pos)
|
local node = minetest.env:get_node(pos)
|
||||||
if node.name=="mesecons_whiskers75:andblock" then
|
if node.name=="mesecons_whiskers75:andblock" then
|
||||||
@ -7,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
|
||||||
-- This SHOULD detect mesecons on x+ or -1 and turn a node y+1 on...
|
end
|
||||||
|
-- This SHOULD detect mesecons on x+ or -1 and turn a node y+1 on...
|
||||||
|
BIN
mesecons_whiskers75/textures/Untitled.xcf
Normal file
BIN
mesecons_whiskers75/textures/Untitled.xcf
Normal file
Binary file not shown.
BIN
mesecons_whiskers75/textures/whiskers75andblock.png
Normal file
BIN
mesecons_whiskers75/textures/whiskers75andblock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 242 B |
Loading…
Reference in New Issue
Block a user