mirror of
https://github.com/D00Med/witchcraft.git
synced 2024-12-25 17:20:18 +01:00
Red potion fix
Fixed red potion to work with hud_hunger
This commit is contained in:
parent
e0910f2607
commit
793195db93
14
init.lua
14
init.lua
@ -553,7 +553,12 @@ minetest.register_node("witchcraft:potion_red", {
|
|||||||
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
|
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
inventory_image = "witchcraft_potion_red.png",
|
inventory_image = "witchcraft_potion_red.png",
|
||||||
on_use = minetest.item_eat(30, "vessels:glass_bottle"),
|
on_use = function(itemstack, player)
|
||||||
|
local health = player:get_hp();
|
||||||
|
player:set_hp(health+20)
|
||||||
|
itemstack:replace("bucket:bucket_empty")
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("witchcraft:potion_red_2", {
|
minetest.register_node("witchcraft:potion_red_2", {
|
||||||
@ -572,7 +577,12 @@ minetest.register_node("witchcraft:potion_red_2", {
|
|||||||
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
|
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
inventory_image = "witchcraft_potion_red.png^[colorize:black:50",
|
inventory_image = "witchcraft_potion_red.png^[colorize:black:50",
|
||||||
on_use = minetest.item_eat(100, "vessels:glass_bottle"),
|
on_use = function(itemstack, player)
|
||||||
|
local health = player:get_hp();
|
||||||
|
player:set_hp(health+50)
|
||||||
|
itemstack:replace("bucket:bucket_empty")
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("witchcraft:potion_darkpurple", {
|
minetest.register_node("witchcraft:potion_darkpurple", {
|
||||||
|
Loading…
Reference in New Issue
Block a user