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 shouldRerunTimer=false
|
||||||
local shouldUpdateFormspec=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
|
if self:shouldDeactivate(pos) then
|
||||||
minetest.swap_node(pos,{
|
minetest.swap_node(pos,{
|
||||||
name=self.name,
|
name=self.name,
|
||||||
@ -103,5 +95,13 @@ function industrialtest.ActivatedMachine.activeOnTimer(self,pos,elapsed)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.activeUpdate then
|
||||||
|
shouldRerunTimer,shouldUpdateFormspec=self:activeUpdate(pos,elapsed,meta,inv)
|
||||||
|
end
|
||||||
|
|
||||||
|
if shouldUpdateFormspec then
|
||||||
|
self:updateFormspec(pos)
|
||||||
|
end
|
||||||
|
|
||||||
return shouldRerunTimer
|
return shouldRerunTimer
|
||||||
end
|
end
|
||||||
|
@ -41,9 +41,9 @@ function industrialtest.ElectricMachine.onConstruct(self,pos)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if self.hasPowerOutput then
|
end
|
||||||
meta:set_string("industrialtest.network",minetest.serialize(industrialtest.api.createNetworkMap(pos)))
|
if self.hasPowerOutput then
|
||||||
end
|
meta:set_string("industrialtest.network",minetest.serialize(industrialtest.api.createNetworkMap(pos)))
|
||||||
end
|
end
|
||||||
|
|
||||||
industrialtest.Machine.onConstruct(self,pos)
|
industrialtest.Machine.onConstruct(self,pos)
|
||||||
@ -82,7 +82,7 @@ function industrialtest.ElectricMachine.onTimer(self,pos,elapsed)
|
|||||||
return result or result2
|
return result or result2
|
||||||
end
|
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
|
local found=false
|
||||||
if self.powerLists then
|
if self.powerLists then
|
||||||
for _,value in ipairs(self.powerLists) do
|
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)
|
return industrialtest.Machine.allowMetadataInventoryMove(self,pos,fromList,fromIndex,toList,toIndex,count)
|
||||||
end
|
end
|
||||||
|
|
||||||
function industrialtest.Machine.allowMetadataInventoryPut(self,pos,listname,index,stack,player)
|
function industrialtest.ElectricMachine.allowMetadataInventoryPut(self,pos,listname,index,stack,player)
|
||||||
local found=false
|
local found=false
|
||||||
if self.powerLists then
|
if self.powerLists then
|
||||||
for _,value in ipairs(self.powerLists) do
|
for _,value in ipairs(self.powerLists) do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user