Fix some oversights

This commit is contained in:
2025-01-08 22:46:16 +01:00
parent 752fe4f192
commit 6934a8b342
2 changed files with 13 additions and 13 deletions

View File

@@ -85,14 +85,6 @@ function industrialtest.ActivatedMachine.activeOnTimer(self,pos,elapsed)
local shouldRerunTimer=false
local shouldUpdateFormspec=false
if self.activeUpdate then
shouldRerunTimer,shouldUpdateFormspec=self:activeUpdate(pos,elapsed,meta,inv)
end
if shouldUpdateFormspec then
self:updateFormspec(pos)
end
if self:shouldDeactivate(pos) then
minetest.swap_node(pos,{
name=self.name,
@@ -103,5 +95,13 @@ function industrialtest.ActivatedMachine.activeOnTimer(self,pos,elapsed)
return false
end
if self.activeUpdate then
shouldRerunTimer,shouldUpdateFormspec=self:activeUpdate(pos,elapsed,meta,inv)
end
if shouldUpdateFormspec then
self:updateFormspec(pos)
end
return shouldRerunTimer
end