Compare commits

...

10 Commits

Author SHA1 Message Date
Nathan Salapat
84766f33d2 fix 15 2024-07-16 18:11:20 -05:00
Étienne Gagnon
7f7bd99bc8 Update farming redo support
Add support for blueberry, blackberry & strawberry
2023-09-03 08:46:33 +02:00
rubenwardy
5d11725799
Remove release from mod.conf 2021-02-01 21:30:47 +00:00
Nathan Salapat
1a665743ca
Merge pull request #8 from samuel-p/master
fixed farming:pumkin and added some more fruits
2020-04-02 19:28:33 -05:00
samuel-p
9dff07965c added aliases for farming:carrot_juice and farming:pineapple_juice 2020-04-01 23:32:48 +02:00
samuel-p
0683eb2c6f added farming:blueberries, farming:pineapple, farming:pineapple_ring and default:blueberries 2020-04-01 22:34:26 +02:00
samuel-p
44624d39d4 fixed farming:pumpkin
added farming:pumpkin_slice
added ethereal:coconut_slice
2020-04-01 16:54:56 +02:00
NathanSalapat
66c1ce1be5 fixed a bug that would crash the game if player tried to take liquid out of an empty silo or barrel. 2019-09-01 19:51:28 -05:00
NathanSalapat
631d641249 fixed typo in depends. 2019-06-02 17:01:52 -05:00
NathanSalapat
70c38fafad fixed type in mod.conf 2019-02-20 09:08:00 -06:00
4 changed files with 44 additions and 14 deletions

View File

@ -9,5 +9,5 @@ farming_plus?
crops?
farming?
minetest_doc_modpack?
fruits?
fruit?
ethereal?

View File

@ -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

View File

@ -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'})

View File

@ -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