Update castle modpack
38
README.md
@ -177,15 +177,15 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
### Stored in 'modpacks' directory
|
||||
|
||||
* castle ([MIT][lic.castle])
|
||||
* [castle_farming][] -- version: [a190dcf Git][ver.castle_farming] *2017-08-30* ***UPDATES***
|
||||
* [castle_gates][] -- version: [dc53584 Git][ver.castle_gates] *2017-04-28* ***UPDATES***
|
||||
* [castle_lighting][] -- version: [a7110c6 Git][ver.castle_lighting] *2017-06-07* ***UPDATES***
|
||||
* [castle_masonry][] -- version [2ed4f19 Git][ver.castle_masonry] *2017-02-28* ***UPDATES***
|
||||
* [castle_shields][] -- version [ce853d7 Git][ver.castle_shields] *2017-02-28* ***UPDATES***
|
||||
* [castle_storage][] -- version [c60b9ec Git][ver.castle_storage] *2017-06-04* ***UPDATES***
|
||||
* [castle_tapestries][] -- version [78b6e36 Git][ver.castle_tapestries] *2017-03-19* ***UPDATES***
|
||||
* [castle_weapons][] -- version [5f5ebcc Git][ver.castle_weapons] *2017-06-07* ([patched][patch.castle_weapons]) ***UPDATES***
|
||||
* [crafting_bench][] -- version [ca21489 Git][ver.crafting_bench] *2017-06-07* ***UPDATES***
|
||||
* [castle_farming][] -- version: [032f277 Git][ver.castle_farming] *2020-02-28*
|
||||
* [castle_gates][] -- version: [21b5a6c Git][ver.castle_gates] *2021-03-14*
|
||||
* [castle_lighting][] -- version: [32a42e3 Git][ver.castle_lighting] *2020-02-28*
|
||||
* [castle_masonry][] -- version: [6e81ab1 Git][ver.castle_masonry] *2020-09-09*
|
||||
* [castle_shields][] -- version: [78e74b0 Git][ver.castle_shields] *2019-11-23*
|
||||
* [castle_storage][] -- version: [ad5e887 Git][ver.castle_storage] *2020-02-28*
|
||||
* [castle_tapestries][] -- version: [f5e3ac1 Git][ver.castle_tapestries] *2020-02-16*
|
||||
* [castle_weapons][] -- version: [d3cf095 Git][ver.castle_weapons] *2020-02-28* ([patched][patch.castle_weapons])
|
||||
* [crafting_bench][] -- version: [69083ed Git][ver.crafting_bench] *2020-05-27*
|
||||
* [mob-engine][] ([zlib][lic.mob-engine] / [CC BY-SA][lic.ccbysa3.0]) -- version: [c2bedc3 Git][ver.mob-engine] *2018-04-23* ([patched][patch.mob-engine])
|
||||
* [mymods](https://github.com/AntumMT/mp-mymods)
|
||||
* [mydoors][] ([CC-BY / CC-BY-SA][lic.mydoors] / [WTFPL][lic.wtfpl] / [DWYWFPL][lic.dwywpl]) -- version: [eef3b5f Git][ver.mydoors] *2018-06-12* ([patched][patch.mydoors])
|
||||
@ -430,20 +430,20 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
[ver.bridges]: https://github.com/Sokomine/bridges/tree/5b5f475
|
||||
[ver.bright_night]: https://github.com/Yukitty/minetest-bright_night/tree/69b750a
|
||||
[ver.campfire]: https://github.com/Napiophelios/campfire/tree/1058f1d
|
||||
[ver.castle_farming]: https://github.com/minetest-mods/castle_farming/tree/b6503cf
|
||||
[ver.castle_gates]: https://github.com/minetest-mods/castle_gates/tree/dc53584
|
||||
[ver.castle_lighting]: https://github.com/minetest-mods/castle_lighting/tree/a7110c6
|
||||
[ver.castle_masonry]: https://github.com/minetest-mods/castle_masonry/tree/2ed4f19
|
||||
[ver.castle_shields]: https://github.com/minetest-mods/castle_shields/tree/ce853d7
|
||||
[ver.castle_storage]: https://github.com/minetest-mods/castle_storage/tree/c60b9ec
|
||||
[ver.castle_tapestries]: https://github.com/minetest-mods/castle_tapestries/tree/78b6e36
|
||||
[ver.castle_weapons]: https://github.com/minetest-mods/castle_weapons/tree/5f5ebcc
|
||||
[ver.castle_farming]: https://github.com/minetest-mods/castle_farming/tree/032f277
|
||||
[ver.castle_gates]: https://github.com/minetest-mods/castle_gates/tree/21b5a6c
|
||||
[ver.castle_lighting]: https://github.com/minetest-mods/castle_lighting/tree/32a42e3
|
||||
[ver.castle_masonry]: https://github.com/minetest-mods/castle_masonry/tree/6e81ab1
|
||||
[ver.castle_shields]: https://github.com/minetest-mods/castle_shields/tree/78e74b0
|
||||
[ver.castle_storage]: https://github.com/minetest-mods/castle_storage/tree/ad5e887
|
||||
[ver.castle_tapestries]: https://github.com/minetest-mods/castle_tapestries/tree/f5e3ac1
|
||||
[ver.castle_weapons]: https://github.com/minetest-mods/castle_weapons/tree/d3cf095
|
||||
[ver.chatlog]: https://github.com/AntumMT/mod-chatlog/tree/v1.0
|
||||
[ver.christmas]: https://github.com/TheZenKitteh/minetest-christmas/tree/d3bd872
|
||||
[ver.cleaner]: https://github.com/AntumMT/mod-cleaner/tree/68222b1
|
||||
[ver.coloredwood]: https://gitlab.com/VanessaE/coloredwood/tags/2021-01-30
|
||||
[ver.compassgps]: https://github.com/Kilarin/compassgps/tree/567b95f
|
||||
[ver.crafting_bench]: https://github.com/minetest-mods/crafting_bench/tree/ca21489
|
||||
[ver.crafting_bench]: https://github.com/minetest-mods/crafting_bench/tree/69083ed
|
||||
[ver.craftguide]: https://github.com/minetest-mods/craftguide/tree/f379998
|
||||
[ver.crops]: https://github.com/minetest-mods/crops/tree/v1
|
||||
[ver.currency]: https://gitlab.com/VanessaE/currency/tree/2021-01-30
|
||||
@ -531,7 +531,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
[patch.bedrock2]: https://github.com/AntumMT/mod-bedrock2/tree/9da5912
|
||||
[patch.boats2]: https://github.com/AntumMT/mod-boats2/tree/9b2bcb7
|
||||
[patch.bridges]: https://github.com/AntumMT/mod-bridges/tree/ba8f71a
|
||||
[patch.castle_weapons]: https://github.com/AntumMT/mod-castle_weapons/tree/669db13
|
||||
[patch.castle_weapons]: https://github.com/AntumMT/mod-castle_weapons/tree/6ec6f46
|
||||
[patch.christmas]: https://github.com/AntumMT/mod-christmas/tree/7ffdc67
|
||||
[patch.craftguide]: https://github.com/AntumMT/mod-craftguide/tree/aef18f2
|
||||
[patch.crops]: https://github.com/AntumMT/mod-crops/tree/a1cce06
|
||||
|
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Minetest Mods Team
|
||||
Copyright (c) 2016 Minetest Mods Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1,14 +1,9 @@
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
## Castle farm products
|
||||
|
||||
Castles Mod
|
||||
by: Philipbenr And DanDuncombe
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
B: Philipbenr, DanDuncombe, FaceDeer
|
||||
|
||||
Licence: MIT
|
||||
|
||||
see: LICENSE
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Contains farm products useful for decorating a castle:
|
||||
@ -16,5 +11,3 @@ Contains farm products useful for decorating a castle:
|
||||
* Hide wall and floor coverings
|
||||
* Bound straw bale
|
||||
* Straw training dummy
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
@ -1,6 +1,5 @@
|
||||
default
|
||||
farming
|
||||
intllib?
|
||||
wool
|
||||
bucket
|
||||
ropes?
|
@ -1,6 +1,4 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
minetest.register_alias("castle:hides", "castle_farming:hides")
|
||||
|
||||
|
418
mods/modpacks/castle/castle_farming/i18n.py
Normal file
@ -0,0 +1,418 @@
|
||||
#!/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, 2020 Louis Royer
|
||||
# LGPLv2.1+
|
||||
|
||||
from __future__ import print_function
|
||||
import os, fnmatch, re, shutil, errno
|
||||
from sys import argv as _argv
|
||||
|
||||
# Running params
|
||||
params = {"recursive": False,
|
||||
"help": False,
|
||||
"mods": False,
|
||||
"verbose": False,
|
||||
"folders": []
|
||||
}
|
||||
# Available CLI options
|
||||
options = {"recursive": ['--recursive', '-r'],
|
||||
"help": ['--help', '-h'],
|
||||
"mods": ['--installed-mods'],
|
||||
"verbose": ['--verbose', '-v']
|
||||
}
|
||||
|
||||
# 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["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)
|
||||
|
||||
# Handles "concatenation" .. " of strings"
|
||||
pattern_concat = re.compile(r'["\'][\s]*\.\.[\s]*["\']', re.DOTALL)
|
||||
|
||||
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$')
|
||||
|
||||
#attempt to read the mod's name from the mod.conf file. Returns None on failure
|
||||
def get_modname(folder):
|
||||
try:
|
||||
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:
|
||||
return match.group(1)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
return None
|
||||
|
||||
#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(os.path.join(folder, 'locale/')):
|
||||
for name in files:
|
||||
if pattern_tr_filename.search(name):
|
||||
out.append(name)
|
||||
return out
|
||||
|
||||
# A series of search and replaces that massage a .po file's contents into
|
||||
# a .tr file's equivalent
|
||||
def process_po_file(text):
|
||||
# The first three items are for unused matches
|
||||
text = re.sub(r'#~ msgid "', "", text)
|
||||
text = re.sub(r'"\n#~ msgstr ""\n"', "=", text)
|
||||
text = re.sub(r'"\n#~ msgstr "', "=", text)
|
||||
# comment lines
|
||||
text = re.sub(r'#.*\n', "", text)
|
||||
# converting msg pairs into "=" pairs
|
||||
text = re.sub(r'msgid "', "", text)
|
||||
text = re.sub(r'"\nmsgstr ""\n"', "=", text)
|
||||
text = re.sub(r'"\nmsgstr "', "=", text)
|
||||
# various line breaks and escape codes
|
||||
text = re.sub(r'"\n"', "", text)
|
||||
text = re.sub(r'"\n', "\n", text)
|
||||
text = re.sub(r'\\"', '"', text)
|
||||
text = re.sub(r'\\n', '@n', text)
|
||||
# remove header text
|
||||
text = re.sub(r'=Project-Id-Version:.*\n', "", text)
|
||||
# remove double-spaced lines
|
||||
text = re.sub(r'\n\n', '\n', text)
|
||||
return text
|
||||
|
||||
# Go through existing .po files and, if a .tr file for that language
|
||||
# *doesn't* exist, convert it and create it.
|
||||
# The .tr file that results will subsequently be reprocessed so
|
||||
# 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(os.path.join(folder, 'locale/')):
|
||||
for name in files:
|
||||
code_match = pattern_po_language_code.match(name)
|
||||
if code_match == None:
|
||||
continue
|
||||
language_code = code_match.group(1)
|
||||
tr_name = modname + "." + language_code + ".tr"
|
||||
tr_file = os.path.join(root, tr_name)
|
||||
if os.path.exists(tr_file):
|
||||
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 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)
|
||||
|
||||
# from https://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python/600612#600612
|
||||
# Creates a directory if it doesn't exist, silently does
|
||||
# nothing if it already exists
|
||||
def mkdir_p(path):
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError as exc: # Python >2.5
|
||||
if exc.errno == errno.EEXIST and os.path.isdir(path):
|
||||
pass
|
||||
else: raise
|
||||
|
||||
# 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 and comments from
|
||||
# the previous version of this text
|
||||
def strings_to_text(dkeyStrings, dOld, mod_name):
|
||||
lOut = [f"# textdomain: {mod_name}\n"]
|
||||
|
||||
dGroupedBySource = {}
|
||||
|
||||
for key in dkeyStrings:
|
||||
sourceList = list(dkeyStrings[key])
|
||||
sourceList.sort()
|
||||
sourceString = "\n".join(sourceList)
|
||||
listForSource = dGroupedBySource.get(sourceString, [])
|
||||
listForSource.append(key)
|
||||
dGroupedBySource[sourceString] = listForSource
|
||||
|
||||
lSourceKeys = list(dGroupedBySource.keys())
|
||||
lSourceKeys.sort()
|
||||
for source in lSourceKeys:
|
||||
localizedStrings = dGroupedBySource[source]
|
||||
localizedStrings.sort()
|
||||
lOut.append("")
|
||||
lOut.append(source)
|
||||
lOut.append("")
|
||||
for localizedString in localizedStrings:
|
||||
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:
|
||||
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):
|
||||
# read existing template file to preserve comments
|
||||
existing_template = import_tr_file(templ_file)
|
||||
|
||||
text = strings_to_text(dkeyStrings, existing_template[0], mod_name)
|
||||
mkdir_p(os.path.dirname(templ_file))
|
||||
with open(templ_file, "wt", encoding='utf-8') as template_file:
|
||||
template_file.write(text)
|
||||
|
||||
|
||||
# Gets all translatable strings from a lua file
|
||||
def read_lua_file_strings(lua_file):
|
||||
lOut = []
|
||||
with open(lua_file, encoding='utf-8') as text_file:
|
||||
text = text_file.read()
|
||||
#TODO remove comments here
|
||||
|
||||
text = re.sub(pattern_concat, "", text)
|
||||
|
||||
strings = []
|
||||
for s in pattern_lua.findall(text):
|
||||
strings.append(s[1])
|
||||
for s in pattern_lua_bracketed.findall(text):
|
||||
strings.append(s)
|
||||
|
||||
for s in strings:
|
||||
s = re.sub(r'"\.\.\s+"', "", s)
|
||||
s = re.sub("@[^@=0-9]", "@@", s)
|
||||
s = s.replace('\\"', '"')
|
||||
s = s.replace("\\'", "'")
|
||||
s = s.replace("\n", "@n")
|
||||
s = s.replace("\\n", "@n")
|
||||
s = s.replace("=", "@=")
|
||||
lOut.append(s)
|
||||
return lOut
|
||||
|
||||
# Gets strings from an existing translation 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.
|
||||
def import_tr_file(tr_file):
|
||||
dOut = {}
|
||||
text = 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():
|
||||
line = line.rstrip('\n')
|
||||
if line[:3] == "###":
|
||||
# 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:
|
||||
# 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)
|
||||
|
||||
# Walks all lua files in the mod folder, collects translatable strings,
|
||||
# and writes it to a template.txt file
|
||||
# Returns a dictionary of localized strings to source file sets
|
||||
# that can be used with the strings_to_text function.
|
||||
def generate_template(folder, mod_name):
|
||||
dOut = {}
|
||||
for root, dirs, files in os.walk(folder):
|
||||
for name in files:
|
||||
if fnmatch.fnmatch(name, "*.lua"):
|
||||
fname = os.path.join(root, name)
|
||||
found = read_lua_file_strings(fname)
|
||||
if params["verbose"]:
|
||||
print(f"{fname}: {str(len(found))} translatable strings")
|
||||
|
||||
for s in found:
|
||||
sources = dOut.get(s, set())
|
||||
sources.add(f"### {os.path.basename(fname)} ###")
|
||||
dOut[s] = sources
|
||||
|
||||
if len(dOut) == 0:
|
||||
return None
|
||||
templ_file = os.path.join(folder, "locale/template.txt")
|
||||
write_template(templ_file, dOut, mod_name)
|
||||
return dOut
|
||||
|
||||
# Updates an existing .tr file, copying the old one to a ".old" file
|
||||
# if any changes have happened
|
||||
# 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 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)
|
||||
|
||||
if textOld and textOld != textNew:
|
||||
print(f"{tr_file} has changed.")
|
||||
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)
|
||||
|
||||
# Updates translation files for the mod in the given folder
|
||||
def update_mod(folder):
|
||||
modname = get_modname(folder)
|
||||
if modname is not None:
|
||||
process_po_files(folder, modname)
|
||||
print(f"Updating translations for {modname}")
|
||||
data = generate_template(folder, modname)
|
||||
if data == None:
|
||||
print(f"No translatable strings found in {modname}")
|
||||
else:
|
||||
for tr_file in get_existing_tr_files(folder):
|
||||
update_tr_file(data, modname, os.path.join(folder, "locale/", tr_file))
|
||||
else:
|
||||
print("Unable to find modname in folder " + folder)
|
||||
|
||||
# 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(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:
|
||||
update_mod(subfolder + "/")
|
||||
else:
|
||||
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 + "/")
|
||||
|
||||
|
||||
main()
|
@ -1,45 +0,0 @@
|
||||
|
||||
-- Fallback functions for when `intllib` is not installed.
|
||||
-- Code released under Unlicense <http://unlicense.org>.
|
||||
|
||||
-- Get the latest version of this file at:
|
||||
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
|
||||
|
||||
local function format(str, ...)
|
||||
local args = { ... }
|
||||
local function repl(escape, open, num, close)
|
||||
if escape == "" then
|
||||
local replacement = tostring(args[tonumber(num)])
|
||||
if open == "" then
|
||||
replacement = replacement..close
|
||||
end
|
||||
return replacement
|
||||
else
|
||||
return "@"..open..num..close
|
||||
end
|
||||
end
|
||||
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
|
||||
end
|
||||
|
||||
local gettext, ngettext
|
||||
if minetest.get_modpath("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
gettext, ngettext = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
gettext = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
-- Fill in missing functions.
|
||||
|
||||
gettext = gettext or function(msgid, ...)
|
||||
return format(msgid, ...)
|
||||
end
|
||||
|
||||
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
|
||||
return format(n==1 and msgid or msgid_plural, ...)
|
||||
end
|
||||
|
||||
return gettext, ngettext
|
@ -0,0 +1,11 @@
|
||||
# textdomain: castle_farming
|
||||
|
||||
|
||||
### hides.lua ###
|
||||
|
||||
Hides=Escondite
|
||||
|
||||
### straw.lua ###
|
||||
|
||||
Bound Straw=Paja amarrada
|
||||
Training Dummy=Maniqui de Entrenamiento
|
@ -0,0 +1,11 @@
|
||||
# textdomain: castle_farming
|
||||
|
||||
|
||||
### hides.lua ###
|
||||
|
||||
Hides=Esconde-se
|
||||
|
||||
### straw.lua ###
|
||||
|
||||
Bound Straw=Palha Amarrada
|
||||
Training Dummy=Vaca Parada de Madeira (para Laço)
|
@ -1,30 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-02-27 00:59-0700\n"
|
||||
"PO-Revision-Date: 2017-04-21 19:47-0500\n"
|
||||
"Last-Translator: Carlos Barraza <carlosbarrazaes@gmail.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: Español\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: hides.lua:9
|
||||
msgid "Hides"
|
||||
msgstr "Escondite"
|
||||
|
||||
#: straw.lua:13
|
||||
msgid "Bound Straw"
|
||||
msgstr "Paja amarrada"
|
||||
|
||||
#: straw.lua:22
|
||||
msgid "Training Dummy"
|
||||
msgstr "Maniqui de Entrenamiento"
|
@ -1,30 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2017
|
||||
# This file is distributed under the same license as the castle_farming package.
|
||||
# Caio Roberto <caiorrs@gmail.com>, 2017.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-02-27 00:59-0700\n"
|
||||
"PO-Revision-Date: 2017-06-29 13:00-0330\n"
|
||||
"Last-Translator: Caio Roberto <caiorrs@gmail.com>\n"
|
||||
"Language-Team: Paulo Slomp FACED UFRGS <00009228@ufrgs.br>\n"
|
||||
"Language: Brazilian Portuguese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: hides.lua:9
|
||||
msgid "Hides"
|
||||
msgstr "Esconde-se"
|
||||
|
||||
#: straw.lua:13
|
||||
msgid "Bound Straw"
|
||||
msgstr "Palha Amarrada"
|
||||
|
||||
#: straw.lua:22
|
||||
msgid "Training Dummy"
|
||||
msgstr "Vaca Parada de Madeira (para Laço)"
|
@ -1,30 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-02-27 00:59-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: hides.lua:9
|
||||
msgid "Hides"
|
||||
msgstr ""
|
||||
|
||||
#: straw.lua:13
|
||||
msgid "Bound Straw"
|
||||
msgstr ""
|
||||
|
||||
#: straw.lua:22
|
||||
msgid "Training Dummy"
|
||||
msgstr ""
|
11
mods/modpacks/castle/castle_farming/locale/template.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# textdomain: castle_farming
|
||||
|
||||
|
||||
### hides.lua ###
|
||||
|
||||
Hides=
|
||||
|
||||
### straw.lua ###
|
||||
|
||||
Bound Straw=
|
||||
Training Dummy=
|
@ -1 +1,4 @@
|
||||
name = castle_farming
|
||||
depends = default, farming, wool, bucket
|
||||
optional_depends = ropes
|
||||
description = Contains farming products useful for decorating a castle
|
@ -5,9 +5,7 @@ minetest.register_alias_force("cottages:straw_bale", "castle_farming:bound_straw
|
||||
minetest.register_alias_force("darkage:straw_bale", "castle_farming:bound_straw")
|
||||
minetest.register_alias_force("castle:bound_straw", "castle_farming:bound_straw")
|
||||
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
minetest.register_node("castle_farming:bound_straw", {
|
||||
description = S("Bound Straw"),
|
||||
|
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 756 B After Width: | Height: | Size: 732 B |
Before Width: | Height: | Size: 803 B After Width: | Height: | Size: 798 B |
@ -1,101 +0,0 @@
|
||||
-- A simple special-purpose class, this is used for building up sets of three-dimensional points for fast reference
|
||||
|
||||
Pointset = {}
|
||||
Pointset.__index = Pointset
|
||||
|
||||
function Pointset.create()
|
||||
local set = {}
|
||||
setmetatable(set,Pointset)
|
||||
set.points = {}
|
||||
return set
|
||||
end
|
||||
|
||||
function Pointset:set(x, y, z, value)
|
||||
-- sets a value in the 3D array "points".
|
||||
if self.points[x] == nil then
|
||||
self.points[x] = {}
|
||||
end
|
||||
if self.points[x][y] == nil then
|
||||
self.points[x][y] = {}
|
||||
end
|
||||
self.points[x][y][z] = value
|
||||
end
|
||||
|
||||
function Pointset:set_if_not_in(excluded, x, y, z, value)
|
||||
-- If a value is not already set for this point in the 3D array "excluded", set it in "points"
|
||||
if excluded:get(x, y, z) ~= nil then
|
||||
return
|
||||
end
|
||||
self:set(x, y, z, value)
|
||||
end
|
||||
|
||||
function Pointset:get(x, y, z)
|
||||
-- return a value from the 3D array "points"
|
||||
if self.points[x] == nil or self.points[x][y] == nil then
|
||||
return nil
|
||||
end
|
||||
return self.points[x][y][z]
|
||||
end
|
||||
|
||||
function Pointset:set_pos(pos, value)
|
||||
self:set(pos.x, pos.y, pos.z, value)
|
||||
end
|
||||
|
||||
function Pointset:set_pos_if_not_in(excluded, pos, value)
|
||||
self:set_if_not_in(excluded, pos.x, pos.y, pos.z, value)
|
||||
end
|
||||
|
||||
function Pointset:get_pos(pos)
|
||||
return self:get(pos.x, pos.y, pos.z)
|
||||
end
|
||||
|
||||
function Pointset:pop()
|
||||
-- returns a point that's in the 3D array, and then removes it.
|
||||
local pos = {}
|
||||
local ytable
|
||||
local ztable
|
||||
local val
|
||||
|
||||
local count = 0
|
||||
for _ in pairs(self.points) do count = count + 1 end
|
||||
if count == 0 then
|
||||
return nil
|
||||
end
|
||||
|
||||
pos.x, ytable = next(self.points)
|
||||
pos.y, ztable = next(ytable)
|
||||
pos.z, val = next(ztable)
|
||||
|
||||
self.points[pos.x][pos.y][pos.z] = nil
|
||||
|
||||
count = 0
|
||||
for _ in pairs(self.points[pos.x][pos.y]) do count = count + 1 end
|
||||
if count == 0 then
|
||||
self.points[pos.x][pos.y] = nil
|
||||
end
|
||||
|
||||
count = 0
|
||||
for _ in pairs(self.points[pos.x]) do count = count + 1 end
|
||||
if count == 0 then
|
||||
self.points[pos.x] = nil
|
||||
end
|
||||
|
||||
return pos, val
|
||||
end
|
||||
|
||||
function Pointset:get_pos_list(value)
|
||||
-- Returns a list of all points with the given value in standard Minetest vector format. If no value is provided, returns all points
|
||||
local outlist = {}
|
||||
for x, ytable in ipairs(self.points) do
|
||||
for y, ztable in ipairs(ytable) do
|
||||
for z, val in ipairs(ztable) do
|
||||
if (value == nil and val ~= nil ) or val == value then
|
||||
table.insert(outlist, {x=x, y=y, z=z})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return outlist
|
||||
end
|
||||
|
||||
|
@ -1,6 +1,18 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
-- Used for localization, choose either built-in or intllib.
|
||||
|
||||
local MP, S, NS = nil
|
||||
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_gates")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
|
||||
if minetest.get_modpath("doors") then
|
||||
doors.register("castle_gates:oak_door", {
|
||||
@ -16,6 +28,21 @@ if minetest.get_modpath("doors") then
|
||||
{"default:tree", "default:tree"},
|
||||
}
|
||||
})
|
||||
|
||||
local door_recipe
|
||||
if minetest.get_modpath("xpanes") then
|
||||
door_recipe = {
|
||||
{"xpanes:jailbars_flat", "xpanes:jailbars_flat"},
|
||||
{"xpanes:jailbars_flat", "xpanes:jailbars_flat"},
|
||||
{"xpanes:jailbars_flat", "xpanes:jailbars_flat"},
|
||||
}
|
||||
else
|
||||
door_recipe = {
|
||||
{"default:steel_ingot", ""},
|
||||
{"", "default:steel_ingot"},
|
||||
{"default:steel_ingot", ""},
|
||||
}
|
||||
end
|
||||
|
||||
doors.register("castle_gates:jail_door", {
|
||||
tiles = {{ name = "castle_door_jail.png", backface_culling = true }},
|
||||
@ -25,11 +52,7 @@ if minetest.get_modpath("doors") then
|
||||
groups = { cracky = 2, door = 1, flow_through = 1},
|
||||
sound_open = "doors_steel_door_open",
|
||||
sound_close = "doors_steel_door_close",
|
||||
recipe = {
|
||||
{"castle_gates:jailbars", "castle_gates:jailbars"},
|
||||
{"castle_gates:jailbars", "castle_gates:jailbars"},
|
||||
{"castle_gates:jailbars", "castle_gates:jailbars"},
|
||||
}
|
||||
recipe = door_recipe,
|
||||
})
|
||||
|
||||
minetest.register_alias("castle:oak_door_a", "castle_gates:oak_door_a")
|
||||
@ -44,7 +67,7 @@ if minetest.get_modpath("xpanes") then
|
||||
tiles = {"castle_jailbars.png"},
|
||||
drawtype = "airlike",
|
||||
paramtype = "light",
|
||||
textures = {"castle_jailbars.png", "castle_jailbars.png", "xpanes_space.png"},
|
||||
textures = {"castle_jailbars.png", "castle_jailbars.png", "castle_jailbars.png"},
|
||||
inventory_image = "castle_jailbars.png",
|
||||
wield_image = "castle_jailbars.png",
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
|
@ -1,5 +1,4 @@
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
dofile(MP.."/class_pointset.lua")
|
||||
|
||||
-- Given a facedir, returns a set of all the corresponding directions
|
||||
local get_dirs = function(facedir)
|
||||
@ -116,6 +115,8 @@ end
|
||||
|
||||
|
||||
local get_door_layout = function(pos, facedir, player)
|
||||
if facedir > 23 then return nil end -- A bug in another mod once resulted in bad param2s being written to nodes, this will at least prevent crashes if something like that happens again.
|
||||
|
||||
-- This method does a flood-fill looking for all nodes that meet the following criteria:
|
||||
-- belongs to a "castle_gate" group
|
||||
-- has the same "back" direction as the initial node
|
||||
@ -128,17 +129,18 @@ local get_door_layout = function(pos, facedir, player)
|
||||
door.previous_move = minetest.get_meta(pos):get_string("previous_move")
|
||||
|
||||
-- temporary pointsets used while searching
|
||||
local to_test = Pointset.create()
|
||||
local tested = Pointset.create()
|
||||
local can_slide_to = Pointset.create()
|
||||
local to_test = {}
|
||||
local tested = {}
|
||||
local can_slide_to = {}
|
||||
|
||||
local castle_gate_group_value -- this will be populated from the first gate node we encounter, which will be the one that was clicked on
|
||||
|
||||
to_test:set_pos(pos, true)
|
||||
|
||||
local test_pos, _ = to_test:pop()
|
||||
|
||||
local player_has_bypass = minetest.check_player_privs(player, "protection_bypass")
|
||||
|
||||
local test_pos = pos
|
||||
while test_pos ~= nil do
|
||||
tested:set_pos(test_pos, true) -- track nodes we've looked at
|
||||
local test_pos_hash = minetest.hash_node_position(test_pos)
|
||||
tested[test_pos_hash] = true -- track nodes we've looked at
|
||||
local test_node = minetest.get_node(test_pos)
|
||||
|
||||
if test_node.name == "ignore" then
|
||||
@ -146,16 +148,18 @@ local get_door_layout = function(pos, facedir, player)
|
||||
return nil
|
||||
end
|
||||
|
||||
if minetest.is_protected(test_pos, player:get_player_name()) and not minetest.check_player_privs(player, "protection_bypass") then
|
||||
if not player_has_bypass and minetest.is_protected(test_pos, player:get_player_name()) then
|
||||
door.contains_protected_node = true
|
||||
end
|
||||
|
||||
local test_node_def = minetest.registered_nodes[test_node.name]
|
||||
can_slide_to:set_pos(test_pos, test_node_def.buildable_to == true)
|
||||
if test_node_def.buildable_to then
|
||||
can_slide_to[test_pos_hash] = true
|
||||
end
|
||||
|
||||
if test_node_def.paramtype2 == "facedir" then
|
||||
if test_node_def.paramtype2 == "facedir" and test_node.param2 <= 23 then -- prospective door nodes need to be of type facedir and have a valid param2
|
||||
local test_node_dirs = get_dirs(test_node.param2)
|
||||
local coplanar = vector.equals(test_node_dirs.back, door.directions.back)
|
||||
local coplanar = vector.equals(test_node_dirs.back, door.directions.back) -- the "back" vector needs to point in the same direction as the rest of the door
|
||||
|
||||
if castle_gate_group_value == nil and test_node_def.groups.castle_gate ~= nil then
|
||||
castle_gate_group_value = test_node_def.groups.castle_gate -- read the group value from the first gate node encountered
|
||||
@ -163,36 +167,41 @@ local get_door_layout = function(pos, facedir, player)
|
||||
|
||||
if coplanar and test_node_def.groups.castle_gate == castle_gate_group_value then
|
||||
local entry = {["pos"] = test_pos, ["node"] = test_node}
|
||||
table.insert(door.all, entry)
|
||||
if test_node_def._gate_hinge ~= nil then
|
||||
table.insert(door.all, entry) -- it's definitely a gate node of some sort.
|
||||
if test_node_def._gate_hinge ~= nil then -- it's a hinge type of node, need to do extra work
|
||||
local axis, placement = interpret_hinge(test_node_def._gate_hinge, test_pos, test_node_dirs)
|
||||
if door.hinge == nil then
|
||||
if door.hinge == nil then -- this is the first hinge we've encountered.
|
||||
door.hinge = {axis=axis, placement=placement}
|
||||
elseif door.hinge.axis ~= axis then
|
||||
door.directions = test_node_dirs -- force the door as a whole to use the same reference frame as the first hinge
|
||||
elseif door.hinge.axis ~= axis then -- there was a previous hinge. Do they rotate on the same axis?
|
||||
return nil -- Misaligned hinge axes, door cannot rotate.
|
||||
else
|
||||
local axis_dir = {x=0, y=0, z=0}
|
||||
axis_dir[axis] = 1
|
||||
local displacement = vector.normalize(vector.subtract(placement, door.hinge.placement))
|
||||
local displacement = vector.normalize(vector.subtract(placement, door.hinge.placement)) -- check if this new hinge is displaced relative to the first hinge on any axis other than the rotation axis
|
||||
if not (vector.equals(displacement, axis_dir) or vector.equals(displacement, vector.multiply(axis_dir, -1))) then
|
||||
return nil -- Misaligned hinge offset, door cannot rotate.
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
can_slide_to:set_pos(test_pos, true) -- since this is part of the door, other parts of the door can slide into it
|
||||
can_slide_to[test_pos_hash] = true -- since this is part of the door, other parts of the door can slide into it
|
||||
|
||||
local test_directions = {"top", "bottom", "left", "right"}
|
||||
for _, dir in pairs(test_directions) do
|
||||
local adjacent_pos = vector.add(test_pos, door.directions[dir])
|
||||
local adjacent_node = minetest.get_node(adjacent_pos)
|
||||
local adjacent_def = minetest.registered_nodes[adjacent_node.name]
|
||||
can_slide_to:set_pos(adjacent_pos, adjacent_def.buildable_to == true or adjacent_def.groups.castle_gate)
|
||||
local adjacent_pos_hash = minetest.hash_node_position(adjacent_pos)
|
||||
|
||||
if adjacent_def.buildable_to then
|
||||
can_slide_to[adjacent_pos_hash] = true
|
||||
end
|
||||
|
||||
if test_node_def._gate_edges == nil or not test_node_def._gate_edges[dir] then -- if we ourselves are an edge node, don't look in the direction we're an edge in
|
||||
if tested:get_pos(adjacent_pos) == nil then -- don't look at nodes that have already been looked at
|
||||
|
||||
if tested[adjacent_pos_hash] == nil then -- don't look at nodes that have already been looked at
|
||||
if adjacent_def.paramtype2 == "facedir" then -- all doors are facedir nodes so we can pre-screen some targets
|
||||
|
||||
local edge_points_back_at_test_pos = false
|
||||
-- Look at the adjacent node's definition. If it's got gate edges, check if they point back at us.
|
||||
if adjacent_def._gate_edges ~= nil then
|
||||
@ -206,7 +215,7 @@ local get_door_layout = function(pos, facedir, player)
|
||||
end
|
||||
|
||||
if not edge_points_back_at_test_pos then
|
||||
to_test:set_pos(adjacent_pos, true)
|
||||
table.insert(to_test, adjacent_pos_hash)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -215,17 +224,20 @@ local get_door_layout = function(pos, facedir, player)
|
||||
end
|
||||
end
|
||||
|
||||
test_pos, _ = to_test:pop()
|
||||
test_pos = table.remove(to_test)
|
||||
if test_pos ~= nil then
|
||||
test_pos = minetest.get_position_from_hash(test_pos)
|
||||
end
|
||||
end
|
||||
|
||||
if door.hinge == nil then
|
||||
--sliding door, evaluate which directions it can go
|
||||
door.can_slide = {top=true, bottom=true, left=true, right=true}
|
||||
for _,door_node in pairs(door.all) do
|
||||
door.can_slide.top = door.can_slide.top and can_slide_to:get_pos(vector.add(door_node.pos, door.directions.top))
|
||||
door.can_slide.bottom = door.can_slide.bottom and can_slide_to:get_pos(vector.add(door_node.pos, door.directions.bottom))
|
||||
door.can_slide.left = door.can_slide.left and can_slide_to:get_pos(vector.add(door_node.pos, door.directions.left))
|
||||
door.can_slide.right = door.can_slide.right and can_slide_to:get_pos(vector.add(door_node.pos, door.directions.right))
|
||||
door.can_slide.top = door.can_slide.top and can_slide_to[minetest.hash_node_position(vector.add(door_node.pos, door.directions.top))]
|
||||
door.can_slide.bottom = door.can_slide.bottom and can_slide_to[minetest.hash_node_position(vector.add(door_node.pos, door.directions.bottom))]
|
||||
door.can_slide.left = door.can_slide.left and can_slide_to[minetest.hash_node_position(vector.add(door_node.pos, door.directions.left))]
|
||||
door.can_slide.right = door.can_slide.right and can_slide_to[minetest.hash_node_position(vector.add(door_node.pos, door.directions.right))]
|
||||
end
|
||||
else
|
||||
--rotating door, evaluate which direction it can go. Slightly more complicated.
|
||||
@ -317,6 +329,10 @@ end
|
||||
-- only the "castle_gate" group is needed for that.
|
||||
|
||||
castle_gates.trigger_gate = function(pos, node, player)
|
||||
if not player or not player:get_pos() then
|
||||
return -- Player left; invalid ObjectRef
|
||||
end
|
||||
|
||||
local door = get_door_layout(pos, node.param2, player)
|
||||
|
||||
if door ~= nil then
|
||||
@ -381,9 +397,11 @@ castle_gates.trigger_gate = function(pos, node, player)
|
||||
end
|
||||
|
||||
if door_moved then
|
||||
minetest.after(1, function()
|
||||
castle_gates.trigger_gate(door.all[1].pos, door.all[1].node, player)
|
||||
end)
|
||||
minetest.after(1, function(player_name)
|
||||
-- Get current player ObjectRef (nil when gone)
|
||||
castle_gates.trigger_gate(door.all[1].pos, door.all[1].node,
|
||||
minetest.get_player_by_name(player_name))
|
||||
end, player:get_player_name())
|
||||
end
|
||||
end
|
||||
end
|
@ -1,6 +1,15 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
local MP, S, NS = nil
|
||||
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_gates")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- copied from castle_masonry in case that mod is not loaded
|
||||
local get_material_properties = function(material)
|
||||
@ -91,34 +100,33 @@ castle_gates.register_gate_slot = function(material)
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":"..material.name.."_portcullis_slot 3",
|
||||
output = mod_name..":"..material.name.."_gate_slot 2",
|
||||
recipe = {
|
||||
{material.craft_material,"",material.craft_material},
|
||||
{material.craft_material,"",material.craft_material},
|
||||
{material.craft_material,"",material.craft_material},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":"..material.name.."_portcullis_slot",
|
||||
output = mod_name..":"..material.name.."_gate_slot",
|
||||
type = "shapeless",
|
||||
recipe = {mod_name..":"..material.name.."_portcullis_slot_reverse"},
|
||||
recipe = {mod_name..":"..material.name.."_gate_slot_reverse"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = mod_name..":"..material.name.."_portcullis_slot_reverse",
|
||||
output = mod_name..":"..material.name.."_gate_slot_reverse",
|
||||
type = "shapeless",
|
||||
recipe = {mod_name..":"..material.name.."_portcullis_slot"},
|
||||
recipe = {mod_name..":"..material.name.."_gate_slot"},
|
||||
})
|
||||
|
||||
if burn_time > 0 then
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":"..material.name.."_portcullis_slot",
|
||||
recipe = mod_name..":"..material.name.."_gate_slot",
|
||||
burntime = burn_time * 2,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":"..material.name.."_portcullis_slot_reverse",
|
||||
recipe = mod_name..":"..material.name.."_gate_slot_reverse",
|
||||
burntime = burn_time * 2,
|
||||
})
|
||||
end
|
||||
|
@ -1,22 +1,47 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
local MP, S, NS = nil
|
||||
|
||||
minetest.register_node("castle_gates:portcullis_bars", {
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_gates")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
|
||||
minetest.register_alias("castle_gates:gate_edge", "castle_gates:wood_gate_edge")
|
||||
minetest.register_alias("castle_gates:gate_edge_handle", "castle_gates:wood_gate_edge_handle")
|
||||
minetest.register_alias("castle_gates:gate_hinge", "castle_gates:wood_gate_hinge")
|
||||
minetest.register_alias("castle_gates:gate_panel", "castle_gates:wood_gate_panel")
|
||||
minetest.register_alias("castle_gates:portcullis_bars", "castle_gates:wood_portcullis_bars")
|
||||
minetest.register_alias("castle_gates:portcullis_bars_bottom", "castle_gates:wood_portcullis_bars_bottom")
|
||||
|
||||
local register_gates = function(node_prefix, material_description, material_texture, gate_groups, gate_sounds, portcullis_recipe, panel_recipe)
|
||||
|
||||
local portcullis_groups = {castle_gate = 1, flow_through = 1}
|
||||
local panel_groups = {castle_gate = 1}
|
||||
for group, val in pairs(gate_groups) do
|
||||
portcullis_groups[group] = val
|
||||
panel_groups[group] = val
|
||||
end
|
||||
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_portcullis_bars", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Portcullis Bars"),
|
||||
description = S("@1 Portcullis Bars", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.portcullis_bars_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.portcullis_bars_usagehelp,
|
||||
groups = {castle_gate = 1, choppy = 1, flow_through = 1},
|
||||
groups = portcullis_groups,
|
||||
tiles = {
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -32,21 +57,21 @@ minetest.register_node("castle_gates:portcullis_bars", {
|
||||
on_rightclick = castle_gates.trigger_gate,
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:portcullis_bars_bottom", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_portcullis_bars_bottom", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Portcullis Bottom"),
|
||||
description = S("@1 Portcullis Bottom", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.portcullis_bars_bottom_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.portcullis_bars_bottom_usagehelp,
|
||||
groups = {castle_gate = 1, choppy = 1, flow_through = 1},
|
||||
groups = portcullis_groups,
|
||||
tiles = {
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -67,53 +92,46 @@ minetest.register_node("castle_gates:portcullis_bars_bottom", {
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:portcullis_bars 3",
|
||||
output = "castle_gates:"..node_prefix.."_portcullis_bars 3",
|
||||
recipe = portcullis_recipe,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:"..node_prefix.."_portcullis_bars",
|
||||
recipe = {
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"castle_gates:"..node_prefix.."_portcullis_bars_bottom"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:portcullis_bars",
|
||||
output = "castle_gates:"..node_prefix.."_portcullis_bars_bottom",
|
||||
recipe = {
|
||||
{"castle_gates:portcullis_bars_bottom"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:portcullis_bars_bottom",
|
||||
recipe = {
|
||||
{"castle_gates:portcullis_bars"}
|
||||
{"castle_gates:"..node_prefix.."_portcullis_bars"}
|
||||
},
|
||||
})
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_panel 8",
|
||||
recipe = {
|
||||
{"stairs:slab_wood","stairs:slab_wood", ""},
|
||||
{"stairs:slab_wood","stairs:slab_wood", ""},
|
||||
},
|
||||
output = "castle_gates:"..node_prefix.."_gate_panel 8",
|
||||
recipe = panel_recipe,
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:gate_panel", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_gate_panel", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Gate Door"),
|
||||
description = S("@1 Gate Door", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.gate_panel_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.gate_panel_usagehelp,
|
||||
groups = {choppy = 1, castle_gate = 1},
|
||||
groups = panel_groups,
|
||||
tiles = {
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -126,26 +144,26 @@ minetest.register_node("castle_gates:gate_panel", {
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_edge",
|
||||
output = "castle_gates:"..node_prefix.."_gate_edge",
|
||||
type = "shapeless",
|
||||
recipe = {"castle_gates:gate_panel"},
|
||||
recipe = {"castle_gates:"..node_prefix.."_gate_panel"},
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:gate_edge", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_gate_edge", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Gate Door Edge"),
|
||||
description = S("@1 Gate Door Edge", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.gate_edge_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.gate_edge_usagehelp,
|
||||
groups = {choppy = 1, castle_gate = 1},
|
||||
groups = panel_groups,
|
||||
tiles = {
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png^[transformFX)",
|
||||
"default_wood.png^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png)",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png^[transformFX)",
|
||||
material_texture.."^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png)",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -159,32 +177,32 @@ minetest.register_node("castle_gates:gate_edge", {
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_edge_handle",
|
||||
output = "castle_gates:"..node_prefix.."_gate_edge_handle",
|
||||
type = "shapeless",
|
||||
recipe = {"castle_gates:gate_edge"},
|
||||
recipe = {"castle_gates:"..node_prefix.."_gate_edge"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_panel",
|
||||
output = "castle_gates:"..node_prefix.."_gate_panel",
|
||||
type = "shapeless",
|
||||
recipe = {"castle_gates:gate_edge_handle"},
|
||||
recipe = {"castle_gates:"..node_prefix.."_gate_edge_handle"},
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:gate_edge_handle", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_gate_edge_handle", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Gate Door With Handle"),
|
||||
description = S("@1 Gate Door With Handle", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.gate_edge_handle_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.gate_edge_handle_usagehelp,
|
||||
groups = {choppy = 1, castle_gate = 1},
|
||||
groups = panel_groups,
|
||||
tiles = {
|
||||
"castle_steel.png^(default_wood.png^[mask:castle_door_side_mask.png^[transformR90)",
|
||||
"castle_steel.png^(default_wood.png^[mask:castle_door_side_mask.png^[transformR270)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_door_side_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:(castle_door_side_mask.png^[transformFX))",
|
||||
"default_wood.png^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png^[transformFX)^(castle_steel.png^[mask:castle_door_handle_mask.png^[transformFX)",
|
||||
"default_wood.png^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png)^(castle_steel.png^[mask:castle_door_handle_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[mask:castle_door_side_mask.png^[transformR90)",
|
||||
"castle_steel.png^("..material_texture.."^[mask:castle_door_side_mask.png^[transformR270)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_door_side_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:(castle_door_side_mask.png^[transformFX))",
|
||||
material_texture.."^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png^[transformFX)^(castle_steel.png^[mask:castle_door_handle_mask.png^[transformFX)",
|
||||
material_texture.."^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png)^(castle_steel.png^[mask:castle_door_handle_mask.png)",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -205,24 +223,24 @@ minetest.register_node("castle_gates:gate_edge_handle", {
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_hinge 3",
|
||||
output = "castle_gates:"..node_prefix.."_gate_hinge 3",
|
||||
recipe = {
|
||||
{"", "castle_gates:gate_panel", ""},
|
||||
{"default:steel_ingot", "castle_gates:gate_panel", ""},
|
||||
{"", "castle_gates:gate_panel", ""}
|
||||
{"", "castle_gates:"..node_prefix.."_gate_panel", ""},
|
||||
{"default:steel_ingot", "castle_gates:"..node_prefix.."_gate_panel", ""},
|
||||
{"", "castle_gates:"..node_prefix.."_gate_panel", ""}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:gate_hinge", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_gate_hinge", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Gate Door With Hinge"),
|
||||
description = S("@1 Gate Door With Hinge", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.gate_hinge_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.gate_hinge_usagehelp,
|
||||
groups = {choppy = 1, castle_gate = 1},
|
||||
groups = panel_groups,
|
||||
tiles = {
|
||||
"default_wood.png^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
|
||||
@ -241,3 +259,29 @@ minetest.register_node("castle_gates:gate_hinge", {
|
||||
_gate_hinge = {axis="top", offset={"front","left"}},
|
||||
on_rightclick = castle_gates.trigger_gate,
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
register_gates("wood", S("Wooden"), "default_wood.png", {choppy = 1}, default.node_sound_wood_defaults(),
|
||||
{
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
},
|
||||
{
|
||||
{"stairs:slab_wood","stairs:slab_wood", ""},
|
||||
{"stairs:slab_wood","stairs:slab_wood", ""},
|
||||
}
|
||||
)
|
||||
|
||||
register_gates("steel", S("Steel"), "default_steel_block.png", {cracky = 1, level = 2}, default.node_sound_metal_defaults(),
|
||||
{
|
||||
{"","default:steel_ingot","" },
|
||||
{"default:steel_ingot","default:steel_ingot","default:steel_ingot" },
|
||||
{"","default:steel_ingot","" },
|
||||
},
|
||||
{
|
||||
{"stairs:slab_steelblock","stairs:slab_steelblock", ""},
|
||||
{"stairs:slab_steelblock","stairs:slab_steelblock", ""},
|
||||
}
|
||||
)
|
||||
|
16
mods/modpacks/castle/castle_gates/locale/castle_gates.it.tr
Normal file
@ -0,0 +1,16 @@
|
||||
# textdomain:castle_gates
|
||||
|
||||
Oak Door=Porta di quercia
|
||||
Jail Door=Porta della prigione
|
||||
Jail Bars=Sbarre della prigione
|
||||
@1 Portcullis Bars=Sbarre della saracinesca di @1
|
||||
@1 Portcullis Bottom=Estremità inferiore della saracinesca di @1
|
||||
@1 Gate Door=Porta di @1 del cancello
|
||||
@1 Gate Door Edge=Estremità della porta di @1 del cancello
|
||||
@1 Gate Door With Handle=Porta di @1 con maniglia del cancello
|
||||
@1 Gate Door With Hinge=Porta di @1 con cardine del cancello
|
||||
Wooden=legno
|
||||
Steel=acciaio
|
||||
Stonebrick=mattone di pietra
|
||||
@1 Gate Slot=Alloggio di @1 del cancello
|
||||
@1 Gate Slot Reverse=Rovescio dell'alloggio di @1 del cancello
|
@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-01 23:41-0700\n"
|
||||
"POT-Creation-Date: 2019-04-14 22:15-0600\n"
|
||||
"PO-Revision-Date: 2017-04-28 11:56-0400\n"
|
||||
"Last-Translator: Carlos Barraza\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -31,8 +31,8 @@ msgid ""
|
||||
"The bottom edge of a portcullis gate, with knobs to lock securely into the "
|
||||
"floor."
|
||||
msgstr ""
|
||||
"Es el borde inferior de una puerta rastrillo, con perillas para bloquearla con "
|
||||
"seguridad en el piso"
|
||||
"Es el borde inferior de una puerta rastrillo, con perillas para bloquearla "
|
||||
"con seguridad en el piso"
|
||||
|
||||
#: doc.lua:15
|
||||
msgid ""
|
||||
@ -41,8 +41,8 @@ msgid ""
|
||||
"just decorative."
|
||||
msgstr ""
|
||||
"Este bloque puede ser usado para definir el borde de una puerta rastrillo "
|
||||
"que esta cerca de otra puerta, si tiene varias puertas independientes, "
|
||||
"de lo contrario es simplemente decorativo"
|
||||
"que esta cerca de otra puerta, si tiene varias puertas independientes, de "
|
||||
"lo contrario es simplemente decorativo"
|
||||
|
||||
#: doc.lua:17
|
||||
msgid "A basic gate panel."
|
||||
@ -67,10 +67,10 @@ msgid ""
|
||||
"separately, for example. Note that edges aren't strictly necessary for gates "
|
||||
"that stand alone."
|
||||
msgstr ""
|
||||
"El borde oscurecido de este panel marca el limite de la puerta."
|
||||
"Usted puede utilizar estos bloques para construir puertas dobles para asegurar "
|
||||
"que las dos puertas funcionen por separado, por ejemplo. Tenga en cuenta que "
|
||||
"los bordes no son estrictamente necesarios para las puertas individuales"
|
||||
"El borde oscurecido de este panel marca el limite de la puerta. Usted puede "
|
||||
"utilizar estos bloques para construir puertas dobles para asegurar que las "
|
||||
"dos puertas funcionen por separado, por ejemplo. Tenga en cuenta que los "
|
||||
"bordes no son estrictamente necesarios para las puertas individuales"
|
||||
|
||||
#: doc.lua:23
|
||||
msgid "A gate edge with a handle."
|
||||
@ -106,7 +106,7 @@ msgstr ""
|
||||
msgid "A block with a slot to allow an adjacent sliding gate through."
|
||||
msgstr ""
|
||||
"Un bloque con una ranura en el medio para que una puerta deslizante pueda "
|
||||
"pasar a través de ella."
|
||||
"pasar a travs de ella."
|
||||
|
||||
#: doc.lua:30
|
||||
msgid ""
|
||||
@ -146,8 +146,8 @@ msgid ""
|
||||
"Gates are large multi-node constructions that swing on hinges or slide out "
|
||||
"of the way when triggered."
|
||||
msgstr ""
|
||||
"Las puertas grandes son construcciones multi nodo que se abren usando bisagras "
|
||||
"o se deslizan hacia arriba cuando se activan"
|
||||
"Las puertas grandes son construcciones multi nodo que se abren usando "
|
||||
"bisagras o se deslizan hacia arriba cuando se activan"
|
||||
|
||||
#: doc.lua:43
|
||||
msgid "Gate construction"
|
||||
@ -211,19 +211,56 @@ msgstr ""
|
||||
"puerta todavía busca obstrucciones en la región que está moviéndose y no "
|
||||
"girara si hay algo en el camino."
|
||||
|
||||
|
||||
#: doors.lua:8
|
||||
msgid "Oak Door"
|
||||
msgstr "Puerta de Roble"
|
||||
|
||||
#: doors.lua:22
|
||||
#: doors.lua:37
|
||||
msgid "Jail Door"
|
||||
msgstr "Puerta de Cárcel"
|
||||
|
||||
#: doors.lua:43
|
||||
#: doors.lua:54
|
||||
msgid "Jail Bars"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:23
|
||||
#, fuzzy
|
||||
msgid "@1 Portcullis Bars"
|
||||
msgstr "Barras de la Puerta Rastrillo"
|
||||
|
||||
#: gates.lua:53
|
||||
#, fuzzy
|
||||
msgid "@1 Portcullis Bottom"
|
||||
msgstr "Terminación de la Puerta Rastrillo"
|
||||
|
||||
#: gates.lua:113
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door"
|
||||
msgstr "Porción de la Puerta"
|
||||
|
||||
#: gates.lua:145
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door Edge"
|
||||
msgstr "Borde de la Puerta"
|
||||
|
||||
#: gates.lua:184
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door With Handle"
|
||||
msgstr "Pestillo de la Puerta"
|
||||
|
||||
#: gates.lua:227
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door With Hinge"
|
||||
msgstr "Bisagra de la Puerta"
|
||||
|
||||
#: gates.lua:256
|
||||
msgid "Wooden"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:268
|
||||
msgid "Steel"
|
||||
msgstr ""
|
||||
|
||||
#: gate_slots.lua:36
|
||||
msgid "Stonebrick"
|
||||
msgstr "Ladrillo de Piedra"
|
||||
@ -235,27 +272,3 @@ msgstr "Espacio para Puerta de @1"
|
||||
#: gate_slots.lua:70
|
||||
msgid "@1 Gate Slot Reverse"
|
||||
msgstr "Espacio para Puerta Invertido de @1"
|
||||
|
||||
#: gates.lua:7
|
||||
msgid "Portcullis Bars"
|
||||
msgstr "Barras de la Puerta Rastrillo"
|
||||
|
||||
#: gates.lua:37
|
||||
msgid "Portcullis Bottom"
|
||||
msgstr "Terminación de la Puerta Rastrillo"
|
||||
|
||||
#: gates.lua:104
|
||||
msgid "Gate Door"
|
||||
msgstr "Porción de la Puerta"
|
||||
|
||||
#: gates.lua:136
|
||||
msgid "Gate Door Edge"
|
||||
msgstr "Borde de la Puerta"
|
||||
|
||||
#: gates.lua:175
|
||||
msgid "Gate Door With Handle"
|
||||
msgstr "Pestillo de la Puerta"
|
||||
|
||||
#: gates.lua:218
|
||||
msgid "Gate Door With Hinge"
|
||||
msgstr "Bisagra de la Puerta"
|
||||
|
282
mods/modpacks/castle/castle_gates/locale/it.po
Normal file
@ -0,0 +1,282 @@
|
||||
# ITALIAN LOCALE FILE FOR THE CASTLE GATES MODULE
|
||||
# Copyright (C) 2017 Philipbenr And DanDuncombe
|
||||
# This file is distributed under the same license as the CASTLE GATES package.
|
||||
# Hamlet <54187342+h4ml3t@users.noreply.github.com> 2017, 2019.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Castle Gates\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-04-14 22:15-0600\n"
|
||||
"PO-Revision-Date: 2019-11-11 23:23+0100\n"
|
||||
"Last-Translator: Hamlet <54187342+h4ml3t@users.noreply.github.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 2.2.1\n"
|
||||
|
||||
#: doc.lua:11
|
||||
msgid "Heavy wooden bars designed to prevent entry even to siege equipment."
|
||||
msgstr ""
|
||||
"Pesanti sbarre di legno progettate per impedire l'accesso perfino "
|
||||
"all'equipaggiamento da assedio."
|
||||
|
||||
#: doc.lua:12
|
||||
msgid ""
|
||||
"Place these bars in a structure together and they will slide as a unified "
|
||||
"gate when clicked on."
|
||||
msgstr ""
|
||||
"Componete una struttura mettendo insieme queste sbarre ed esse scorreranno "
|
||||
"come un'unica saracinesca quando ci si cliccherà sopra."
|
||||
|
||||
#: doc.lua:14
|
||||
msgid ""
|
||||
"The bottom edge of a portcullis gate, with knobs to lock securely into the "
|
||||
"floor."
|
||||
msgstr ""
|
||||
"La parte inferiore di una saracinesca, con puntali per bloccarsi saldamente "
|
||||
"nel pavimento."
|
||||
|
||||
#: doc.lua:15
|
||||
msgid ""
|
||||
"This block can be used to define the edge of a portcullius that meets up "
|
||||
"with another gate, should you have an arrangement like that. Otherwise it's "
|
||||
"just decorative."
|
||||
msgstr ""
|
||||
"Questo blocco può essere usato per definire l'estremità di una saracinesca "
|
||||
"che si incontra con un'altra, se doveste avere una tale disposizione. "
|
||||
"Altrimenti è solo decorativo."
|
||||
|
||||
#: doc.lua:17
|
||||
msgid "A basic gate panel."
|
||||
msgstr "Un pannello di base per cancelli, porte e portoni."
|
||||
|
||||
#: doc.lua:18
|
||||
msgid ""
|
||||
"This gate segment will move in unison with adjoining gate segments when "
|
||||
"right-clicked."
|
||||
msgstr ""
|
||||
"Questo segmento si muoverà all'unisono con altri segmenti adiacenti quando "
|
||||
"cliccato col tasto destro."
|
||||
|
||||
#: doc.lua:20
|
||||
msgid "A gate panel with a defined edge."
|
||||
msgstr ""
|
||||
"Un pannello per cancelli, porte e portoni avente un'estremità definita."
|
||||
|
||||
#: doc.lua:21
|
||||
msgid ""
|
||||
"The darkened edge of this panel marks the edge of the gate it's a part of. "
|
||||
"You can use these when building double doors to ensure the two parts swing "
|
||||
"separately, for example. Note that edges aren't strictly necessary for gates "
|
||||
"that stand alone."
|
||||
msgstr ""
|
||||
"L'estremità annerita di questo pannello contrassegna il bordo del cancello, "
|
||||
"porta o portone di cui fa parte. Per esempio potete usarla quando costruite "
|
||||
"doppi battenti per assicurarvi che le due parti ruotino separatamente. Si "
|
||||
"noti che queste estremità non sono strettamente necessarie per cancelli, "
|
||||
"porte e portoni a battente singolo."
|
||||
|
||||
#: doc.lua:23
|
||||
msgid "A gate edge with a handle."
|
||||
msgstr "Una estremità di cancello, porta o portone con una maniglia."
|
||||
|
||||
#: doc.lua:24
|
||||
msgid ""
|
||||
"The handle is basically decorative, a door this size can be swung by "
|
||||
"clicking anywhere on it. But the darkened edge of this panel is useful for "
|
||||
"defining the edge of a gate when it abuts a partner to the side."
|
||||
msgstr ""
|
||||
"Fondamentalmente la maniglia è decorativa, un cancello o porta di queste "
|
||||
"dimensioni possono essere aperti cliccando un punto qualunque su di essi. Ma "
|
||||
"il bordo annerito di questo pannello è utile per stabilire la fine di un "
|
||||
"battente quando confina con un altro."
|
||||
|
||||
#: doc.lua:26
|
||||
msgid "A hinged gate segment that allows a gate to swing."
|
||||
msgstr ""
|
||||
"Un segmento di cancello, porta o portone provvisto di un cardine che ne "
|
||||
"consente la rotazione."
|
||||
|
||||
#: doc.lua:27
|
||||
msgid ""
|
||||
"If you have more than one hinge in your gate, make sure the hinges line up "
|
||||
"correctly otherwise the gate will not be able to swing. The hinge is the "
|
||||
"protruding block along the edge of the gate panel."
|
||||
msgstr ""
|
||||
"Se avete più di un cardine nel vostro cancello, porta o portone, accertatevi "
|
||||
"che siano allineati correttamente altrimenti non potrà ruotare. Il cardine è "
|
||||
"la protuberanza lungo il bordo del pannello."
|
||||
|
||||
#: doc.lua:29
|
||||
msgid "A block with a slot to allow an adjacent sliding gate through."
|
||||
msgstr ""
|
||||
"Un blocco provvisto di una fessura per consentire a una porta scorrevole di "
|
||||
"scivolarci attraverso."
|
||||
|
||||
#: doc.lua:30
|
||||
msgid ""
|
||||
"This block is designed to extend into a neighboring node that a sliding gate "
|
||||
"passes through, to provide a tight seal for the gate to move through without "
|
||||
"allowing anything else to squeeze in."
|
||||
msgstr ""
|
||||
"Questo blocco è progettato per estendersi in un nodo vicino attraverso cui "
|
||||
"scivoli una porta scorrevole, per fornire una chiusura ermetica alla porta o "
|
||||
"saracinesca che gli passa attraverso senza permettere a niente altro di "
|
||||
"intrufolarvisi."
|
||||
|
||||
#: doc.lua:32
|
||||
msgid ""
|
||||
"A block that extends into an adjacent node to provide a tight seal for a "
|
||||
"large gate."
|
||||
msgstr ""
|
||||
"Un blocco che si estende in un nodo adiacente per fornire una chiusura "
|
||||
"ermetica per un portone."
|
||||
|
||||
#: doc.lua:33
|
||||
msgid ""
|
||||
"Two nodes cannot occupy the same space, but this block extends into a "
|
||||
"neighboring node's space to allow for gates to form a tight seal. It can be "
|
||||
"used with sliding gates or swinging gates."
|
||||
msgstr ""
|
||||
"Due nodi non possono occupare lo stesso spazio, ma questo blocco si estende "
|
||||
"nello spazio di un nodo vicino per consentire a cancelli, porte, portoni e "
|
||||
"saracinesche di formare una chiusura ermetica. Può essere usato con porte "
|
||||
"scorrevoli o a rotazione."
|
||||
|
||||
#: doc.lua:37
|
||||
msgid "Gates"
|
||||
msgstr "Cancelli, porte, portoni e saracinesche"
|
||||
|
||||
#: doc.lua:38
|
||||
msgid ""
|
||||
"Gates are large multi-node constructions that swing on hinges or slide out "
|
||||
"of the way when triggered."
|
||||
msgstr ""
|
||||
"Cancelli, porte, portoni e saracinesche sono costruzioni multi-nodo che "
|
||||
"quando vengono attivate ruotano su dei cardini o scivolano via."
|
||||
|
||||
#: doc.lua:43
|
||||
msgid "Gate construction"
|
||||
msgstr "Costruzione di cancelli, porte, portoni e saracinesche"
|
||||
|
||||
#: doc.lua:45
|
||||
msgid ""
|
||||
"Gates are multi-node constructions, usually (though not always) consisting "
|
||||
"of multiple node types that fit together into a unified whole. The "
|
||||
"orientation of gate nodes is significant, so a screwdriver will be a helpful "
|
||||
"tool when constructing gates.\n"
|
||||
"\n"
|
||||
"A gate's extent is determined by a \"flood fill\" operation. When you "
|
||||
"trigger a gate block, all compatible neighboring blocks will be considered "
|
||||
"part of the same structure and will move in unison. Only gate blocks that "
|
||||
"are aligned with each other will be considered part of the same gate. If you "
|
||||
"wish to build adjoining gates (for example, a large pair of double doors "
|
||||
"that meet in the center) you'll need to make use of gate edge blocks to "
|
||||
"prevent it all from being considered one big door. Note that if your gate "
|
||||
"does not abut any other gates you don't actually need to define its edges "
|
||||
"this way - you don't have to use edge blocks in this case.\n"
|
||||
"\n"
|
||||
"If a gate has no hinge nodes it will be considered a sliding gate. When "
|
||||
"triggered, the gate code will search for a direction that the gate can slide "
|
||||
"in and will move it in that direction at a rate of one block-length per "
|
||||
"second. Once it reaches an obstruction it will stop, and when triggered "
|
||||
"again it will try sliding in the opposite direction.\n"
|
||||
"\n"
|
||||
"If a gate has hinge nodes then triggering it will cause the gate to try "
|
||||
"swinging around the hinge. If the gate has multiple hinges and they don't "
|
||||
"line up properly the gate will be unable to move. Note that the gate can "
|
||||
"only exist in 90-degree increments of orientation, but the gate still looks "
|
||||
"for obstructions in the region it is swinging through and will not swing if "
|
||||
"there's something in the way."
|
||||
msgstr ""
|
||||
"Cancelli, porte, portoni e saracinesche sono costruzioni multi-nodo, di "
|
||||
"solito (anche se non sempre) costituite da molteplici tipi di nodi che si "
|
||||
"uniscono in un tutt'uno. L'orientamento è importante, perciò un cacciavite "
|
||||
"sarà uno strumento utile quando si costruiscono cancelli, porte, ecc.\n"
|
||||
"\n"
|
||||
"L'estensione di cancelli e simili è stabilita da un'operazione \"flood fill"
|
||||
"\" (allagamento riempitivo). Quando attivate un blocco di cancello, tutte le "
|
||||
"parti limitrofe compatibili verranno considerate parte della stessa "
|
||||
"struttura e si muoveranno all'unisono. Solamente i blocchi che sono "
|
||||
"allineati l'un l'altro saranno considerati come parte dello stesso cancello. "
|
||||
"Se desiderate costruire cancelli confinanti (per esempio, un paio di grossi "
|
||||
"battenti che si incontrano nel mezzo) dovrete fare uso dei blocchi-estremità "
|
||||
"per impedire che il tutto sia considerato come un'unica grossa porta. Si "
|
||||
"noti che se il vostro cancello non confina con nessun altro non avete la "
|
||||
"necessità di definirne le estremità in questo modo - in questo caso non è "
|
||||
"necessario che usiate blocchi-estremità.\n"
|
||||
"\n"
|
||||
"Se un cancello, ecc. non ha nodi coi cardini sarà considerato come "
|
||||
"scorrevole. Quando attivato, il programma del cancello cercherà una "
|
||||
"direzione in cui possa scivolare e lo muoverà in quella direzione al passo "
|
||||
"della distanza di un nodo al secondo. Quando raggiungerà un ostacolo si "
|
||||
"fermerà, e quando attivato ancora tenterà di scorrere nella direzione "
|
||||
"opposta.\n"
|
||||
"\n"
|
||||
"Se un cancello, ecc. ha dei nodi coi cardini, attivandolo lo si farà ruotare "
|
||||
"attorno al cardine. Se il cancello ha più cardini e questi non sono "
|
||||
"allineati correttamente non riuscirà a muoversi. Si noti che il cancello può "
|
||||
"svilupparsi solo in incrementi di 90° di orientamento, e controllerà la "
|
||||
"presenza di ostacoli nella zona in cui ruota e non ruoterà se c'è qualcosa "
|
||||
"di mezzo."
|
||||
|
||||
#: doors.lua:8
|
||||
msgid "Oak Door"
|
||||
msgstr "Porta di quercia"
|
||||
|
||||
#: doors.lua:37
|
||||
msgid "Jail Door"
|
||||
msgstr "Porta della prigione"
|
||||
|
||||
#: doors.lua:54
|
||||
msgid "Jail Bars"
|
||||
msgstr "Sbarre della prigione"
|
||||
|
||||
#: gates.lua:23
|
||||
msgid "@1 Portcullis Bars"
|
||||
msgstr "Sbarre della saracinesca di @1"
|
||||
|
||||
#: gates.lua:53
|
||||
msgid "@1 Portcullis Bottom"
|
||||
msgstr "Estremità inferiore della saracinesca di @1"
|
||||
|
||||
#: gates.lua:113
|
||||
msgid "@1 Gate Door"
|
||||
msgstr "Porta di @1 del cancello"
|
||||
|
||||
#: gates.lua:145
|
||||
msgid "@1 Gate Door Edge"
|
||||
msgstr "Estremità della porta di @1 del cancello"
|
||||
|
||||
#: gates.lua:184
|
||||
msgid "@1 Gate Door With Handle"
|
||||
msgstr "Porta di @1 con maniglia del cancello"
|
||||
|
||||
#: gates.lua:227
|
||||
msgid "@1 Gate Door With Hinge"
|
||||
msgstr "Porta di @1 con cardine del cancello"
|
||||
|
||||
#: gates.lua:256
|
||||
msgid "Wooden"
|
||||
msgstr "legno"
|
||||
|
||||
#: gates.lua:268
|
||||
msgid "Steel"
|
||||
msgstr "acciaio"
|
||||
|
||||
#: gate_slots.lua:36
|
||||
msgid "Stonebrick"
|
||||
msgstr "mattone di pietra"
|
||||
|
||||
#: gate_slots.lua:45
|
||||
msgid "@1 Gate Slot"
|
||||
msgstr "Alloggio di @1 per cancelli, porte, portoni e saracinesche"
|
||||
|
||||
#: gate_slots.lua:70
|
||||
msgid "@1 Gate Slot Reverse"
|
||||
msgstr ""
|
||||
"Rovescio dell'alloggio di @1 per cancelli, porte, portoni e saracinesche"
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-01 23:41-0700\n"
|
||||
"POT-Creation-Date: 2019-04-14 22:15-0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -157,14 +157,46 @@ msgstr ""
|
||||
msgid "Oak Door"
|
||||
msgstr ""
|
||||
|
||||
#: doors.lua:22
|
||||
#: doors.lua:37
|
||||
msgid "Jail Door"
|
||||
msgstr ""
|
||||
|
||||
#: doors.lua:43
|
||||
#: doors.lua:54
|
||||
msgid "Jail Bars"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:23
|
||||
msgid "@1 Portcullis Bars"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:53
|
||||
msgid "@1 Portcullis Bottom"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:113
|
||||
msgid "@1 Gate Door"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:145
|
||||
msgid "@1 Gate Door Edge"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:184
|
||||
msgid "@1 Gate Door With Handle"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:227
|
||||
msgid "@1 Gate Door With Hinge"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:256
|
||||
msgid "Wooden"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:268
|
||||
msgid "Steel"
|
||||
msgstr ""
|
||||
|
||||
#: gate_slots.lua:36
|
||||
msgid "Stonebrick"
|
||||
msgstr ""
|
||||
@ -176,27 +208,3 @@ msgstr ""
|
||||
#: gate_slots.lua:70
|
||||
msgid "@1 Gate Slot Reverse"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:7
|
||||
msgid "Portcullis Bars"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:37
|
||||
msgid "Portcullis Bottom"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:104
|
||||
msgid "Gate Door"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:136
|
||||
msgid "Gate Door Edge"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:175
|
||||
msgid "Gate Door With Handle"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:218
|
||||
msgid "Gate Door With Hinge"
|
||||
msgstr ""
|
||||
|
16
mods/modpacks/castle/castle_gates/locale/template.txt
Normal file
@ -0,0 +1,16 @@
|
||||
# textdomain:castle_gates
|
||||
|
||||
Oak Door=
|
||||
Jail Door=
|
||||
Jail Bars=
|
||||
@1 Portcullis Bars=
|
||||
@1 Portcullis Bottom=
|
||||
@1 Gate Door=
|
||||
@1 Gate Door Edge=
|
||||
@1 Gate Door With Handle=
|
||||
@1 Gate Door With Hinge=
|
||||
Wooden=
|
||||
Steel=
|
||||
Stonebrick=
|
||||
@1 Gate Slot=
|
||||
@1 Gate Slot Reverse=
|
6
mods/modpacks/castle/castle_gates/locale/update.bat
Normal file
@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
cd ..
|
||||
set LIST=
|
||||
for /r %%X in (*.lua) do set LIST=!LIST! %%X
|
||||
..\intllib\tools\xgettext.bat %LIST%
|
@ -1 +1,4 @@
|
||||
name = castle_gates
|
||||
description = This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons.
|
||||
depends = default
|
||||
optional_depends = castle_masonry, doors, xpanes, intllib, doc
|
||||
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 194 B After Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 878 B After Width: | Height: | Size: 851 B |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 253 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 194 B After Width: | Height: | Size: 95 B |
@ -1,14 +1,9 @@
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
## Castle Lighting
|
||||
|
||||
Castles Mod
|
||||
by: Philipbenr And DanDuncombe
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
By: Philipbenr, DanDuncombe, FaceDeer
|
||||
|
||||
Licence: MIT
|
||||
|
||||
see: LICENSE
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
This mod contains medieval lighting sources suitable for a castle. It includes:
|
@ -1,8 +1,6 @@
|
||||
if not minetest.get_modpath("fire") then return end
|
||||
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local brasier_longdesc = S("A brasier for producing copious amounts of light and heat.")
|
||||
local brasier_usagehelp = S("To ignite the brasier place a flammable fuel in its inventory slot. A lump of coal will burn for about half an hour.")
|
||||
|
@ -1,5 +1,4 @@
|
||||
default
|
||||
intllib?
|
||||
fire?
|
||||
castle_masonry?
|
||||
hopper?
|
||||
|
418
mods/modpacks/castle/castle_lighting/i18n.py
Normal file
@ -0,0 +1,418 @@
|
||||
#!/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, 2020 Louis Royer
|
||||
# LGPLv2.1+
|
||||
|
||||
from __future__ import print_function
|
||||
import os, fnmatch, re, shutil, errno
|
||||
from sys import argv as _argv
|
||||
|
||||
# Running params
|
||||
params = {"recursive": False,
|
||||
"help": False,
|
||||
"mods": False,
|
||||
"verbose": False,
|
||||
"folders": []
|
||||
}
|
||||
# Available CLI options
|
||||
options = {"recursive": ['--recursive', '-r'],
|
||||
"help": ['--help', '-h'],
|
||||
"mods": ['--installed-mods'],
|
||||
"verbose": ['--verbose', '-v']
|
||||
}
|
||||
|
||||
# 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["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)
|
||||
|
||||
# Handles "concatenation" .. " of strings"
|
||||
pattern_concat = re.compile(r'["\'][\s]*\.\.[\s]*["\']', re.DOTALL)
|
||||
|
||||
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$')
|
||||
|
||||
#attempt to read the mod's name from the mod.conf file. Returns None on failure
|
||||
def get_modname(folder):
|
||||
try:
|
||||
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:
|
||||
return match.group(1)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
return None
|
||||
|
||||
#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(os.path.join(folder, 'locale/')):
|
||||
for name in files:
|
||||
if pattern_tr_filename.search(name):
|
||||
out.append(name)
|
||||
return out
|
||||
|
||||
# A series of search and replaces that massage a .po file's contents into
|
||||
# a .tr file's equivalent
|
||||
def process_po_file(text):
|
||||
# The first three items are for unused matches
|
||||
text = re.sub(r'#~ msgid "', "", text)
|
||||
text = re.sub(r'"\n#~ msgstr ""\n"', "=", text)
|
||||
text = re.sub(r'"\n#~ msgstr "', "=", text)
|
||||
# comment lines
|
||||
text = re.sub(r'#.*\n', "", text)
|
||||
# converting msg pairs into "=" pairs
|
||||
text = re.sub(r'msgid "', "", text)
|
||||
text = re.sub(r'"\nmsgstr ""\n"', "=", text)
|
||||
text = re.sub(r'"\nmsgstr "', "=", text)
|
||||
# various line breaks and escape codes
|
||||
text = re.sub(r'"\n"', "", text)
|
||||
text = re.sub(r'"\n', "\n", text)
|
||||
text = re.sub(r'\\"', '"', text)
|
||||
text = re.sub(r'\\n', '@n', text)
|
||||
# remove header text
|
||||
text = re.sub(r'=Project-Id-Version:.*\n', "", text)
|
||||
# remove double-spaced lines
|
||||
text = re.sub(r'\n\n', '\n', text)
|
||||
return text
|
||||
|
||||
# Go through existing .po files and, if a .tr file for that language
|
||||
# *doesn't* exist, convert it and create it.
|
||||
# The .tr file that results will subsequently be reprocessed so
|
||||
# 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(os.path.join(folder, 'locale/')):
|
||||
for name in files:
|
||||
code_match = pattern_po_language_code.match(name)
|
||||
if code_match == None:
|
||||
continue
|
||||
language_code = code_match.group(1)
|
||||
tr_name = modname + "." + language_code + ".tr"
|
||||
tr_file = os.path.join(root, tr_name)
|
||||
if os.path.exists(tr_file):
|
||||
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 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)
|
||||
|
||||
# from https://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python/600612#600612
|
||||
# Creates a directory if it doesn't exist, silently does
|
||||
# nothing if it already exists
|
||||
def mkdir_p(path):
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError as exc: # Python >2.5
|
||||
if exc.errno == errno.EEXIST and os.path.isdir(path):
|
||||
pass
|
||||
else: raise
|
||||
|
||||
# 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 and comments from
|
||||
# the previous version of this text
|
||||
def strings_to_text(dkeyStrings, dOld, mod_name):
|
||||
lOut = [f"# textdomain: {mod_name}\n"]
|
||||
|
||||
dGroupedBySource = {}
|
||||
|
||||
for key in dkeyStrings:
|
||||
sourceList = list(dkeyStrings[key])
|
||||
sourceList.sort()
|
||||
sourceString = "\n".join(sourceList)
|
||||
listForSource = dGroupedBySource.get(sourceString, [])
|
||||
listForSource.append(key)
|
||||
dGroupedBySource[sourceString] = listForSource
|
||||
|
||||
lSourceKeys = list(dGroupedBySource.keys())
|
||||
lSourceKeys.sort()
|
||||
for source in lSourceKeys:
|
||||
localizedStrings = dGroupedBySource[source]
|
||||
localizedStrings.sort()
|
||||
lOut.append("")
|
||||
lOut.append(source)
|
||||
lOut.append("")
|
||||
for localizedString in localizedStrings:
|
||||
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:
|
||||
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):
|
||||
# read existing template file to preserve comments
|
||||
existing_template = import_tr_file(templ_file)
|
||||
|
||||
text = strings_to_text(dkeyStrings, existing_template[0], mod_name)
|
||||
mkdir_p(os.path.dirname(templ_file))
|
||||
with open(templ_file, "wt", encoding='utf-8') as template_file:
|
||||
template_file.write(text)
|
||||
|
||||
|
||||
# Gets all translatable strings from a lua file
|
||||
def read_lua_file_strings(lua_file):
|
||||
lOut = []
|
||||
with open(lua_file, encoding='utf-8') as text_file:
|
||||
text = text_file.read()
|
||||
#TODO remove comments here
|
||||
|
||||
text = re.sub(pattern_concat, "", text)
|
||||
|
||||
strings = []
|
||||
for s in pattern_lua.findall(text):
|
||||
strings.append(s[1])
|
||||
for s in pattern_lua_bracketed.findall(text):
|
||||
strings.append(s)
|
||||
|
||||
for s in strings:
|
||||
s = re.sub(r'"\.\.\s+"', "", s)
|
||||
s = re.sub("@[^@=0-9]", "@@", s)
|
||||
s = s.replace('\\"', '"')
|
||||
s = s.replace("\\'", "'")
|
||||
s = s.replace("\n", "@n")
|
||||
s = s.replace("\\n", "@n")
|
||||
s = s.replace("=", "@=")
|
||||
lOut.append(s)
|
||||
return lOut
|
||||
|
||||
# Gets strings from an existing translation 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.
|
||||
def import_tr_file(tr_file):
|
||||
dOut = {}
|
||||
text = 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():
|
||||
line = line.rstrip('\n')
|
||||
if line[:3] == "###":
|
||||
# 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:
|
||||
# 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)
|
||||
|
||||
# Walks all lua files in the mod folder, collects translatable strings,
|
||||
# and writes it to a template.txt file
|
||||
# Returns a dictionary of localized strings to source file sets
|
||||
# that can be used with the strings_to_text function.
|
||||
def generate_template(folder, mod_name):
|
||||
dOut = {}
|
||||
for root, dirs, files in os.walk(folder):
|
||||
for name in files:
|
||||
if fnmatch.fnmatch(name, "*.lua"):
|
||||
fname = os.path.join(root, name)
|
||||
found = read_lua_file_strings(fname)
|
||||
if params["verbose"]:
|
||||
print(f"{fname}: {str(len(found))} translatable strings")
|
||||
|
||||
for s in found:
|
||||
sources = dOut.get(s, set())
|
||||
sources.add(f"### {os.path.basename(fname)} ###")
|
||||
dOut[s] = sources
|
||||
|
||||
if len(dOut) == 0:
|
||||
return None
|
||||
templ_file = os.path.join(folder, "locale/template.txt")
|
||||
write_template(templ_file, dOut, mod_name)
|
||||
return dOut
|
||||
|
||||
# Updates an existing .tr file, copying the old one to a ".old" file
|
||||
# if any changes have happened
|
||||
# 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 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)
|
||||
|
||||
if textOld and textOld != textNew:
|
||||
print(f"{tr_file} has changed.")
|
||||
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)
|
||||
|
||||
# Updates translation files for the mod in the given folder
|
||||
def update_mod(folder):
|
||||
modname = get_modname(folder)
|
||||
if modname is not None:
|
||||
process_po_files(folder, modname)
|
||||
print(f"Updating translations for {modname}")
|
||||
data = generate_template(folder, modname)
|
||||
if data == None:
|
||||
print(f"No translatable strings found in {modname}")
|
||||
else:
|
||||
for tr_file in get_existing_tr_files(folder):
|
||||
update_tr_file(data, modname, os.path.join(folder, "locale/", tr_file))
|
||||
else:
|
||||
print("Unable to find modname in folder " + folder)
|
||||
|
||||
# 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(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:
|
||||
update_mod(subfolder + "/")
|
||||
else:
|
||||
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 + "/")
|
||||
|
||||
|
||||
main()
|
@ -4,9 +4,8 @@ minetest.register_alias("castle:light", "castle_lighting:light")
|
||||
minetest.register_alias("castle:chandelier", "castle_lighting:chandelier")
|
||||
minetest.register_alias("castle:chandelier_chain", "castle_lighting:chandelier_chain")
|
||||
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
castle_lighting = {}
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
|
||||
-- Fallback functions for when `intllib` is not installed.
|
||||
-- Code released under Unlicense <http://unlicense.org>.
|
||||
|
||||
-- Get the latest version of this file at:
|
||||
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
|
||||
|
||||
local function format(str, ...)
|
||||
local args = { ... }
|
||||
local function repl(escape, open, num, close)
|
||||
if escape == "" then
|
||||
local replacement = tostring(args[tonumber(num)])
|
||||
if open == "" then
|
||||
replacement = replacement..close
|
||||
end
|
||||
return replacement
|
||||
else
|
||||
return "@"..open..num..close
|
||||
end
|
||||
end
|
||||
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
|
||||
end
|
||||
|
||||
local gettext, ngettext
|
||||
if minetest.get_modpath("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
gettext, ngettext = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
gettext = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
-- Fill in missing functions.
|
||||
|
||||
gettext = gettext or function(msgid, ...)
|
||||
return format(msgid, ...)
|
||||
end
|
||||
|
||||
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
|
||||
return format(n==1 and msgid or msgid_plural, ...)
|
||||
end
|
||||
|
||||
return gettext, ngettext
|
@ -0,0 +1,18 @@
|
||||
# textdomain: castle_lighting
|
||||
|
||||
|
||||
### brasier.lua ###
|
||||
|
||||
@1 Brasier=Brasero de @1
|
||||
A brasier for producing copious amounts of light and heat.=Un brasero para producir grandes cantidades de luz y calor.
|
||||
Floor Brasier=Brasero con Patas
|
||||
Stonebrick=Ladrillo de piedra
|
||||
|
||||
To ignite the brasier place a flammable fuel in its inventory slot. A lump of coal will burn for about half an hour.=Para encender el brasero coloque un combustible inflamable en su ranura de inventario. Un trozo de carbón arderá durante media hora.
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Chandelier=Candelero
|
||||
Chandelier Chain=Colgante de Candelero
|
||||
Light Block=Bloque de luz
|
@ -0,0 +1,18 @@
|
||||
# textdomain: castle_lighting
|
||||
|
||||
|
||||
### brasier.lua ###
|
||||
|
||||
@1 Brasier=Braciere di @1
|
||||
A brasier for producing copious amounts of light and heat.=Un braciere per produrre grandi quantità di luce e calore.
|
||||
Floor Brasier=Braciere da pavimento
|
||||
Stonebrick=Mattoni di pietra
|
||||
|
||||
To ignite the brasier place a flammable fuel in its inventory slot. A lump of coal will burn for about half an hour.=Per accendere il braciere mettete del combustibile nella sua casella di inventario. Un grumo di carbone brucerà per circa mezz'ora.
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Chandelier=Candeliere
|
||||
Chandelier Chain=Catena per candeliere
|
||||
Light Block=Lampada
|
@ -1,54 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-01 23:52-0700\n"
|
||||
"PO-Revision-Date: 2017-04-28 12:40-0400\n"
|
||||
"Last-Translator: Carlos Barraza\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: Español\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: brasier.lua:7
|
||||
msgid "A brasier for producing copious amounts of light and heat."
|
||||
msgstr "Un brasero para producir grandes cantidades de luz y calor."
|
||||
|
||||
#: brasier.lua:8
|
||||
msgid ""
|
||||
"To ignite the brasier place a flammable fuel in its inventory slot. A lump "
|
||||
"of coal will burn for about half an hour."
|
||||
msgstr ""
|
||||
"Para encender el brasero coloque un combustible inflamable en su ranura de "
|
||||
"inventario. Un trozo de carbón arderá durante media hora."
|
||||
|
||||
#: brasier.lua:107
|
||||
msgid "Floor Brasier"
|
||||
msgstr "Brasero con Patas"
|
||||
|
||||
#: brasier.lua:156
|
||||
msgid "Stonebrick"
|
||||
msgstr "Ladrillo de piedra"
|
||||
|
||||
#: brasier.lua:228
|
||||
msgid "@1 Brasier"
|
||||
msgstr "Brasero de @1"
|
||||
|
||||
#: init.lua:17
|
||||
msgid "Light Block"
|
||||
msgstr "Bloque de luz"
|
||||
|
||||
#: init.lua:37
|
||||
msgid "Chandelier"
|
||||
msgstr "Candelero"
|
||||
|
||||
#: init.lua:76
|
||||
msgid "Chandelier Chain"
|
||||
msgstr "Colgante de Candelero"
|
@ -1,52 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-01 23:52-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: brasier.lua:7
|
||||
msgid "A brasier for producing copious amounts of light and heat."
|
||||
msgstr ""
|
||||
|
||||
#: brasier.lua:8
|
||||
msgid ""
|
||||
"To ignite the brasier place a flammable fuel in its inventory slot. A lump "
|
||||
"of coal will burn for about half an hour."
|
||||
msgstr ""
|
||||
|
||||
#: brasier.lua:107
|
||||
msgid "Floor Brasier"
|
||||
msgstr ""
|
||||
|
||||
#: brasier.lua:156
|
||||
msgid "Stonebrick"
|
||||
msgstr ""
|
||||
|
||||
#: brasier.lua:228
|
||||
msgid "@1 Brasier"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:17
|
||||
msgid "Light Block"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:37
|
||||
msgid "Chandelier"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:76
|
||||
msgid "Chandelier Chain"
|
||||
msgstr ""
|
18
mods/modpacks/castle/castle_lighting/locale/template.txt
Normal file
@ -0,0 +1,18 @@
|
||||
# textdomain: castle_lighting
|
||||
|
||||
|
||||
### brasier.lua ###
|
||||
|
||||
@1 Brasier=
|
||||
A brasier for producing copious amounts of light and heat.=
|
||||
Floor Brasier=
|
||||
Stonebrick=
|
||||
|
||||
To ignite the brasier place a flammable fuel in its inventory slot. A lump of coal will burn for about half an hour.=
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Chandelier=
|
||||
Chandelier Chain=
|
||||
Light Block=
|
@ -1 +1,4 @@
|
||||
name = castle_lighting
|
||||
depends = default
|
||||
optional_depends = fire, castle_masonry, hopper, doc
|
||||
description = This mod contains medieval castle lighting solutions
|
||||
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 316 B After Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 755 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 460 B |
38
mods/modpacks/castle/castle_masonry/README.md
Normal file
@ -0,0 +1,38 @@
|
||||
## Castle Masonry
|
||||
|
||||
by: Philipbenr, DanDuncombe, FaceDeer
|
||||
|
||||
Licence: MIT
|
||||
|
||||
This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons.
|
||||
|
||||
Contains:
|
||||
|
||||
* Walls, Corner-walls,
|
||||
* Castlestone Stairs, Slabs, and Pillars
|
||||
* Arrowslits and embrasures
|
||||
* Rubble (to fill the interior of thick castle walls)
|
||||
* Murder holes and machicolations
|
||||
* Pillars and crossbraces
|
||||
* Roof slate
|
||||
* Paving stone
|
||||
* Dungeon stone
|
||||
|
||||
Mod settings can allow for the basic castle masonry forms to be made for the following material types (all optional):
|
||||
|
||||
* Cobble
|
||||
* Desert stone
|
||||
* Desert stone brick
|
||||
* Sandstone
|
||||
* Sandstone brick
|
||||
* Desert Sandstone
|
||||
* Desert Sandstone brick
|
||||
* Silver Sandstone
|
||||
* Silver Sandstone brick
|
||||
* Stone
|
||||
* Stone brick
|
||||
* Castle wall
|
||||
* Wood
|
||||
* Snow
|
||||
* Ice
|
||||
* Obsidian Brick
|
@ -1,43 +0,0 @@
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Castles Mod
|
||||
by: Philipbenr And DanDuncombe
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Licence: MIT
|
||||
|
||||
see: LICENSE
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons.
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Contains:
|
||||
|
||||
--Walls, Corner-walls,
|
||||
--Castlestone Stairs, Slabs, and Pillars
|
||||
--Arrowslits and embrasures
|
||||
--Rubble (to fill the interior of thick castle walls)
|
||||
--Murder holes and machicolations
|
||||
--Pillars and crossbraces
|
||||
--Roof slate
|
||||
--Paving stone
|
||||
--Dungeon stone
|
||||
|
||||
Mod settings can allow for the basic castle masonry forms to be made for the following material types (all optional):
|
||||
|
||||
Cobble
|
||||
Desert stone
|
||||
Desert stone brick
|
||||
Sandstone
|
||||
Sandstone brick
|
||||
Stone
|
||||
Stone brick
|
||||
Castle wall
|
||||
Wood
|
||||
Snow
|
||||
Ice
|
||||
Obsidian Brick
|
@ -1,6 +1,18 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
-- Used for localization, choose either built-in or intllib.
|
||||
|
||||
local MP, S, NS = nil
|
||||
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_masonry")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
|
||||
castle_masonry.register_arrowslit = function(material)
|
||||
local composition_def, burn_time, tile, desc = castle_masonry.get_material_properties(material)
|
||||
@ -163,4 +175,4 @@ castle_masonry.register_arrowslit_alias_force = function(old_mod_name, old_mater
|
||||
minetest.register_alias_force(old_mod_name..":arrowslit_"..old_material_name.."_cross", new_mod_name..":arrowslit_"..new_material_name.."_cross")
|
||||
minetest.register_alias_force(old_mod_name..":arrowslit_"..old_material_name.."_hole", new_mod_name..":arrowslit_"..new_material_name.."_hole")
|
||||
minetest.register_alias_force(old_mod_name..":arrowslit_"..old_material_name.."_embrasure", new_mod_name..":arrowslit_"..new_material_name.."_embrasure")
|
||||
end
|
||||
end
|
||||
|
@ -1,6 +0,0 @@
|
||||
default
|
||||
moreblocks?
|
||||
stairs?
|
||||
building_blocks?
|
||||
asphalt?
|
||||
streets?
|
@ -1 +0,0 @@
|
||||
This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons.
|
218
mods/modpacks/castle/castle_masonry/i18n.py
Normal file
@ -0,0 +1,218 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- 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
|
||||
# LGPLv2.1+
|
||||
|
||||
from __future__ import print_function
|
||||
import os, fnmatch, re, shutil, errno
|
||||
|
||||
#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
|
||||
#TODO: support [[]] delimiters
|
||||
pattern_lua = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
|
||||
|
||||
# Handles "concatenation" .. " of strings"
|
||||
pattern_concat = re.compile(r'["\'][\s]*\.\.[\s]*["\']', re.DOTALL)
|
||||
|
||||
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$')
|
||||
|
||||
#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:
|
||||
for line in mod_conf:
|
||||
match = pattern_name.match(line)
|
||||
if match:
|
||||
return match.group(1)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
return None
|
||||
|
||||
#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 name in files:
|
||||
if pattern_tr_filename.search(name):
|
||||
out.append(name)
|
||||
return out
|
||||
|
||||
# A series of search and replaces that massage a .po file's contents into
|
||||
# a .tr file's equivalent
|
||||
def process_po_file(text):
|
||||
# The first three items are for unused matches
|
||||
text = re.sub(r'#~ msgid "', "", text)
|
||||
text = re.sub(r'"\n#~ msgstr ""\n"', "=", text)
|
||||
text = re.sub(r'"\n#~ msgstr "', "=", text)
|
||||
# comment lines
|
||||
text = re.sub(r'#.*\n', "", text)
|
||||
# converting msg pairs into "=" pairs
|
||||
text = re.sub(r'msgid "', "", text)
|
||||
text = re.sub(r'"\nmsgstr ""\n"', "=", text)
|
||||
text = re.sub(r'"\nmsgstr "', "=", text)
|
||||
# various line breaks and escape codes
|
||||
text = re.sub(r'"\n"', "", text)
|
||||
text = re.sub(r'"\n', "\n", text)
|
||||
text = re.sub(r'\\"', '"', text)
|
||||
text = re.sub(r'\\n', '@n', text)
|
||||
# remove header text
|
||||
text = re.sub(r'=Project-Id-Version:.*\n', "", text)
|
||||
# remove double-spaced lines
|
||||
text = re.sub(r'\n\n', '\n', text)
|
||||
return text
|
||||
|
||||
# Go through existing .po files and, if a .tr file for that language
|
||||
# *doesn't* exist, convert it and create it.
|
||||
# The .tr file that results will subsequently be reprocessed so
|
||||
# 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 name in files:
|
||||
code_match = pattern_po_language_code.match(name)
|
||||
if code_match == None:
|
||||
continue
|
||||
language_code = code_match.group(1)
|
||||
tr_name = modname + "." + language_code + ".tr"
|
||||
tr_file = os.path.join(root, tr_name)
|
||||
if os.path.exists(tr_file):
|
||||
print(tr_name + " already exists, ignoring " + name)
|
||||
continue
|
||||
fname = os.path.join(root, name)
|
||||
with open(fname, "r", encoding='utf-8') as po_file:
|
||||
print("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)
|
||||
|
||||
# from https://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python/600612#600612
|
||||
# Creates a directory if it doesn't exist, silently does
|
||||
# nothing if it already exists
|
||||
def mkdir_p(path):
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError as exc: # Python >2.5
|
||||
if exc.errno == errno.EEXIST and os.path.isdir(path):
|
||||
pass
|
||||
else: raise
|
||||
|
||||
# Writes a template.txt file
|
||||
def write_template(templ_file, lkeyStrings):
|
||||
lOut = []
|
||||
lkeyStrings.sort()
|
||||
for s in lkeyStrings:
|
||||
lOut.append("%s=" % s)
|
||||
mkdir_p(os.path.dirname(templ_file))
|
||||
with open(templ_file, "wt", encoding='utf-8') as template_file:
|
||||
template_file.write("\n".join(lOut))
|
||||
|
||||
# Gets all translatable strings from a lua file
|
||||
def read_lua_file_strings(lua_file):
|
||||
lOut = []
|
||||
with open(lua_file, encoding='utf-8') as text_file:
|
||||
text = text_file.read()
|
||||
text = re.sub(pattern_concat, "", text)
|
||||
for s in pattern_lua.findall(text):
|
||||
s = s[1]
|
||||
s = re.sub(r'"\.\.\s+"', "", s)
|
||||
s = re.sub("@[^@=0-9]", "@@", s)
|
||||
s = s.replace('\\"', '"')
|
||||
s = s.replace("\\'", "'")
|
||||
s = s.replace("\n", "@n")
|
||||
s = s.replace("\\n", "@n")
|
||||
s = s.replace("=", "@=")
|
||||
lOut.append(s)
|
||||
return lOut
|
||||
|
||||
# Gets strings from an existing translation file
|
||||
def import_tr_file(tr_file):
|
||||
dOut = {}
|
||||
if os.path.exists(tr_file):
|
||||
with open(tr_file, "r", encoding='utf-8') as existing_file :
|
||||
for line in existing_file.readlines():
|
||||
s = line.strip()
|
||||
if s == "" or s[0] == "#":
|
||||
continue
|
||||
match = pattern_tr.match(s)
|
||||
if match:
|
||||
dOut[match.group(1)] = match.group(2)
|
||||
return dOut
|
||||
|
||||
# Walks all lua files in the mod folder, collects translatable strings,
|
||||
# and writes it to a template.txt file
|
||||
def generate_template(folder):
|
||||
lOut = []
|
||||
for root, dirs, files in os.walk(folder):
|
||||
for name in files:
|
||||
if fnmatch.fnmatch(name, "*.lua"):
|
||||
fname = os.path.join(root, name)
|
||||
found = read_lua_file_strings(fname)
|
||||
print(fname + ": " + str(len(found)) + " translatable strings")
|
||||
lOut.extend(found)
|
||||
lOut = list(set(lOut))
|
||||
lOut.sort()
|
||||
if len(lOut) == 0:
|
||||
return None
|
||||
templ_file = folder + "locale/template.txt"
|
||||
write_template(templ_file, lOut)
|
||||
return lOut
|
||||
|
||||
# Updates an existing .tr file, copying the old one to a ".old" file
|
||||
def update_tr_file(lNew, mod_name, tr_file):
|
||||
print("updating " + tr_file)
|
||||
lOut = ["# textdomain: %s\n" % mod_name]
|
||||
|
||||
#TODO only make a .old if there are actual changes from the old file
|
||||
if os.path.exists(tr_file):
|
||||
shutil.copyfile(tr_file, tr_file+".old")
|
||||
|
||||
dOld = import_tr_file(tr_file)
|
||||
for key in lNew:
|
||||
val = dOld.get(key, "")
|
||||
lOut.append("%s=%s" % (key, val))
|
||||
lOut.append("##### not used anymore #####")
|
||||
for key in dOld:
|
||||
if key not in lNew:
|
||||
lOut.append("%s=%s" % (key, dOld[key]))
|
||||
with open(tr_file, "w", encoding='utf-8') as new_tr_file:
|
||||
new_tr_file.write("\n".join(lOut))
|
||||
|
||||
# Updates translation files for the mod in the given folder
|
||||
def update_mod(folder):
|
||||
modname = get_modname(folder)
|
||||
if modname is not None:
|
||||
process_po_files(folder, modname)
|
||||
print("Updating translations for " + modname)
|
||||
data = generate_template(folder)
|
||||
if data == None:
|
||||
print("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)
|
||||
else:
|
||||
print("Unable to find modname in folder " + folder)
|
||||
|
||||
def update_folder(folder):
|
||||
is_modpack = os.path.exists(folder+"modpack.txt") or os.path.exists(folder+"modpack.conf")
|
||||
if is_modpack:
|
||||
subfolders = [f.path for f in os.scandir(folder) if f.is_dir()]
|
||||
for subfolder in subfolders:
|
||||
update_mod(subfolder + "/")
|
||||
else:
|
||||
update_mod(folder)
|
||||
print("Done.")
|
||||
|
||||
|
||||
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 + "/")
|
@ -7,7 +7,20 @@ dofile(MP.."/murder_holes.lua")
|
||||
dofile(MP.."/stone_wall.lua")
|
||||
dofile(MP.."/paving.lua")
|
||||
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
-- Used for localization, choose either built-in or intllib.
|
||||
|
||||
local S, NS = nil
|
||||
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_masonry")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
|
||||
local read_setting = function(name, default)
|
||||
local setting = minetest.settings:get_bool(name)
|
||||
@ -26,7 +39,7 @@ end
|
||||
|
||||
castle_masonry.materials = {}
|
||||
if read_setting("castle_masonry_stonewall", true) then
|
||||
table.insert(castle_masonry.materials, {name="stonewall", desc=S("Stonewall"), tile="castle_stonewall.png", craft_material="castle:stonewall"})
|
||||
table.insert(castle_masonry.materials, {name="stonewall", desc=S("Stonewall"), tile="castle_stonewall.png", craft_material="castle_masonry:stonewall"})
|
||||
end
|
||||
if read_setting("castle_masonry_cobble", true) then
|
||||
table.insert(castle_masonry.materials, {name="cobble", desc=S("Cobble"), tile="default_cobble.png", craft_material="default:cobble"})
|
||||
@ -40,6 +53,12 @@ end
|
||||
if read_setting("castle_masonry_desertstonebrick", true) then
|
||||
table.insert(castle_masonry.materials, {name="desertstonebrick", desc=S("Desert Stone Brick"), tile="default_desert_stone_brick.png", craft_material="default:desert_stonebrick"})
|
||||
end
|
||||
if read_setting("castle_masonry_desertsandstonebrick", true) then
|
||||
table.insert(castle_masonry.materials, {name="desertsandstonebrick", desc=S("Desert Sandstone Brick"), tile="default_desert_sandstone_brick.png", craft_material="default:desert_sandstone_brick"})
|
||||
end
|
||||
if read_setting("castle_masonry_silversandstonebrick", true) then
|
||||
table.insert(castle_masonry.materials, {name="silversandstonebrick", desc=S("Silver Sandstone Brick"), tile="default_silver_sandstone_brick.png", craft_material="default:silver_sandstone_brick"})
|
||||
end
|
||||
if read_setting("castle_masonry_stone", true) then
|
||||
table.insert(castle_masonry.materials, {name="stone", desc=S("Stone"), tile="default_stone.png", craft_material="default:stone"})
|
||||
end
|
||||
@ -49,6 +68,12 @@ end
|
||||
if read_setting("castle_masonry_desertstone", true) then
|
||||
table.insert(castle_masonry.materials, {name="desertstone", desc=S("Desert Stone"), tile="default_desert_stone.png", craft_material="default:desert_stone"})
|
||||
end
|
||||
if read_setting("castle_masonry_desertsandstone", true) then
|
||||
table.insert(castle_masonry.materials, {name="desertsandstone", desc=S("Desert Sandstone"), tile="default_desert_sandstone.png", craft_material="default:desert_sandstone"})
|
||||
end
|
||||
if read_setting("castle_masonry_silversandstone", true) then
|
||||
table.insert(castle_masonry.materials, {name="silversandstone", desc=S("Silver Sandstone"), tile="default_silver_sandstone.png", craft_material="default:silver_sandstone"})
|
||||
end
|
||||
if read_setting("castle_masonry_wood", false) then
|
||||
table.insert(castle_masonry.materials, {name="wood", desc=S("Wood"), tile="default_wood.png", craft_material="group:wood", composition_material="default:wood"})
|
||||
end
|
||||
@ -70,9 +95,9 @@ castle_masonry.get_material_properties = function(material)
|
||||
burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack(material.composition_material)}}).time
|
||||
else
|
||||
composition_def = minetest.registered_nodes[material.craft_material]
|
||||
burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack(material.craft_materia)}}).time
|
||||
burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack(material.craft_material)}}).time
|
||||
end
|
||||
|
||||
|
||||
local tiles = material.tile
|
||||
if tiles == nil then
|
||||
tiles = composition_def.tile
|
||||
@ -84,7 +109,7 @@ castle_masonry.get_material_properties = function(material)
|
||||
if desc == nil then
|
||||
desc = composition_def.description
|
||||
end
|
||||
|
||||
|
||||
return composition_def, burn_time, tiles, desc
|
||||
end
|
||||
|
||||
@ -117,7 +142,7 @@ minetest.register_alias("castle:arrowslit_cross", "castle_masonry:arrowslit_ston
|
||||
for _, material in pairs(castle_masonry.materials) do
|
||||
castle_masonry.register_murderhole_alias("castle", material.name, "castle_masonry", material.name)
|
||||
castle_masonry.register_pillar_alias("castle", material.name, "castle_masonry", material.name)
|
||||
|
||||
|
||||
-- Arrowslit upgrade has special handling because the castle mod arrow slit is reversed relative to current build-from-inside standard
|
||||
local lbm_def = {
|
||||
name = "castle_masonry:arrowslit_flip_front_to_back"..material.name,
|
||||
@ -134,4 +159,4 @@ for _, material in pairs(castle_masonry.materials) do
|
||||
end
|
||||
}
|
||||
minetest.register_lbm(lbm_def)
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,50 @@
|
||||
# textdomain: castle_masonry
|
||||
|
||||
@1 Arrowslit=Aspillera de @1
|
||||
@1 Arrowslit with Cross=Aspillera con Crus de @1
|
||||
@1 Arrowslit with Hole=Aspillera con Agujero de @1
|
||||
@1 Crossbrace=Viga de @1
|
||||
@1 Embrasure=Aféizar de @1
|
||||
@1 Extended Crossbrace=Viga Extendida de @1
|
||||
@1 Half Pillar Base=Base de Medio Pilar de @1
|
||||
@1 Half Pillar Middle=Medio del Medio Pilar de @1
|
||||
@1 Half Pillar Top=Parte Superior de Medio Pilar @1
|
||||
@1 Machicolation=Matacán de @1
|
||||
@1 Murder Hole=Agujero de @1
|
||||
@1 Pillar Base=Base de Pilar de @1
|
||||
@1 Pillar Middle=Medio Pilar de @1
|
||||
@1 Pillar Top=Parte Superior de Pilar de @1
|
||||
Castle Corner=Esquina de Castillo
|
||||
Castle Pavement Slab=Pavimento de Castillo
|
||||
Castle Pavement Stair=Escalera de Castillo Pavimentada
|
||||
Castle Rubble=Escombros de Castillo
|
||||
Castle Rubble Slab=Losa de Escombro de Castillo
|
||||
Castle Rubble Stair=Escalera de Escombro de Castillo
|
||||
Castle Stonewall Slab=Losa de Pared de Castillo
|
||||
Castle Stonewall Stair=Escalera de Pared de Castillo
|
||||
Castle Wall=Pared de Castillo
|
||||
Cobble=Adoquín
|
||||
Desert Sandstone=Piedra del Desierto
|
||||
Desert Sandstone Brick=Ladrillo de Piedra del Desierto
|
||||
Desert Stone=Piedra del Desierto
|
||||
Desert Stone Brick=Ladrillo de Piedra del Desierto
|
||||
Dungeon Stone=Piedra de Mazmorra
|
||||
Dungeon Stone Slab=Losa de Piedra de Mazmorra
|
||||
Dungeon Stone Stair=Escalera de Piedra de Mazmorra
|
||||
Ice=Hielo
|
||||
Obsidian Brick=Ladrillo de Obsidiana
|
||||
Pavement Brick=Ladrillo Pavimentado
|
||||
Paving Stone=Piedra Pavimentada
|
||||
Roof Slates=Pizarras de Techo
|
||||
Rubble=Escombros
|
||||
Sandstone=Arenisca
|
||||
Sandstone Brick=Ladrillo de Arenisca
|
||||
Silver Sandstone=Arenisca
|
||||
Silver Sandstone Brick=Ladrillo de Arenisca
|
||||
Snow=Nieve
|
||||
Stone=Piedra
|
||||
Stone Wall=Pared de Piedra
|
||||
Stonebrick=Ladrillo de Piedra
|
||||
Stonewall=Pared de piedra
|
||||
Wood=Madera
|
||||
##### not used anymore #####
|
@ -0,0 +1,50 @@
|
||||
# textdomain: castle_masonry
|
||||
|
||||
@1 Arrowslit=Meurtrière en @1
|
||||
@1 Arrowslit with Cross=Meurtrière en croix en @1
|
||||
@1 Arrowslit with Hole=Meurtrière avec trou en @1
|
||||
@1 Crossbrace=Travers en @1
|
||||
@1 Embrasure=Embrasure en @1
|
||||
@1 Extended Crossbrace=Travers entendu en @1
|
||||
@1 Half Pillar Base=Base de demi pilier en @1
|
||||
@1 Half Pillar Middle=Milieu de demi pilier en @1
|
||||
@1 Half Pillar Top=Haut de demi pilier en @1
|
||||
@1 Machicolation=Machicoulis en @1
|
||||
@1 Murder Hole=Trou en @1
|
||||
@1 Pillar Base=Base de pilier en @1
|
||||
@1 Pillar Middle=Milieu de pilier en @1
|
||||
@1 Pillar Top=Haut de pilier en @1
|
||||
Castle Corner=Angle de chateau
|
||||
Castle Pavement Slab=Dalle de chateau pavé
|
||||
Castle Pavement Stair=Escaliers de chateau pavé
|
||||
Castle Rubble=Gravats de chateau
|
||||
Castle Rubble Slab=Dalle en gravats de chateau
|
||||
Castle Rubble Stair=Escalier en gravats de chateau
|
||||
Castle Stonewall Slab=Dalle en pierre brune
|
||||
Castle Stonewall Stair=Escalier en pierre brune
|
||||
Castle Wall=Pierre brune
|
||||
Cobble=Pavé
|
||||
Desert Sandstone=Pierre du désert
|
||||
Desert Sandstone Brick=Brique de pierre du désert
|
||||
Desert Stone=Pierre du désert
|
||||
Desert Stone Brick=Brique de pierre du désert
|
||||
Dungeon Stone=Pierre de dongeon
|
||||
Dungeon Stone Slab=Dalle en pierre de dongeon
|
||||
Dungeon Stone Stair=Escalier en pierre de dongeon
|
||||
Ice=Glace
|
||||
Obsidian Brick=Brique d'obsidienne
|
||||
Pavement Brick=Brique de pavage
|
||||
Paving Stone=Pierre de pavage
|
||||
Roof Slates=Toiture en ardoise
|
||||
Rubble=Décombre
|
||||
Sandstone=Grès
|
||||
Sandstone Brick=Brique de grès
|
||||
Silver Sandstone=Grès
|
||||
Silver Sandstone Brick=Brique de grès
|
||||
Snow=Neige
|
||||
Stone=Pierre
|
||||
Stone Wall=Mur de pierre
|
||||
Stonebrick=Brique de pierre
|
||||
Stonewall=Pierre brune
|
||||
Wood=Bois
|
||||
##### not used anymore #####
|
@ -0,0 +1,50 @@
|
||||
# textdomain: castle_masonry
|
||||
|
||||
@1 Arrowslit=Feritoia per frecce di @1
|
||||
@1 Arrowslit with Cross=Feritoia a croce per frecce di @1
|
||||
@1 Arrowslit with Hole=Feritoia a foro per frecce di @1
|
||||
@1 Crossbrace=Costolone di @1
|
||||
@1 Embrasure=Feritoia di @1
|
||||
@1 Extended Crossbrace=Costolone esteso di @1
|
||||
@1 Half Pillar Base=Mezza base della colonna di @1
|
||||
@1 Half Pillar Middle=Mezzo fusto della colonna di @1
|
||||
@1 Half Pillar Top=Mezzo capitello di @1
|
||||
@1 Machicolation=Caditoia di @1
|
||||
@1 Murder Hole=Buca assassina di @1
|
||||
@1 Pillar Base=Base della colonna di @1
|
||||
@1 Pillar Middle=Fusto della colonna di @1
|
||||
@1 Pillar Top=Capitello di @1
|
||||
Castle Corner=Angolo del castello
|
||||
Castle Pavement Slab=Lastra pavimentale del castello
|
||||
Castle Pavement Stair=Scala pavimentale del castello
|
||||
Castle Rubble=Detriti del castello
|
||||
Castle Rubble Slab=Lastra del castello in detriti
|
||||
Castle Rubble Stair=Scala del castello in detriti
|
||||
Castle Stonewall Slab=Lastra del castello in muro di pietra
|
||||
Castle Stonewall Stair=Scala del castello in muro di pietra
|
||||
Castle Wall=Muro del castello
|
||||
Cobble=ciottoli
|
||||
Desert Sandstone=arenaria del deserto
|
||||
Desert Sandstone Brick=mattone d'arenaria del deserto
|
||||
Desert Stone=pietra del deserto
|
||||
Desert Stone Brick=mattone di pietra del deserto
|
||||
Dungeon Stone=Pietra del sotterraneo
|
||||
Dungeon Stone Slab=Lastra di pietra del sotterraneo
|
||||
Dungeon Stone Stair=Scala di pietra del sotterraneo
|
||||
Ice=ghiaccio
|
||||
Obsidian Brick=mattone d'ossidiana
|
||||
Pavement Brick=Mattone pavimentale
|
||||
Paving Stone=Pietra pavimentale
|
||||
Roof Slates=Tegole d'ardesia
|
||||
Rubble=Detriti
|
||||
Sandstone=arenaria
|
||||
Sandstone Brick=mattone d'arenaria del deserto
|
||||
Silver Sandstone=arenaria argentata
|
||||
Silver Sandstone Brick=mattone d'arenaria argentata
|
||||
Snow=neve
|
||||
Stone=pietra
|
||||
Stone Wall=Muro di pietra
|
||||
Stonebrick=mattone di pietra
|
||||
Stonewall=muro di pietra
|
||||
Wood=legno
|
||||
##### not used anymore #####
|
210
mods/modpacks/castle/castle_masonry/locale/es.po
Normal file
@ -0,0 +1,210 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-11-12 13:31+0100\n"
|
||||
"PO-Revision-Date: 2017-04-28 15:23-0400\n"
|
||||
"Last-Translator: Carlos Barraza\n"
|
||||
"Language-Team: Español\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit"
|
||||
msgstr "Aspillera de @1"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit with Cross"
|
||||
msgstr "Aspillera con Crus de @1"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit with Hole"
|
||||
msgstr "Aspillera con Agujero de @1"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Embrasure"
|
||||
msgstr "Aféizar de @1 "
|
||||
|
||||
#: init.lua
|
||||
msgid "Stonewall"
|
||||
msgstr "Pared de piedra"
|
||||
|
||||
#: init.lua
|
||||
msgid "Cobble"
|
||||
msgstr "Adoquín"
|
||||
|
||||
#: init.lua
|
||||
msgid "Stonebrick"
|
||||
msgstr "Ladrillo de Piedra"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sandstone Brick"
|
||||
msgstr "Ladrillo de Arenisca"
|
||||
|
||||
#: init.lua
|
||||
msgid "Desert Stone Brick"
|
||||
msgstr "Ladrillo de Piedra del Desierto"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Desert Sandstone Brick"
|
||||
msgstr "Ladrillo de Piedra del Desierto"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Silver Sandstone Brick"
|
||||
msgstr "Ladrillo de Arenisca"
|
||||
|
||||
#: init.lua
|
||||
msgid "Stone"
|
||||
msgstr "Piedra"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sandstone"
|
||||
msgstr "Arenisca"
|
||||
|
||||
#: init.lua
|
||||
msgid "Desert Stone"
|
||||
msgstr "Piedra del Desierto"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Desert Sandstone"
|
||||
msgstr "Piedra del Desierto"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Silver Sandstone"
|
||||
msgstr "Arenisca"
|
||||
|
||||
#: init.lua
|
||||
msgid "Wood"
|
||||
msgstr "Madera"
|
||||
|
||||
#: init.lua
|
||||
msgid "Ice"
|
||||
msgstr "Hielo"
|
||||
|
||||
#: init.lua
|
||||
msgid "Snow"
|
||||
msgstr "Nieve"
|
||||
|
||||
#: init.lua
|
||||
msgid "Obsidian Brick"
|
||||
msgstr "Ladrillo de Obsidiana"
|
||||
|
||||
#: murder_holes.lua
|
||||
msgid "@1 Murder Hole"
|
||||
msgstr "Agujero de @1"
|
||||
|
||||
#: murder_holes.lua
|
||||
msgid "@1 Machicolation"
|
||||
msgstr "Matacán de @1"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Paving Stone"
|
||||
msgstr "Piedra Pavimentada"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Pavement Brick"
|
||||
msgstr "Ladrillo Pavimentado"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Castle Pavement Stair"
|
||||
msgstr "Escalera de Castillo Pavimentada"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Castle Pavement Slab"
|
||||
msgstr "Pavimento de Castillo"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Roof Slates"
|
||||
msgstr "Pizarras de Techo"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Base"
|
||||
msgstr "Base de Pilar de @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Base"
|
||||
msgstr "Base de Medio Pilar de @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Top"
|
||||
msgstr "Parte Superior de Pilar de @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Top"
|
||||
msgstr "Parte Superior de Medio Pilar @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Middle"
|
||||
msgstr "Medio Pilar de @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Middle"
|
||||
msgstr "Medio del Medio Pilar de @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Crossbrace"
|
||||
msgstr "Viga de @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Extended Crossbrace"
|
||||
msgstr "Viga Extendida de @1"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Wall"
|
||||
msgstr "Pared de Castillo"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble"
|
||||
msgstr "Escombros de Castillo"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Corner"
|
||||
msgstr "Esquina de Castillo"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Stone Wall"
|
||||
msgstr "Pared de Piedra"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Rubble"
|
||||
msgstr "Escombros"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Stonewall Stair"
|
||||
msgstr "Escalera de Pared de Castillo"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Stonewall Slab"
|
||||
msgstr "Losa de Pared de Castillo"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble Stair"
|
||||
msgstr "Escalera de Escombro de Castillo"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble Slab"
|
||||
msgstr "Losa de Escombro de Castillo"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone"
|
||||
msgstr "Piedra de Mazmorra"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone Stair"
|
||||
msgstr "Escalera de Piedra de Mazmorra"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone Slab"
|
||||
msgstr "Losa de Piedra de Mazmorra"
|
210
mods/modpacks/castle/castle_masonry/locale/fr.po
Normal file
@ -0,0 +1,210 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-11-12 13:31+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit"
|
||||
msgstr "Meurtrière en @1"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit with Cross"
|
||||
msgstr "Meurtrière en croix en @1"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit with Hole"
|
||||
msgstr "Meurtrière avec trou en @1"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Embrasure"
|
||||
msgstr "Embrasure en @1"
|
||||
|
||||
#: init.lua
|
||||
msgid "Stonewall"
|
||||
msgstr "Pierre brune"
|
||||
|
||||
#: init.lua
|
||||
msgid "Cobble"
|
||||
msgstr "Pavé"
|
||||
|
||||
#: init.lua
|
||||
msgid "Stonebrick"
|
||||
msgstr "Brique de pierre"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sandstone Brick"
|
||||
msgstr "Brique de grès"
|
||||
|
||||
#: init.lua
|
||||
msgid "Desert Stone Brick"
|
||||
msgstr "Brique de pierre du désert"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Desert Sandstone Brick"
|
||||
msgstr "Brique de pierre du désert"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Silver Sandstone Brick"
|
||||
msgstr "Brique de grès"
|
||||
|
||||
#: init.lua
|
||||
msgid "Stone"
|
||||
msgstr "Pierre"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sandstone"
|
||||
msgstr "Grès"
|
||||
|
||||
#: init.lua
|
||||
msgid "Desert Stone"
|
||||
msgstr "Pierre du désert"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Desert Sandstone"
|
||||
msgstr "Pierre du désert"
|
||||
|
||||
#: init.lua
|
||||
#, fuzzy
|
||||
msgid "Silver Sandstone"
|
||||
msgstr "Grès"
|
||||
|
||||
#: init.lua
|
||||
msgid "Wood"
|
||||
msgstr "Bois"
|
||||
|
||||
#: init.lua
|
||||
msgid "Ice"
|
||||
msgstr "Glace"
|
||||
|
||||
#: init.lua
|
||||
msgid "Snow"
|
||||
msgstr "Neige"
|
||||
|
||||
#: init.lua
|
||||
msgid "Obsidian Brick"
|
||||
msgstr "Brique d'obsidienne"
|
||||
|
||||
#: murder_holes.lua
|
||||
msgid "@1 Murder Hole"
|
||||
msgstr "Trou en @1"
|
||||
|
||||
#: murder_holes.lua
|
||||
msgid "@1 Machicolation"
|
||||
msgstr "Machicoulis en @1"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Paving Stone"
|
||||
msgstr "Pierre de pavage"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Pavement Brick"
|
||||
msgstr "Brique de pavage"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Castle Pavement Stair"
|
||||
msgstr "Escaliers de chateau pavé"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Castle Pavement Slab"
|
||||
msgstr "Dalle de chateau pavé"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Roof Slates"
|
||||
msgstr "Toiture en ardoise"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Base"
|
||||
msgstr "Base de pilier en @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Base"
|
||||
msgstr "Base de demi pilier en @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Top"
|
||||
msgstr "Haut de pilier en @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Top"
|
||||
msgstr "Haut de demi pilier en @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Middle"
|
||||
msgstr "Milieu de pilier en @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Middle"
|
||||
msgstr "Milieu de demi pilier en @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Crossbrace"
|
||||
msgstr "Travers en @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Extended Crossbrace"
|
||||
msgstr "Travers entendu en @1"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Wall"
|
||||
msgstr "Pierre brune"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble"
|
||||
msgstr "Gravats de chateau"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Corner"
|
||||
msgstr "Angle de chateau"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Stone Wall"
|
||||
msgstr "Mur de pierre"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Rubble"
|
||||
msgstr "Décombre"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Stonewall Stair"
|
||||
msgstr "Escalier en pierre brune"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Stonewall Slab"
|
||||
msgstr "Dalle en pierre brune"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble Stair"
|
||||
msgstr "Escalier en gravats de chateau"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble Slab"
|
||||
msgstr "Dalle en gravats de chateau"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone"
|
||||
msgstr "Pierre de dongeon"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone Stair"
|
||||
msgstr "Escalier en pierre de dongeon"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone Slab"
|
||||
msgstr "Dalle en pierre de dongeon"
|
207
mods/modpacks/castle/castle_masonry/locale/it.po
Normal file
@ -0,0 +1,207 @@
|
||||
# ITALIAN LOCALE FILE FOR THE CASTLE MASONRY MODULE
|
||||
# Copyright (C) 2017 Philipbenr And DanDuncombe
|
||||
# This file is distributed under the same license as the CASTLE MASONRY package.
|
||||
# Hamlet <54187342+h4ml3t@users.noreply.github.com> 2017, 2019.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Castle Masonry\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-11-12 12:13+0100\n"
|
||||
"PO-Revision-Date: 2019-11-12 12:24+0100\n"
|
||||
"Last-Translator: Hamlet <54187342+h4ml3t@users.noreply.github.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 2.2.1\n"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit"
|
||||
msgstr "Feritoia per frecce di @1"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit with Cross"
|
||||
msgstr "Feritoia a croce per frecce di @1"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit with Hole"
|
||||
msgstr "Feritoia a foro per frecce di @1"
|
||||
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Embrasure"
|
||||
msgstr "Feritoia di @1"
|
||||
|
||||
#: init.lua
|
||||
msgid "Stonewall"
|
||||
msgstr "muro di pietra"
|
||||
|
||||
#: init.lua
|
||||
msgid "Cobble"
|
||||
msgstr "ciottoli"
|
||||
|
||||
#: init.lua
|
||||
msgid "Stonebrick"
|
||||
msgstr "mattone di pietra"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sandstone Brick"
|
||||
msgstr "mattone d'arenaria del deserto"
|
||||
|
||||
#: init.lua
|
||||
msgid "Desert Stone Brick"
|
||||
msgstr "mattone di pietra del deserto"
|
||||
|
||||
#: init.lua
|
||||
msgid "Desert Sandstone Brick"
|
||||
msgstr "mattone d'arenaria del deserto"
|
||||
|
||||
#: init.lua
|
||||
msgid "Silver Sandstone Brick"
|
||||
msgstr "mattone d'arenaria argentata"
|
||||
|
||||
#: init.lua
|
||||
msgid "Stone"
|
||||
msgstr "pietra"
|
||||
|
||||
#: init.lua
|
||||
msgid "Sandstone"
|
||||
msgstr "arenaria"
|
||||
|
||||
#: init.lua
|
||||
msgid "Desert Stone"
|
||||
msgstr "pietra del deserto"
|
||||
|
||||
#: init.lua
|
||||
msgid "Desert Sandstone"
|
||||
msgstr "arenaria del deserto"
|
||||
|
||||
#: init.lua
|
||||
msgid "Silver Sandstone"
|
||||
msgstr "arenaria argentata"
|
||||
|
||||
#: init.lua
|
||||
msgid "Wood"
|
||||
msgstr "legno"
|
||||
|
||||
#: init.lua
|
||||
msgid "Ice"
|
||||
msgstr "ghiaccio"
|
||||
|
||||
#: init.lua
|
||||
msgid "Snow"
|
||||
msgstr "neve"
|
||||
|
||||
#: init.lua
|
||||
msgid "Obsidian Brick"
|
||||
msgstr "mattone d'ossidiana"
|
||||
|
||||
#: murder_holes.lua
|
||||
msgid "@1 Murder Hole"
|
||||
msgstr "Buca assassina di @1"
|
||||
|
||||
#: murder_holes.lua
|
||||
msgid "@1 Machicolation"
|
||||
msgstr "Caditoia di @1"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Paving Stone"
|
||||
msgstr "Pietra pavimentale"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Pavement Brick"
|
||||
msgstr "Mattone pavimentale"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Castle Pavement Stair"
|
||||
msgstr "Scala pavimentale del castello"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Castle Pavement Slab"
|
||||
msgstr "Lastra pavimentale del castello"
|
||||
|
||||
#: paving.lua
|
||||
msgid "Roof Slates"
|
||||
msgstr "Tegole d'ardesia"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Base"
|
||||
msgstr "Base della colonna di @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Base"
|
||||
msgstr "Mezza base della colonna di @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Top"
|
||||
msgstr "Capitello di @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Top"
|
||||
msgstr "Mezzo capitello di @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Middle"
|
||||
msgstr "Fusto della colonna di @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Middle"
|
||||
msgstr "Mezzo fusto della colonna di @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Crossbrace"
|
||||
msgstr "Costolone di @1"
|
||||
|
||||
#: pillars.lua
|
||||
msgid "@1 Extended Crossbrace"
|
||||
msgstr "Costolone esteso di @1"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Wall"
|
||||
msgstr "Muro del castello"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble"
|
||||
msgstr "Detriti del castello"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Corner"
|
||||
msgstr "Angolo del castello"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Stone Wall"
|
||||
msgstr "Muro di pietra"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Rubble"
|
||||
msgstr "Detriti"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Stonewall Stair"
|
||||
msgstr "Scala del castello in muro di pietra"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Stonewall Slab"
|
||||
msgstr "Lastra del castello in muro di pietra"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble Stair"
|
||||
msgstr "Scala del castello in detriti"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble Slab"
|
||||
msgstr "Lastra del castello in detriti"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone"
|
||||
msgstr "Pietra del sotterraneo"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone Stair"
|
||||
msgstr "Scala di pietra del sotterraneo"
|
||||
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone Slab"
|
||||
msgstr "Lastra di pietra del sotterraneo"
|
@ -8,182 +8,199 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-02-21 23:41-0700\n"
|
||||
"POT-Creation-Date: 2019-11-12 13:31+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: arrow_slits.lua:12
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit"
|
||||
msgstr ""
|
||||
|
||||
#: arrow_slits.lua:33
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit with Cross"
|
||||
msgstr ""
|
||||
|
||||
#: arrow_slits.lua:58
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Arrowslit with Hole"
|
||||
msgstr ""
|
||||
|
||||
#: arrow_slits.lua:81
|
||||
#: arrow_slits.lua
|
||||
msgid "@1 Embrasure"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:29
|
||||
#: init.lua
|
||||
msgid "Stonewall"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:32
|
||||
#: init.lua
|
||||
msgid "Cobble"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:35
|
||||
#: init.lua
|
||||
msgid "Stonebrick"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:38
|
||||
#: init.lua
|
||||
msgid "Sandstone Brick"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:41
|
||||
#: init.lua
|
||||
msgid "Desert Stone Brick"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:44
|
||||
#: init.lua
|
||||
msgid "Desert Sandstone Brick"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Silver Sandstone Brick"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Stone"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:47
|
||||
#: init.lua
|
||||
msgid "Sandstone"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:50
|
||||
#: init.lua
|
||||
msgid "Desert Stone"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:53
|
||||
#: init.lua
|
||||
msgid "Desert Sandstone"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Silver Sandstone"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Wood"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:56
|
||||
#: init.lua
|
||||
msgid "Ice"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:59
|
||||
#: init.lua
|
||||
msgid "Snow"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:62
|
||||
#: init.lua
|
||||
msgid "Obsidian Brick"
|
||||
msgstr ""
|
||||
|
||||
#: murder_holes.lua:14
|
||||
#: murder_holes.lua
|
||||
msgid "@1 Murder Hole"
|
||||
msgstr ""
|
||||
|
||||
#: murder_holes.lua:33
|
||||
#: murder_holes.lua
|
||||
msgid "@1 Machicolation"
|
||||
msgstr ""
|
||||
|
||||
#: paving.lua:11
|
||||
#: paving.lua
|
||||
msgid "Paving Stone"
|
||||
msgstr ""
|
||||
|
||||
#: paving.lua:30
|
||||
#: paving.lua
|
||||
msgid "Pavement Brick"
|
||||
msgstr ""
|
||||
|
||||
#: paving.lua:40
|
||||
#: paving.lua
|
||||
msgid "Castle Pavement Stair"
|
||||
msgstr ""
|
||||
|
||||
#: paving.lua:41
|
||||
#: paving.lua
|
||||
msgid "Castle Pavement Slab"
|
||||
msgstr ""
|
||||
|
||||
#: paving.lua:49
|
||||
#: paving.lua
|
||||
msgid "Roof Slates"
|
||||
msgstr ""
|
||||
|
||||
#: pillars.lua:18
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Base"
|
||||
msgstr ""
|
||||
|
||||
#: pillars.lua:36
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Base"
|
||||
msgstr ""
|
||||
|
||||
#: pillars.lua:54
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Top"
|
||||
msgstr ""
|
||||
|
||||
#: pillars.lua:72
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Top"
|
||||
msgstr ""
|
||||
|
||||
#: pillars.lua:90
|
||||
#: pillars.lua
|
||||
msgid "@1 Pillar Middle"
|
||||
msgstr ""
|
||||
|
||||
#: pillars.lua:106
|
||||
#: pillars.lua
|
||||
msgid "@1 Half Pillar Middle"
|
||||
msgstr ""
|
||||
|
||||
#: pillars.lua:123
|
||||
#: pillars.lua
|
||||
msgid "@1 Crossbrace"
|
||||
msgstr ""
|
||||
|
||||
#: pillars.lua:147
|
||||
#: pillars.lua
|
||||
msgid "@1 Extended Crossbrace"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:11
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Wall"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:22
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:57
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Corner"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:78
|
||||
#: stone_wall.lua
|
||||
msgid "Stone Wall"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:86
|
||||
#: stone_wall.lua
|
||||
msgid "Rubble"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:100
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Stonewall Stair"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:101
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Stonewall Slab"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:108
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble Stair"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:109
|
||||
#: stone_wall.lua
|
||||
msgid "Castle Rubble Slab"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:117 stone_wall.lua:143
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:156
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone Stair"
|
||||
msgstr ""
|
||||
|
||||
#: stone_wall.lua:157
|
||||
#: stone_wall.lua
|
||||
msgid "Dungeon Stone Slab"
|
||||
msgstr ""
|
||||
|
49
mods/modpacks/castle/castle_masonry/locale/template.txt
Normal file
@ -0,0 +1,49 @@
|
||||
# textdomain:castle_masonry
|
||||
|
||||
@1 Arrowslit=
|
||||
@1 Arrowslit with Cross=
|
||||
@1 Arrowslit with Hole=
|
||||
@1 Embrasure=
|
||||
Stonewall=
|
||||
Cobble=
|
||||
Stonebrick=
|
||||
Sandstone Brick=
|
||||
Desert Stone Brick=
|
||||
Desert Sandstone Brick=
|
||||
Silver Sandstone Brick=
|
||||
Stone=
|
||||
Sandstone=
|
||||
Desert Stone=
|
||||
Desert Sandstone=
|
||||
Silver Sandstone=
|
||||
Wood=
|
||||
Ice=
|
||||
Snow=
|
||||
Obsidian Brick=
|
||||
@1 Murder Hole=
|
||||
@1 Machicolation=
|
||||
Paving Stone=
|
||||
Pavement Brick=
|
||||
Castle Pavement Stair=
|
||||
Castle Pavement Slab=
|
||||
Roof Slates=
|
||||
@1 Pillar Base=
|
||||
@1 Half Pillar Base=
|
||||
@1 Pillar Top=
|
||||
@1 Half Pillar Top=
|
||||
@1 Pillar Middle=
|
||||
@1 Half Pillar Middle=
|
||||
@1 Crossbrace=
|
||||
@1 Extended Crossbrace=
|
||||
Castle Wall=
|
||||
Castle Rubble=
|
||||
Castle Corner=
|
||||
Stone Wall=
|
||||
Rubble=
|
||||
Castle Stonewall Stair=
|
||||
Castle Stonewall Slab=
|
||||
Castle Rubble Stair=
|
||||
Castle Rubble Slab=
|
||||
Dungeon Stone=
|
||||
Dungeon Stone Stair=
|
||||
Dungeon Stone Slab=
|
@ -1 +1,7 @@
|
||||
name = castle_masonry
|
||||
depends = default
|
||||
optional_depends = moreblocks, stairs, building_blocks, asphalt, streets, intllib
|
||||
description = """
|
||||
This is a mod all about creating castles and castle dungeons.
|
||||
Many of the nodes are used for the outer-walls or dungeons.
|
||||
"""
|
@ -1,6 +1,17 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
-- Used for localization, choose either built-in or intllib.
|
||||
|
||||
local MP, S, NS = nil
|
||||
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_masonry")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -3,9 +3,20 @@ minetest.register_alias("castle:pavement_brick", "castle_masonry:pavement_brick"
|
||||
minetest.register_alias("castle:roofslate", "castle_masonry:roofslate")
|
||||
|
||||
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
-- Used for localization, choose either built-in or intllib.
|
||||
|
||||
local MP, S, NS = nil
|
||||
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_masonry")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
|
||||
minetest.register_node("castle_masonry:pavement_brick", {
|
||||
description = S("Paving Stone"),
|
||||
@ -26,13 +37,14 @@ minetest.register_craft({
|
||||
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("castle", "pavement_brick", "castle_masonry:pavement_brick", {
|
||||
stairsplus:register_all("castle_masonry", "pavement_brick", "castle_masonry:pavement_brick", {
|
||||
description = S("Pavement Brick"),
|
||||
tiles = {"castle_pavement_brick.png"},
|
||||
groups = {cracky=2, not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
stairsplus:register_alias_all("castle", "pavement_brick", "castle_masonry", "pavement_brick")
|
||||
elseif minetest.get_modpath("stairs") then
|
||||
stairs.register_stair_and_slab("pavement_brick", "castle_masonry:pavement_brick",
|
||||
{cracky=2},
|
||||
@ -106,4 +118,4 @@ if not (mod_building_blocks or mod_streets) then
|
||||
recipe = "default:gravel",
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -1,6 +1,18 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
-- Used for localization, choose either built-in or intllib.
|
||||
|
||||
local MP, S, NS = nil
|
||||
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_masonry")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
|
||||
castle_masonry.register_pillar = function(material)
|
||||
local composition_def, burn_time, tile, desc = castle_masonry.get_material_properties(material)
|
||||
@ -173,11 +185,11 @@ castle_masonry.register_pillar = function(material)
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_middle 4",
|
||||
output = mod_name..":pillar_"..material.name.."_middle 2",
|
||||
recipe = {
|
||||
{material.craft_material,material.craft_material},
|
||||
{material.craft_material,material.craft_material},
|
||||
{material.craft_material,material.craft_material} },
|
||||
{material.craft_material},
|
||||
{material.craft_material},
|
||||
{material.craft_material} },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 281 KiB |
@ -5,9 +5,13 @@ castle_masonry_cobble (Cobble) bool true
|
||||
castle_masonry_stonebrick (Stone Brick) bool true
|
||||
castle_masonry_sandstonebrick (Sandstone Brick) bool true
|
||||
castle_masonry_desertstonebrick (Desert Stone Brick) bool true
|
||||
castle_masonry_desertsandstonebrick (Desert Sandstone Brick) bool true
|
||||
castle_masonry_silversandstonebrick (Silver Sandstone Brick) bool true
|
||||
castle_masonry_stone (Stone) bool true
|
||||
castle_masonry_sandstone (Sandstone) bool true
|
||||
castle_masonry_desertstone (Desert Stone) bool true
|
||||
castle_masonry_desertsandstone (Desert Sandstone) bool true
|
||||
castle_masonry_silversandstone (Silver Sandstone) bool true
|
||||
castle_masonry_wood (Wood) bool false
|
||||
castle_masonry_ice (Ice) bool false
|
||||
castle_masonry_snow (Snow) bool false
|
||||
@ -17,4 +21,4 @@ castle_masonry_obsidianbrick (Obsidian Brick) bool false
|
||||
|
||||
castle_masonry_pillar (Pillars) bool true
|
||||
castle_masonry_arrowslit (Arrow slits) bool true
|
||||
castle_masonry_murderhole (Murder holes and machicolations) bool true
|
||||
castle_masonry_murderhole (Murder holes and machicolations) bool true
|
||||
|
@ -1,6 +1,18 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
-- Used for localization, choose either built-in or intllib.
|
||||
|
||||
local MP, S, NS = nil
|
||||
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_masonry")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
|
||||
minetest.register_alias("castle:stonewall", "castle_masonry:stonewall")
|
||||
minetest.register_alias("castle:dungeon_stone", "castle_masonry:dungeon_stone")
|
||||
@ -90,8 +102,8 @@ if minetest.get_modpath("moreblocks") then
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
stairsplus:register_stair_alias("castle", "stonewall", "castle_masonry", "stonewall")
|
||||
stairsplus:register_stair_alias("castle", "rubble", "castle_masonry", "rubble")
|
||||
stairsplus:register_alias_all("castle", "stonewall", "castle_masonry", "stonewall")
|
||||
stairsplus:register_alias_all("castle", "rubble", "castle_masonry", "rubble")
|
||||
|
||||
elseif minetest.get_modpath("stairs") then
|
||||
stairs.register_stair_and_slab("stonewall", "castle_masonry:stonewall",
|
||||
@ -139,7 +151,7 @@ minetest.register_craft({
|
||||
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("castle", "dungeon_stone", "castle_masonry:dungeon_stone", {
|
||||
stairsplus:register_all("castle_masonry", "dungeon_stone", "castle_masonry:dungeon_stone", {
|
||||
description = S("Dungeon Stone"),
|
||||
tiles = {"castle_dungeon_stone.png"},
|
||||
groups = {cracky=2, not_in_creative_inventory=1},
|
||||
@ -147,7 +159,7 @@ if minetest.get_modpath("moreblocks") then
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
stairsplus:register_stair_alias("castle", "dungeon_stone", "castle_masonry", "dungeon_stone")
|
||||
stairsplus:register_alias_all("castle", "dungeon_stone", "castle_masonry", "dungeon_stone")
|
||||
|
||||
elseif minetest.get_modpath("stairs") then
|
||||
stairs.register_stair_and_slab("dungeon_stone", "castle_masonry:dungeon_stone",
|
||||
|
Before Width: | Height: | Size: 682 B After Width: | Height: | Size: 672 B |
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 660 B After Width: | Height: | Size: 659 B |
23
mods/modpacks/castle/castle_shields/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
## Castle Shields
|
||||
|
||||
by: Philipbenr, DanDuncombe and FaceDeer
|
||||
|
||||
Licence: MIT
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
This mod adds decorative wall-mounted shields. It comes with three default shields, but it's very easy to mix and match the colours and patterns to generate additional shields for your server; see default_shields.lua for a good place to insert your own, or make use of the castle_shields.register_shield method in your own mods.
|
||||
|
||||
The three default shields were defined thusly:
|
||||
|
||||
* castle_shields.register_shield("shield_1", "Mounted Shield", "red", "blue", "slash")
|
||||
* castle_shields.register_shield("shield_2", "Mounted Shield", "cyan", "yellow", "chevron")
|
||||
* castle_shields.register_shield("shield_3", "Mounted Shield", "grey", "green", "cross")
|
||||
|
||||
The following colors are permitted:
|
||||
|
||||
"black", "blue", "brown", "cyan", "dark_green", "dark_grey", "green", "grey", "magenta", "orange", "pink", "red", "violet", "white", "yellow"
|
||||
|
||||
The following patterns are permitted:
|
||||
|
||||
"slash", "chevron", "cross"
|
@ -1,25 +0,0 @@
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Castles Mod
|
||||
by: Philipbenr And DanDuncombe
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Licence: MIT
|
||||
|
||||
see: LICENSE
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
This mod adds decorative wall-mounted shields. It comes with three default shields, but it's very easy to mix and match the colours and patterns to generate additional shields for your server; see default_shields.lua for a good place to insert your own, or make use of the castle_shields.register_shield method in your own mods.
|
||||
|
||||
The three default shields were defined thusly:
|
||||
|
||||
castle_shields.register_shield("shield_1", "Mounted Shield", "red", "blue", "slash")
|
||||
castle_shields.register_shield("shield_2", "Mounted Shield", "cyan", "yellow", "chevron")
|
||||
castle_shields.register_shield("shield_3", "Mounted Shield", "grey", "green", "cross")
|
||||
|
||||
The following colors are permitted:
|
||||
"black", "blue", "brown", "cyan", "dark_green", "dark_grey", "green", "grey", "magenta", "orange", "pink", "red", "violet", "white", "yellow"
|
||||
The following patterns are permitted:
|
||||
"slash", "chevron", "cross"
|
@ -2,9 +2,21 @@ minetest.register_alias("castle:shield", "castle_shields:shield_1")
|
||||
minetest.register_alias("castle:shield_2", "castle_shields:shield_2")
|
||||
minetest.register_alias("castle:shield_3", "castle_shields:shield_3")
|
||||
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
-- Used for localization, choose either built-in or intllib.
|
||||
|
||||
local MP, S, NS = nil
|
||||
|
||||
if (minetest.get_modpath("intllib") == nil) then
|
||||
S = minetest.get_translator("castle_shields")
|
||||
|
||||
else
|
||||
-- internationalization boilerplate
|
||||
MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
end
|
||||
|
||||
|
||||
--The following colors are permitted:
|
||||
-- "black", "blue", "brown", "cyan", "dark_green", "dark_grey", "green", "grey", "magenta", "orange", "pink", "red", "violet", "white", "yellow"
|
||||
@ -15,4 +27,4 @@ local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
castle_shields.register_shield("shield_1", S("Mounted Shield"), "red", "blue", "slash")
|
||||
castle_shields.register_shield("shield_2", S("Mounted Shield"), "cyan", "yellow", "chevron")
|
||||
castle_shields.register_shield("shield_3", S("Mounted Shield"), "grey", "green", "cross")
|
||||
castle_shields.register_shield("shield_3", S("Mounted Shield"), "grey", "green", "cross")
|
||||
|
@ -0,0 +1,3 @@
|
||||
# textdomain:castle_shields
|
||||
|
||||
Mounted Shield=Scudo appeso
|
23
mods/modpacks/castle/castle_shields/locale/it.po
Normal file
@ -0,0 +1,23 @@
|
||||
# ITALIAN LOCALE FILE FOR THE CASTLE SHIELDS MODULE
|
||||
# Copyright (C) 2017 Philipbenr And DanDuncombe
|
||||
# This file is distributed under the same license as the CASTLE SHIELDS package.
|
||||
# Hamlet <h4mlet@riseup.net>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Castle Shields\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-02-25 14:47-0700\n"
|
||||
"PO-Revision-Date: 2017-09-10 22:38+0100\n"
|
||||
"Last-Translator: H4mlet <h4mlet@riseup.net>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: it\n"
|
||||
"X-Generator: Poedit 1.6.10\n"
|
||||
|
||||
#: init.lua:6 init.lua:41 init.lua:75
|
||||
msgid "Mounted Shield"
|
||||
msgstr "Scudo appeso"
|
3
mods/modpacks/castle/castle_shields/locale/template.txt
Normal file
@ -0,0 +1,3 @@
|
||||
# textdomain:castle_shields
|
||||
|
||||
Mounted Shield=
|
@ -1 +1,4 @@
|
||||
name = castle_shields
|
||||
description = Adds decorative wall shields
|
||||
depends = default, dye
|
||||
optional_depends = intllib
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -1,4 +1,4 @@
|
||||
castle_shields.register_shield = function(name, desc, background_color, foreground_color, mask)
|
||||
castle_shields.register_shield = function(name, desc, background_color, foreground_color, mask, disable_recipe)
|
||||
|
||||
local tile_side = "castle_shield_"..background_color..".png"
|
||||
local tile_front = "castle_shield_"..background_color..".png^(castle_shield_"..foreground_color..".png^[mask:castle_shield_mask_"..mask..".png)"
|
||||
@ -28,6 +28,11 @@ castle_shields.register_shield = function(name, desc, background_color, foregrou
|
||||
},
|
||||
})
|
||||
|
||||
if disable_recipe then
|
||||
-- recipe disabled by caller
|
||||
return
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = minetest.get_current_modname()..":"..name,
|
||||
recipe = {
|
||||
@ -36,4 +41,4 @@ castle_shields.register_shield = function(name, desc, background_color, foregrou
|
||||
{"dye:"..background_color, "default:steel_ingot", "dye:"..foreground_color},
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
|
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 306 B |