mirror of
https://github.com/lhofhansl/rangedweapons.git
synced 2024-11-19 22:03:57 +01:00
Fix glass/door breaking settings
This commit is contained in:
parent
a93bb59536
commit
7d2844ae12
5
ammo.lua
5
ammo.lua
@ -143,7 +143,8 @@ end
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if rweapons_door_breaking == "true" and door_break > 0 then
|
if door_break > 0 and minetest.settings:get_bool("rangedweapons_door_breaking", true) then
|
||||||
|
|
||||||
if string.find(minetest.get_node(moveresult.collisions[1].node_pos).name,"door_wood") then
|
if string.find(minetest.get_node(moveresult.collisions[1].node_pos).name,"door_wood") then
|
||||||
|
|
||||||
minetest.swap_node(moveresult.collisions[1].node_pos, {name = "air"})
|
minetest.swap_node(moveresult.collisions[1].node_pos, {name = "air"})
|
||||||
@ -152,7 +153,7 @@ minetest.sound_play("rangedweapons_woodbreak",{pos = moveresult.collisions[1].no
|
|||||||
|
|
||||||
end end
|
end end
|
||||||
|
|
||||||
if rweapons_glass_breaking == "true" and glass_break > 0 then
|
if glass_break > 0 and minetest.settings:get_bool("rangedweapons_glass_breaking", true) then
|
||||||
|
|
||||||
local nodeName = minetest.get_node(moveresult.collisions[1].node_pos).name
|
local nodeName = minetest.get_node(moveresult.collisions[1].node_pos).name
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user