From 32ed41ce6a9575f268839027757e8484688ec49a Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 8 Jan 2017 01:50:07 -0700 Subject: Fix bug in rotation code that was breaking build_facing metadata --- util_layout.lua | 4 ++-- 1 file 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. -- cgit v1.2.3