Don't try to check if other reactor chambers are powered if Nuclear Reactor wasn't initialized

Fixes #7
This commit is contained in:
mrkubax10 2024-03-28 07:13:32 +01:00
parent c8be496afe
commit 960b2e5b45

View File

@ -93,11 +93,13 @@ override={
if meta:get_int("meseconPowered")==1 then
return
end
local chambers=minetest.deserialize(meta:get_string("chambers"))
for _,chamber in ipairs(chambers) do
local chamberMeta=minetest.get_meta(chamber)
if chamberMeta:get_int("meseconPowered")==1 then
return
if meta:contains("chambers") then
local chambers=minetest.deserialize(meta:get_string("chambers"))
for _,chamber in ipairs(chambers) do
local chamberMeta=minetest.get_meta(chamber)
if chamberMeta:get_int("meseconPowered")==1 then
return
end
end
end