Fix some oversights
This commit is contained in:
parent
752fe4f192
commit
6934a8b342
@ -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
|
||||
|
@ -41,9 +41,9 @@ function industrialtest.ElectricMachine.onConstruct(self,pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
if self.hasPowerOutput then
|
||||
meta:set_string("industrialtest.network",minetest.serialize(industrialtest.api.createNetworkMap(pos)))
|
||||
end
|
||||
end
|
||||
if self.hasPowerOutput then
|
||||
meta:set_string("industrialtest.network",minetest.serialize(industrialtest.api.createNetworkMap(pos)))
|
||||
end
|
||||
|
||||
industrialtest.Machine.onConstruct(self,pos)
|
||||
@ -82,7 +82,7 @@ function industrialtest.ElectricMachine.onTimer(self,pos,elapsed)
|
||||
return result or result2
|
||||
end
|
||||
|
||||
function industrialtest.Machine.allowMetadataInventoryMove(self,pos,fromList,fromIndex,toList,toIndex,count)
|
||||
function industrialtest.ElectricMachine.allowMetadataInventoryMove(self,pos,fromList,fromIndex,toList,toIndex,count)
|
||||
local found=false
|
||||
if self.powerLists then
|
||||
for _,value in ipairs(self.powerLists) do
|
||||
@ -99,7 +99,7 @@ function industrialtest.Machine.allowMetadataInventoryMove(self,pos,fromList,fro
|
||||
return industrialtest.Machine.allowMetadataInventoryMove(self,pos,fromList,fromIndex,toList,toIndex,count)
|
||||
end
|
||||
|
||||
function industrialtest.Machine.allowMetadataInventoryPut(self,pos,listname,index,stack,player)
|
||||
function industrialtest.ElectricMachine.allowMetadataInventoryPut(self,pos,listname,index,stack,player)
|
||||
local found=false
|
||||
if self.powerLists then
|
||||
for _,value in ipairs(self.powerLists) do
|
||||
|
Loading…
x
Reference in New Issue
Block a user