Update
This commit is contained in:
parent
d6cb0dc610
commit
1835ab63d3
1 changed files with 33 additions and 29 deletions
|
@ -15,22 +15,25 @@ local E = thirsty.ext_nodes_items
|
||||||
--------------------
|
--------------------
|
||||||
-- Hydrate only --
|
-- Hydrate only --
|
||||||
--------------------
|
--------------------
|
||||||
local def = table.copy(minetest.registered_items["farming:glass_water"])
|
if minetest.registered_items["farming:glass_water"] then
|
||||||
def.on_use = function(itemstack,player,pointed_thing)
|
local def = table.copy(minetest.registered_items["farming:glass_water"])
|
||||||
|
def.on_use = function(itemstack,player,pointed_thing)
|
||||||
thirsty.drink(player,2,20,E.drinking_glass)
|
thirsty.drink(player,2,20,E.drinking_glass)
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
minetest.register_craftitem(":farming:glass_water", def)
|
minetest.register_craftitem(":farming:glass_water", def)
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.registered_items["farming:rose_water"] then
|
||||||
local def = table.copy(minetest.registered_items["farming:rose_water"])
|
local def = table.copy(minetest.registered_items["farming:rose_water"])
|
||||||
def.on_use = function(itemstack,player,pointed_thing)
|
def.on_use = function(itemstack,player,pointed_thing)
|
||||||
thirsty.drink(player,12,24,E.glass_bottle)
|
thirsty.drink(player,12,24,E.glass_bottle)
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
minetest.register_craftitem(":farming:rose_water", def)
|
minetest.register_craftitem(":farming:rose_water", def)
|
||||||
|
end
|
||||||
|
|
||||||
----------------------------
|
----------------------------
|
||||||
-- Hydrate and Food Items --
|
-- Hydrate and Food Items --
|
||||||
|
@ -52,8 +55,9 @@ thirsty.register_food_drink("farming:chili_pepper" ,1,-1,-5,40,nil)
|
||||||
--------------------
|
--------------------
|
||||||
-- Complex/Custom --
|
-- Complex/Custom --
|
||||||
--------------------
|
--------------------
|
||||||
local def = table.copy(minetest.registered_items["farming:cactus_juice"])
|
if minetest.registered_items["farming:cactus_juice"] then
|
||||||
def.on_use = function(itemstack, player, pointed_thing)
|
local def = table.copy(minetest.registered_items["farming:cactus_juice"])
|
||||||
|
def.on_use = function(itemstack, player, pointed_thing)
|
||||||
if player then
|
if player then
|
||||||
if math.random(5) == 1 then
|
if math.random(5) == 1 then
|
||||||
thirsty.drink(player,-2,20,E.drinking_glass)
|
thirsty.drink(player,-2,20,E.drinking_glass)
|
||||||
|
@ -67,5 +71,5 @@ def.on_use = function(itemstack, player, pointed_thing)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craftitem(":farming:cactus_juice", def)
|
minetest.register_craftitem(":farming:cactus_juice", def)
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue