diff options
author | FaceDeer <derksenmobile@gmail.com> | 2017-01-08 01:50:07 -0700 |
---|---|---|
committer | FaceDeer <derksenmobile@gmail.com> | 2017-01-08 01:50:07 -0700 |
commit | 32ed41ce6a9575f268839027757e8484688ec49a (patch) | |
tree | 4fabb63d1cf35c0aeb306dccbd638ff2a0f73c44 | |
parent | cc264477bb73cb0a5b0eca901ae268944e514d70 (diff) |
Fix bug in rotation code that was breaking build_facing metadata
-rw-r--r-- | util_layout.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util_layout.lua b/util_layout.lua index 5b68919..5077944 100644 --- a/util_layout.lua +++ b/util_layout.lua @@ -197,9 +197,9 @@ local rotate_node_image = function(node_image, origin, axis, direction, old_pos_ end if node_image.build_item_paramtype2 == "wallmounted" then - node_image.meta.fields.build_facing = wallmounted_rotate[axis][direction][node_image.meta.fields.build_facing] + node_image.meta.fields.build_facing = wallmounted_rotate[axis][direction][tonumber(node_image.meta.fields.build_facing)] elseif node_image.build_item_paramtype2 == "facedir" then - node_image.meta.fields.build_facing = facedir_rotate[axis][direction][node_image.meta.fields.build_facing] + node_image.meta.fields.build_facing = facedir_rotate[axis][direction][tonumber(node_image.meta.fields.build_facing)] end node_image.meta.fields.waiting = nil -- If we're rotating a controller that's in the "waiting" state, clear it. Otherwise it may stick like that. |