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,6 +93,7 @@ override={
if meta:get_int("meseconPowered")==1 then
return
end
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)
@ -100,6 +101,7 @@ override={
return
end
end
end
meta:set_int("enabled",0)
meta:set_int("stateChanged",1)