Merge pull request #9 from programmerjake/fix-energy-collector
Fix error where energy_collector.lua tries to compare to nil
This commit is contained in:
commit
2b5fad975a
|
@ -95,7 +95,9 @@ local function on_timer(pos, elapsed)
|
|||
using_orb = false
|
||||
end
|
||||
|
||||
if minetest.get_natural_light(above) >= 14 then
|
||||
local light = minetest.get_natural_light(above)
|
||||
|
||||
if light and light >= 14 then
|
||||
if check_for_furnaces(pos, 1, true) then
|
||||
-- do nothing, energy is being used for the furnace.
|
||||
return true
|
||||
|
@ -306,4 +308,4 @@ exchangeclone.register_energy_collector("exchangeclone:energy_collector_mk5", "E
|
|||
{"exchangeclone:energy_collector_mk4", "exchangeclone:energy_collector_mk4", "exchangeclone:energy_collector_mk4"},
|
||||
{iron, iron, iron}
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue