mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-10 09:27:31 +01:00
remove protector field when dug
This commit is contained in:
parent
077707343d
commit
a2e803d522
@ -54,6 +54,7 @@ Change log:
|
|||||||
- 2.4 - Update to newer functions, Minetest 0.4.16 needed to run now.
|
- 2.4 - Update to newer functions, Minetest 0.4.16 needed to run now.
|
||||||
- 2.5 - Added HUD text to show when player is inside a protected area (updates every 5 seconds)
|
- 2.5 - Added HUD text to show when player is inside a protected area (updates every 5 seconds)
|
||||||
- 2.6 - Add protection against CSM tampering, updated Intllib support (thanks codexp), tweaked block textures
|
- 2.6 - Add protection against CSM tampering, updated Intllib support (thanks codexp), tweaked block textures
|
||||||
|
- 2.7 - Remove protection field entity when protector has been dug
|
||||||
|
|
||||||
Lucky Blocks: 10
|
Lucky Blocks: 10
|
||||||
|
|
||||||
|
14
init.lua
14
init.lua
@ -430,6 +430,13 @@ minetest.register_node("protector:protect", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_blast = function() end,
|
on_blast = function() end,
|
||||||
|
|
||||||
|
after_destruct = function(pos, oldnode)
|
||||||
|
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
||||||
|
for _, v in ipairs(objects) do
|
||||||
|
v:remove()
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -514,6 +521,13 @@ minetest.register_node("protector:protect2", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_blast = function() end,
|
on_blast = function() end,
|
||||||
|
|
||||||
|
after_destruct = function(pos, oldnode)
|
||||||
|
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
||||||
|
for _, v in ipairs(objects) do
|
||||||
|
v:remove()
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- recipes to switch between protectors
|
-- recipes to switch between protectors
|
||||||
|
Loading…
Reference in New Issue
Block a user