summaryrefslogtreecommitdiff
path: root/util_execute_cycle.lua
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-01-12 00:50:17 -0700
committerFaceDeer <derksenmobile@gmail.com>2017-01-12 00:50:17 -0700
commite008aed60c3e4e5875c94617a6cc6d588f283582 (patch)
treee7651fc4027e356b48dafe2fbc88c014f2d1cd32 /util_execute_cycle.lua
parent9f139288845b7aa27bc4a251d6d5ddde713d27b7 (diff)
Update axle to new layout class, drop dug items in the right placeorigin/layout-refactor
Diffstat (limited to 'util_execute_cycle.lua')
-rw-r--r--util_execute_cycle.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/util_execute_cycle.lua b/util_execute_cycle.lua
index 42bf410..316a003 100644
--- a/util_execute_cycle.lua
+++ b/util_execute_cycle.lua
@@ -221,11 +221,6 @@ digtron.execute_dig_cycle = function(pos, clicker)
-- All tests passed, ready to go for real!
minetest.sound_play("construction", {gain=1.0, pos=pos})
- -- store or drop the products of the digger heads
- for _, itemname in pairs(items_dropped) do
- digtron.place_in_inventory(itemname, layout.inventories, pos)
- end
-
-- if the player is standing within the array or next to it, move him too.
local move_player = move_player_test(layout, clicker)
@@ -250,6 +245,11 @@ digtron.execute_dig_cycle = function(pos, clicker)
clicker:moveto(digtron.find_new_pos(clicker:getpos(), facing), true)
end
+ -- store or drop the products of the digger heads
+ for _, itemname in pairs(items_dropped) do
+ minetest.debug("placing in inventory", itemname)
+ digtron.place_in_inventory(itemname, layout.inventories, oldpos)
+ end
local building_fuel_cost = 0
local strange_failure = false