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 if meta:get_int("meseconPowered")==1 then
return return
end end
local chambers=minetest.deserialize(meta:get_string("chambers")) if meta:contains("chambers") then
for _,chamber in ipairs(chambers) do local chambers=minetest.deserialize(meta:get_string("chambers"))
local chamberMeta=minetest.get_meta(chamber) for _,chamber in ipairs(chambers) do
if chamberMeta:get_int("meseconPowered")==1 then local chamberMeta=minetest.get_meta(chamber)
return if chamberMeta:get_int("meseconPowered")==1 then
return
end
end end
end end