diff options
Diffstat (limited to 'extranodes/init.lua')
-rw-r--r-- | extranodes/init.lua | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/extranodes/init.lua b/extranodes/init.lua index 4b304b1..5ed5f5f 100644 --- a/extranodes/init.lua +++ b/extranodes/init.lua @@ -195,4 +195,42 @@ minetest.register_craft({ type = "cooking", output = "technic:diamond_seed", recipe = "technic:graphite" -})
\ No newline at end of file +}) + +-- aspirin + +-- makes any sence only when there is hunger as a separate status of the player +-- also it uses willow twigs - ethereal dependency + +if minetest.get_modpath("hunger") and minetest.get_modpath("ethereal") then + + minetest.register_craftitem(":technic:aspirin_pill", { + description = "Aspirin pill", + inventory_image = "technic_aspirin_pill.png", + on_use = function(itemstack, user, pointed_thing) + user:set_hp(user:get_hp() + 2) + itemstack:take_item() + return itemstack + end + }) + + minetest.register_craftitem(":technic:aspirin_bottle", { + description = "Aspirin pills", + inventory_image = "technic_aspirin_bottle.png", + on_use = function(itemstack, user, pointed_thing) + user:set_hp(20) + itemstack:take_item() + return itemstack + end + }) + + minetest.register_craft({ + type = "shapeless", + output = "technic:aspirin_bottle", + recipe = {"technic:aspirin_pill", "technic:aspirin_pill", + "technic:aspirin_pill", "technic:aspirin_pill", + "technic:aspirin_pill", "technic:aspirin_pill", + "technic:aspirin_pill", "vessels:glass_bottle"} + }) + +end
\ No newline at end of file |