mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-12-25 01:40:18 +01:00
Merge branch 'master' of https://github.com/Jeija/minetest-mod-mesecons
This commit is contained in:
commit
1712523772
3
mesecons_whiskers75/depends.txt
Normal file
3
mesecons_whiskers75/depends.txt
Normal file
@ -0,0 +1,3 @@
|
||||
default
|
||||
mesecons
|
||||
mesecons_temperest
|
11
mesecons_whiskers75/init.lua
Normal file
11
mesecons_whiskers75/init.lua
Normal file
@ -0,0 +1,11 @@
|
||||
--Whiskers75's code
|
||||
--AND block
|
||||
local update = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
if node.name=="mesecons_whiskers75:andblock" then
|
||||
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
|
||||
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...
|
Loading…
Reference in New Issue
Block a user