added support for plantlife modpack.
This commit is contained in:
parent
b779091826
commit
41afa438a3
@ -3,3 +3,4 @@ default
|
|||||||
vessels
|
vessels
|
||||||
hunger?
|
hunger?
|
||||||
thirsty?
|
thirsty?
|
||||||
|
plantlife?
|
||||||
|
@ -74,7 +74,7 @@ minetest.register_node('drinks:juice_press', {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if vessel == 'vessels:glass_bottle' then
|
if vessel == 'vessels:glass_bottle' then
|
||||||
if instack:get_count() >= 4 then
|
if instack:get_count() >= 8 then
|
||||||
meta:set_string('container', 'jbo_')
|
meta:set_string('container', 'jbo_')
|
||||||
meta:set_string('fruitnumber', 8)
|
meta:set_string('fruitnumber', 8)
|
||||||
meta:set_string('infotext', 'Juicing...')
|
meta:set_string('infotext', 'Juicing...')
|
||||||
@ -97,7 +97,7 @@ minetest.register_node('drinks:juice_press', {
|
|||||||
if instack:get_count() >= 2 then
|
if instack:get_count() >= 2 then
|
||||||
local under_node = {x=pos.x, y=pos.y-1, z=pos.z}
|
local under_node = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||||
local under_node_name = minetest.get_node_or_nil(under_node)
|
local under_node_name = minetest.get_node_or_nil(under_node)
|
||||||
if under_node_name.name == 'drink:liquid_barrel' then
|
if under_node_name.name == 'drinks:liquid_barrel' then
|
||||||
local meta_u = minetest.env:get_meta(under_node)
|
local meta_u = minetest.env:get_meta(under_node)
|
||||||
local barrel_fruit = meta_u:get_string('fruit')
|
local barrel_fruit = meta_u:get_string('fruit')
|
||||||
if fruit == barrel_fruit or barrel_fruit == 'empty' then
|
if fruit == barrel_fruit or barrel_fruit == 'empty' then
|
||||||
|
13
init.lua
13
init.lua
@ -17,6 +17,19 @@ if minetest.get_modpath('default') then
|
|||||||
table.insert(drinks.drink_table, {'cactus', 'Cactus', '#96F97B'})
|
table.insert(drinks.drink_table, {'cactus', 'Cactus', '#96F97B'})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath('bushes_classic') then
|
||||||
|
drinks.juiceable['blackberry'] = true
|
||||||
|
drinks.juiceable['blueberry'] = true
|
||||||
|
drinks.juiceable['gooseberry'] = true
|
||||||
|
drinks.juiceable['raspberry'] = true
|
||||||
|
drinks.juiceable['strawberry'] = true
|
||||||
|
table.insert(drinks.drink_table, {'blackberry', 'Blackberry', '#581845'})
|
||||||
|
table.insert(drinks.drink_table, {'blueberry', 'Blueberry', '#521dcb'})
|
||||||
|
table.insert(drinks.drink_table, {'gooseberry', 'Gooseberry', '#9cf57c'})
|
||||||
|
table.insert(drinks.drink_table, {'raspberry', 'Raspberry', '#C70039'})
|
||||||
|
table.insert(drinks.drink_table, {'strawberry', 'Strawberry', '#ff3636'})
|
||||||
|
end
|
||||||
|
|
||||||
if minetest.get_modpath('thirsty') then
|
if minetest.get_modpath('thirsty') then
|
||||||
dofile(minetest.get_modpath('drinks')..'/drinks.lua')
|
dofile(minetest.get_modpath('drinks')..'/drinks.lua')
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user