From 74593fa1500d2096b266da41bc47aa02130dea50 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Tue, 3 Jan 2023 17:22:57 +0100 Subject: [PATCH] Fix sound bug --- basic_machines/quarry.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/basic_machines/quarry.lua b/basic_machines/quarry.lua index 14a4796..c4d9f1e 100644 --- a/basic_machines/quarry.lua +++ b/basic_machines/quarry.lua @@ -196,6 +196,9 @@ local function quarry_task(pos, crd, nvm) pos1.y = y_curr pos2.y = y_curr + -- Restarting the server can detach the coroutine data. + -- Therefore, read nvm again. + nvm = techage.get_nvm(pos) nvm.level = y_first - y_curr if minetest.is_area_protected(pos1, pos2, owner, 5) then @@ -382,6 +385,8 @@ local tubing = { end, on_node_load = function(pos) CRD(pos).State:on_node_load(pos) + stop_sound(pos) + play_sound(pos) end, }