]> git.lizzy.rs Git - xdecor.git/commitdiff
Inflict a little damage when opening the hive formspec
authorkilbith <jeanpatrick.guerrero@gmail.com>
Mon, 28 Sep 2015 13:11:32 +0000 (15:11 +0200)
committerkilbith <jeanpatrick.guerrero@gmail.com>
Mon, 28 Sep 2015 13:11:32 +0000 (15:11 +0200)
hive.lua

index 7256239c4cbceea7543972b62667a9fba7df625c..e5666b0a2a263fd2183bdec5231b855c7d699315 100644 (file)
--- a/hive.lua
+++ b/hive.lua
@@ -33,6 +33,10 @@ xdecor.register("hive", {
                local health = puncher:get_hp()
                puncher:set_hp(health - 4)
        end,
+       on_rightclick = function(_, _, clicker)
+               local health = clicker:get_hp()
+               clicker:set_hp(health - 1)
+       end,
        allow_metadata_inventory_put = function(_, listname, _, stack, _)
                if listname == "honey" then return 0 end
                return stack:get_count()