fix energy wakeup, wooh!

This commit is contained in:
Pascal Abresch 2019-10-04 04:00:21 +02:00
parent ca7c23e2fc
commit 34d01977fa

View File

@ -7,9 +7,9 @@ local function round(x)
end
local function wakeup(pos,share)
--called to test if a node needs to be woken uü
--called to test if a node needs to be woken up
local node = minetest.get_node(pos)
if (minetest.get_item_group(node.name, "sparktech_energy_wakeup") == 1) then
if (minetest.get_item_group(node.name, "sparktech_energy_wakeup") >= 1) then
local ntype = minetest.get_item_group(node.name, "spaktech_energy_type")
local meta = minetest.get_meta(pos)
local energy = meta:get_int("energy")
@ -19,7 +19,7 @@ local function wakeup(pos,share)
minetest.get_node_timer(pos):start(0.5)
end
elseif ntype == 4 then
if minetest.get_item_group(node.name, "sparktech_energy_may") == energy then
if minetest.get_item_group(node.name, "sparktech_energy_wakeup") == energy then -- set the value to when you want to be woken up key
minetest.get_node_timer(pos):start(0.5)
end
end