summaryrefslogtreecommitdiff
path: root/node_axle.lua
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-01-12 00:53:04 -0700
committerGitHub <noreply@github.com>2017-01-12 00:53:04 -0700
commit578484352b8892787974fe14b0b856579c5f5afe (patch)
treee7651fc4027e356b48dafe2fbc88c014f2d1cd32 /node_axle.lua
parentf665f430fc94165a8c2d01f7d09fc327eee66c58 (diff)
parente008aed60c3e4e5875c94617a6cc6d588f283582 (diff)
Merge pull request #1 from FaceDeer/layout-refactor
Layout refactor
Diffstat (limited to 'node_axle.lua')
-rw-r--r--node_axle.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/node_axle.lua b/node_axle.lua
index c156c37..ab36c97 100644
--- a/node_axle.lua
+++ b/node_axle.lua
@@ -36,10 +36,10 @@ minetest.register_node("digtron:axle", {
-- Been too soon since last time the digtron rotated.
return
end
- local image = digtron.get_layout_image(pos, clicker)
- digtron.rotate_layout_image(image, node.param2)
- if digtron.can_write_layout_image(image, clicker) then
- digtron.write_layout_image(image)
+ local image = DigtronLayout.create(pos, clicker)
+ image:rotate_layout_image(node.param2)
+ if image:can_write_layout_image() then
+ image:write_layout_image()
minetest.sound_play("whirr", {gain=1.0, pos=pos})
meta = minetest.get_meta(pos)