Compare commits
10 Commits
9dcba4a932
...
84766f33d2
Author | SHA1 | Date | |
---|---|---|---|
|
84766f33d2 | ||
|
7f7bd99bc8 | ||
|
5d11725799 | ||
|
1a665743ca | ||
|
9dff07965c | ||
|
0683eb2c6f | ||
|
44624d39d4 | ||
|
66c1ce1be5 | ||
|
631d641249 | ||
|
70c38fafad |
@ -9,5 +9,5 @@ farming_plus?
|
||||
crops?
|
||||
farming?
|
||||
minetest_doc_modpack?
|
||||
fruits?
|
||||
fruit?
|
||||
ethereal?
|
||||
|
@ -478,11 +478,17 @@ minetest.register_node('drinks:liquid_barrel', {
|
||||
return 0
|
||||
end
|
||||
elseif listname == 'dst' then --removing liquid
|
||||
local inputstack = stack:get_name()
|
||||
local inputcount = stack:get_count()
|
||||
local valid = string.sub(inputstack, 1, 7)
|
||||
if valid == 'vessels' or valid == 'bucket:' then
|
||||
return inputcount
|
||||
--make sure there is a liquid to remove
|
||||
local juice = meta:get_string('fruit')
|
||||
if juice ~= 'empty' then
|
||||
local inputstack = stack:get_name()
|
||||
local inputcount = stack:get_count()
|
||||
local valid = string.sub(inputstack, 1, 7)
|
||||
if valid == 'vessels' or valid == 'bucket:' then
|
||||
return inputcount
|
||||
else
|
||||
return 0
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
@ -589,11 +595,17 @@ minetest.register_node('drinks:liquid_silo', {
|
||||
return 0
|
||||
end
|
||||
elseif listname == 'dst' then --removing liquid
|
||||
local inputstack = stack:get_name()
|
||||
local inputcount = stack:get_count()
|
||||
local valid = string.sub(inputstack, 1, 7)
|
||||
if valid == 'vessels' or valid == 'bucket:' then
|
||||
return inputcount
|
||||
--make sure there is liquid to take_item
|
||||
local juice = meta:get_string('fruit')
|
||||
if juice ~= 'empty' then
|
||||
local inputstack = stack:get_name()
|
||||
local inputcount = stack:get_count()
|
||||
local valid = string.sub(inputstack, 1, 7)
|
||||
if valid == 'vessels' or valid == 'bucket:' then
|
||||
return inputcount
|
||||
else
|
||||
return 0
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
19
init.lua
19
init.lua
@ -77,8 +77,10 @@ longname = {
|
||||
if minetest.get_modpath('default') then
|
||||
drinks.juiceable['apple'] = true -- Name of fruit to make juiceable.
|
||||
drinks.juiceable['cactus'] = true
|
||||
drinks.juiceable['blueberries'] = true
|
||||
table.insert(drinks.drink_table, {'apple', 'Apple', '#ecff56'})
|
||||
table.insert(drinks.drink_table, {'cactus', 'Cactus', '#96F97B'})
|
||||
table.insert(drinks.drink_table, {'blueberries', 'Blueberry', '#521dcb'})
|
||||
end
|
||||
|
||||
if minetest.get_modpath('bushes_classic') then
|
||||
@ -132,9 +134,16 @@ if minetest.get_modpath('farming') then
|
||||
drinks.juiceable['carrot'] = true
|
||||
drinks.juiceable['cucumber'] = true
|
||||
drinks.juiceable['grapes'] = true
|
||||
drinks.juiceable['pumpkin'] = true
|
||||
drinks.juiceable['pumpkin_8'] = true
|
||||
drinks.juiceable['pumpkin_slice'] = true
|
||||
drinks.juiceable['raspberries'] = true
|
||||
drinks.juiceable['rhubarb'] = true
|
||||
drinks.juiceable['blueberries'] = true
|
||||
drinks.juiceable['pineapple'] = true
|
||||
drinks.juiceable['pineapple_ring'] = true
|
||||
drinks.juiceable['blueberries'] = true
|
||||
drinks.juiceable['blackberry'] = true
|
||||
drinks.juiceable['strawberry'] = true
|
||||
table.insert(drinks.drink_table, {'melon', 'Melon', '#ef4646'})
|
||||
table.insert(drinks.drink_table, {'tomato', 'Tomato', '#990000'})
|
||||
table.insert(drinks.drink_table, {'carrot', 'Carrot', '#ed9121'})
|
||||
@ -143,6 +152,13 @@ if minetest.get_modpath('farming') then
|
||||
table.insert(drinks.drink_table, {'pumpkin', 'Pumpkin', '#ffc04c'})
|
||||
table.insert(drinks.drink_table, {'raspberries', 'Raspberry', '#C70039'})
|
||||
table.insert(drinks.drink_table, {'rhubarb', 'Rhubarb', '#fb8461'})
|
||||
table.insert(drinks.drink_table, {'blueberries', 'Blueberry', '#521dcb'})
|
||||
table.insert(drinks.drink_table, {'pineapple', 'Pineapple', '#dcd611'})
|
||||
table.insert(drinks.drink_table, {'blueberries', 'Blueberry', '#521dcb'})
|
||||
table.insert(drinks.drink_table, {'blackberry', 'Blackberry', '#581845'})
|
||||
table.insert(drinks.drink_table, {'strawberry', 'Strawberry', '#ff3636'})
|
||||
minetest.register_alias_force('farming:carrot_juice', 'drinks:jcu_carrot')
|
||||
minetest.register_alias_force('farming:pineapple_juice', 'drinks:jcu_pineapple')
|
||||
end
|
||||
|
||||
if minetest.get_modpath('fruit') then
|
||||
@ -159,6 +175,7 @@ end
|
||||
if minetest.get_modpath('ethereal') then
|
||||
drinks.juiceable['banana'] = true
|
||||
drinks.juiceable['coconut'] = true
|
||||
drinks.juiceable['coconut_slice'] = true
|
||||
drinks.juiceable['orange'] = true
|
||||
drinks.juiceable['strawberry'] = true
|
||||
table.insert(drinks.drink_table, {'banana', 'Banana', '#eced9f'})
|
||||
|
5
mod.conf
5
mod.conf
@ -1,5 +1,6 @@
|
||||
name = drinks
|
||||
depends= buket,default,vessels,stairs
|
||||
depends= bucket,default,vessels,stairs
|
||||
description = Adds a juice press and two juice storage containers. Most fruits and several veggies can be juiced. The resulting drinks can be 'ate' to gain health, or if you are using the thirsty mod, to regain hydration.
|
||||
author = Nathan, Napiophelios
|
||||
optional_depends = hunger,thirsty,plantlife,farming_plus,crops,farming,minetest_doc_modpack,fruits,ethereal
|
||||
optional_depends = hunger,thirsty,plantlife,farming_plus,crops,farming,minetest_doc_modpack,fruit,ethereal
|
||||
title = Drinks
|
||||
|
Loading…
x
Reference in New Issue
Block a user