Use nodebox for rendering cables
This commit is contained in:
16
api.lua
16
api.lua
@@ -131,13 +131,15 @@ industrialtest.api.powerFlow=function(pos)
|
||||
transferred=true
|
||||
end
|
||||
local def=minetest.registered_nodes[minetest.get_node(neighbourPositions[key]).name]
|
||||
local updateFormspec=def._industrialtest_updateFormspec
|
||||
if updateFormspec then
|
||||
updateFormspec(value)
|
||||
end
|
||||
local onPowerFlow=def._industrialtest_onPowerFlow
|
||||
if onPowerFlow and transferred then
|
||||
onPowerFlow(neighbourPositions[key],industrialtest.api.getOppositeSide(key))
|
||||
if def then
|
||||
local updateFormspec=def._industrialtest_updateFormspec
|
||||
if updateFormspec then
|
||||
updateFormspec(value)
|
||||
end
|
||||
local onPowerFlow=def._industrialtest_onPowerFlow
|
||||
if onPowerFlow and transferred then
|
||||
onPowerFlow(neighbourPositions[key],industrialtest.api.getOppositeSide(key))
|
||||
end
|
||||
end
|
||||
minetest.get_node_timer(neighbourPositions[key]):start(industrialtest.updateDelay)
|
||||
if not industrialtest.api.isFullyCharged(value) then
|
||||
|
||||
Reference in New Issue
Block a user