From 8b0d34034499dac5d58638c88ed53be896ac13da Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Mon, 21 Mar 2022 20:49:22 +0100 Subject: [PATCH] Fix collider remove bug --- basis/assemble.lua | 3 ++- basis/lib.lua | 2 +- items/registered_nodes.lua | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/basis/assemble.lua b/basis/assemble.lua index c4d81d9..8763d2d 100644 --- a/basis/assemble.lua +++ b/basis/assemble.lua @@ -173,13 +173,14 @@ local function remove_inv(pos, inv, param2, AssemblyPlan, player_name, idx) if inv:room_for_item("src", stack) then local node = minetest.get_node(pos1) if node.name == node_name then + local meta = M(pos1):to_table() minetest.remove_node(pos1) inv:add_item("src", stack) play_sound(pos, "default_dig_cracky") local ndef = minetest.registered_nodes[node_name] if ndef and ndef.after_dig_node then local digger = minetest.get_player_by_name(player_name) - ndef.after_dig_node(pos1, pos, ItemStack(node_name), {}, digger) + ndef.after_dig_node(pos1, node, meta, digger) end end end diff --git a/basis/lib.lua b/basis/lib.lua index 6bf49dc..bfbe84a 100644 --- a/basis/lib.lua +++ b/basis/lib.lua @@ -76,7 +76,7 @@ for _,row in ipairs(ROTATION) do end function techage.facedir_to_rotation(facedir) - return FACEDIR_TO_ROT[facedir] + return FACEDIR_TO_ROT[facedir] or FACEDIR_TO_ROT[0] end function techage.param2_turn_left(param2) diff --git a/items/registered_nodes.lua b/items/registered_nodes.lua index a6a6bae..c193ea0 100644 --- a/items/registered_nodes.lua +++ b/items/registered_nodes.lua @@ -64,4 +64,4 @@ techage.register_mobs_mods("wildlife") techage.register_mobs_mods("mobs_skeletons") techage.register_mobs_mods("mobs_dwarves") techage.register_mobs_mods("mobf_trader") -techage.register_mobs_mods("ts_vehicles") +techage.register_mobs_mods("ts_vehicles_cars")