Add few callback methods to Machine
This commit is contained in:
parent
29662f1821
commit
b3d08d965c
@ -26,6 +26,10 @@ function industrialtest.Machine.onDestruct(self)
|
|||||||
-- dummy function
|
-- dummy function
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function industrialtest.Machine.afterPlaceNode(self,pos,placer,itemstack,pointed)
|
||||||
|
-- dummy function
|
||||||
|
end
|
||||||
|
|
||||||
function industrialtest.Machine.getFormspec(self,pos)
|
function industrialtest.Machine.getFormspec(self,pos)
|
||||||
local formspec
|
local formspec
|
||||||
if industrialtest.mtgAvailable then
|
if industrialtest.mtgAvailable then
|
||||||
@ -147,6 +151,10 @@ function industrialtest.Machine.onMetadataInventoryTake(self,pos,listname,index,
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function industrialtest.Machine.onReceiveFields(self,pos,formname,fields)
|
||||||
|
-- dummy function
|
||||||
|
end
|
||||||
|
|
||||||
function industrialtest.Machine.createDefinitionTable(self)
|
function industrialtest.Machine.createDefinitionTable(self)
|
||||||
local def={
|
local def={
|
||||||
description=self.description,
|
description=self.description,
|
||||||
@ -157,6 +165,9 @@ function industrialtest.Machine.createDefinitionTable(self)
|
|||||||
on_destruct=function(pos)
|
on_destruct=function(pos)
|
||||||
self:onDestruct(pos)
|
self:onDestruct(pos)
|
||||||
end,
|
end,
|
||||||
|
after_place_node=function(pos,placer,itemstack,pointed)
|
||||||
|
self:afterPlaceNode(pos,placer,itemstack,pointed)
|
||||||
|
end,
|
||||||
on_timer=function(pos,elapsed)
|
on_timer=function(pos,elapsed)
|
||||||
return self:onTimer(pos,elapsed)
|
return self:onTimer(pos,elapsed)
|
||||||
end,
|
end,
|
||||||
@ -178,6 +189,9 @@ function industrialtest.Machine.createDefinitionTable(self)
|
|||||||
on_metadata_inventory_take=function(pos,listname,index,stack,player)
|
on_metadata_inventory_take=function(pos,listname,index,stack,player)
|
||||||
self:onMetadataInventoryTake(pos,listname,index,stack)
|
self:onMetadataInventoryTake(pos,listname,index,stack)
|
||||||
end,
|
end,
|
||||||
|
on_receive_fields=function(pos,formname,fields)
|
||||||
|
self:onReceiveFields(pos,formname,fields)
|
||||||
|
end,
|
||||||
_industrialtest_self=self
|
_industrialtest_self=self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user