Skip to content

Commit

Permalink
Cactus is harmful
Browse files Browse the repository at this point in the history
  • Loading branch information
aimlol committed Jul 14, 2013
1 parent 7df5426 commit 989cf84
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mods/default/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,18 @@ minetest.register_abm({
end
})

minetest.register_abm({
nodenames = {"default:cactus"},
interval = 0.5,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
players = minetest.env:get_objects_inside_radius(pos, 1)
for i, player in ipairs(players) do
player:set_hp(player:get_hp() - 1)
end
end,
})

minetest.register_node("default:papyrus", {
description = "Papyrus",
drawtype = "plantlike",
Expand Down

0 comments on commit 989cf84

Please sign in to comment.