fixed farming_plus nodes.

This commit is contained in:
NathanSalapat 2016-11-15 11:25:46 -06:00
parent 7157d6c0ee
commit 0740d9543a
2 changed files with 17 additions and 15 deletions

View File

@ -67,7 +67,9 @@ minetest.register_node('drinks:juice_press', {
local timer = minetest.get_node_timer(pos)
local instack = inv:get_stack("src", 1)
local fruitstack = instack:get_name()
local mod, fruit, trash = fruitstack:match("([^:]+):([^:]+)_([^:]+)")
local mod, fruit = fruitstack:match("([^:]+):([^:]+)")
print (mod)
print (fruit)
if drinks.juiceable[fruit] then
meta:set_string('fruit', fruit)
local outstack = inv:get_stack("dst", 1)

View File

@ -32,23 +32,23 @@ end
if minetest.get_modpath('farming_plus') then
drinks.juiceable['banana'] = true
drinks.juiceable['lemon'] = true
drinks.juiceable['lemon_item'] = true
drinks.juiceable['melon'] = true
drinks.juiceable['orange'] = true
drinks.juiceable['peach'] = true
drinks.juiceable['rhubarb'] = true
drinks.juiceable['tomato'] = true
drinks.juiceable['strawberry'] = true
drinks.juiceable['raspberry'] = true
drinks.juiceable['orange_item'] = true
drinks.juiceable['peach_item'] = true
drinks.juiceable['rhubarb_item'] = true
drinks.juiceable['tomato_item'] = true
drinks.juiceable['strawberry_item'] = true
drinks.juiceable['raspberry_item'] = true
table.insert(drinks.drink_table, {'banana', 'Banana', '#eced9f'})
table.insert(drinks.drink_table, {'lemon', 'Lemon', '#feffaa'})
table.insert(drinks.drink_table, {'lemon_item', 'Lemon', '#feffaa'})
table.insert(drinks.drink_table, {'melon', 'Melon', '#ef4646'})
table.insert(drinks.drink_table, {'orange', 'Orange', '#ffc417'})
table.insert(drinks.drink_table, {'peach', 'Peach', '#f2bc1e'})
table.insert(drinks.drink_table, {'rhubarb', 'Rhubarb', '#fb8461'})
table.insert(drinks.drink_table, {'tomato', 'Tomato', '#d03a0e'})
table.insert(drinks.drink_table, {'strawberry', 'Strawberry', '#ff3636'})
table.insert(drinks.drink_table, {'raspberry', 'Raspberry', '#C70039'})
table.insert(drinks.drink_table, {'orange_item', 'Orange', '#ffc417'})
table.insert(drinks.drink_table, {'peach_item', 'Peach', '#f2bc1e'})
table.insert(drinks.drink_table, {'rhubarb_item', 'Rhubarb', '#fb8461'})
table.insert(drinks.drink_table, {'tomato_item', 'Tomato', '#d03a0e'})
table.insert(drinks.drink_table, {'strawberry_item', 'Strawberry', '#ff3636'})
table.insert(drinks.drink_table, {'raspberry_item', 'Raspberry', '#C70039'})
end
if minetest.get_modpath('thirsty') then