update cottages, cool_trees, bonemeal, homedecor, mesecons, moretrees,

plantlife, unified dyes
This commit is contained in:
VanessaE 2020-12-02 10:07:21 -05:00
parent 85dd448379
commit 1c425e2a31
61 changed files with 799 additions and 330 deletions

View File

@ -1,3 +1,4 @@
default
doc?
intllib?
intllib?
technic?

View File

@ -1,26 +1,127 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Script to generate the template file and update the translation files.
# Copy the script into the mod or modpack root folder and run it there.
#
# Copyright (C) 2019 Joachim Stolberg, 2020 FaceDeer
# Copyright (C) 2019 Joachim Stolberg, 2020 FaceDeer, 2020 Louis Royer
# LGPLv2.1+
#
# See https://github.com/minetest-tools/update_translations for
# potential future updates to this script.
from __future__ import print_function
import os, fnmatch, re, shutil, errno
from sys import argv as _argv
from sys import stderr as _stderr
verbose = False
# Running params
params = {"recursive": False,
"help": False,
"mods": False,
"verbose": False,
"folders": [],
"no-old-file": False
}
# Available CLI options
options = {"recursive": ['--recursive', '-r'],
"help": ['--help', '-h'],
"mods": ['--installed-mods'],
"verbose": ['--verbose', '-v'],
"no-old-file": ['--no-old-file']
}
# Strings longer than this will have extra space added between
# them in the translation files to make it easier to distinguish their
# beginnings and endings at a glance
doublespace_threshold = 60
def set_params_folders(tab: list):
'''Initialize params["folders"] from CLI arguments.'''
# Discarding argument 0 (tool name)
for param in tab[1:]:
stop_param = False
for option in options:
if param in options[option]:
stop_param = True
break
if not stop_param:
params["folders"].append(os.path.abspath(param))
def set_params(tab: list):
'''Initialize params from CLI arguments.'''
for option in options:
for option_name in options[option]:
if option_name in tab:
params[option] = True
break
def print_help(name):
'''Prints some help message.'''
print(f'''SYNOPSIS
{name} [OPTIONS] [PATHS...]
DESCRIPTION
{', '.join(options["help"])}
prints this help message
{', '.join(options["recursive"])}
run on all subfolders of paths given
{', '.join(options["mods"])}
run on locally installed modules
{', '.join(options["no-old-file"])}
do not create *.old files
{', '.join(options["verbose"])}
add output information
''')
def main():
'''Main function'''
set_params(_argv)
set_params_folders(_argv)
if params["help"]:
print_help(_argv[0])
elif params["recursive"] and params["mods"]:
print("Option --installed-mods is incompatible with --recursive")
else:
# Add recursivity message
print("Running ", end='')
if params["recursive"]:
print("recursively ", end='')
# Running
if params["mods"]:
print(f"on all locally installed modules in {os.path.abspath('~/.minetest/mods/')}")
run_all_subfolders("~/.minetest/mods")
elif len(params["folders"]) >= 2:
print("on folder list:", params["folders"])
for f in params["folders"]:
if params["recursive"]:
run_all_subfolders(f)
else:
update_folder(f)
elif len(params["folders"]) == 1:
print("on folder", params["folders"][0])
if params["recursive"]:
run_all_subfolders(params["folders"][0])
else:
update_folder(params["folders"][0])
else:
print("on folder", os.path.abspath("./"))
if params["recursive"]:
run_all_subfolders(os.path.abspath("./"))
else:
update_folder(os.path.abspath("./"))
#group 2 will be the string, groups 1 and 3 will be the delimiters (" or ')
#See https://stackoverflow.com/questions/46967465/regex-match-text-in-either-single-or-double-quote
pattern_lua = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
pattern_lua_bracketed = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*\[\[(.*?)\]\][\s,\)]', re.DOTALL)
pattern_lua_s = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
pattern_lua_fs = re.compile(r'[\.=^\t,{\(\s]N?FS\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
pattern_lua_bracketed_s = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*\[\[(.*?)\]\][\s,\)]', re.DOTALL)
pattern_lua_bracketed_fs = re.compile(r'[\.=^\t,{\(\s]N?FS\(\s*\[\[(.*?)\]\][\s,\)]', re.DOTALL)
# Handles "concatenation" .. " of strings"
pattern_concat = re.compile(r'["\'][\s]*\.\.[\s]*["\']', re.DOTALL)
pattern_tr = re.compile(r'(.+?[^@])=(.+)')
pattern_tr = re.compile(r'(.*?[^@])=(.*)')
pattern_name = re.compile(r'^name[ ]*=[ ]*([^ \n]*)')
pattern_tr_filename = re.compile(r'\.tr$')
pattern_po_language_code = re.compile(r'(.*)\.po$')
@ -28,7 +129,7 @@ pattern_po_language_code = re.compile(r'(.*)\.po$')
#attempt to read the mod's name from the mod.conf file. Returns None on failure
def get_modname(folder):
try:
with open(folder + "mod.conf", "r", encoding='utf-8') as mod_conf:
with open(os.path.join(folder, "mod.conf"), "r", encoding='utf-8') as mod_conf:
for line in mod_conf:
match = pattern_name.match(line)
if match:
@ -40,7 +141,7 @@ def get_modname(folder):
#If there are already .tr files in /locale, returns a list of their names
def get_existing_tr_files(folder):
out = []
for root, dirs, files in os.walk(folder + 'locale/'):
for root, dirs, files in os.walk(os.path.join(folder, 'locale/')):
for name in files:
if pattern_tr_filename.search(name):
out.append(name)
@ -76,7 +177,7 @@ def process_po_file(text):
# any "no longer used" strings will be preserved.
# Note that "fuzzy" tags will be lost in this process.
def process_po_files(folder, modname):
for root, dirs, files in os.walk(folder + 'locale/'):
for root, dirs, files in os.walk(os.path.join(folder, 'locale/')):
for name in files:
code_match = pattern_po_language_code.match(name)
if code_match == None:
@ -85,13 +186,13 @@ def process_po_files(folder, modname):
tr_name = modname + "." + language_code + ".tr"
tr_file = os.path.join(root, tr_name)
if os.path.exists(tr_file):
if verbose:
print(tr_name + " already exists, ignoring " + name)
if params["verbose"]:
print(f"{tr_name} already exists, ignoring {name}")
continue
fname = os.path.join(root, name)
with open(fname, "r", encoding='utf-8') as po_file:
if verbose:
print("Importing translations from " + name)
if params["verbose"]:
print(f"Importing translations from {name}")
text = process_po_file(po_file.read())
with open(tr_file, "wt", encoding='utf-8') as tr_out:
tr_out.write(text)
@ -109,10 +210,12 @@ def mkdir_p(path):
# Converts the template dictionary to a text to be written as a file
# dKeyStrings is a dictionary of localized string to source file sets
# dOld is a dictionary of existing translations, for use when updating
# existing .tr files
def strings_to_text(dkeyStrings, dOld, mod_name):
lOut = ["# textdomain: %s\n" % mod_name]
# dOld is a dictionary of existing translations and comments from
# the previous version of this text
def strings_to_text(dkeyStrings, dOld, mod_name, header_comments):
lOut = [f"# textdomain: {mod_name}\n"]
if header_comments is not None:
lOut.append(header_comments)
dGroupedBySource = {}
@ -127,27 +230,52 @@ def strings_to_text(dkeyStrings, dOld, mod_name):
lSourceKeys = list(dGroupedBySource.keys())
lSourceKeys.sort()
for source in lSourceKeys:
lOut.append("")
localizedStrings = dGroupedBySource[source]
localizedStrings.sort()
lOut.append("")
lOut.append(source)
lOut.append("")
for localizedString in localizedStrings:
val = dOld.get(localizedString, "")
lOut.append("%s=%s" % (localizedString, val))
val = dOld.get(localizedString, {})
translation = val.get("translation", "")
comment = val.get("comment")
if len(localizedString) > doublespace_threshold and not lOut[-1] == "":
lOut.append("")
if comment != None:
lOut.append(comment)
lOut.append(f"{localizedString}={translation}")
if len(localizedString) > doublespace_threshold:
lOut.append("")
unusedExist = False
for key in dOld:
if key not in dkeyStrings:
if not unusedExist:
unusedExist = True
lOut.append("\n##### not used anymore #####")
lOut.append("%s=%s" % (key, dOld[key]))
return "\n".join(lOut)
val = dOld[key]
translation = val.get("translation")
comment = val.get("comment")
# only keep an unused translation if there was translated
# text or a comment associated with it
if translation != None and (translation != "" or comment):
if not unusedExist:
unusedExist = True
lOut.append("\n\n##### not used anymore #####\n")
if len(key) > doublespace_threshold and not lOut[-1] == "":
lOut.append("")
if comment != None:
lOut.append(comment)
lOut.append(f"{key}={translation}")
if len(key) > doublespace_threshold:
lOut.append("")
return "\n".join(lOut) + '\n'
# Writes a template.txt file
# dkeyStrings is the dictionary returned by generate_template
def write_template(templ_file, dkeyStrings, mod_name):
text = strings_to_text(dkeyStrings, {}, mod_name)
# read existing template file to preserve comments
existing_template = import_tr_file(templ_file)
text = strings_to_text(dkeyStrings, existing_template[0], mod_name, existing_template[2])
mkdir_p(os.path.dirname(templ_file))
with open(templ_file, "wt", encoding='utf-8') as template_file:
template_file.write(text)
@ -163,9 +291,13 @@ def read_lua_file_strings(lua_file):
text = re.sub(pattern_concat, "", text)
strings = []
for s in pattern_lua.findall(text):
for s in pattern_lua_s.findall(text):
strings.append(s[1])
for s in pattern_lua_bracketed.findall(text):
for s in pattern_lua_bracketed_s.findall(text):
strings.append(s)
for s in pattern_lua_fs.findall(text):
strings.append(s[1])
for s in pattern_lua_bracketed_fs.findall(text):
strings.append(s)
for s in strings:
@ -183,21 +315,55 @@ def read_lua_file_strings(lua_file):
# returns both a dictionary of translations
# and the full original source text so that the new text
# can be compared to it for changes.
# Returns also header comments in the third return value.
def import_tr_file(tr_file):
dOut = {}
text = None
header_comment = None
if os.path.exists(tr_file):
with open(tr_file, "r", encoding='utf-8') as existing_file :
# save the full text to allow for comparison
# of the old version with the new output
text = existing_file.read()
existing_file.seek(0)
# a running record of the current comment block
# we're inside, to allow preceeding multi-line comments
# to be retained for a translation line
latest_comment_block = None
for line in existing_file.readlines():
s = line.strip()
if s == "" or s[0] == "#":
continue
match = pattern_tr.match(s)
line = line.rstrip('\n')
if line[:3] == "###":
if header_comment is None:
# Save header comments
header_comment = latest_comment_block
# Stip textdomain line
tmp_h_c = ""
for l in header_comment.split('\n'):
if not l.startswith("# textdomain:"):
tmp_h_c += l + '\n'
header_comment = tmp_h_c
# Reset comment block if we hit a header
latest_comment_block = None
continue
if line[:1] == "#":
# Save the comment we're inside
if not latest_comment_block:
latest_comment_block = line
else:
latest_comment_block = latest_comment_block + "\n" + line
continue
match = pattern_tr.match(line)
if match:
dOut[match.group(1)] = match.group(2)
return (dOut, text)
# this line is a translated line
outval = {}
outval["translation"] = match.group(2)
if latest_comment_block:
# if there was a comment, record that.
outval["comment"] = latest_comment_block
latest_comment_block = None
dOut[match.group(1)] = outval
return (dOut, text, header_comment)
# Walks all lua files in the mod folder, collects translatable strings,
# and writes it to a template.txt file
@ -210,17 +376,17 @@ def generate_template(folder, mod_name):
if fnmatch.fnmatch(name, "*.lua"):
fname = os.path.join(root, name)
found = read_lua_file_strings(fname)
if verbose:
print(fname + ": " + str(len(found)) + " translatable strings")
if params["verbose"]:
print(f"{fname}: {str(len(found))} translatable strings")
for s in found:
sources = dOut.get(s, set())
sources.add("# " + fname)
sources.add(f"### {os.path.basename(fname)} ###")
dOut[s] = sources
if len(dOut) == 0:
return None
templ_file = folder + "locale/template.txt"
templ_file = os.path.join(folder, "locale/template.txt")
write_template(templ_file, dOut, mod_name)
return dOut
@ -229,18 +395,19 @@ def generate_template(folder, mod_name):
# dNew is the data used to generate the template, it has all the
# currently-existing localized strings
def update_tr_file(dNew, mod_name, tr_file):
if verbose:
print("updating " + tr_file)
if params["verbose"]:
print(f"updating {tr_file}")
tr_import = import_tr_file(tr_file)
dOld = tr_import[0]
textOld = tr_import[1]
textNew = strings_to_text(dNew, dOld, mod_name)
textNew = strings_to_text(dNew, dOld, mod_name, tr_import[2])
if textOld and textOld != textNew:
print(tr_file + " has changed.")
shutil.copyfile(tr_file, tr_file+".old")
print(f"{tr_file} has changed.")
if not params["no-old-file"]:
shutil.copyfile(tr_file, f"{tr_file}.old")
with open(tr_file, "w", encoding='utf-8') as new_tr_file:
new_tr_file.write(textNew)
@ -250,20 +417,21 @@ def update_mod(folder):
modname = get_modname(folder)
if modname is not None:
process_po_files(folder, modname)
print("Updating translations for " + modname)
print(f"Updating translations for {modname}")
data = generate_template(folder, modname)
if data == None:
print("No translatable strings found in " + modname)
print(f"No translatable strings found in {modname}")
else:
for tr_file in get_existing_tr_files(folder):
update_tr_file(data, modname, folder + "locale/" + tr_file)
update_tr_file(data, modname, os.path.join(folder, "locale/", tr_file))
else:
print("Unable to find modname in folder " + folder)
print(f"\033[31mUnable to find modname in folder {folder}.\033[0m", file=_stderr)
exit(1)
# Determines if the folder being pointed to is a mod or a mod pack
# and then runs update_mod accordingly
def update_folder(folder):
is_modpack = os.path.exists(folder+"modpack.txt") or os.path.exists(folder+"modpack.conf")
is_modpack = os.path.exists(os.path.join(folder, "modpack.txt")) or os.path.exists(os.path.join(folder, "modpack.conf"))
if is_modpack:
subfolders = [f.path for f in os.scandir(folder) if f.is_dir()]
for subfolder in subfolders:
@ -272,10 +440,9 @@ def update_folder(folder):
update_mod(folder)
print("Done.")
def run_all_subfolders(folder):
for modfolder in [f.path for f in os.scandir(folder) if f.is_dir()]:
update_folder(modfolder + "/")
update_folder("./")
# Runs this script on each sub-folder in the parent folder.
# I'm using this for testing this script on all installed mods.
#for modfolder in [f.path for f in os.scandir("../") if f.is_dir()]:
# update_folder(modfolder + "/")
main()

View File

@ -18,12 +18,39 @@ local hammer_repairable = minetest.settings:get_bool("anvil_hammer_is_repairable
anvil.make_unrepairable = function(item_name)
local item_def = minetest.registered_items[item_name]
if item_def then
item_def.groups.not_repaired_by_anvil = 1
minetest.override_item(item_name, {groups = item_def.groups})
-- Drop table reference. Copy other values over.
local groups = { not_repaired_by_anvil = 1 }
for k, v in pairs(item_def.groups) do groups[k] = v end
minetest.override_item(item_name, {groups = groups})
end
end
anvil.make_unrepairable("technic:water_can")
anvil.make_unrepairable("technic:lava_can")
if minetest.get_modpath("technic") then
-- make rechargeable technic tools unrepairable
anvil.make_unrepairable("technic:water_can")
anvil.make_unrepairable("technic:lava_can")
anvil.make_unrepairable("technic:flashlight")
anvil.make_unrepairable("technic:battery")
anvil.make_unrepairable("technic:vacuum")
anvil.make_unrepairable("technic:prospector")
anvil.make_unrepairable("technic:sonic_screwdriver")
anvil.make_unrepairable("technic:chainsaw")
anvil.make_unrepairable("technic:laser_mk1")
anvil.make_unrepairable("technic:laser_mk2")
anvil.make_unrepairable("technic:laser_mk3")
anvil.make_unrepairable("technic:mining_drill")
anvil.make_unrepairable("technic:mining_drill_mk2")
anvil.make_unrepairable("technic:mining_drill_mk2_1")
anvil.make_unrepairable("technic:mining_drill_mk2_2")
anvil.make_unrepairable("technic:mining_drill_mk2_3")
anvil.make_unrepairable("technic:mining_drill_mk2_4")
anvil.make_unrepairable("technic:mining_drill_mk3")
anvil.make_unrepairable("technic:mining_drill_mk3_1")
anvil.make_unrepairable("technic:mining_drill_mk3_2")
anvil.make_unrepairable("technic:mining_drill_mk3_3")
anvil.make_unrepairable("technic:mining_drill_mk3_4")
anvil.make_unrepairable("technic:mining_drill_mk3_5")
end
local S = minetest.get_translator(minetest.get_current_modname())
@ -280,10 +307,7 @@ minetest.register_node("anvil:anvil", {
local input = inv:get_stack('input',1)
-- only tools can be repaired
if( not( input )
or input:is_empty()
or input:get_name() == "technic:water_can"
or input:get_name() == "technic:lava_can" ) then
if not input or input:is_empty() then
return
end
@ -317,7 +341,7 @@ minetest.register_node("anvil:anvil", {
})
end
minetest.after(2, function()
if( puncher ) then
if( puncher ) and ( hud2 ) and ( hud3 ) then
puncher:hud_remove(hud2)
puncher:hud_remove(hud3)
end

View File

@ -1,18 +1,36 @@
# textdomain: anvil
# ./init.lua
@1 cannot be repaired with an anvil.=
@1's anvil=
### init.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
@1 cannot be repaired with an anvil.=@1 kann nicht mit einem Amboss repariert werden.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
@1's anvil=@1 Amboss
A tool for repairing other tools at a blacksmith's anvil.=Stahlhammer um Werkzeuge auf dem Amboss zu reparieren
A tool for repairing other tools in conjunction with a blacksmith's hammer.=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A tool for repairing other tools in conjunction with a blacksmith's hammer.=Ein Werkzeug zur Reparatur anderer Werkzeuge in Verbindung mit einem Schmiedehammer.
Anvil=Amboss
Right-click on this anvil with a damaged tool to place the damaged tool upon it. You can then repair the damaged tool by striking it with a blacksmith's hammer. Repeated blows may be necessary to fully repair a badly worn tool. To retrieve the tool either punch or right-click the anvil with an empty hand.=
Steel blacksmithing hammer=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Right-click on this anvil with a damaged tool to place the damaged tool upon it. You can then repair the damaged tool by striking it with a blacksmith's hammer. Repeated blows may be necessary to fully repair a badly worn tool. To retrieve the tool either punch or right-click the anvil with an empty hand.=Klicken Sie mit einem beschädigten Werkzeug mit der rechten Maustaste auf diesen Amboss, um das beschädigte Werkzeug darauf zu platzieren. Sie können das beschädigte Werkzeug dann reparieren, indem Sie es mit einem Schmiedehammer schlagen. Wiederholte Schläge können erforderlich sein, um ein stark abgenutztes Werkzeug vollständig zu reparieren. Um das Werkzeug abzurufen, schlagen Sie entweder mit einer leeren Hand auf den Amboss oder klicken Sie mit der rechten Maustaste darauf.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Steel blacksmithing hammer=Stahlschmiedehammer
This anvil is for damaged tools only.=Das Werkstueckfeld gilt nur fuer beschaedigtes Werkzeug.
Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task.=
Your @1 has been repaired successfully.=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task.=Schlagen Sie mit diesem Hammer auf einen Amboss mit einem beschädigten Werkzeug und reparieren Sie ihn. Es kann auch zum Zertrümmern von Steinen verwendet werden, ist jedoch für diese Aufgabe nicht gut geeignet.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Your @1 has been repaired successfully.=Ihr @1 wurde erfolgreich repariert.
##### not used anymore #####
Workpiece:=Werkstueck:
Optional=Moegliche
storage for=Aufbewahrung fuer
@ -21,4 +39,4 @@ Punch anvil with hammer to=Schlage mit dem Hammer auf den Amboss um
repair tool in workpiece-slot.=das Werkzeug im Werkstueckfeld zu reparieren.
anvil=Amboss
Anvil (owned by %s)=Amboss (gehoert %s)
Owner: %s=Besitzer: %s
Owner: %s=Besitzer: %s

View File

@ -1,14 +1,24 @@
# textdomain: anvil
# ./init.lua
@1 cannot be repaired with an anvil.=
@1's anvil=
### init.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
@1 cannot be repaired with an anvil.=@1 no se puede reparar con un yunque.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
@1's anvil=Yunque de @1
A tool for repairing other tools at a blacksmith's anvil.=Es una herramienta para reparar otras herramientas en el yunque del herrero
A tool for repairing other tools in conjunction with a blacksmith's hammer.=Es una herramienta para reparar de herramientas dañadas en conjunto con el martillo del herrero.
Anvil=Yunque
Right-click on this anvil with a damaged tool to place the damaged tool upon it. You can then repair the damaged tool by striking it with a blacksmith's hammer. Repeated blows may be necessary to fully repair a badly worn tool. To retrieve the tool either punch or right-click the anvil with an empty hand.=Haga clic derecho sobre este yunque con una herramienta dañada Puede reparar la herramienta dañada golpeándola con el martillo del herrero Para reparar completamente una herramienta puede dar varios golpes Para sacar la herramienta, golpeela con la mano vacia o tambien con un clic derecho
Steel blacksmithing hammer=Martillo de acero para la herrería
This anvil is for damaged tools only.=Este yunque es sólo para herramientas dañadas
Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task.=Use este martillo para dar golpes sobre el yunque donde puso la herramienta dañada Tambien puede ser usado para romper piedra pero no es muy adecuado para esa tarea.
Your @1 has been repaired successfully.=Su @1 ha sido reparado correctamente.
Your @1 has been repaired successfully.=Su @1 ha sido reparado correctamente.

View File

@ -1,14 +1,22 @@
# textdomain: anvil
# ./init.lua
### init.lua ###
@1 cannot be repaired with an anvil.=@1 ne peut pas être réparé avec une enclume.
@1's anvil=enclume de @1
A tool for repairing other tools at a blacksmith's anvil.=Un outil pour réparer les autres outils avec une enclume de forgeron.
A tool for repairing other tools in conjunction with a blacksmith's hammer.=Un outil pour réparer les autres outils à utiliser avec un marteau de forgeron.
Anvil=Enclume
Right-click on this anvil with a damaged tool to place the damaged tool upon it. You can then repair the damaged tool by striking it with a blacksmith's hammer. Repeated blows may be necessary to fully repair a badly worn tool. To retrieve the tool either punch or right-click the anvil with an empty hand.=Cliquez-droit sur cette enclume avec un outil endommagé pour le placer dessus. Vous pourrez alors réparer l'outil endommagé en le frappant avec un marteau de forgeron. Des coups successifs seront nécessaires pour réparer l'outil entièrement. Pour récupérer l'outil, frappez dessus ou faites un click-droit en ayant la main vide.
Steel blacksmithing hammer=Marteau de forgeron en acier
This anvil is for damaged tools only.=L'enclume s'utilise sur les outils endommagés.
Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task.=Utilisez ce marteau pour frapper une enclume contenant un outil endommagé, ainsi vous pourrez le réparer. Il peut être aussi utilisé pour casser de la pierre, mais il n'est pas adapté à cette tâche.
Your @1 has been repaired successfully.=Votre @1 a été réparé avec succès.

View File

@ -1,14 +1,24 @@
# textdomain: anvil
# ./init.lua
@1 cannot be repaired with an anvil.=
@1's anvil=
### init.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
@1 cannot be repaired with an anvil.=@1 non può essere riparato con un'incudine.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
@1's anvil=L'incudine di @1
A tool for repairing other tools at a blacksmith's anvil.=Un attrezzo per riparare altri attrezzi su di una incudine da fabbro.
A tool for repairing other tools in conjunction with a blacksmith's hammer.=Un attrezzo per riparare altri attrezzi usando un martello da fabbro.
Anvil=Incudine
Right-click on this anvil with a damaged tool to place the damaged tool upon it. You can then repair the damaged tool by striking it with a blacksmith's hammer. Repeated blows may be necessary to fully repair a badly worn tool. To retrieve the tool either punch or right-click the anvil with an empty hand.=Fate click destro su questa incudine con un attrezzo danneggiato per metterlo sull'incudine. Poi potrete ripararlo colpendolo con un martello da fabbro. Potrebbero essere necessari più colpi per riparare un attrezzo gravemente danneggiato. Per riprendere l'attrezzo colpite o fate click destro sull'incudine a mani vuote.
Steel blacksmithing hammer=Martello da fabbro di acciaio
This anvil is for damaged tools only.=Questa incudine è solo per attrezzi danneggiati.
Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task.=Usate questo martello per colpire una incudine su cui è posto un attrezzo danneggiato e potrete ripararlo. Può anche essere usato per colpire la pietra, ma non è molto adatto a questo compito.
Your @1 has been repaired successfully.=La/il vostr* @1 è stat* riparat* con successo.
Your @1 has been repaired successfully.=La/il vostr* @1 è stat* riparat* con successo.

View File

@ -1,14 +1,22 @@
# textdomain: anvil
# ./init.lua
### init.lua ###
@1 cannot be repaired with an anvil.=
@1's anvil=
A tool for repairing other tools at a blacksmith's anvil.=
A tool for repairing other tools in conjunction with a blacksmith's hammer.=
Anvil=
Right-click on this anvil with a damaged tool to place the damaged tool upon it. You can then repair the damaged tool by striking it with a blacksmith's hammer. Repeated blows may be necessary to fully repair a badly worn tool. To retrieve the tool either punch or right-click the anvil with an empty hand.=
Steel blacksmithing hammer=
This anvil is for damaged tools only.=
Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task.=
Your @1 has been repaired successfully.=
Your @1 has been repaired successfully.=

View File

@ -1,4 +1,4 @@
name = anvil
depends = default
optional_depends = doc
optional_depends = doc,technic
description = Hammer and anvil for repairing tools.

View File

@ -86,28 +86,43 @@ end
-- Decoration
--
local place_on
local biomes
local offset
local scale
if minetest.get_modpath("rainf") then
minetest.register_decoration({
deco_type = "schematic",
place_on = {"rainf:meadow"},
sidelen = 16,
noise_params = {
offset = 0.01,
scale = 0.001,
spread = {x = 255, y = 255, z = 255},
seed = 32,
octaves = 3,
persist = 0.67
},
biomes = {"rainf"},
y_min = 1,
y_max = 80,
schematic = birch.birchtree,
flags = "place_center_x, place_center_z",
place_offset_y = 1,
})
place_on = "rainf:meadow"
biomes = "rainf"
offset = 0.01
scale = 0.001
else
place_on = "default:dirt_with_grass"
biomes = "grassland"
offset = 0.008
scale = 0.001
end
minetest.register_decoration({
deco_type = "schematic",
place_on = {place_on},
sidelen = 16,
noise_params = {
offset = offset,
scale = scale,
spread = {x = 255, y = 255, z = 255},
seed = 32,
octaves = 3,
persist = 0.67
},
biomes = {biomes},
y_min = 1,
y_max = 80,
schematic = birch.birchtree,
flags = "place_center_x, place_center_z",
place_offset_y = 1,
})
--
-- Nodes
--
@ -253,3 +268,20 @@ if minetest.get_modpath("bonemeal") ~= nil then
{"birch:sapling", grow_new_birch_tree, "soil"},
})
end
--Door
if minetest.get_modpath("doors") ~= nil then
doors.register("door_birch_wood", {
tiles = {{ name = "birch_door_wood.png", backface_culling = true }},
description = S("Birch Wood Door"),
inventory_image = "birch_item_wood.png",
groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
recipe = {
{"birch:wood", "birch:wood"},
{"birch:wood", "birch:wood"},
{"birch:wood", "birch:wood"},
}
})
end

View File

@ -7,4 +7,5 @@ Birch Tree Stair=Escaleras de abedul
Birch Tree Slab=Losa de abedul
Inner Birch Tree Stair=Escaleras de abedul interior
Outer Birch Tree Stair=Escaleras de abedul exterior
Birch Slab=Losa de abedul
Birch Slab=Losa de abedul
Birch Wood Door=Puerta de abedul

View File

@ -1,4 +1,4 @@
name = birch
description = Birch Tree for Grassland
depends = default
optional_depends = stairs, bonemeal, rainf
optional_depends = stairs, bonemeal, rainf, doors

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -632,6 +632,16 @@ minetest.register_craft({
}
})
minetest.register_craft({
type = "shapeless",
output = "bonemeal:mulch",
recipe = {
"group:seed", "group:seed", "group:seed",
"group:seed", "group:seed", "group:seed",
"group:seed", "group:seed", "group:seed"
}
})
-- fertiliser
minetest.register_craft({
type = "shapeless",

View File

@ -41,7 +41,7 @@ minetest.register_craft({
minetest.register_craft({
output = 'building_blocks:fakegrass 2',
recipe = {
{'default:leaves'},
{'group:leaves'},
{"default:dirt"},
}
})
@ -139,7 +139,7 @@ minetest.register_craft({
minetest.register_craft({
output = 'building_blocks:woodglass 1',
recipe = {
{"default:wood"},
{"group:wood"},
{"default:glass"},
}
})

View File

@ -66,20 +66,38 @@ end
-- Decoration
--
if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local place_on
local biomes
local offset
local scale
if minetest.get_modpath("rainf") then
place_on = "rainf:meadow"
biomes = "rainf"
offset = 0.0008
scale = 0.00004
else
place_on = "default:dirt_with_grass"
biomes = "grassland"
offset = 0.00005
scale = 0.00004
end
minetest.register_decoration({
deco_type = "schematic",
place_on = {"rainf:meadow"},
place_on = {place_on},
sidelen = 16,
noise_params = {
offset = 0.0008,
scale = 0.00004,
offset = offset,
scale = scale,
spread = {x = 250, y = 250, z = 250},
seed = 278,
octaves = 3,
persist = 0.66
},
biomes = {"rainf"},
biomes = {biomes},
y_min = 1,
y_max = 80,
schematic = modpath.."/schematics/chestnuttree.mts",
@ -232,3 +250,19 @@ if minetest.get_modpath("bonemeal") ~= nil then
{"chestnuttree:sapling", grow_new_chestnuttree_tree, "soil"},
})
end
--Door
if minetest.get_modpath("doors") ~= nil then
doors.register("door_chestnut_wood", {
tiles = {{ name = "chesnuttree_door_wood.png", backface_culling = true }},
description = S("Chestnut Wood Door"),
inventory_image = "chestnuttree_item_wood.png",
groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
recipe = {
{"chestnuttree:wood", "chestnuttree:wood"},
{"chestnuttree:wood", "chestnuttree:wood"},
{"chestnuttree:wood", "chestnuttree:wood"},
}
})
end

View File

@ -8,4 +8,5 @@ Chestnut Tree Slab=Losa de castaño
Chestnut Tree Stair=Escalera de castaño
Chestnut Tree Sapling=Retoño de castaño
Chestnut Tree Trunk=Madera de castaño
Chestnut Tree Wood=Tablas de castaño
Chestnut Tree Wood=Tablas de castaño
Chestnut Wood Door=Puerta de castaño

View File

@ -1,4 +1,4 @@
name = chestnuttree
description = Chesnut Tree for Grassland
depends = default
optional_depends = stairs, bonemeal, rainf
optional_depends = stairs, bonemeal, rainf, doors

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -213,3 +213,20 @@ if minetest.get_modpath("bonemeal") ~= nil then
{"clementinetree:sapling", grow_new_clementinetree_tree, "soil"},
})
end
--Door
if minetest.get_modpath("doors") ~= nil then
doors.register("door_clementinetree_wood", {
tiles = {{ name = "clementinetree_door_wood.png", backface_culling = true }},
description = S("Clementine Wood Door"),
inventory_image = "clementinetree_item_wood.png",
groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
recipe = {
{"clementinetree:wood", "clementinetree:wood"},
{"clementinetree:wood", "clementinetree:wood"},
{"clementinetree:wood", "clementinetree:wood"},
}
})
end

View File

@ -7,4 +7,5 @@ Clementine Tree Slab=Losa de clementinero
Clementine Tree Stair=Escalera de clementinero
Clementine Tree Sapling=Retoño de clementinero
Clementine Tree Trunk=Madera de clementinero
Clementine Tree Wood=Tablas de clementinero
Clementine Tree Wood=Tablas de clementinero
Clementine Wood Door=Puerta de clementinero

View File

@ -1,4 +1,4 @@
name = clementinetree
description = Clementine Tree for Decidious Forest
depends = default
optional_depends = stairs, bonemeal
optional_depends = stairs, bonemeal, doors

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -25,7 +25,7 @@ end
-- Decoration
--
if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then
if mg_name ~= "v6" and mg_name ~= "singlenode" then
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_rainforest_litter"},

View File

@ -1,4 +1,4 @@
name = ebony
description = Ebony Tree for Rainforest Biome
depends = default
optional_depends = stairs, bonemeal, rainf
optional_depends = stairs, bonemeal

View File

@ -24,20 +24,38 @@ end
-- Decoration
--
if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local place_on
local biomes
local offset
local scale
if minetest.get_modpath("rainf") then
place_on = "rainf:meadow"
biomes = "rainf"
offset = 0.0008
scale = 0.00005
else
place_on = "default:dirt_with_grass"
biomes = "grassland"
offset = 0.00008
scale = 0.00005
end
minetest.register_decoration({
deco_type = "schematic",
place_on = {"rainf:meadow"},
place_on = {place_on},
sidelen = 16,
noise_params = {
offset = 0.0008,
scale = 0.00005,
offset = offset,
scale = scale,
spread = {x = 250, y = 250, z = 250},
seed = 789,
octaves = 3,
persist = 0.66
},
biomes = {"rainf"},
biomes = {biomes},
y_min = 1,
y_max = 32,
schematic = modpath.."/schematics/hollytree.mts",

View File

@ -161,7 +161,7 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:doorbell",
recipe = {
{ "homedecor:light_switch", "basic_materials:energy_crystal_simple", "homedecor:speaker_driver" }
{ "homedecor:light_switch_off", "basic_materials:energy_crystal_simple", "homedecor:speaker_driver" }
},
})

View File

@ -76,7 +76,7 @@ homedecor.register("wall_shelf", {
minetest.register_craft({
output = "homedecor:table",
recipe = {
{ "default:wood","default:wood", "default:wood" },
{ "group:wood","group:wood", "group:wood" },
{ "group:stick", "", "group:stick" },
},
})

View File

@ -27,19 +27,20 @@ local word_to_bright = {
}
local rules_alldir = {
{x = 0, y = 0, z = -1}, -- borrowed from lightstones
{x = 1, y = 0, z = 0},
{x = -1, y = 0, z = 0},
{x = 0, y = 0, z = 1},
{x = 1, y = 1, z = 0},
{x = 1, y = -1, z = 0},
{x = -1, y = 1, z = 0},
{x = -1, y = -1, z = 0},
{x = -1, y = 0, z = 0},
{x = 1, y = 0, z = 0},
{x = 0, y = 0, z = -1}, -- borrowed from lightstones
{x = 0, y = 1, z = 1},
{x = 0, y = -1, z = 1},
{x = -1, y = 1, z = 0},
{x = 0, y = 1, z = 0},
{x = 1, y = 1, z = 0},
{x = 0, y = 1, z = -1},
{x = 0, y = -1, z = -1},
{x = 0, y = -1, z = 1},
{x = -1, y = -1, z = 0},
{x = 0, y = -1, z = 0},
{x = 1, y = -1, z = 0},
{x = 0, y = -1, z = -1},
}
-- mesecons compatibility

View File

@ -96,8 +96,8 @@ minetest.register_craft({
output = "homedecor:desk",
recipe = {
{ "stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood" },
{ "homedecor:drawer_small", "default:wood", "default:wood" },
{ "homedecor:drawer_small", "", "default:wood" },
{ "homedecor:drawer_small", "group:wood", "group:wood" },
{ "homedecor:drawer_small", "", "group:wood" },
},
})
@ -105,17 +105,17 @@ minetest.register_craft({
output = "homedecor:desk",
recipe = {
{ "moreblocks:slab_wood", "moreblocks:slab_wood", "moreblocks:slab_wood" },
{ "homedecor:drawer_small", "default:wood", "default:wood" },
{ "homedecor:drawer_small", "", "default:wood" },
{ "homedecor:drawer_small", "group:wood", "group:wood" },
{ "homedecor:drawer_small", "", "group:wood" },
},
})
minetest.register_craft({
output = "homedecor:filing_cabinet",
recipe = {
{ "", "default:wood", "" },
{ "default:wood", "homedecor:drawer_small", "default:wood" },
{ "", "default:wood", "" },
{ "", "group:wood", "" },
{ "group:wood", "homedecor:drawer_small", "group:wood" },
{ "", "group:wood", "" },
},
})

View File

@ -189,7 +189,7 @@ minetest.register_craft( {
output = "homedecor:wardrobe",
recipe = {
{ "homedecor:drawer_small", "homedecor:kitchen_cabinet" },
{ "homedecor:drawer_small", "default:wood" },
{ "homedecor:drawer_small", "default:wood" }
{ "homedecor:drawer_small", "group:wood" },
{ "homedecor:drawer_small", "group:wood" }
},
})

View File

@ -24,7 +24,7 @@ end
-- Decoration
--
if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then
if mg_name ~= "v6" and mg_name ~= "singlenode" then
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_rainforest_litter"},

View File

@ -1,4 +1,4 @@
name = jacaranda
description = Jacaranda for jungles
depends = default
optional_depends = stairs, bonemeal, rainf
optional_depends = stairs, bonemeal

View File

@ -214,3 +214,20 @@ if minetest.get_modpath("bonemeal") ~= nil then
{"larch:sapling", grow_new_larch_tree, "soil"},
})
end
--Door
if minetest.get_modpath("doors") ~= nil then
doors.register("door_larch_wood", {
tiles = {{ name = "larch_door_wood.png", backface_culling = true }},
description = S("Larch Wood Door"),
inventory_image = "larch_item_wood.png",
groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
recipe = {
{"larch:wood", "larch:wood"},
{"larch:wood", "larch:wood"},
{"larch:wood", "larch:wood"},
}
})
end

View File

@ -2,4 +2,8 @@
Larch Sapling=Retoño de alerce
Larch Trunk=Madera de alerce
Larch Wood=Tablas de alerce
Larch Leaves=Hojas de alerce
Larch Leaves=Hojas de alerce
Larch Tree Outer Stair=Escalera exterior de alerce
Larch Tree Slab=Losa de alerce
Larch Stair=Escalera de alerce
Larch Wood Door=Puerta de alerce

View File

@ -1,3 +1,3 @@
name = larch
description = Larch Tree
optional_depends = stairs, bonemeal
optional_depends = stairs, bonemeal, doors

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -26,7 +26,7 @@ end
-- Decoration
--
if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then
if mg_name ~= "v6" and mg_name ~= "singlenode" then
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_rainforest_litter"},

View File

@ -25,20 +25,33 @@ end
-- Decoration
--
if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then
if mg_name ~= "v6" and mg_name ~= "singlenode" then
if minetest.get_modpath("rainf") then
place_on = "rainf:meadow"
biomes = "rainf"
offset = 0.0005
scale = 0.0002
else
place_on = "default:dirt_with_grass"
biomes = "grassland"
offset = 0.0002
scale = 0.0002
end
minetest.register_decoration({
deco_type = "schematic",
place_on = {"rainf:meadow"},
place_on = {place_on},
sidelen = 16,
noise_params = {
offset = 0.0005,
scale = 0.0002,
offset = offset,
scale = scale,
spread = {x = 250, y = 250, z = 250},
seed = 3462,
octaves = 3,
persist = 0.66
},
biomes = {"rainf"},
biomes = {biomes},
y_min = 1,
y_max = 62,
schematic = modpath.."/schematics/maple.mts",
@ -192,3 +205,21 @@ if minetest.get_modpath("bonemeal") ~= nil then
{"maple:sapling", grow_new_maple_tree, "soil"},
})
end
--Door
if minetest.get_modpath("doors") ~= nil then
doors.register("door_maple_wood", {
tiles = {{ name = "maple_door_wood.png", backface_culling = true }},
description = S("Maple Wood Door"),
inventory_image = "maple_item_wood.png",
groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
recipe = {
{"maple:wood", "maple:wood"},
{"maple:wood", "maple:wood"},
{"maple:wood", "maple:wood"},
}
})
end

View File

@ -7,3 +7,4 @@ Maple Stair=Escaleras de arce
Inner Maple Stair=Escaleras de arce
Outer Maple Stair=Escaleras de arce
Maple Slab=Losa de arce
Maple Wood Door=Puerta de arce

View File

@ -1,4 +1,4 @@
name = maple
description = Maple Tree
depends = default
optional_depends = stairs, bonemeal, rainf
optional_depends = stairs, bonemeal, rainf, doors

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -3,7 +3,11 @@ minetest.register_node("mesecons_noteblock:noteblock", {
tiles = {"mesecons_noteblock.png"},
is_ground_content = false,
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2},
on_punch = function(pos, node) -- change sound when punched
on_punch = function(pos, node, puncher) -- change sound when punched
if minetest.is_protected(pos, puncher and puncher:get_player_name()) then
return
end
node.param2 = (node.param2+1)%12
mesecon.noteblock_play(pos, node.param2)
minetest.set_node(pos, node)

View File

@ -177,6 +177,7 @@ moretrees.cedar_biome = {
avoid_nodes = moretrees.avoidnodes,
avoid_radius = 10,
seed_diff = 336,
min_elevation = 0, --Added to solve an issue where cedar trees would sometimes spawn deep underground
near_nodes = {"default:water_source"},
near_nodes_size = 15,
near_nodes_count = 5,

View File

@ -1,211 +1,211 @@
# textdomain: moretrees
# Translation by Xanthin
# Translation by Xanthin and heavygale
### cocos_palm.lua ###
Coconut=Kokosnuss
Coconut Flower=
Coconut Flower=Kokosnussblüte
### crafts.lua ###
Acorn Muffin=Eichelmuffin
Acorn Muffin batter=Eichelmuffinteig
Coconut Milk=Kokosnussmilch
Date=
Date & nut snack=
Date-nut cake=
Date-nut cake batter=
Date-nut energy bar=
Date=Dattel
Date & nut snack=Dattel & Nuss-Snack
Date-nut cake=Dattelnusskuchen
Date-nut cake batter=Dattelnuss-Kuchenteig
Date-nut energy bar=Dattelnuss-Energieriegel
Raw Coconut=Kokosnussfleisch
Roasted Cedar Cone Nuts=
Roasted Fir Cone Nuts=Geroestete Tannenzapfen
Roasted Spruce Cone Nuts=Geroestete Fichtenzapfen
Roasted Cedar Cone Nuts=Geröstete Zedernzapfenkerne
Roasted Fir Cone Nuts=Geroestete Tannenzapfenkerne
Roasted Spruce Cone Nuts=Geroestete Fichtenzapfenkerne
### date_palm.lua ###
Date Flowers=
Date Stem=
Dates=
Date Flowers=Dattelblüten
Date Stem=Dattelstamm
Dates=Datteln
### node_defs.lua ###
@1 (fast growth)=
@1 (fast growth)=@1 (schnelles Wachstum)
Acorn=Eichel
Apple Tree=
Apple Tree Fence=
Apple Tree Fence Gate=
Apple Tree Fence Rail=
Apple Tree=Apfelbaum
Apple Tree Fence=Apfelbaum-Zaun
Apple Tree Fence Gate=Apfelbaum-Tor
Apple Tree Fence Rail=Apfelbaum-Schiene
Apple Tree Leaves=Apfelbaumlaub
Apple Tree Planks=Apfelbaumbretter
Apple Tree Planks Slab=
Apple Tree Planks Stair=
Apple Tree Planks Slab=Apfelbaumplatte
Apple Tree Planks Stair=Apfelbaumstufe
Apple Tree Sapling=Apfelbaumsetzling
Apple Tree Trunk=Apfelbaumstamm
Apple Tree Trunk Slab=
Apple Tree Trunk Stair=
Beech Tree=
Beech Tree Fence=
Beech Tree Fence Gate=
Beech Tree Fence Rail=
Apple Tree Trunk Slab=Apfelbaumstammplatte
Apple Tree Trunk Stair=Apfelbaumstammstufe
Beech Tree=Buche
Beech Tree Fence=Buchenholz-Zaun
Beech Tree Fence Gate=Buchenholz-Tor
Beech Tree Fence Rail=Buchenholz-Schiene
Beech Tree Leaves=Buchenlaub
Beech Tree Planks=Buchebretter
Beech Tree Planks Slab=
Beech Tree Planks Stair=
Beech Tree Planks=Buchenholzbretter
Beech Tree Planks Slab=Buchenholzplatte
Beech Tree Planks Stair=Buchenholzstufe
Beech Tree Sapling=Buchesetzling
Beech Tree Trunk=Buchenstamm
Beech Tree Trunk Slab=
Beech Tree Trunk Stair=
Birch Tree=
Birch Tree Fence=
Birch Tree Fence Gate=
Birch Tree Fence Rail=
Beech Tree Trunk Slab=Buchenstammplatte
Beech Tree Trunk Stair=Buchenstammstufe
Birch Tree=Birke
Birch Tree Fence=Birkenholz-Zaun
Birch Tree Fence Gate=Birkenholz-Tor
Birch Tree Fence Rail=Birkenholz-Schiene
Birch Tree Leaves=Birkenlaub
Birch Tree Planks=Birkebretter
Birch Tree Planks Slab=
Birch Tree Planks Stair=
Birch Tree Planks Slab=Birkenholzplatte
Birch Tree Planks Stair=Birkeholzstufe
Birch Tree Sapling=Birkensetzling
Birch Tree Trunk=Birkenstamm
Birch Tree Trunk Slab=
Birch Tree Trunk Stair=
Cedar Cone=
Cedar Tree=
Cedar Tree Fence=
Cedar Tree Fence Gate=
Cedar Tree Fence Rail=
Cedar Tree Leaves=
Cedar Tree Planks=
Cedar Tree Planks Slab=
Cedar Tree Planks Stair=
Cedar Tree Sapling=
Cedar Tree Trunk=
Cedar Tree Trunk Slab=
Cedar Tree Trunk Stair=
Date Palm Tree=
Date Palm Tree Fence=
Date Palm Tree Fence Gate=
Date Palm Tree Fence Rail=
Date Palm Tree Leaves=
Date Palm Tree Planks=
Date Palm Tree Planks Slab=
Date Palm Tree Planks Stair=
Date Palm Tree Sapling=
Date Palm Tree Trunk=
Date Palm Tree Trunk Slab=
Date Palm Tree Trunk Stair=
Douglas Fir=
Douglas Fir Fence=
Douglas Fir Fence Gate=
Douglas Fir Fence Rail=
Birch Tree Trunk Slab=Birkenstammplatte
Birch Tree Trunk Stair=Birkenstammstufe
Cedar Cone=Zedernzapfen
Cedar Tree=Zeder
Cedar Tree Fence=Zedernholz-Zaun
Cedar Tree Fence Gate=Zedernholz-Tor
Cedar Tree Fence Rail=Zedernholz-Schiene
Cedar Tree Leaves=Zederblätter
Cedar Tree Planks=Zedernholzbretter
Cedar Tree Planks Slab=Zedernholzplatte
Cedar Tree Planks Stair=Zedernholzstufe
Cedar Tree Sapling=Zedersetzling
Cedar Tree Trunk=Zederstamm
Cedar Tree Trunk Slab=Zederstammplatte
Cedar Tree Trunk Stair=Zederstamm Stufe
Date Palm Tree=Dattelpalme
Date Palm Tree Fence=Dattelpalmen-Zaun
Date Palm Tree Fence Gate=Dattelpalmen-Tor
Date Palm Tree Fence Rail=Dattelpalmen-Schiene
Date Palm Tree Leaves=Dattelpalmenblätter
Date Palm Tree Planks=Dattelpalmenbretter
Date Palm Tree Planks Slab=Dattelpalmenplatte
Date Palm Tree Planks Stair=Dattelpalmenstufe
Date Palm Tree Sapling=Dattelpalmensetzling
Date Palm Tree Trunk=Dattelpalmenstamm
Date Palm Tree Trunk Slab=Dattelpalmenstammplatte
Date Palm Tree Trunk Stair=Dattelpalmenstammstufe
Douglas Fir=Douglasie
Douglas Fir Fence=Douglasien-Zaun
Douglas Fir Fence Gate=Douglasien-Tor
Douglas Fir Fence Rail=Douglasien-Schiene
Douglas Fir Leaves=Douglasiennadeln
Douglas Fir Leaves (Bright)=Douglasiennadeln (breit)
Douglas Fir Planks=Douglasienbretter
Douglas Fir Planks Slab=
Douglas Fir Planks Stair=
Douglas Fir Planks Slab=Douglasienplatte
Douglas Fir Planks Stair=Douglasienstufe
Douglas Fir Sapling=Douglasiensetzling
Douglas Fir Trunk=Douglasienstamm
Douglas Fir Trunk Slab=
Douglas Fir Trunk Stair=
Douglas Fir Trunk Slab=Douglasienstammplatte
Douglas Fir Trunk Stair=Douglasienstammstufe
Fir Cone=Tannenzapfen
Giant Sequoia=
Giant Sequoia Fence=
Giant Sequoia Fence Gate=
Giant Sequoia Fence Rail=
Giant Sequoia=Riesenmammutbaum
Giant Sequoia Fence=Riesenmammutbaum-Zaun
Giant Sequoia Fence Gate=Riesenmammutbaum-Tor
Giant Sequoia Fence Rail=Riesenmammutbaum-Schiene
Giant Sequoia Leaves=Riesenmammutbaumlaub
Giant Sequoia Planks=Riesenmammutbaumbretter
Giant Sequoia Planks Slab=
Giant Sequoia Planks Stair=
Giant Sequoia Planks Slab=Riesenmammutbaumplatte
Giant Sequoia Planks Stair=Riesenmammutbaumstufe
Giant Sequoia Sapling=Riesenmammutbaumsetzling
Giant Sequoia Trunk=Riesenmammutbaumstamm
Giant Sequoia Trunk Slab=
Giant Sequoia Trunk Stair=
Jungle Tree=
Jungle Tree Fence=
Jungle Tree Fence Gate=
Jungle Tree Fence Rail=
Giant Sequoia Trunk Slab=Riesenmammutbaumstammplatte
Giant Sequoia Trunk Stair=Riesenmammutbaumstammstufe
Jungle Tree=Tropenbaum
Jungle Tree Fence=Tropenbaum-Zaun
Jungle Tree Fence Gate=Tropenbaum-Tor
Jungle Tree Fence Rail=Tropenbaum-Schiene
Jungle Tree Leaves=Tropenbaumlaub
Jungle Tree Leaves (@1)=Tropenbaumlaub (@1)
Jungle Tree Planks=Tropenholzbretter
Jungle Tree Planks Slab=
Jungle Tree Planks Stair=
Jungle Tree Planks Slab=Tropenholzplatte
Jungle Tree Planks Stair=Tropenholzstufe
Jungle Tree Sapling=Tropenbaumsetzling
Jungle Tree Trunk=Tropenbaumstamm
Jungle Tree Trunk Slab=
Jungle Tree Trunk Stair=
Oak Tree=
Oak Tree Fence=
Oak Tree Fence Gate=
Oak Tree Fence Rail=
Jungle Tree Trunk Slab=Tropenbaumstammplatte
Jungle Tree Trunk Stair=Tropenbaumstammstufe
Oak Tree=Eiche
Oak Tree Fence=Eichenholz-Zaun
Oak Tree Fence Gate=Eichenholz-Tor
Oak Tree Fence Rail=Eichenholz-Schiene
Oak Tree Leaves=Eichenlaub
Oak Tree Planks=Eichenbretter
Oak Tree Planks Slab=
Oak Tree Planks Stair=
Oak Tree Planks Slab=Eichenholzplatte
Oak Tree Planks Stair=Eichenholzstufe
Oak Tree Sapling=Eichensetzling
Oak Tree Trunk=Eichenstamm
Oak Tree Trunk Slab=
Oak Tree Trunk Stair=
Palm Tree=
Palm Tree Fence=
Palm Tree Fence Gate=
Palm Tree Fence Rail=
Oak Tree Trunk Slab=Eichenstammplatte
Oak Tree Trunk Stair=Eichenstammstufe
Palm Tree=Palme
Palm Tree Fence=Plamenholz-Zaun
Palm Tree Fence Gate=Plamenholz-Tor
Palm Tree Fence Rail=Plamenholz-Schiene
Palm Tree Leaves=Palmenlaub
Palm Tree Planks=Palmenbretter
Palm Tree Planks Slab=
Palm Tree Planks Stair=
Palm Tree Planks Slab=Plamenholzplatte
Palm Tree Planks Stair=Plamenholzstufe
Palm Tree Sapling=Palmensetzling
Palm Tree Trunk=Palmenstamm
Palm Tree Trunk Slab=
Palm Tree Trunk Stair=
Poplar Tree=
Poplar Tree Fence=
Poplar Tree Fence Gate=
Poplar Tree Fence Rail=
Poplar Tree Leaves=
Poplar Tree Planks=
Poplar Tree Planks Slab=
Poplar Tree Planks Stair=
Poplar Tree Sapling=
Poplar Tree Trunk=
Poplar Tree Trunk Slab=
Poplar Tree Trunk Stair=
Palm Tree Trunk Slab=Palmenstammplatte
Palm Tree Trunk Stair=Palmenstammstufe
Poplar Tree=Pappel
Poplar Tree Fence=Pappelholz-Zaun
Poplar Tree Fence Gate=Pappelholz-Tor
Poplar Tree Fence Rail=Pappelholz-Schiene
Poplar Tree Leaves=Pappelblätter
Poplar Tree Planks=Pappelholzbretter
Poplar Tree Planks Slab=Pappelholzsplatte
Poplar Tree Planks Stair=Pappelholzstufe
Poplar Tree Sapling=Pappelsetzling
Poplar Tree Trunk=Pappelstamm
Poplar Tree Trunk Slab=Pappelstammplatte
Poplar Tree Trunk Stair=Pappelstammstufe
Red=rot
Rubber Tree=
Rubber Tree Fence=
Rubber Tree Fence Gate=
Rubber Tree Fence Rail=
Rubber Tree=Gummibaum
Rubber Tree Fence=Gummibaum-Zaun
Rubber Tree Fence Gate=Gummibaum-Tor
Rubber Tree Fence Rail=Gummibaum-Schiene
Rubber Tree Leaves=Gummibaumlaub
Rubber Tree Planks=Gummibaumbretter
Rubber Tree Planks Slab=
Rubber Tree Planks Stair=
Rubber Tree Planks Slab=Gummibaumplatte
Rubber Tree Planks Stair=Gummibaumstufe
Rubber Tree Sapling=Gummibaumsetzling
Rubber Tree Trunk=Gummibaumstamm
Rubber Tree Trunk (Empty)=Gummibaumstamm (leer)
Rubber Tree Trunk Slab=
Rubber Tree Trunk Stair=
Small poplar Tree Sapling=
Rubber Tree Trunk Slab=Gummibaumstammplatte
Rubber Tree Trunk Stair=Gummibaumstammstufe
Small poplar Tree Sapling=Kleiner Pappelsetzling
Spruce Cone=Fichtenzapfen
Spruce Tree=
Spruce Tree Fence=
Spruce Tree Fence Gate=
Spruce Tree Fence Rail=
Spruce Tree=Fichte
Spruce Tree Fence=Fichtenholz-Zaun
Spruce Tree Fence Gate=Fichtenholz-Zaun
Spruce Tree Fence Rail=Fichtenholz-Schiene
Spruce Tree Leaves=Fichtennadeln
Spruce Tree Planks=Fichtenbretter
Spruce Tree Planks Slab=
Spruce Tree Planks Stair=
Spruce Tree Planks Slab=Fichtenholzplatte
Spruce Tree Planks Stair=Fichtenholzstufe
Spruce Tree Sapling=Fichtensetzling
Spruce Tree Trunk=Fichtenstamm
Spruce Tree Trunk Slab=
Spruce Tree Trunk Stair=
Willow Tree=
Willow Tree Fence=
Willow Tree Fence Gate=
Willow Tree Fence Rail=
Spruce Tree Trunk Slab=Fichtenstammplatte
Spruce Tree Trunk Stair=Fichtenstammstufe
Willow Tree=Weide
Willow Tree Fence=Weidenholz-Zaun
Willow Tree Fence Gate=Weidenholz-Tor
Willow Tree Fence Rail=Weidenholz-Schiene
Willow Tree Leaves=Weidenlaub
Willow Tree Planks=Weidenbretter
Willow Tree Planks Slab=
Willow Tree Planks Stair=
Willow Tree Planks Slab=Weidenholzplatte
Willow Tree Planks Stair=Weidenholzstufe
Willow Tree Sapling=Weidensetzling
Willow Tree Trunk=Weidenstamm
Willow Tree Trunk Slab=
Willow Tree Trunk Stair=
Willow Tree Trunk Slab=Weidenstammplatte
Willow Tree Trunk Stair=Weidenstammstufe
Yellow=gelb

View File

@ -50,20 +50,33 @@ end
-- Decoration
--
if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then
if mg_name ~= "v6" and mg_name ~= "singlenode" then
if minetest.get_modpath("rainf") then
place_on = "rainf:meadow"
biomes = "rainf"
offset = 0.0008
scale = 0.00004
else
place_on = "default:dirt_with_grass"
biomes = "grassland"
offset = 0.0008
scale = 0.00004
end
minetest.register_decoration({
deco_type = "schematic",
place_on = {"rainf:meadow"},
place_on = {place_on},
sidelen = 16,
noise_params = {
offset = 0.0008,
scale = 0.00004,
offset = offset,
scale = scale,
spread = {x = 250, y = 250, z = 250},
seed = 6431,
octaves = 3,
persist = 0.66
},
biomes = {"rainf"},
biomes = {biomes},
y_min = 1,
y_max = 80,
schematic = modpath.."/schematics/oak.mts",
@ -216,3 +229,17 @@ if minetest.get_modpath("bonemeal") ~= nil then
{"oak:sapling", grow_new_oak_tree, "soil"},
})
end
if minetest.get_modpath("doors") ~= nil then
doors.register("door_oak_wood", {
tiles = {{ name = "oak_door_wood.png", backface_culling = true }},
description = S("Oak Wood Door"),
inventory_image = "oak_item_wood.png",
groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
recipe = {
{"oak:wood", "oak:wood"},
{"oak:wood", "oak:wood"},
{"oak:wood", "oak:wood"},
}
})
end

View File

@ -8,3 +8,4 @@ Oak Leaves=Hojas de roble
Oak Outer Stair=Escalera exterior de roble
Oak Slab=Losa de roble
Oak Stair=Escalera de roble
Oak Wood Door=Puerta de roble

View File

@ -1,4 +1,4 @@
name = oak
description = Oak Tree
depends = default
optional_depends = stairs, bonemeal, rainf
optional_depends = stairs, bonemeal, rainf, doors

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

0
palm/textures/palm_coconut_slice.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -25,7 +25,7 @@ end
-- Decoration
--
if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then
if mg_name ~= "v6" and mg_name ~= "singlenode" then
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt_with_rainforest_litter"},

View File

@ -1,4 +1,4 @@
name = pineapple
description = Pineapple tree for the jungle
depends = default
optional_depends = bonemeal, rainf
optional_depends = bonemeal

View File

@ -3,7 +3,8 @@
### bridge.lua ###
Wooden Bridge=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Wooden Bridge=Puente de madera
### crafts.lua ###
@ -13,15 +14,18 @@ Rope Segment=Segmento de cuerda
A hanging rope ladder that automatically extends downward.=Una escalera de cuerda colgante que se extiende automáticamente hacia abajo.
A ladder for climbing. It can reach greater heights when placed against a supporting block.=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A ladder for climbing. It can reach greater heights when placed against a supporting block.=Una escalera para subir. Puede alcanzar mayores alturas cuando se coloca contra un bloque de soporte.
A rope can be severed midway using an axe or other similar tool. The section of rope below the cut will collapse and disappear, potentially causing players who were hanging on to it to fall. The remaining rope will not resume descent on its own, but the rope box at the top of the rope "remembers" how long the rope was and if it is deconstructed and replaced it will still have the same maximum length of rope as before - no rope is permanently lost when a rope is severed like this.=Una cuerda puede ser cortada a mitad de camino usando un hacha u otra herramienta similar. La sección de la cuerda debajo del corte se colapsará y desaparecerá, lo que puede causar que los jugadores que estaban colgados de ella se caigan. El resto de la cuerda no volverá a descender por sí sola, pero la caja de la cuerda en la parte superior de la cuerda "recuerda" la longitud de la cuerda y si es deconstruida y reemplazada tendrá la misma longitud máxima de cuerda que antes - ninguna cuerda se pierde permanentemente cuando una cuerda es cortada de esta manera.
A wooden platform with support struts useful for bridging gaps.=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A wooden platform with support struts useful for bridging gaps.=Una plataforma de madera con puntales de soporte útil para salvar huecos.
After a rope ladder is placed on a vertical wall it will begin extending downward until it reaches its maximum length (@1 meters). If the rope ladder is removed all of the ladder below the point of removal will disappear. A rope ladder can be severed partway down using an axe or similar tool, and the ladder below the point where it is cut will collapse. No rope is actually lost in the process, though, and if the uppermost section of the ladder is removed and replaced the ladder will re-extend to the same maximum length as before.=Después de colocar una escalera de cuerda en una pared vertical, comenzará a extenderse hacia abajo hasta que alcance su longitud máxima (@1 metro). Si se retira la escalera de cuerda, desaparecerá toda la escalera por debajo del punto de extracción. Una escalera de cuerda puede ser cortada hasta la mitad usando un hacha o una herramienta similar, y la escalera por debajo del punto donde es cortada colapsará. Sin embargo, no se pierde ninguna cuerda en el proceso, y si la sección superior de la escalera se retira y se reemplaza, la escalera se volverá a extender a la misma longitud máxima que antes.
Right-clicking on a ladder with a stack of identical ladder items will automatically add new ladder segments to the top, provided it hasn't extended too far up beyond the last block behind it providing support.=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Right-clicking on a ladder with a stack of identical ladder items will automatically add new ladder segments to the top, provided it hasn't extended too far up beyond the last block behind it providing support.=Al hacer clic con el botón derecho en una escalera con una pila de elementos de escalera idénticos, se agregarán automáticamente nuevos segmentos de escalera a la parte superior, siempre que no se haya extendido demasiado más allá del último bloque detrás de ella que brinda soporte.
Rope boxes have a certain amount of rope contained within them specified in the name of the node, and have a limit to how much rope they can support that depends on the material they're made of. The different lengths can be crafted by combining and splitting up rope boxes in the crafting grid. For example, you can craft a @1m rope box by putting a @2m rope box and a rope segment in the crafting grid, or a @3m rope box and two rope segments in the crafting grid. Two rope segments can be recovered by putting the @4m rope box in the crafting grid by itself.=Las cajas de cuerdas tienen una cierta cantidad de cuerda contenida dentro de ellas especificada en el nombre del nodo, y tienen un límite en la cantidad de cuerda que pueden soportar que depende del material del que están hechas. Las diferentes longitudes se pueden realizar combinando y dividiendo las cajas de cuerda en la rejilla de elaboración. Por ejemplo, puedes crear una caja de cuerda de @1m poniendo una caja de cuerda de @2m y un segmento de cuerda en la rejilla de artesanía, o una caja de cuerda de @3m y dos segmentos de cuerda en la rejilla de artesanía. Se pueden recuperar dos segmentos de cable colocando solo la caja de cable de @4m en la rejilla de fabricación.
@ -29,7 +33,8 @@ Rope segments are bundles of fibre twisted into robust cables.=Los segmentos de
Ropes are hung by placing rope boxes, which automatically lower a rope of fixed length below them. They can be climbed and cut.=Las cuerdas se cuelgan colocando cajas de cuerda, que bajan automáticamente una cuerda de longitud fija por debajo de ellas. Se pueden escalar y cortar.
This behaves like most structural blocks except in one circumstance: when placed on top of a block with buildable space on the side facing away from you, this block will not be built on top but instead will extend out from that far side of the target block. This allows a platform to be easily built that juts out away from the location you're standing on.=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
This behaves like most structural blocks except in one circumstance: when placed on top of a block with buildable space on the side facing away from you, this block will not be built on top but instead will extend out from that far side of the target block. This allows a platform to be easily built that juts out away from the location you're standing on.=Esto se comporta como la mayoría de los bloques estructurales, excepto en una circunstancia: cuando se coloca encima de un bloque con un espacio edificable en el lado que mira hacia afuera, este bloque no se construirá en la parte superior, sino que se extenderá desde ese lado más alejado del bloque objetivo. . Esto permite construir fácilmente una plataforma que sobresale del lugar en el que se encuentra.
This craft item is useful for creating rope ladders, or for spooling on wooden spindles to hang and climb upon.=Esta objeto es útil para crear escaleras de cuerda, o para enrollar en husillos de madera para colgar y trepar.
@ -47,10 +52,14 @@ Wood=madera
### extendingladder.lua ###
Steel Extendable Ladder=
Steel Ladder=
Wooden Extendable Ladder=
Wooden Ladder=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Steel Extendable Ladder=Escalera extensible de acero
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Steel Ladder=Escalera de acero
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Wooden Extendable Ladder=Escalera extensible de madera
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Wooden Ladder=Escalera de madera
### ropeboxes.lua ###

View File

@ -42,6 +42,14 @@ for i in pairs(NoDe) do
liquids_pointable = true,
on_place = function(itemstack, placer, pointed_thing)
local pt = pointed_thing
if not placer then return end
local playername = placer:get_player_name()
if minetest.is_protected(pt.above, playername) then
minetest.record_protection_violation(pt.above, playername)
return
end
local direction = minetest.dir_to_facedir(placer:get_look_dir())
if minetest.get_node(pt.above).name=="air" then
minetest.swap_node(pt.above, {name="trunks:twig_"..math.random(1,4), param2=direction})

View File

@ -166,14 +166,11 @@ minetest.register_on_placenode(
return false
end
local param2
if not string.find(itemstack:to_string(), "palette_index") then
local param2
local color = 0
if def.palette == "unifieddyes_palette_extended.png"
and def.paramtype2 == "color" then
param2 = 240
color = 240
elseif def.palette == "unifieddyes_palette_colorwallmounted.png"
and def.paramtype2 == "colorwallmounted" then
param2 = newnode.param2 % 8
@ -184,17 +181,21 @@ minetest.register_on_placenode(
if param2 then
minetest.swap_node(pos, {name = newnode.name, param2 = param2})
minetest.get_meta(pos):set_int("palette_index", color)
end
end
if def.palette ~= "" then
minetest.get_meta(pos):set_int("palette_index", param2 or 240)
end
end
)
-- The complementary function: strip-off the color if the node being dug is still white/neutral
local function move_item(item, pos, inv, digger)
if not (digger and digger:is_player()) then return end
local function move_item(item, pos, inv, digger, fix_color)
if not (digger and digger:is_player()) then return end
local creative = creative_mode or minetest.check_player_privs(digger, "creative")
item = unifieddyes.fix_bad_color_info(item, fix_color)
if inv:room_for_item("main", item)
and (not creative or not inv:contains_item("main", item, true)) then
inv:add_item("main", item)
@ -214,20 +215,21 @@ function unifieddyes.on_dig(pos, node, digger)
local oldparam2 = minetest.get_node(pos).param2
local def = minetest.registered_items[node.name]
local del_color
local fix_color
if def.paramtype2 == "color" and oldparam2 == 240 and def.palette == "unifieddyes_palette_extended.png" then
del_color = true
fix_color = 240
elseif def.paramtype2 == "color" and oldparam2 == 0 and def.palette == "unifieddyes_palette_extended.png" then
fix_color = 0
elseif def.paramtype2 == "colorwallmounted" and math.floor(oldparam2 / 8) == 0 and def.palette == "unifieddyes_palette_colorwallmounted.png" then
del_color = true
fix_color = 0
elseif def.paramtype2 == "colorfacedir" and math.floor(oldparam2 / 32) == 0 and string.find(def.palette, "unifieddyes_palette_") then
del_color = true
fix_color = 0
end
local inv = digger:get_inventory()
if del_color then
move_item(node.name, pos, inv, digger)
if fix_color then
move_item(node.name, pos, inv, digger, fix_color)
else
return minetest.node_dig(pos, node, digger)
end
@ -273,11 +275,14 @@ end
-- This helper function creates a colored itemstack
function unifieddyes.fix_bad_color_info(item, paletteidx)
local stack=minetest.itemstring_with_color(item, paletteidx)
return string.gsub(stack, "u0001color", "u0001palette_index")
end
function unifieddyes.make_colored_itemstack(item, palette, color)
local paletteidx = unifieddyes.getpaletteidx(color, palette)
local stack = ItemStack(item)
stack:get_meta():set_int("palette_index", paletteidx)
return stack:to_string(),paletteidx
return unifieddyes.fix_bad_color_info(item, paletteidx), paletteidx
end
-- these helper functions register all of the recipes needed to create colored