Compare commits

...

10 Commits

Author SHA1 Message Date
tenplus1
919335538e remove placement rotation for wrench mod to work 2024-12-27 12:20:29 +00:00
tenplus1
420d83db6e fix interlace error 2024-09-20 08:22:21 +01:00
tenplus1
969e03b2d5 remove xp desc. 2024-08-03 23:52:48 +01:00
tenplus1
69f2827805 update {eatable} function 2024-07-27 18:29:06 +01:00
tenplus1
9aa9fb2d58 code tidy 2024-07-27 08:31:21 +01:00
tenplus1
191d4acb90 add helper function for {eatable} 2024-07-26 17:23:29 +01:00
tenplus1
71431a298d add {eatable} group to food items and update infotext 2024-07-26 14:31:27 +01:00
tenplus1
937e1c6cb5 set is_ground_content (thx SwissAlpS) 2024-02-28 08:11:58 +00:00
tenplus1
7bb220900b remove meta from translations 2023-10-08 17:27:43 +01:00
tenplus1
7964b7f64a fix agave syrup translation (thx TheDarkTiger) 2023-10-07 11:47:09 +01:00
7 changed files with 24 additions and 49 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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