added honey-mead bottle, updated translations, tweaked and tidied code, added lucky blocks
@ -23,8 +23,10 @@ Change log:
|
|||||||
- 1.3 - Translations updated and French added thanks to TheDarkTiger
|
- 1.3 - Translations updated and French added thanks to TheDarkTiger
|
||||||
- 1.4 - Added bottle of beer and bottle of wheat beer (thanks Darkstalker for textures)
|
- 1.4 - Added bottle of beer and bottle of wheat beer (thanks Darkstalker for textures)
|
||||||
- 1.5 - Added bottle of sake (texture by Darkstalker), code tidy & tweaks, resized bottles and glasses, added some new lucky blocks, support for Thirst mod
|
- 1.5 - Added bottle of sake (texture by Darkstalker), code tidy & tweaks, resized bottles and glasses, added some new lucky blocks, support for Thirst mod
|
||||||
|
- 1.6 - Added bottle of Mead and Cider (textures by Darkstalker), re-arranged
|
||||||
|
code, tweaked lucky blocks, updated translations
|
||||||
|
|
||||||
Lucky Blocks: 16
|
Lucky Blocks: 14
|
||||||
|
|
||||||
|
|
||||||
Wine Mod API
|
Wine Mod API
|
||||||
|
603
init.lua
@ -1,26 +1,28 @@
|
|||||||
|
wine = {}
|
||||||
|
|
||||||
local def = minetest.get_modpath("default")
|
local def = minetest.get_modpath("default")
|
||||||
|
|
||||||
wine = {
|
local snd_d = def and default.node_sound_defaults()
|
||||||
snd_d = def and default.node_sound_defaults(),
|
local snd_g = def and default.node_sound_glass_defaults()
|
||||||
snd_g = def and default.node_sound_glass_defaults(),
|
local snd_l = def and default.node_sound_leaves_defaults()
|
||||||
snd_l = def and default.node_sound_leaves_defaults(),
|
local sand = "default:desert_sand"
|
||||||
sand = "default:desert_sand"
|
|
||||||
}
|
|
||||||
|
|
||||||
-- check for MineClone2
|
-- check for MineClone2
|
||||||
local mcl = minetest.get_modpath("mcl_core")
|
local mcl = minetest.get_modpath("mcl_core")
|
||||||
|
|
||||||
if mcl then
|
if mcl then
|
||||||
wine.snd_d = mcl_sounds.node_sound_glass_defaults()
|
snd_d = mcl_sounds.node_sound_glass_defaults()
|
||||||
wine.snd_g = mcl_sounds.node_sound_defaults()
|
snd_g = mcl_sounds.node_sound_defaults()
|
||||||
wine.snd_l = mcl_sounds.node_sound_leaves_defaults()
|
snd_l = mcl_sounds.node_sound_leaves_defaults()
|
||||||
wine.sand = "mcl_core:sand"
|
sand = "mcl_core:sand"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- check for Unified Inventory
|
-- check for Unified Inventory
|
||||||
local is_uninv = minetest.global_exists("unified_inventory") or false
|
local is_uninv = minetest.global_exists("unified_inventory") or false
|
||||||
|
|
||||||
|
-- is thirsty mod active
|
||||||
|
local thirsty_mod = minetest.get_modpath("thirsty")
|
||||||
|
|
||||||
-- Intllib
|
-- Intllib
|
||||||
local S
|
local S
|
||||||
if minetest.get_modpath("intllib") then
|
if minetest.get_modpath("intllib") then
|
||||||
@ -87,6 +89,7 @@ if is_uninv then
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- add item to ferment list and resulting beverage
|
||||||
function wine:add_item(list)
|
function wine:add_item(list)
|
||||||
|
|
||||||
for n = 1, #list do
|
for n = 1, #list do
|
||||||
@ -105,477 +108,113 @@ function wine:add_item(list)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- selection boxes
|
-- list of beverages (name, desc, has bottle, hunger, thirst)
|
||||||
local gla_sel = {type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}}
|
local beverages = {
|
||||||
local bot_sel = {type = "fixed", fixed = {-0.15, -0.5, -0.15, 0.15, 0.25, 0.15}}
|
{"wine", "Wine", true, 2, 5},
|
||||||
|
{"beer", "Beer", true, 2, 8},
|
||||||
|
{"rum", "Rum", true, 2, 5},
|
||||||
|
{"tequila", "Tequila", true, 2, 3},
|
||||||
|
{"wheat_beer", "Wheat Beer", true, 2, 8},
|
||||||
|
{"sake", "Sake", true, 2, 3},
|
||||||
|
{"bourbon", "Bourbon", true, 2, 3},
|
||||||
|
{"vodka", "Vodka", true, 2, 3},
|
||||||
|
{"cider", "Cider", true, 2, 6},
|
||||||
|
{"mead", "Honey-Mead", true, 4, 5}
|
||||||
|
}
|
||||||
|
|
||||||
-- is thirsty mod active
|
-- create glasses and bottles
|
||||||
local thirsty_mod = minetest.get_modpath("thirsty")
|
for n = 1, #beverages do
|
||||||
|
|
||||||
|
local name = beverages[n][1]
|
||||||
|
local desc = beverages[n][2]
|
||||||
|
local has_bottle = beverages[n][2]
|
||||||
|
local hunger = beverages[n][3]
|
||||||
|
local thirst = beverages[n][3]
|
||||||
|
|
||||||
-- glass of wine
|
-- glass
|
||||||
minetest.register_node("wine:glass_wine", {
|
minetest.register_node("wine:glass_" .. name, {
|
||||||
description = S("Glass of Wine"),
|
description = S("Glass of " .. desc),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
visual_scale = 0.5,
|
visual_scale = 0.5,
|
||||||
tiles = {"wine_glass.png"},
|
tiles = {"wine_" .. name .. "_glass.png"},
|
||||||
inventory_image = "wine_glass.png",
|
inventory_image = "wine_" .. name .. "_glass.png",
|
||||||
wield_image = "wine_glass.png",
|
wield_image = "wine_" .. name .. "_glass.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = gla_sel,
|
selection_box = {
|
||||||
groups = {
|
type = "fixed",
|
||||||
food_wine = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
fixed = {-0.15, -0.5, -0.15, 0.15, 0, 0.15}
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(2),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 5)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- bottle of wine
|
|
||||||
minetest.register_node("wine:bottle_wine", {
|
|
||||||
description = S("Bottle of Wine"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.7,
|
|
||||||
tiles = {"wine_bottle.png"},
|
|
||||||
inventory_image = "wine_bottle.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = bot_sel,
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
|
||||||
sounds = wine.snd_d,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- glass of rum
|
|
||||||
minetest.register_node("wine:glass_rum", {
|
|
||||||
description = S("Rum"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.5,
|
|
||||||
tiles = {"wine_rum_glass.png"},
|
|
||||||
inventory_image = "wine_rum_glass.png",
|
|
||||||
wield_image = "wine_rum_glass.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = gla_sel,
|
|
||||||
groups = {
|
|
||||||
food_rum = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(2),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 5)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- bottle of rum
|
|
||||||
minetest.register_node("wine:bottle_rum", {
|
|
||||||
description = S("Bottle of Rum"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.7,
|
|
||||||
tiles = {"wine_rum_bottle.png"},
|
|
||||||
inventory_image = "wine_rum_bottle.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = bot_sel,
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
|
||||||
sounds = wine.snd_d,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- glass of weizen, or wheat beer
|
|
||||||
-- The image is a lighter version of the one from RiverKpocc @ deviantart.com
|
|
||||||
minetest.register_node("wine:glass_wheat_beer", {
|
|
||||||
description = S("Wheat Beer"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.5,
|
|
||||||
tiles = {"wine_wheat_beer_glass.png"},
|
|
||||||
inventory_image = "wine_wheat_beer_glass.png",
|
|
||||||
wield_image = "wine_wheat_beer_glass.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = gla_sel,
|
|
||||||
groups = {
|
|
||||||
food_beer = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(2),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 8)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- bottle of wheat beer
|
|
||||||
minetest.register_node("wine:bottle_wheat_beer", {
|
|
||||||
description = S("Bottle of Wheat Beer"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.7,
|
|
||||||
tiles = {"wine_wheat_beer_bottle.png"},
|
|
||||||
inventory_image = "wine_wheat_beer_bottle.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = bot_sel,
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
|
||||||
sounds = wine.snd_d,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- glass of beer (thanks to RiverKpocc @ deviantart.com for image)
|
|
||||||
minetest.register_node("wine:glass_beer", {
|
|
||||||
description = S("Beer"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.5,
|
|
||||||
tiles = {"wine_beer_glass.png"},
|
|
||||||
inventory_image = "wine_beer_glass.png",
|
|
||||||
wield_image = "wine_beer_glass.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = gla_sel,
|
|
||||||
groups = {
|
|
||||||
food_beer = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(2),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 8)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- bottle of beer
|
|
||||||
minetest.register_node("wine:bottle_beer", {
|
|
||||||
description = S("Bottle of Beer"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.7,
|
|
||||||
tiles = {"wine_beer_bottle.png"},
|
|
||||||
inventory_image = "wine_beer_bottle.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = bot_sel,
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
|
||||||
sounds = wine.snd_d,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- glass of honey mead
|
|
||||||
minetest.register_node("wine:glass_mead", {
|
|
||||||
description = S("Honey-Mead"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.5,
|
|
||||||
tiles = {"wine_mead_glass.png"},
|
|
||||||
inventory_image = "wine_mead_glass.png",
|
|
||||||
wield_image = "wine_mead_glass.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = gla_sel,
|
|
||||||
groups = {
|
|
||||||
food_mead = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(4),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 5)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(4, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- glass of apple cider
|
|
||||||
minetest.register_node("wine:glass_cider", {
|
|
||||||
description = S("Apple Cider"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.5,
|
|
||||||
tiles = {"wine_cider_glass.png"},
|
|
||||||
inventory_image = "wine_cider_glass.png",
|
|
||||||
wield_image = "wine_cider_glass.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = gla_sel,
|
|
||||||
groups = {
|
|
||||||
food_cider = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(2),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 6)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- bottle of cider
|
|
||||||
minetest.register_node("wine:bottle_cider", {
|
|
||||||
description = S("Bottle of Cider"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.7,
|
|
||||||
tiles = {"wine_cider_bottle.png"},
|
|
||||||
inventory_image = "wine_cider_bottle.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = bot_sel,
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
|
||||||
sounds = wine.snd_d,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- glass of tequila
|
|
||||||
minetest.register_node("wine:glass_tequila", {
|
|
||||||
description = S("Tequila"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.5,
|
|
||||||
tiles = {"wine_tequila.png"},
|
|
||||||
inventory_image = "wine_tequila.png",
|
|
||||||
wield_image = "wine_tequila.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = gla_sel,
|
|
||||||
groups = {
|
|
||||||
food_tequila = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(2),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 3)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- bottle of tequila
|
|
||||||
minetest.register_node("wine:bottle_tequila", {
|
|
||||||
description = S("Bottle of Tequila"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.7,
|
|
||||||
tiles = {"wine_tequila_bottle.png"},
|
|
||||||
inventory_image = "wine_tequila_bottle.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = bot_sel,
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
|
||||||
sounds = wine.snd_d,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- glass of sake
|
|
||||||
minetest.register_node("wine:glass_sake", {
|
|
||||||
description = S("Sake"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.5,
|
|
||||||
tiles = {"wine_sake.png"},
|
|
||||||
inventory_image = "wine_sake.png",
|
|
||||||
wield_image = "wine_sake.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = gla_sel,
|
|
||||||
groups = {
|
|
||||||
food_sake = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(2),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 3)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- bottle of sake
|
|
||||||
minetest.register_node("wine:bottle_sake", {
|
|
||||||
description = S("Bottle of Sake"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.7,
|
|
||||||
tiles = {"wine_sake_bottle.png"},
|
|
||||||
inventory_image = "wine_sake_bottle.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = bot_sel,
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
|
||||||
sounds = wine.snd_d,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- glass of bourbon
|
|
||||||
minetest.register_node("wine:glass_bourbon", {
|
|
||||||
description = S("Glass of Bourbon"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.5,
|
|
||||||
tiles = {"wine_bourbon_glass.png"},
|
|
||||||
inventory_image = "wine_bourbon_glass.png",
|
|
||||||
wield_image = "wine_bourbon_glass.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = gla_sel,
|
|
||||||
groups = {
|
|
||||||
food_wine = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(2),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 3)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- bottle of bourbon
|
|
||||||
minetest.register_node("wine:bottle_bourbon", {
|
|
||||||
description = S("Bottle of Bourbon"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.7,
|
|
||||||
tiles = {"wine_bourbon_bottle.png"},
|
|
||||||
inventory_image = "wine_bourbon_bottle.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = bot_sel,
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
|
||||||
sounds = wine.snd_d,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- glass of vodka
|
|
||||||
minetest.register_node("wine:glass_vodka", {
|
|
||||||
description = S("Glass of Vodka"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.5,
|
|
||||||
tiles = {"wine_vodka_glass.png"},
|
|
||||||
inventory_image = "wine_vodka_glass.png",
|
|
||||||
wield_image = "wine_vodka_glass.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = gla_sel,
|
|
||||||
groups = {
|
|
||||||
food_wine = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
alcohol = 1
|
|
||||||
},
|
|
||||||
sounds = wine.snd_g,
|
|
||||||
-- on_use = minetest.item_eat(2),
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
if user then
|
|
||||||
if thirsty_mod then
|
|
||||||
thirsty.drink(user, 3)
|
|
||||||
end
|
|
||||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- bottle of vodka
|
|
||||||
minetest.register_node("wine:bottle_vodka", {
|
|
||||||
description = S("Bottle of Vodka"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.7,
|
|
||||||
tiles = {"wine_vodka_bottle.png"},
|
|
||||||
inventory_image = "wine_vodka_bottle.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = bot_sel,
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
|
||||||
sounds = wine.snd_d,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- bottle recipes
|
|
||||||
local bottles = {"wine", "beer", "rum", "tequila", "wheat_beer", "sake",
|
|
||||||
"bourbon", "vodka", "cider"}
|
|
||||||
|
|
||||||
for n = 1, #bottles do
|
|
||||||
|
|
||||||
local glass = "wine:glass_" .. bottles[n]
|
|
||||||
local bottle = "wine:bottle_" .. bottles[n]
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = bottle,
|
|
||||||
recipe = {
|
|
||||||
{glass, glass, glass},
|
|
||||||
{glass, glass, glass},
|
|
||||||
{glass, glass, glass},
|
|
||||||
},
|
},
|
||||||
|
groups = {
|
||||||
|
vessel = 1, dig_immediate = 3,
|
||||||
|
attached_node = 1, alcohol = 1
|
||||||
|
},
|
||||||
|
sounds = snd_g,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
|
||||||
|
if user then
|
||||||
|
|
||||||
|
if thirsty_mod then
|
||||||
|
thirsty.drink(user, 5)
|
||||||
|
end
|
||||||
|
|
||||||
|
return minetest.do_item_eat(2, nil,
|
||||||
|
itemstack, user, pointed_thing)
|
||||||
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
-- bottle
|
||||||
type = "shapeless",
|
if has_bottle then
|
||||||
output = glass .. " 9",
|
|
||||||
recipe = {bottle},
|
minetest.register_node("wine:bottle_" .. name, {
|
||||||
})
|
description = S("Bottle of " .. desc),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
visual_scale = 0.7,
|
||||||
|
tiles = {"wine_" .. name .. "_bottle.png"},
|
||||||
|
inventory_image = "wine_" .. name .. "_bottle.png",
|
||||||
|
paramtype = "light",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
walkable = false,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.15, -0.5, -0.15, 0.15, 0.25, 0.15}
|
||||||
|
},
|
||||||
|
groups = {dig_immediate = 3, attached_node = 1, vessel = 1},
|
||||||
|
sounds = snd_d,
|
||||||
|
})
|
||||||
|
|
||||||
|
local glass = "wine:glass_" .. name
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "wine:bottle_" .. name,
|
||||||
|
recipe = {
|
||||||
|
{glass, glass, glass},
|
||||||
|
{glass, glass, glass},
|
||||||
|
{glass, glass, glass},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = glass .. " 9",
|
||||||
|
recipe = {"wine:bottle_" .. name},
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- override to add food group to wine glass
|
||||||
|
minetest.override_item("wine:glass_wine", {
|
||||||
|
groups = {
|
||||||
|
food_wine = 1, vessel = 1, dig_immediate = 3,
|
||||||
|
attached_node = 1, alcohol = 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
-- blue agave
|
-- blue agave
|
||||||
minetest.register_node("wine:blue_agave", {
|
minetest.register_node("wine:blue_agave", {
|
||||||
description = S("Blue Agave"),
|
description = S("Blue Agave"),
|
||||||
@ -593,7 +232,7 @@ minetest.register_node("wine:blue_agave", {
|
|||||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0.3, 0.2}
|
fixed = {-0.2, -0.5, -0.2, 0.2, 0.3, 0.2}
|
||||||
},
|
},
|
||||||
groups = {snappy = 3, attached_node = 1, plant = 1},
|
groups = {snappy = 3, attached_node = 1, plant = 1},
|
||||||
sounds = wine.snd_l,
|
sounds = snd_l,
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
|
|
||||||
@ -624,7 +263,7 @@ minetest.register_node("wine:blue_agave", {
|
|||||||
n = minetest.find_nodes_in_area_under_air(
|
n = minetest.find_nodes_in_area_under_air(
|
||||||
{x = pos.x + 1, y = pos.y - 1, z = pos.z + 1},
|
{x = pos.x + 1, y = pos.y - 1, z = pos.z + 1},
|
||||||
{x = pos.x - 1, y = pos.y - 2, z = pos.z - 1},
|
{x = pos.x - 1, y = pos.y - 2, z = pos.z - 1},
|
||||||
{wine.sand})
|
{sand})
|
||||||
|
|
||||||
-- place blue agave
|
-- place blue agave
|
||||||
if n and #n > 0 then
|
if n and #n > 0 then
|
||||||
@ -648,21 +287,21 @@ minetest.register_craft( {
|
|||||||
|
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {wine.sand},
|
place_on = {sand},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
fill_ratio = 0.001,
|
fill_ratio = 0.001,
|
||||||
biomes = {"desert"},
|
biomes = {"desert"},
|
||||||
decoration = {"wine:blue_agave"},
|
decoration = {"wine:blue_agave"},
|
||||||
y_min = 15,
|
y_min = 15,
|
||||||
y_max = 50,
|
y_max = 50,
|
||||||
spawn_by = wine.sand,
|
spawn_by = sand,
|
||||||
num_spawn_by = 6,
|
num_spawn_by = 6,
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("bonemeal") then
|
if minetest.get_modpath("bonemeal") then
|
||||||
|
|
||||||
bonemeal:add_deco({
|
bonemeal:add_deco({
|
||||||
{wine.sand, {}, {"default:dry_shrub", "wine:blue_agave", "", ""} }
|
{sand, {}, {"default:dry_shrub", "wine:blue_agave", "", ""} }
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -799,8 +438,8 @@ minetest.register_node("wine:wine_barrel", {
|
|||||||
-- the default stack, from which objects will be taken
|
-- the default stack, from which objects will be taken
|
||||||
input_inventory = "dst",
|
input_inventory = "dst",
|
||||||
connect_sides = {
|
connect_sides = {
|
||||||
left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
|
left = 1, right = 1, back = 1,
|
||||||
} end end)(),
|
front = 1, bottom = 1, top = 1} } end end)(),
|
||||||
|
|
||||||
on_timer = function(pos)
|
on_timer = function(pos)
|
||||||
|
|
||||||
@ -909,12 +548,14 @@ minetest.register_lbm({
|
|||||||
if minetest.get_modpath("lucky_block") then
|
if minetest.get_modpath("lucky_block") then
|
||||||
|
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
|
{"fal", {"default:water_source"}, 1, true, 4},
|
||||||
{"dro", {"wine:glass_wine"}, 5},
|
{"dro", {"wine:glass_wine"}, 5},
|
||||||
{"dro", {"wine:glass_beer"}, 5},
|
{"dro", {"wine:glass_beer"}, 5},
|
||||||
{"dro", {"wine:glass_wheat_beer"}, 5},
|
{"dro", {"wine:glass_wheat_beer"}, 5},
|
||||||
{"dro", {"wine:glass_mead"}, 5},
|
{"dro", {"wine:glass_mead"}, 5},
|
||||||
{"dro", {"wine:glass_cider"}, 5},
|
{"dro", {"wine:glass_cider"}, 5},
|
||||||
{"dro", {"wine:glass_rum"}, 5},
|
{"dro", {"wine:glass_rum"}, 5},
|
||||||
|
{"dro", {"wine:glass_sake"}, 5},
|
||||||
{"dro", {"wine:glass_tequila"}, 5},
|
{"dro", {"wine:glass_tequila"}, 5},
|
||||||
{"dro", {"wine:glass_bourbon"}, 5},
|
{"dro", {"wine:glass_bourbon"}, 5},
|
||||||
{"dro", {"wine:glass_vodka"}, 5},
|
{"dro", {"wine:glass_vodka"}, 5},
|
||||||
@ -924,10 +565,12 @@ if minetest.get_modpath("lucky_block") then
|
|||||||
{name = "wine:bottle_wine", max = 1},
|
{name = "wine:bottle_wine", max = 1},
|
||||||
{name = "wine:bottle_tequila", max = 1},
|
{name = "wine:bottle_tequila", max = 1},
|
||||||
{name = "wine:bottle_rum", max = 1},
|
{name = "wine:bottle_rum", max = 1},
|
||||||
|
{name = "wine:bottle_cider", max = 1},
|
||||||
{name = "wine:bottle_bourbon", max = 1},
|
{name = "wine:bottle_bourbon", max = 1},
|
||||||
{name = "wine:bottle_vodka", max = 1},
|
{name = "wine:bottle_vodka", max = 1},
|
||||||
{name = "wine:wine_barrel", max = 1},
|
{name = "wine:wine_barrel", max = 1},
|
||||||
{name = "wine:bottle_sake", max = 1},
|
{name = "wine:bottle_sake", max = 1},
|
||||||
|
{name = "wine:bottle_mead", max = 1},
|
||||||
{name = "wine:bottle_beer", max = 1},
|
{name = "wine:bottle_beer", max = 1},
|
||||||
{name = "wine:bottle_wheat_beer", max = 1},
|
{name = "wine:bottle_wheat_beer", max = 1},
|
||||||
{name = "wine:blue_agave", max = 4}}},
|
{name = "wine:blue_agave", max = 4}}},
|
||||||
|
19
license.txt
@ -20,12 +20,19 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
Textures by TenPlus1 unless listed below (CC-By-3.0)
|
||||||
|
|
||||||
wine_bourbon_bottle.png has royalty free license
|
Mikhail Miroscnichenko @ dreamstime.com (royalty free license)
|
||||||
(Mikhail Miroscnichenko @ dreamstime.com)
|
wine_bourbon_bottle.png
|
||||||
|
|
||||||
|
RiverKpocc @ deviantart.com
|
||||||
|
wine_beer_glass.png
|
||||||
|
wine_wheat_beer_glass.png
|
||||||
|
|
||||||
Textures by Darkstalker (cc-by-3.0 license)
|
Textures by Darkstalker (cc-by-3.0 license)
|
||||||
wine_beer_bottle.png
|
wine_beer_bottle.png
|
||||||
wine_wheat_beer_bottle.png
|
wine_wheat_beer_bottle.png
|
||||||
wine_sake_bottle.png
|
wine_sake_bottle.png
|
||||||
wine_cider.bottle.png
|
wine_cider.bottle.png
|
||||||
|
wine_mead_bottle.png
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# textdomain: wine
|
# textdomain: wine
|
||||||
# author: Xanthin
|
# author: Xanthin
|
||||||
# author: TheDarkTiger
|
# author: TheDarkTiger
|
||||||
# last update: 2020/May/11
|
# last update: 2020/May/12
|
||||||
|
|
||||||
Glass of Wine=Glas Wein
|
Glass of Wine=Glas Wein
|
||||||
Bottle of Wine=Flasche Wein
|
Bottle of Wine=Flasche Wein
|
||||||
@ -13,6 +13,7 @@ Bottle of Wheat Beer=Flasche Weizenbier
|
|||||||
Beer=Bier
|
Beer=Bier
|
||||||
Bottle of Beer=Flasche Bier
|
Bottle of Beer=Flasche Bier
|
||||||
Honey-Mead=Honigwein
|
Honey-Mead=Honigwein
|
||||||
|
Bottle of Honey-Mead=Flasche Honigwein
|
||||||
Apple Cider=Apfelwein
|
Apple Cider=Apfelwein
|
||||||
Bottle of Cider=Flasche Apfelwein
|
Bottle of Cider=Flasche Apfelwein
|
||||||
Tequila=Tequila
|
Tequila=Tequila
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# author: Unknown
|
# author: Unknown
|
||||||
# author: TenPlus1
|
# author: TenPlus1
|
||||||
# author: TheDarkTiger
|
# author: TheDarkTiger
|
||||||
# last update: 2020/May/11
|
# last update: 2020/May/12
|
||||||
|
|
||||||
Glass of Wine=Copa de vino
|
Glass of Wine=Copa de vino
|
||||||
Bottle of Wine=Botella de vino
|
Bottle of Wine=Botella de vino
|
||||||
@ -14,6 +14,7 @@ Bottle of Wheat Beer=Botella de Cerveza de Trigo
|
|||||||
Beer=Cerveza
|
Beer=Cerveza
|
||||||
Bottle of Beer=Botella de Cerveza
|
Bottle of Beer=Botella de Cerveza
|
||||||
Honey-Mead=Bebida de Miel
|
Honey-Mead=Bebida de Miel
|
||||||
|
Bottle of Honey-Mead=Botella de Bebida de Miel
|
||||||
Apple Cider=Sidra de Manzana
|
Apple Cider=Sidra de Manzana
|
||||||
Bottle of Cider=Botella de Sidra de Manzana
|
Bottle of Cider=Botella de Sidra de Manzana
|
||||||
Tequila=Tequíla
|
Tequila=Tequíla
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Traduction Française du mod Wine par TenPlus1
|
# Traduction Française du mod Wine par TenPlus1
|
||||||
# textdomain: wine
|
# textdomain: wine
|
||||||
# author: TheDarkTiger
|
# author: TheDarkTiger
|
||||||
# last update: 2020/May/08
|
# last update: 2020/May/12
|
||||||
|
|
||||||
Glass of Wine=Verre de Vin
|
Glass of Wine=Verre de Vin
|
||||||
Bottle of Wine=Bouteille de Vin
|
Bottle of Wine=Bouteille de Vin
|
||||||
@ -12,6 +12,7 @@ Bottle of Wheat Beer=Bouteille de Bière de Blé
|
|||||||
Beer=Bière
|
Beer=Bière
|
||||||
Bottle of Beer=Bouteille de Bière
|
Bottle of Beer=Bouteille de Bière
|
||||||
Honey-Mead=Hydromel
|
Honey-Mead=Hydromel
|
||||||
|
Bottle of Honey-Mead=Bouteille de Hydromel
|
||||||
Apple Cider=Cidre Brut
|
Apple Cider=Cidre Brut
|
||||||
Bottle of Cider=Bouteille de Cidre
|
Bottle of Cider=Bouteille de Cidre
|
||||||
Tequila=Tequila
|
Tequila=Tequila
|
||||||
|
@ -12,6 +12,7 @@ Bottle of Wheat Beer=
|
|||||||
Beer=
|
Beer=
|
||||||
Bottle of Beer=
|
Bottle of Beer=
|
||||||
Honey-Mead=
|
Honey-Mead=
|
||||||
|
Bottle of Honey-Mead=
|
||||||
Apple Cider=
|
Apple Cider=
|
||||||
Bottle of Cider=
|
Bottle of Cider=
|
||||||
Tequila=
|
Tequila=
|
||||||
|
BIN
textures/wine_mead_bottle.png
Normal file
After Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 374 B |