diff options
Diffstat (limited to 'util.lua')
-rw-r--r-- | util.lua | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -429,4 +429,19 @@ digtron.update_builder_item = function(pos) digtron.create_builder_item = item_stack:get_name() minetest.add_entity(pos,"digtron:builder_item") end -end
\ No newline at end of file +end + +digtron.damage_creatures = function(player, pos, amount) + local objects = minetest.env:get_objects_inside_radius(pos, 1.0) + if objects ~= nil then + for _, obj in ipairs(objects) do + if obj then + obj:punch(player, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = amount}, + }, nil ) + end + end + end +end +
\ No newline at end of file |