mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 08:01:07 +01:00
Revert "fixed daylightsensor's register_abms"
This reverts commit 5a4abcbcb7
.
This commit is contained in:
parent
14295cc4d7
commit
e2360204a7
1 changed files with 4 additions and 8 deletions
|
@ -96,9 +96,8 @@ minetest.register_abm({
|
|||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
local time = minetest.get_us_time()
|
||||
|
||||
if light >= 14 and time > 6000 then
|
||||
if light >= 12 and minetest.get_timeofday() > 0.2 and minetest.get_timeofday() < 0.8 then
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_on", param2=node.param2})
|
||||
mesecon.receptor_on(pos, mesecon.rules.pplate)
|
||||
end
|
||||
|
@ -112,9 +111,8 @@ minetest.register_abm({
|
|||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
local time = minetest.get_us_time()
|
||||
|
||||
if light < 14 and time > 18000 then
|
||||
if light < 12 then
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_off", param2=node.param2})
|
||||
mesecon.receptor_off(pos, mesecon.rules.pplate)
|
||||
end
|
||||
|
@ -205,9 +203,8 @@ minetest.register_abm({
|
|||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
local time = minetest.get_us_time()
|
||||
|
||||
if light < 14 and time > 18000 then
|
||||
if light < 12 then
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_inverted_on", param2=node.param2})
|
||||
mesecon.receptor_on(pos, mesecon.rules.pplate)
|
||||
end
|
||||
|
@ -221,9 +218,8 @@ minetest.register_abm({
|
|||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
local time = minetest.get_us_time()
|
||||
|
||||
if light >= 14 and time > 6000 then
|
||||
if light >= 12 and minetest.get_timeofday() > 0.8 and minetest.get_timeofday() < 0.2 then
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_inverted_off", param2=node.param2})
|
||||
mesecon.receptor_off(pos, mesecon.rules.pplate)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue