Version MFF.

This commit is contained in:
sys4-fr
2018-09-08 01:14:03 +02:00
parent 778ee427f4
commit 78b10c505f
235 changed files with 305 additions and 275 deletions

0
mesecons_blinkyplant/depends.txt Normal file → Executable file
View File

24
mesecons_blinkyplant/init.lua Normal file → Executable file
View File

@ -10,11 +10,25 @@ local toggle_timer = function (pos)
end
local on_timer = function (pos)
local node = minetest.get_node(pos)
if(mesecon.flipstate(pos, node) == "on") then
mesecon.receptor_on(pos)
else
mesecon.receptor_off(pos)
-- DO NOT TOUCH OR.. THREATS! Thanks, MFF
local activate = false
for _, player in pairs(minetest.get_connected_players()) do
local p = player:getpos()
local dist = ((p.x-pos.x)^2 + (p.y-pos.y)^2 + (p.z-pos.z)^2)^0.5
if dist < 40 then
activate = true
break
end
end
if activate then
local node = minetest.get_node(pos)
if(mesecon.flipstate(pos, node) == "on") then
mesecon.receptor_on(pos)
else
mesecon.receptor_off(pos)
end
-- Our modification stops there, thank you, @crabman77
end
toggle_timer(pos)
end

BIN
mesecons_blinkyplant/textures/jeija_blinky_plant_off.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 B

After

Width:  |  Height:  |  Size: 370 B

BIN
mesecons_blinkyplant/textures/jeija_blinky_plant_on.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 395 B