Fix collider remove bug
This commit is contained in:
parent
e0269da493
commit
8b0d340344
@ -173,13 +173,14 @@ local function remove_inv(pos, inv, param2, AssemblyPlan, player_name, idx)
|
|||||||
if inv:room_for_item("src", stack) then
|
if inv:room_for_item("src", stack) then
|
||||||
local node = minetest.get_node(pos1)
|
local node = minetest.get_node(pos1)
|
||||||
if node.name == node_name then
|
if node.name == node_name then
|
||||||
|
local meta = M(pos1):to_table()
|
||||||
minetest.remove_node(pos1)
|
minetest.remove_node(pos1)
|
||||||
inv:add_item("src", stack)
|
inv:add_item("src", stack)
|
||||||
play_sound(pos, "default_dig_cracky")
|
play_sound(pos, "default_dig_cracky")
|
||||||
local ndef = minetest.registered_nodes[node_name]
|
local ndef = minetest.registered_nodes[node_name]
|
||||||
if ndef and ndef.after_dig_node then
|
if ndef and ndef.after_dig_node then
|
||||||
local digger = minetest.get_player_by_name(player_name)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
@ -76,7 +76,7 @@ for _,row in ipairs(ROTATION) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
function techage.facedir_to_rotation(facedir)
|
function techage.facedir_to_rotation(facedir)
|
||||||
return FACEDIR_TO_ROT[facedir]
|
return FACEDIR_TO_ROT[facedir] or FACEDIR_TO_ROT[0]
|
||||||
end
|
end
|
||||||
|
|
||||||
function techage.param2_turn_left(param2)
|
function techage.param2_turn_left(param2)
|
||||||
|
@ -64,4 +64,4 @@ techage.register_mobs_mods("wildlife")
|
|||||||
techage.register_mobs_mods("mobs_skeletons")
|
techage.register_mobs_mods("mobs_skeletons")
|
||||||
techage.register_mobs_mods("mobs_dwarves")
|
techage.register_mobs_mods("mobs_dwarves")
|
||||||
techage.register_mobs_mods("mobf_trader")
|
techage.register_mobs_mods("mobf_trader")
|
||||||
techage.register_mobs_mods("ts_vehicles")
|
techage.register_mobs_mods("ts_vehicles_cars")
|
||||||
|
Loading…
Reference in New Issue
Block a user