Compare commits
10 Commits
3a15c1aa36
...
919335538e
Author | SHA1 | Date | |
---|---|---|---|
|
919335538e | ||
|
420d83db6e | ||
|
969e03b2d5 | ||
|
69f2827805 | ||
|
9aa9fb2d58 | ||
|
191d4acb90 | ||
|
71431a298d | ||
|
937e1c6cb5 | ||
|
7bb220900b | ||
|
7964b7f64a |
@ -73,6 +73,7 @@ minetest.register_node("wine:blue_agave", {
|
||||
end
|
||||
})
|
||||
|
||||
wine.add_eatable("wine:blue_agave", 2)
|
||||
|
||||
-- blue agave into cyan dye
|
||||
if minetest.get_modpath("mcl_dye") then
|
||||
@ -99,7 +100,7 @@ minetest.register_craft({
|
||||
|
||||
-- cook blue agave into a sugar syrup
|
||||
minetest.register_craftitem("wine:agave_syrup", {
|
||||
description = "Agave Syrup",
|
||||
description = S("Agave Syrup"),
|
||||
inventory_image = "wine_agave_syrup.png",
|
||||
groups = {food_sugar = 1, vessel = 1, flammable = 3}
|
||||
})
|
||||
|
51
init.lua
51
init.lua
@ -19,36 +19,14 @@ if mcl then
|
||||
glass_item = "mcl_core:glass"
|
||||
end
|
||||
|
||||
|
||||
-- check for Unified Inventory
|
||||
local is_uninv = minetest.global_exists("unified_inventory") or false
|
||||
|
||||
|
||||
-- is thirsty mod active
|
||||
local thirsty_mod = minetest.get_modpath("thirsty")
|
||||
|
||||
|
||||
-- translation support
|
||||
local S
|
||||
if minetest.get_translator then
|
||||
S = minetest.get_translator("wine")
|
||||
else
|
||||
S = function(s, a, ...)
|
||||
if a == nil then
|
||||
return s
|
||||
end
|
||||
a = {a, ...}
|
||||
return s:gsub("(@?)@(%(?)(%d+)(%)?)", function(e, o, n, c)
|
||||
if e == ""then
|
||||
return a[tonumber(n)] .. (o == "" and c or "")
|
||||
else
|
||||
return "@" .. o .. n .. c
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
wine.S = S
|
||||
|
||||
local S = minetest.get_translator("wine") ; wine.S = S
|
||||
|
||||
-- Unified Inventory hints
|
||||
if is_uninv then
|
||||
@ -61,7 +39,6 @@ if is_uninv then
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
-- fermentation list (drinks added in drinks.lua)
|
||||
local ferment = {}
|
||||
|
||||
@ -92,6 +69,20 @@ function wine:add_item(list)
|
||||
end
|
||||
end
|
||||
|
||||
-- helper function
|
||||
function wine.add_eatable(item, hp)
|
||||
|
||||
local def = minetest.registered_items[item]
|
||||
|
||||
if def then
|
||||
|
||||
local groups = table.copy(def.groups) or {}
|
||||
|
||||
groups.eatable = hp ; groups.flammable = 2
|
||||
|
||||
minetest.override_item(item, {groups = groups})
|
||||
end
|
||||
end
|
||||
|
||||
-- add drink with bottle
|
||||
function wine:add_drink(name, desc, has_bottle, num_hunger, num_thirst, alcoholic)
|
||||
@ -109,8 +100,7 @@ function wine:add_drink(name, desc, has_bottle, num_hunger, num_thirst, alcoholi
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.15, -0.5, -0.15, 0.15, 0, 0.15}
|
||||
type = "fixed", fixed = {-0.15, -0.5, -0.15, 0.15, 0, 0.15}
|
||||
},
|
||||
groups = {
|
||||
vessel = 1, dig_immediate = 3,
|
||||
@ -132,6 +122,8 @@ function wine:add_drink(name, desc, has_bottle, num_hunger, num_thirst, alcoholi
|
||||
end
|
||||
})
|
||||
|
||||
wine.add_eatable("wine:glass_" .. name, num_hunger)
|
||||
|
||||
-- bottle
|
||||
if has_bottle then
|
||||
|
||||
@ -142,11 +134,11 @@ function wine:add_drink(name, desc, has_bottle, num_hunger, num_thirst, alcoholi
|
||||
tiles = {"wine_" .. name .. "_bottle.png"},
|
||||
inventory_image = "wine_" .. name .. "_bottle.png",
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.15, -0.5, -0.15, 0.15, 0.25, 0.15}
|
||||
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,
|
||||
@ -258,13 +250,14 @@ minetest.register_node("wine:wine_barrel", {
|
||||
mesh = "wine_barrel.obj",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {
|
||||
choppy = 2, oddly_breakable_by_hand = 1, flammable = 2,
|
||||
tubedevice = 1, tubedevice_receiver = 1, axey = 1
|
||||
},
|
||||
legacy_facedir_simple = true,
|
||||
|
||||
on_place = minetest.rotate_node,
|
||||
--on_place = minetest.rotate_node,
|
||||
|
||||
on_construct = function(pos)
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
# Template for translations of wine mod
|
||||
# textdomain: wine
|
||||
# author: ?
|
||||
# last update: 2020/October/27
|
||||
|
||||
Glass of Wine=
|
||||
Bottle of Wine=
|
||||
Glass of Beer=
|
||||
|
@ -1,9 +1,4 @@
|
||||
# Deutsche Übersetzung der wine Mod
|
||||
# textdomain: wine
|
||||
# author: Xanthin
|
||||
# author: TheDarkTiger
|
||||
# last update: 2022/August/20
|
||||
|
||||
Glass of Wine=Glas Wein
|
||||
Bottle of Wine=Flasche Wein
|
||||
Glass of Beer=Bier
|
||||
|
@ -1,10 +1,4 @@
|
||||
# Traducción al español del mod Wine por TenPlus1
|
||||
# textdomain: wine
|
||||
# author: Unknown
|
||||
# author: TenPlus1
|
||||
# author: TheDarkTiger
|
||||
# last update: 2022/August/20
|
||||
|
||||
Glass of Wine=Copa de vino
|
||||
Bottle of Wine=Botella de vino
|
||||
Glass of Beer=Cerveza
|
||||
|
@ -1,8 +1,4 @@
|
||||
# Traduction Française du mod Wine par TenPlus1
|
||||
# textdomain: wine
|
||||
# author: TheDarkTiger
|
||||
# last update: 2023/Oct/06
|
||||
|
||||
Glass of Wine=Verre de Vin
|
||||
Bottle of Wine=Bouteille de Vin
|
||||
Glass of Beer=Bière
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 237 B |
Loading…
x
Reference in New Issue
Block a user