translation support, and also hunger_ng support for edibles
This commit is contained in:
parent
95430b8484
commit
ecd2563177
469
i18n.py
Normal file
469
i18n.py
Normal file
@ -0,0 +1,469 @@
|
||||
#!/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+
|
||||
#
|
||||
# See https://github.com/minetest-tools/update_translations for
|
||||
# potential future updates to this script.
|
||||
|
||||
from __future__ import print_function
|
||||
import os, fnmatch, re, shutil, errno
|
||||
from sys import argv as _argv
|
||||
from sys import stderr as _stderr
|
||||
|
||||
# Running params
|
||||
params = {"recursive": False,
|
||||
"help": False,
|
||||
"mods": False,
|
||||
"verbose": False,
|
||||
"folders": [],
|
||||
"no-old-file": False,
|
||||
"break-long-lines": False,
|
||||
"sort": False,
|
||||
"print-source": False
|
||||
}
|
||||
# Available CLI options
|
||||
options = {"recursive": ['--recursive', '-r'],
|
||||
"help": ['--help', '-h'],
|
||||
"mods": ['--installed-mods', '-m'],
|
||||
"verbose": ['--verbose', '-v'],
|
||||
"no-old-file": ['--no-old-file', '-O'],
|
||||
"break-long-lines": ['--break-long-lines', '-b'],
|
||||
"sort": ['--sort', '-s'],
|
||||
"print-source": ['--print-source', '-p']
|
||||
}
|
||||
|
||||
# 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 = 80
|
||||
|
||||
def set_params_folders(tab: list):
|
||||
'''Initialize params["folders"] from CLI arguments.'''
|
||||
# Discarding argument 0 (tool name)
|
||||
for param in tab[1:]:
|
||||
stop_param = False
|
||||
for option in options:
|
||||
if param in options[option]:
|
||||
stop_param = True
|
||||
break
|
||||
if not stop_param:
|
||||
params["folders"].append(os.path.abspath(param))
|
||||
|
||||
def set_params(tab: list):
|
||||
'''Initialize params from CLI arguments.'''
|
||||
for option in options:
|
||||
for option_name in options[option]:
|
||||
if option_name in tab:
|
||||
params[option] = True
|
||||
break
|
||||
|
||||
def print_help(name):
|
||||
'''Prints some help message.'''
|
||||
print(f'''SYNOPSIS
|
||||
{name} [OPTIONS] [PATHS...]
|
||||
DESCRIPTION
|
||||
{', '.join(options["help"])}
|
||||
prints this help message
|
||||
{', '.join(options["recursive"])}
|
||||
run on all subfolders of paths given
|
||||
{', '.join(options["mods"])}
|
||||
run on locally installed modules
|
||||
{', '.join(options["no-old-file"])}
|
||||
do not create *.old files
|
||||
{', '.join(options["sort"])}
|
||||
sort output strings alphabetically
|
||||
{', '.join(options["break-long-lines"])}
|
||||
add extra line breaks before and after long strings
|
||||
{', '.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.expanduser('~/.minetest/mods/')}")
|
||||
run_all_subfolders(os.path.expanduser("~/.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_s = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
|
||||
pattern_lua_fs = re.compile(r'[\.=^\t,{\(\s]N?FS\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
|
||||
pattern_lua_bracketed_s = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*\[\[(.*?)\]\][\s,\)]', re.DOTALL)
|
||||
pattern_lua_bracketed_fs = re.compile(r'[\.=^\t,{\(\s]N?FS\(\s*\[\[(.*?)\]\][\s,\)]', re.DOTALL)
|
||||
|
||||
# Handles "concatenation" .. " of strings"
|
||||
pattern_concat = re.compile(r'["\'][\s]*\.\.[\s]*["\']', re.DOTALL)
|
||||
|
||||
pattern_tr = re.compile(r'(.*?[^@])=(.*)')
|
||||
pattern_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 or folder name. 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:
|
||||
if not os.path.isfile(os.path.join(folder, "modpack.txt")):
|
||||
folder_name = os.path.basename(folder)
|
||||
# Special case when run in Minetest's builtin directory
|
||||
if folder_name == "builtin":
|
||||
return "__builtin"
|
||||
else:
|
||||
return folder_name
|
||||
else:
|
||||
return None
|
||||
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 = f'{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, header_comments):
|
||||
lOut = [f"# textdomain: {mod_name}"]
|
||||
if header_comments is not None:
|
||||
lOut.append(header_comments)
|
||||
|
||||
dGroupedBySource = {}
|
||||
|
||||
for key in dkeyStrings:
|
||||
sourceList = list(dkeyStrings[key])
|
||||
if params["sort"]:
|
||||
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]
|
||||
if params["sort"]:
|
||||
localizedStrings.sort()
|
||||
if params["print-source"]:
|
||||
if lOut[-1] != "":
|
||||
lOut.append("")
|
||||
lOut.append(source)
|
||||
for localizedString in localizedStrings:
|
||||
val = dOld.get(localizedString, {})
|
||||
translation = val.get("translation", "")
|
||||
comment = val.get("comment")
|
||||
if params["break-long-lines"] and len(localizedString) > doublespace_threshold and not lOut[-1] == "":
|
||||
lOut.append("")
|
||||
if comment != None and comment != "" and not comment.startswith("# textdomain:"):
|
||||
lOut.append(comment)
|
||||
lOut.append(f"{localizedString}={translation}")
|
||||
if params["break-long-lines"] and 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 params["break-long-lines"] and len(key) > doublespace_threshold and not lOut[-1] == "":
|
||||
lOut.append("")
|
||||
if comment != None:
|
||||
lOut.append(comment)
|
||||
lOut.append(f"{key}={translation}")
|
||||
if params["break-long-lines"] and 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, existing_template[2])
|
||||
mkdir_p(os.path.dirname(templ_file))
|
||||
with open(templ_file, "wt", encoding='utf-8') as template_file:
|
||||
template_file.write(text)
|
||||
|
||||
|
||||
# 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_s.findall(text):
|
||||
strings.append(s[1])
|
||||
for s in pattern_lua_bracketed_s.findall(text):
|
||||
strings.append(s)
|
||||
for s in pattern_lua_fs.findall(text):
|
||||
strings.append(s[1])
|
||||
for s in pattern_lua_bracketed_fs.findall(text):
|
||||
strings.append(s)
|
||||
|
||||
for s in strings:
|
||||
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.
|
||||
# Returns also header comments in the third return value.
|
||||
def import_tr_file(tr_file):
|
||||
dOut = {}
|
||||
text = None
|
||||
header_comment = None
|
||||
if os.path.exists(tr_file):
|
||||
with open(tr_file, "r", encoding='utf-8') as existing_file :
|
||||
# save the full text to allow for comparison
|
||||
# of the old version with the new output
|
||||
text = existing_file.read()
|
||||
existing_file.seek(0)
|
||||
# a running record of the current comment block
|
||||
# we're inside, to allow preceeding multi-line comments
|
||||
# to be retained for a translation line
|
||||
latest_comment_block = None
|
||||
for line in existing_file.readlines():
|
||||
line = line.rstrip('\n')
|
||||
if line.startswith("###"):
|
||||
if header_comment is None and not latest_comment_block is None:
|
||||
# Save header comments
|
||||
header_comment = latest_comment_block
|
||||
# Strip textdomain line
|
||||
tmp_h_c = ""
|
||||
for l in header_comment.split('\n'):
|
||||
if not l.startswith("# textdomain:"):
|
||||
tmp_h_c += l + '\n'
|
||||
header_comment = tmp_h_c
|
||||
|
||||
# Reset comment block if we hit a header
|
||||
latest_comment_block = None
|
||||
continue
|
||||
elif line.startswith("#"):
|
||||
# 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, header_comment)
|
||||
|
||||
# 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, tr_import[2])
|
||||
|
||||
if textOld and textOld != textNew:
|
||||
print(f"{tr_file} has changed.")
|
||||
if not params["no-old-file"]:
|
||||
shutil.copyfile(tr_file, f"{tr_file}.old")
|
||||
|
||||
with open(tr_file, "w", encoding='utf-8') as new_tr_file:
|
||||
new_tr_file.write(textNew)
|
||||
|
||||
# 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(f"\033[31mUnable to find modname in folder {folder}.\033[0m", file=_stderr)
|
||||
exit(1)
|
||||
|
||||
# Determines if the folder being pointed to is a mod or a mod pack
|
||||
# and then runs update_mod accordingly
|
||||
def update_folder(folder):
|
||||
is_modpack = os.path.exists(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() and not f.name.startswith('.')]
|
||||
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() and not f.name.startswith('.')]:
|
||||
update_folder(modfolder)
|
||||
|
||||
|
||||
main()
|
282
locale/template.txt
Normal file
282
locale/template.txt
Normal file
@ -0,0 +1,282 @@
|
||||
# textdomain: nssm
|
||||
No stats for @1=
|
||||
Kill stats for @1:=
|
||||
See your kill stats, or that of other players=
|
||||
Ant Queen=
|
||||
Ant Worker=
|
||||
Ice Teeth=
|
||||
Black Duck=
|
||||
Sky=
|
||||
@1 Helmet=
|
||||
@1 Chestplate=
|
||||
@1 Leggings=
|
||||
@1 Boots=
|
||||
Pumpking Head=
|
||||
Masticone Head=
|
||||
Duck King Crown=
|
||||
Masticone Crowned Head=
|
||||
Snake Scute Chestplate=
|
||||
@1 Shield=
|
||||
Bloco=
|
||||
Crocodile=
|
||||
Duck=
|
||||
Masticone=
|
||||
Morlu=
|
||||
Sand Bloco=
|
||||
White Werewolf=
|
||||
Sandworm=
|
||||
Werewolf=
|
||||
Rope=
|
||||
Sun Sword=
|
||||
Ant Sword=
|
||||
Mantis Sword=
|
||||
Masticone Fang Sword=
|
||||
Night Sword=
|
||||
Mantis Battleaxe=
|
||||
Mantis Axe=
|
||||
Duck Beak Pickaxe=
|
||||
Ant Pickaxe=
|
||||
Mantis Pickaxe=
|
||||
Stoneater Pickaxe=
|
||||
Little Ice Tooth Knife=
|
||||
Manticore Spine Knife=
|
||||
Felucco Knife=
|
||||
Ant Shovel=
|
||||
Duck Beak Shovel=
|
||||
Ant Billhook=
|
||||
Tarantula Warhammer=
|
||||
Light Crab Mace=
|
||||
Heavy Crab Mace=
|
||||
@1 Sickle=
|
||||
Felucco=
|
||||
Ant=
|
||||
@1 Bomb=
|
||||
Duck Evocation=
|
||||
Bloco Evocation=
|
||||
Enderduck Evocation=
|
||||
Flying Duck Evocation=
|
||||
Swimming Duck Evocation=
|
||||
Duckking Evocation=
|
||||
Spiderduck Evocation=
|
||||
Cobweb Bomb=
|
||||
Ice Bomb=
|
||||
Mantis Clay Bomb=
|
||||
Lava Bomb=
|
||||
Water Bomb=
|
||||
Fire Bomb=
|
||||
Mornar Bomb=
|
||||
Hole Bomb=
|
||||
Food Bomb=
|
||||
Phoenix Fire Bomb=
|
||||
Explosive Bomb=
|
||||
Teleport Bomb=
|
||||
Boom Bomb=
|
||||
Smoke Bomb=
|
||||
Thick Web Bomb=
|
||||
Poison Bomb=
|
||||
Cobblestone Bomb=
|
||||
Fire Ring Bomb=
|
||||
Cage Bomb=
|
||||
Water Column Bomb=
|
||||
Crab=
|
||||
Sky Feather=
|
||||
Snake Scute=
|
||||
Eyed Tentacle=
|
||||
Ant Queen's Abdomen=
|
||||
Masticone Skull Fragments=
|
||||
Kraken Tentacle=
|
||||
Lava Titan Eye=
|
||||
Digested Sand=
|
||||
Black Ice Tooth=
|
||||
Tarantula Fangs=
|
||||
Crab Claw=
|
||||
Cursed Pumpkin Seed=
|
||||
Mantis Claw=
|
||||
Manticore Fur=
|
||||
Ant Husk=
|
||||
Bloco Hide=
|
||||
Crab Shell Fragment=
|
||||
Crocodile Hide=
|
||||
Manticore Spine=
|
||||
Night Feather=
|
||||
Sun Feather=
|
||||
Duck Feather=
|
||||
Black Duck Feather=
|
||||
Masticone Fang=
|
||||
White Wolf Fur=
|
||||
Stoneater Mandible=
|
||||
Ant Mandible=
|
||||
Wolf Fur=
|
||||
Felucco Fur=
|
||||
Mantis Husk=
|
||||
Sand Bloco Hide=
|
||||
Sandworm Hide=
|
||||
Sky Iron=
|
||||
Black Powder=
|
||||
Soarkly Dark Stone Dust=
|
||||
Empty Summoning Bomb=
|
||||
Greedy Soul Fragment=
|
||||
Lustful Soul Fragment=
|
||||
Wrathful Soul Fragment=
|
||||
Proud Soul Fragment=
|
||||
Slothful Soul Fragment=
|
||||
Envious Soul Fragment=
|
||||
Gluttonous Soul Fragment=
|
||||
Gluttonous Moranga=
|
||||
Envious Moranga=
|
||||
Proud Moranga=
|
||||
Slothful Moranga=
|
||||
Lustful Moranga=
|
||||
Wrathful Moranga=
|
||||
Greedy Moranga=
|
||||
Werewolf Leg=
|
||||
Felucco Steak=
|
||||
Roasted Felucco Steak=
|
||||
Moonheron Leg=
|
||||
Chichibio's Moonheron Leg=
|
||||
Crocodile Tail=
|
||||
Roasted Crocodile Tail=
|
||||
Roasted_Werewolf Leg=
|
||||
Duck Legs=
|
||||
Roasted Duck Leg=
|
||||
Ant Leg=
|
||||
Roasted Ant Leg=
|
||||
Spider Leg=
|
||||
Roasted Spider Leg=
|
||||
Brain=
|
||||
Roasted Brain=
|
||||
Tentacle=
|
||||
Roasted Tentacle=
|
||||
Worm Meat=
|
||||
Roasted Worm=
|
||||
Amphibian Heart=
|
||||
Roasted Amphibian Heart=
|
||||
Raw Scrausics Wing=
|
||||
Spicy Scrausics Wing=
|
||||
Phoenix Nuggets=
|
||||
Phoenix Tear=
|
||||
Frosted Amphibian Heart=
|
||||
Surimi=
|
||||
Amphibian Ribs=
|
||||
Roasted Amphibian Ribs=
|
||||
Dolidrosaurus Fin=
|
||||
Roasted Dolidrosaurus Fin=
|
||||
Larva Meat=
|
||||
Larva Juice=
|
||||
Larva Soup=
|
||||
Mantis Meat=
|
||||
Roasted Mantis=
|
||||
Spider Meat=
|
||||
Roasted Spider=
|
||||
Silk Gland=
|
||||
Roasted Silk Gland=
|
||||
Super Silk Gland=
|
||||
Roasted Super Silk Gland=
|
||||
Cobweb String=
|
||||
Dense Cobweb String=
|
||||
Duck Beak=
|
||||
Ice Tooth=
|
||||
Little Ice Tooth=
|
||||
Felucco Horn=
|
||||
Dolidrosaurus=
|
||||
Duck King=
|
||||
Enderduck=
|
||||
You have @1s of boost=
|
||||
Life Energy=
|
||||
Energy Globe=
|
||||
Great Energy Globe=
|
||||
Awesome Energy Globe=
|
||||
Light Energy=
|
||||
Giant Sandworm=
|
||||
Ice Snake=
|
||||
Mantis Larva=
|
||||
Lava Titan=
|
||||
Ant Dirt=
|
||||
Dead leaves=
|
||||
Invisible light source=
|
||||
Venomous Gas=
|
||||
Modders Block=
|
||||
Web=
|
||||
Thick Web=
|
||||
Ink=
|
||||
Mese Meteor=
|
||||
Mese Dragon's Touch=
|
||||
Phoenix Fire=
|
||||
@1 Egg=
|
||||
Stoneater=
|
||||
Signosigno=
|
||||
Duckking=
|
||||
Spiderduck=
|
||||
Icesnake=
|
||||
Larva=
|
||||
Moonheron=
|
||||
Xgaloctopus=
|
||||
Pumpking=
|
||||
Large Pumpboom=
|
||||
Small Pumpboom=
|
||||
Medium Pumpboom=
|
||||
Morvalar=
|
||||
Mese Egg=
|
||||
Morwa Statue=
|
||||
Ant Soldier=
|
||||
Black Widow=
|
||||
Daddy Long Legs=
|
||||
Echidna=
|
||||
Flying Duck=
|
||||
Icelamander=
|
||||
Kraken=
|
||||
Mantis Beast=
|
||||
Mordain=
|
||||
Morgut=
|
||||
Morvy=
|
||||
Night Master=
|
||||
Tarantula=
|
||||
Mese Dragon=
|
||||
Moon Heron=
|
||||
You do not have enough @1=
|
||||
Axe of Pride=
|
||||
energy sphere=
|
||||
Gratuitousness Battleaxe=
|
||||
energy globe=
|
||||
Sword of Eagerness=
|
||||
Falchion of Eagerness=
|
||||
life energy=
|
||||
You cannot go to that protected space!=
|
||||
Sword of Envy=
|
||||
Sword of Gluttony=
|
||||
Death Scythe=
|
||||
Morde=
|
||||
Morgre=
|
||||
Summon me ... when you are ready to fight ...=
|
||||
Mor Valar=
|
||||
Morbat I=
|
||||
Morbat II=
|
||||
Morbat III=
|
||||
Morwa=
|
||||
Mini Octopus=
|
||||
Octopus=
|
||||
Phoenix=
|
||||
Pumpboom (@1)=
|
||||
small=
|
||||
medium=
|
||||
large=
|
||||
PumpKing=
|
||||
Rainbow Staff=
|
||||
Rainbow Tool=
|
||||
Scrausics=
|
||||
Signo-Signo=
|
||||
Snow Biter=
|
||||
Set spear stats modifier - default 1 (somewhat fast)=
|
||||
Spear stat modifier set to @1=
|
||||
@1 Spear=
|
||||
Serenity=
|
||||
Manticore=
|
||||
Mantis=
|
||||
Spider-duck=
|
||||
Stone Eater=
|
||||
Swimming Duck=
|
||||
Uloboros=
|
||||
Gret Wave Energy Release=
|
||||
Destructo Disc=
|
||||
Winding Energy Bullet=
|
||||
Demon Air Beseiging Bullet (press Q to activate)=
|
@ -1,3 +1,5 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
function nssm:register_noneatcraftitems (name, descr)
|
||||
minetest.register_craftitem("nssm:"..name, {
|
||||
description = descr,
|
||||
@ -11,6 +13,7 @@ function nssm:register_eatcraftitems (name, descr, gnam)
|
||||
image = name..".png",
|
||||
on_use = minetest.item_eat(gnam),
|
||||
groups = { meat=1, eatable=1 },
|
||||
_hunger_ng = {satiates = gnam},
|
||||
})
|
||||
end
|
||||
|
||||
@ -25,109 +28,109 @@ end
|
||||
|
||||
-- Materials
|
||||
|
||||
nssm:register_noneatcraftitems ('sky_feather','Sky Feather')
|
||||
nssm:register_noneatcraftitems ('snake_scute','Snake Scute')
|
||||
nssm:register_noneatcraftitems ('eyed_tentacle','Eyed Tentacle')
|
||||
nssm:register_noneatcraftitems ('ant_queen_abdomen',"Ant Queen's Abdomen")
|
||||
nssm:register_noneatcraftitems ('masticone_skull_fragments','Masticone Skull Fragments')
|
||||
nssm:register_noneatcraftitems ('tentacle_curly','Kraken Tentacle')
|
||||
nssm:register_noneatcraftitems ('lava_titan_eye','Lava Titan Eye')
|
||||
nssm:register_noneatcraftitems ('duck_beak','Duck Beak')
|
||||
nssm:register_noneatcraftitems ('ice_tooth','Ice Tooth')
|
||||
nssm:register_noneatcraftitems ('little_ice_tooth','Little Ice Tooth')
|
||||
nssm:register_noneatcraftitems ('digested_sand',"Digested Sand")
|
||||
nssm:register_noneatcraftitems ('black_ice_tooth','Black Ice Tooth')
|
||||
nssm:register_noneatcraftitems ('tarantula_chelicerae','Tarantula Fangs')
|
||||
nssm:register_noneatcraftitems ('crab_chela','Crab Claw')
|
||||
nssm:register_noneatcraftitems ('cursed_pumpkin_seed','Cursed Pumpkin Seed')
|
||||
nssm:register_noneatcraftitems ('mantis_claw','Mantis Claw')
|
||||
nssm:register_noneatcraftitems ('manticore_fur','Manticore Fur')
|
||||
nssm:register_noneatcraftitems ('ant_hard_skin','Ant Husk')
|
||||
nssm:register_noneatcraftitems ('bloco_skin','Bloco Hide')
|
||||
nssm:register_noneatcraftitems ('crab_carapace_fragment','Crab Shell Fragment')
|
||||
nssm:register_noneatcraftitems ('crocodile_skin','Crocodile Hide')
|
||||
nssm:register_noneatcraftitems ('manticore_spine','Manticore Spine')
|
||||
nssm:register_noneatcraftitems ('night_feather','Night Feather')
|
||||
nssm:register_noneatcraftitems ('sun_feather','Sun Feather')
|
||||
nssm:register_noneatcraftitems ('duck_feather','Duck Feather')
|
||||
nssm:register_noneatcraftitems ('black_duck_feather','Black Duck Feather')
|
||||
nssm:register_noneatcraftitems ('masticone_fang','Masticone Fang')
|
||||
nssm:register_noneatcraftitems ('white_wolf_fur','White Wolf Fur')
|
||||
nssm:register_noneatcraftitems ('stoneater_mandible','Stoneater Mandible')
|
||||
nssm:register_noneatcraftitems ('ant_mandible','Ant Mandible')
|
||||
nssm:register_noneatcraftitems ('wolf_fur','Wolf Fur')
|
||||
nssm:register_noneatcraftitems ('felucco_fur','Felucco Fur')
|
||||
nssm:register_noneatcraftitems ('felucco_horn','Felucco Horn')
|
||||
nssm:register_noneatcraftitems ('mantis_skin','Mantis Husk')
|
||||
nssm:register_noneatcraftitems ('sand_bloco_skin','Sand Bloco Hide')
|
||||
nssm:register_noneatcraftitems ('sandworm_skin','Sandworm Hide')
|
||||
nssm:register_noneatcraftitems ('sky_iron','Sky Iron')
|
||||
nssm:register_noneatcraftitems ('web_string','Cobweb String')
|
||||
nssm:register_noneatcraftitems ('dense_web_string','Dense Cobweb String')
|
||||
nssm:register_noneatcraftitems ('black_powder','Black Powder')
|
||||
nssm:register_noneatcraftitems ('morelentir_dust','Soarkly Dark Stone Dust')
|
||||
nssm:register_noneatcraftitems ('empty_evocation_bomb','Empty Summoning Bomb')
|
||||
nssm:register_noneatcraftitems ('sky_feather',S('Sky Feather'))
|
||||
nssm:register_noneatcraftitems ('snake_scute',S('Snake Scute'))
|
||||
nssm:register_noneatcraftitems ('eyed_tentacle',S('Eyed Tentacle'))
|
||||
nssm:register_noneatcraftitems ('ant_queen_abdomen',S("Ant Queen's Abdomen"))
|
||||
nssm:register_noneatcraftitems ('masticone_skull_fragments',S('Masticone Skull Fragments'))
|
||||
nssm:register_noneatcraftitems ('tentacle_curly',S('Kraken Tentacle'))
|
||||
nssm:register_noneatcraftitems ('lava_titan_eye',S('Lava Titan Eye'))
|
||||
nssm:register_noneatcraftitems ('duck_beak',S('Duck Beak'))
|
||||
nssm:register_noneatcraftitems ('ice_tooth',S('Ice Tooth'))
|
||||
nssm:register_noneatcraftitems ('little_ice_tooth',S('Little Ice Tooth'))
|
||||
nssm:register_noneatcraftitems ('digested_sand',S("Digested Sand"))
|
||||
nssm:register_noneatcraftitems ('black_ice_tooth',S('Black Ice Tooth'))
|
||||
nssm:register_noneatcraftitems ('tarantula_chelicerae',S('Tarantula Fangs'))
|
||||
nssm:register_noneatcraftitems ('crab_chela',S('Crab Claw'))
|
||||
nssm:register_noneatcraftitems ('cursed_pumpkin_seed',S('Cursed Pumpkin Seed'))
|
||||
nssm:register_noneatcraftitems ('mantis_claw',S('Mantis Claw'))
|
||||
nssm:register_noneatcraftitems ('manticore_fur',S('Manticore Fur'))
|
||||
nssm:register_noneatcraftitems ('ant_hard_skin',S('Ant Husk'))
|
||||
nssm:register_noneatcraftitems ('bloco_skin',S('Bloco Hide'))
|
||||
nssm:register_noneatcraftitems ('crab_carapace_fragment',S('Crab Shell Fragment'))
|
||||
nssm:register_noneatcraftitems ('crocodile_skin',S('Crocodile Hide'))
|
||||
nssm:register_noneatcraftitems ('manticore_spine',S('Manticore Spine'))
|
||||
nssm:register_noneatcraftitems ('night_feather',S('Night Feather'))
|
||||
nssm:register_noneatcraftitems ('sun_feather',S('Sun Feather'))
|
||||
nssm:register_noneatcraftitems ('duck_feather',S('Duck Feather'))
|
||||
nssm:register_noneatcraftitems ('black_duck_feather',S('Black Duck Feather'))
|
||||
nssm:register_noneatcraftitems ('masticone_fang',S('Masticone Fang'))
|
||||
nssm:register_noneatcraftitems ('white_wolf_fur',S('White Wolf Fur'))
|
||||
nssm:register_noneatcraftitems ('stoneater_mandible',S('Stoneater Mandible'))
|
||||
nssm:register_noneatcraftitems ('ant_mandible',S('Ant Mandible'))
|
||||
nssm:register_noneatcraftitems ('wolf_fur',S('Wolf Fur'))
|
||||
nssm:register_noneatcraftitems ('felucco_fur',S('Felucco Fur'))
|
||||
nssm:register_noneatcraftitems ('felucco_horn',S('Felucco Horn'))
|
||||
nssm:register_noneatcraftitems ('mantis_skin',S('Mantis Husk'))
|
||||
nssm:register_noneatcraftitems ('sand_bloco_skin',S('Sand Bloco Hide'))
|
||||
nssm:register_noneatcraftitems ('sandworm_skin',S('Sandworm Hide'))
|
||||
nssm:register_noneatcraftitems ('sky_iron',S('Sky Iron'))
|
||||
nssm:register_noneatcraftitems ('web_string',S('Cobweb String'))
|
||||
nssm:register_noneatcraftitems ('dense_web_string',S('Dense Cobweb String'))
|
||||
nssm:register_noneatcraftitems ('black_powder',S('Black Powder'))
|
||||
nssm:register_noneatcraftitems ('morelentir_dust',S('Soarkly Dark Stone Dust'))
|
||||
nssm:register_noneatcraftitems ('empty_evocation_bomb',S('Empty Summoning Bomb'))
|
||||
|
||||
nssm:register_noneatcraftitems ('greedy_soul_fragment','Greedy Soul Fragment')
|
||||
nssm:register_noneatcraftitems ('lustful_soul_fragment','Lustful Soul Fragment')
|
||||
nssm:register_noneatcraftitems ('wrathful_soul_fragment','Wrathful Soul Fragment')
|
||||
nssm:register_noneatcraftitems ('proud_soul_fragment','Proud Soul Fragment')
|
||||
nssm:register_noneatcraftitems ('slothful_soul_fragment','Slothful Soul Fragment')
|
||||
nssm:register_noneatcraftitems ('envious_soul_fragment','Envious Soul Fragment')
|
||||
nssm:register_noneatcraftitems ('gluttonous_soul_fragment','Gluttonous Soul Fragment')
|
||||
nssm:register_noneatcraftitems ('gluttonous_moranga','Gluttonous Moranga')
|
||||
nssm:register_noneatcraftitems ('envious_moranga','Envious Moranga')
|
||||
nssm:register_noneatcraftitems ('proud_moranga','Proud Moranga')
|
||||
nssm:register_noneatcraftitems ('slothful_moranga','Slothful Moranga')
|
||||
nssm:register_noneatcraftitems ('lustful_moranga','Lustful Moranga')
|
||||
nssm:register_noneatcraftitems ('wrathful_moranga','Wrathful Moranga')
|
||||
nssm:register_noneatcraftitems ('greedy_moranga','Greedy Moranga')
|
||||
nssm:register_noneatcraftitems ('greedy_soul_fragment',S('Greedy Soul Fragment'))
|
||||
nssm:register_noneatcraftitems ('lustful_soul_fragment',S('Lustful Soul Fragment'))
|
||||
nssm:register_noneatcraftitems ('wrathful_soul_fragment',S('Wrathful Soul Fragment'))
|
||||
nssm:register_noneatcraftitems ('proud_soul_fragment',S('Proud Soul Fragment'))
|
||||
nssm:register_noneatcraftitems ('slothful_soul_fragment',S('Slothful Soul Fragment'))
|
||||
nssm:register_noneatcraftitems ('envious_soul_fragment',S('Envious Soul Fragment'))
|
||||
nssm:register_noneatcraftitems ('gluttonous_soul_fragment',S('Gluttonous Soul Fragment'))
|
||||
nssm:register_noneatcraftitems ('gluttonous_moranga',S('Gluttonous Moranga'))
|
||||
nssm:register_noneatcraftitems ('envious_moranga',S('Envious Moranga'))
|
||||
nssm:register_noneatcraftitems ('proud_moranga',S('Proud Moranga'))
|
||||
nssm:register_noneatcraftitems ('slothful_moranga',S('Slothful Moranga'))
|
||||
nssm:register_noneatcraftitems ('lustful_moranga',S('Lustful Moranga'))
|
||||
nssm:register_noneatcraftitems ('wrathful_moranga',S('Wrathful Moranga'))
|
||||
nssm:register_noneatcraftitems ('greedy_moranga',S('Greedy Moranga'))
|
||||
|
||||
-- Food
|
||||
|
||||
nssm:register_eatcraftitems ('werewolf_leg','Werewolf Leg',3)
|
||||
nssm:register_eatcraftitems ('felucco_steak','Felucco Steak',3)
|
||||
nssm:register_eatcraftitems ('roasted_felucco_steak','Roasted Felucco Steak',6)
|
||||
nssm:register_eatcraftitems ('heron_leg','Moonheron Leg',2)
|
||||
nssm:register_eatcraftitems ('chichibios_heron_leg',"Chichibio's Moonheron Leg",4)
|
||||
nssm:register_eatcraftitems ('crocodile_tail','Crocodile Tail',3)
|
||||
nssm:register_eatcraftitems ('roasted_crocodile_tail','Roasted Crocodile Tail',6)
|
||||
nssm:register_eatcraftitems ('roasted_werewolf_leg','Roasted_Werewolf Leg',6)
|
||||
nssm:register_eatcraftitems ('duck_legs','Duck Legs',1)
|
||||
nssm:register_eatcraftitems ('roasted_duck_legs','Roasted Duck Leg',3)
|
||||
nssm:register_eatcraftitems ('ant_leg','Ant Leg',-1)
|
||||
nssm:register_eatcraftitems ('roasted_ant_leg','Roasted Ant Leg',4)
|
||||
nssm:register_eatcraftitems ('spider_leg','Spider Leg',-1)
|
||||
nssm:register_eatcraftitems ('roasted_spider_leg','Roasted Spider Leg',4)
|
||||
nssm:register_eatcraftitems ('brain','Brain',3)
|
||||
nssm:register_eatcraftitems ('roasted_brain','Roasted Brain',8)
|
||||
nssm:register_eatcraftitems ('tentacle','Tentacle',2)
|
||||
nssm:register_eatcraftitems ('roasted_tentacle','Roasted Tentacle',5)
|
||||
nssm:register_eatcraftitems ('worm_flesh','Worm Meat',-2)
|
||||
nssm:register_eatcraftitems ('roasted_worm_flesh','Roasted Worm',4)
|
||||
nssm:register_eatcraftitems ('amphibian_heart','Amphibian Heart',1)
|
||||
nssm:register_eatcraftitems ('roasted_amphibian_heart','Roasted Amphibian Heart',8)
|
||||
nssm:register_eatcraftitems ('raw_scrausics_wing','Raw Scrausics Wing',1)
|
||||
nssm:register_eatcraftitems ('spicy_scrausics_wing','Spicy Scrausics Wing',6)
|
||||
nssm:register_eatcraftitems ('phoenix_nuggets','Phoenix Nuggets',20)
|
||||
nssm:register_eatcraftitems ('phoenix_tear','Phoenix Tear',20)
|
||||
nssm:register_eatcraftitems ('frosted_amphibian_heart','Frosted Amphibian Heart',-1)
|
||||
nssm:register_eatcraftitems ('surimi','Surimi',4)
|
||||
nssm:register_eatcraftitems ('amphibian_ribs','Amphibian Ribs',2)
|
||||
nssm:register_eatcraftitems ('roasted_amphibian_ribs','Roasted Amphibian Ribs',6)
|
||||
nssm:register_eatcraftitems ('dolidrosaurus_fin','Dolidrosaurus Fin',-2)
|
||||
nssm:register_eatcraftitems ('roasted_dolidrosaurus_fin','Roasted Dolidrosaurus Fin',4)
|
||||
nssm:register_eatcraftitems ('larva_meat','Larva Meat',-1)
|
||||
nssm:register_eatcraftitems ('larva_juice','Larva Juice',-3)
|
||||
nssm:register_eatcraftitems ('larva_soup','Larva Soup',10)
|
||||
nssm:register_eatcraftitems ('mantis_meat','Mantis Meat',1)
|
||||
nssm:register_eatcraftitems ('roasted_mantis_meat','Roasted Mantis',4)
|
||||
nssm:register_eatcraftitems ('spider_meat','Spider Meat',-1)
|
||||
nssm:register_eatcraftitems ('roasted_spider_meat','Roasted Spider',3)
|
||||
nssm:register_eatcraftitems ('silk_gland','Silk Gland',-1)
|
||||
nssm:register_eatcraftitems ('roasted_silk_gland','Roasted Silk Gland',3)
|
||||
nssm:register_eatcraftitems ('super_silk_gland','Super Silk Gland',-8)
|
||||
nssm:register_eatcraftitems ('roasted_super_silk_gland','Roasted Super Silk Gland',2)
|
||||
nssm:register_eatcraftitems ('werewolf_leg',S('Werewolf Leg'),3)
|
||||
nssm:register_eatcraftitems ('felucco_steak',S('Felucco Steak'),3)
|
||||
nssm:register_eatcraftitems ('roasted_felucco_steak',S('Roasted Felucco Steak'),6)
|
||||
nssm:register_eatcraftitems ('heron_leg',S('Moonheron Leg'),2)
|
||||
nssm:register_eatcraftitems ('chichibios_heron_leg',S("Chichibio's Moonheron Leg"),4)
|
||||
nssm:register_eatcraftitems ('crocodile_tail',S('Crocodile Tail'),3)
|
||||
nssm:register_eatcraftitems ('roasted_crocodile_tail',S('Roasted Crocodile Tail'),6)
|
||||
nssm:register_eatcraftitems ('roasted_werewolf_leg',S('Roasted_Werewolf Leg'),6)
|
||||
nssm:register_eatcraftitems ('duck_legs',S('Duck Legs'),1)
|
||||
nssm:register_eatcraftitems ('roasted_duck_legs',S('Roasted Duck Leg'),3)
|
||||
nssm:register_eatcraftitems ('ant_leg',S('Ant Leg'),-1)
|
||||
nssm:register_eatcraftitems ('roasted_ant_leg',S('Roasted Ant Leg'),4)
|
||||
nssm:register_eatcraftitems ('spider_leg',S('Spider Leg'),-1)
|
||||
nssm:register_eatcraftitems ('roasted_spider_leg',S('Roasted Spider Leg'),4)
|
||||
nssm:register_eatcraftitems ('brain',S('Brain'),3)
|
||||
nssm:register_eatcraftitems ('roasted_brain',S('Roasted Brain'),8)
|
||||
nssm:register_eatcraftitems ('tentacle',S('Tentacle'),2)
|
||||
nssm:register_eatcraftitems ('roasted_tentacle',S('Roasted Tentacle'),5)
|
||||
nssm:register_eatcraftitems ('worm_flesh',S('Worm Meat'),-2)
|
||||
nssm:register_eatcraftitems ('roasted_worm_flesh',S('Roasted Worm'),4)
|
||||
nssm:register_eatcraftitems ('amphibian_heart',S('Amphibian Heart'),1)
|
||||
nssm:register_eatcraftitems ('roasted_amphibian_heart',S('Roasted Amphibian Heart'),8)
|
||||
nssm:register_eatcraftitems ('raw_scrausics_wing',S('Raw Scrausics Wing'),1)
|
||||
nssm:register_eatcraftitems ('spicy_scrausics_wing',S('Spicy Scrausics Wing'),6)
|
||||
nssm:register_eatcraftitems ('phoenix_nuggets',S('Phoenix Nuggets'),20)
|
||||
nssm:register_eatcraftitems ('phoenix_tear',S('Phoenix Tear'),20)
|
||||
nssm:register_eatcraftitems ('frosted_amphibian_heart',S('Frosted Amphibian Heart'),-1)
|
||||
nssm:register_eatcraftitems ('surimi',S('Surimi'),4)
|
||||
nssm:register_eatcraftitems ('amphibian_ribs',S('Amphibian Ribs'),2)
|
||||
nssm:register_eatcraftitems ('roasted_amphibian_ribs',S('Roasted Amphibian Ribs'),6)
|
||||
nssm:register_eatcraftitems ('dolidrosaurus_fin',S('Dolidrosaurus Fin'),-2)
|
||||
nssm:register_eatcraftitems ('roasted_dolidrosaurus_fin',S('Roasted Dolidrosaurus Fin'),4)
|
||||
nssm:register_eatcraftitems ('larva_meat',S('Larva Meat'),-1)
|
||||
nssm:register_eatcraftitems ('larva_juice',S('Larva Juice'),-3)
|
||||
nssm:register_eatcraftitems ('larva_soup',S('Larva Soup'),10)
|
||||
nssm:register_eatcraftitems ('mantis_meat',S('Mantis Meat'),1)
|
||||
nssm:register_eatcraftitems ('roasted_mantis_meat',S('Roasted Mantis'),4)
|
||||
nssm:register_eatcraftitems ('spider_meat',S('Spider Meat'),-1)
|
||||
nssm:register_eatcraftitems ('roasted_spider_meat',S('Roasted Spider'),3)
|
||||
nssm:register_eatcraftitems ('silk_gland',S('Silk Gland'),-1)
|
||||
nssm:register_eatcraftitems ('roasted_silk_gland',S('Roasted Silk Gland'),3)
|
||||
nssm:register_eatcraftitems ('super_silk_gland',S('Super Silk Gland'),-8)
|
||||
nssm:register_eatcraftitems ('roasted_super_silk_gland',S('Roasted Super Silk Gland'),2)
|
||||
|
||||
-- Cooking
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
-- Eat energy for a stats boost
|
||||
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local life_energy_ratings = {}
|
||||
local coefficients = {
|
||||
gravity = 1.4,
|
||||
@ -46,7 +48,7 @@ local function set_player_boost(user, duration, power)
|
||||
user:set_physics_override({speed = 2, gravity = 0.5})
|
||||
local remaining = stack_boost(user:get_player_name(), duration)
|
||||
|
||||
minetest.chat_send_player(user:get_player_name(), "You have "..(math.floor(remaining*10)/10).."s of boost")
|
||||
minetest.chat_send_player(user:get_player_name(), S("You have @1s of boost", math.floor(remaining*10)/10))
|
||||
|
||||
local userpos = user:get_pos()
|
||||
minetest.sound_play("nssm_energy_powerup", {
|
||||
@ -181,14 +183,14 @@ local function register_energy_craft(smaller,bigger)
|
||||
})
|
||||
end
|
||||
|
||||
register_energy('life_energy', 'Life Energy', 6, 2, 1)
|
||||
register_energy('energy_globe', 'Energy Globe', 9, 5, 2.5)
|
||||
register_energy('great_energy_globe', 'Great Energy Globe', 12, 12, 5)
|
||||
register_energy('superior_energy_globe', 'Awesome Energy Globe', 15, 18, 10)
|
||||
register_energy('life_energy', S('Life Energy'), 6, 2, 1)
|
||||
register_energy('energy_globe', S('Energy Globe'), 9, 5, 2.5)
|
||||
register_energy('great_energy_globe', S('Great Energy Globe'), 12, 12, 5)
|
||||
register_energy('superior_energy_globe', S('Awesome Energy Globe'), 15, 18, 10)
|
||||
|
||||
-- Always available
|
||||
-- never obtainable
|
||||
register_energy_light('light_energy', 'Light Energy', 12, 64, 1)
|
||||
register_energy_light('light_energy', S('Light Energy'), 12, 64, 1)
|
||||
|
||||
register_energy_craft("nssm:life_energy", "nssm:energy_globe")
|
||||
register_energy_craft("nssm:energy_globe", "nssm:great_energy_globe")
|
||||
|
@ -2,22 +2,24 @@ nssm:load("materials/craft_items.lua")
|
||||
nssm:load("materials/ores.lua")
|
||||
nssm:load("materials/energy_globes.lua")
|
||||
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
--nodes
|
||||
|
||||
minetest.register_node("nssm:ant_dirt", {
|
||||
description = "Ant Dirt",
|
||||
description = S("Ant Dirt"),
|
||||
tiles = {"ant_dirt.png"},
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:dead_leaves", {
|
||||
description = "Dead leaves",
|
||||
description = S("Dead leaves"),
|
||||
tiles = {"dead_leaves.png"},
|
||||
groups = {snappy=3,leaves=1},
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:invisible_light", {
|
||||
description = "Invisible light source",
|
||||
description = S("Invisible light source"),
|
||||
tiles = {"transparent.png"},
|
||||
paramtype = "light",
|
||||
drawtype = "airlike",
|
||||
@ -33,7 +35,7 @@ minetest.register_node("nssm:invisible_light", {
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:venomous_gas", {
|
||||
description = "Venomous Gas",
|
||||
description = S("Venomous Gas"),
|
||||
inventory_image = minetest.inventorycube("venomous_gas2.png"),
|
||||
drawtype = "firelike",
|
||||
tiles = {
|
||||
@ -53,14 +55,14 @@ minetest.register_node("nssm:venomous_gas", {
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:modders_block", {
|
||||
description = "Modders Block",
|
||||
description = S("Modders Block"),
|
||||
tiles = {"modders_block.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, not_in_creative_inventory =1},
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:web", {
|
||||
description = "Web",
|
||||
description = S("Web"),
|
||||
inventory_image = "web.png",
|
||||
tiles = {"web.png"} ,
|
||||
drawtype = "plantlike",
|
||||
@ -105,7 +107,7 @@ minetest.register_node("nssm:web", {
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:thick_web", {
|
||||
description = "Thick Web",
|
||||
description = S("Thick Web"),
|
||||
inventory_image = "thick_web.png",
|
||||
tiles = {"thick_web.png"} ,
|
||||
drawtype = "firelike",
|
||||
@ -126,7 +128,7 @@ minetest.register_node("nssm:thick_web", {
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:ink", {
|
||||
description = "Ink",
|
||||
description = S("Ink"),
|
||||
inventory_image = minetest.inventorycube("ink.png"),
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
@ -160,7 +162,7 @@ minetest.register_node("nssm:ink", {
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:mese_meteor", {
|
||||
description = "Mese Meteor",
|
||||
description = S("Mese Meteor"),
|
||||
tiles = {"mese_meteor.png"} ,
|
||||
paramtype = "light",
|
||||
drop = "",
|
||||
@ -179,7 +181,7 @@ minetest.register_node("nssm:pumpbomb", {
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:dragons_mese", {
|
||||
description = "Mese Dragon's Touch",
|
||||
description = S("Mese Dragon's Touch"),
|
||||
tiles = {"default_mese_block.png"},
|
||||
paramtype = "light",
|
||||
drop = "default:mese_crystal",
|
||||
@ -189,7 +191,7 @@ minetest.register_node("nssm:dragons_mese", {
|
||||
})
|
||||
|
||||
minetest.register_node("nssm:phoenix_fire", {
|
||||
description = "Phoenix Fire",
|
||||
description = S("Phoenix Fire"),
|
||||
drawtype = "firelike",
|
||||
tiles = {{
|
||||
name = "phoenix_fire_animated.png",
|
||||
@ -473,7 +475,7 @@ minetest.register_craft({
|
||||
|
||||
function nssm_register_egg (name, descr)
|
||||
minetest.register_craftitem("nssm:".. name, {
|
||||
description = descr .. " Egg",
|
||||
description = S("@1 Egg", descr),
|
||||
image = name.."_egg.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos1=minetest.get_pointed_thing_position(pointed_thing, true)
|
||||
@ -489,7 +491,7 @@ end
|
||||
|
||||
function nssm_register_egg2 (name, descr) --mobs you can't catch
|
||||
minetest.register_craftitem("nssm:".. name.."_egg", {
|
||||
description = descr .. " Egg",
|
||||
description = S("@1 Egg", descr),
|
||||
image = name.."_egg.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos1=minetest.get_pointed_thing_position(pointed_thing, true)
|
||||
@ -503,63 +505,63 @@ function nssm_register_egg2 (name, descr) --mobs you can't catch
|
||||
})
|
||||
end
|
||||
|
||||
nssm_register_egg ('flying_duck', 'Flying Duck')
|
||||
nssm_register_egg ('stone_eater', 'Stoneater')
|
||||
nssm_register_egg ('signosigno', 'Signosigno')
|
||||
nssm_register_egg ('bloco', 'Bloco')
|
||||
nssm_register_egg ('sand_bloco', 'Sand Bloco')
|
||||
nssm_register_egg ('swimming_duck', 'Swimming Duck')
|
||||
nssm_register_egg ('duck', 'Duck')
|
||||
nssm_register_egg2 ('duckking', 'Duckking')
|
||||
nssm_register_egg ('enderduck', 'Enderduck')
|
||||
nssm_register_egg ('spiderduck', 'Spiderduck')
|
||||
nssm_register_egg2 ('echidna', 'Echidna')
|
||||
nssm_register_egg ('werewolf', 'Werewolf')
|
||||
nssm_register_egg ('white_werewolf', 'White Werewolf')
|
||||
nssm_register_egg ('snow_biter', 'Snow Biter')
|
||||
nssm_register_egg2 ('icelamander', 'Icelamander')
|
||||
nssm_register_egg ('icesnake', 'Icesnake')
|
||||
nssm_register_egg2 ('lava_titan', 'Lava Titan')
|
||||
nssm_register_egg ('masticone', 'Masticone')
|
||||
nssm_register_egg ('mantis_beast', 'Mantis Beast')
|
||||
nssm_register_egg ('mantis', 'Mantis')
|
||||
nssm_register_egg ('larva', 'Larva')
|
||||
nssm_register_egg2 ('phoenix', 'Phoenix')
|
||||
nssm_register_egg2 ('night_master', 'Night Master')
|
||||
nssm_register_egg ('scrausics', 'Scrausics')
|
||||
nssm_register_egg ('moonheron', 'Moonheron')
|
||||
nssm_register_egg ('sandworm', 'Sandworm')
|
||||
nssm_register_egg2 ('giant_sandworm', 'Giant Sandworm')
|
||||
nssm_register_egg2 ('ant_queen', 'Ant Queen')
|
||||
nssm_register_egg ('ant_soldier', 'Ant Soldier')
|
||||
nssm_register_egg ('ant_worker', 'Ant Worker')
|
||||
nssm_register_egg ('crocodile', 'Crocodile')
|
||||
nssm_register_egg ('dolidrosaurus', 'Dolidrosaurus')
|
||||
nssm_register_egg ('crab', 'Crab')
|
||||
nssm_register_egg ('octopus', 'Octopus')
|
||||
nssm_register_egg ('xgaloctopus', 'Xgaloctopus')
|
||||
nssm_register_egg ('black_widow', 'Black Widow')
|
||||
nssm_register_egg ('uloboros', 'Uloboros')
|
||||
nssm_register_egg2 ('tarantula', 'Tarantula')
|
||||
nssm_register_egg ('daddy_long_legs', 'Daddy Long Legs')
|
||||
nssm_register_egg2 ('kraken', 'Kraken')
|
||||
nssm_register_egg2 ('pumpking', 'Pumpking')
|
||||
nssm_register_egg ('manticore', 'Manticore')
|
||||
nssm_register_egg ('felucco', 'Felucco')
|
||||
nssm_register_egg ('pumpboom_large', 'Large Pumpboom')
|
||||
nssm_register_egg ('pumpboom_small', 'Small Pumpboom')
|
||||
nssm_register_egg ('pumpboom_medium', 'Medium Pumpboom')
|
||||
nssm_register_egg2 ('mordain', 'Mordain')
|
||||
nssm_register_egg2 ('morgre', 'Morgre')
|
||||
nssm_register_egg2 ('morvy', 'Morvy')
|
||||
nssm_register_egg2 ('morgut', 'Morgut')
|
||||
nssm_register_egg2 ('morde', 'Morde')
|
||||
nssm_register_egg2 ('morlu', 'Morlu')
|
||||
nssm_register_egg2 ('morwa', 'Morwa')
|
||||
nssm_register_egg ('morvalar', 'Morvalar')
|
||||
nssm_register_egg ('flying_duck', S('Flying Duck'))
|
||||
nssm_register_egg ('stone_eater', S('Stoneater'))
|
||||
nssm_register_egg ('signosigno', S('Signosigno'))
|
||||
nssm_register_egg ('bloco', S('Bloco'))
|
||||
nssm_register_egg ('sand_bloco', S('Sand Bloco'))
|
||||
nssm_register_egg ('swimming_duck', S('Swimming Duck'))
|
||||
nssm_register_egg ('duck', S('Duck'))
|
||||
nssm_register_egg2 ('duckking', S('Duckking'))
|
||||
nssm_register_egg ('enderduck', S('Enderduck'))
|
||||
nssm_register_egg ('spiderduck', S('Spiderduck'))
|
||||
nssm_register_egg2 ('echidna', S('Echidna'))
|
||||
nssm_register_egg ('werewolf', S('Werewolf'))
|
||||
nssm_register_egg ('white_werewolf', S('White Werewolf'))
|
||||
nssm_register_egg ('snow_biter', S('Snow Biter'))
|
||||
nssm_register_egg2 ('icelamander', S('Icelamander'))
|
||||
nssm_register_egg ('icesnake', S('Icesnake'))
|
||||
nssm_register_egg2 ('lava_titan', S('Lava Titan'))
|
||||
nssm_register_egg ('masticone', S('Masticone'))
|
||||
nssm_register_egg ('mantis_beast', S('Mantis Beast'))
|
||||
nssm_register_egg ('mantis', S('Mantis'))
|
||||
nssm_register_egg ('larva', S('Larva'))
|
||||
nssm_register_egg2 ('phoenix', S('Phoenix'))
|
||||
nssm_register_egg2 ('night_master', S('Night Master'))
|
||||
nssm_register_egg ('scrausics', S('Scrausics'))
|
||||
nssm_register_egg ('moonheron', S('Moonheron'))
|
||||
nssm_register_egg ('sandworm', S('Sandworm'))
|
||||
nssm_register_egg2 ('giant_sandworm', S('Giant Sandworm'))
|
||||
nssm_register_egg2 ('ant_queen', S('Ant Queen'))
|
||||
nssm_register_egg ('ant_soldier', S('Ant Soldier'))
|
||||
nssm_register_egg ('ant_worker', S('Ant Worker'))
|
||||
nssm_register_egg ('crocodile', S('Crocodile'))
|
||||
nssm_register_egg ('dolidrosaurus', S('Dolidrosaurus'))
|
||||
nssm_register_egg ('crab', S('Crab'))
|
||||
nssm_register_egg ('octopus', S('Octopus'))
|
||||
nssm_register_egg ('xgaloctopus', S('Xgaloctopus'))
|
||||
nssm_register_egg ('black_widow', S('Black Widow'))
|
||||
nssm_register_egg ('uloboros', S('Uloboros'))
|
||||
nssm_register_egg2 ('tarantula', S('Tarantula'))
|
||||
nssm_register_egg ('daddy_long_legs', S('Daddy Long Legs'))
|
||||
nssm_register_egg2 ('kraken', S('Kraken'))
|
||||
nssm_register_egg2 ('pumpking', S('Pumpking'))
|
||||
nssm_register_egg ('manticore', S('Manticore'))
|
||||
nssm_register_egg ('felucco', S('Felucco'))
|
||||
nssm_register_egg ('pumpboom_large', S('Large Pumpboom'))
|
||||
nssm_register_egg ('pumpboom_small', S('Small Pumpboom'))
|
||||
nssm_register_egg ('pumpboom_medium', S('Medium Pumpboom'))
|
||||
nssm_register_egg2 ('mordain', S('Mordain'))
|
||||
nssm_register_egg2 ('morgre', S('Morgre'))
|
||||
nssm_register_egg2 ('morvy', S('Morvy'))
|
||||
nssm_register_egg2 ('morgut', S('Morgut'))
|
||||
nssm_register_egg2 ('morde', S('Morde'))
|
||||
nssm_register_egg2 ('morlu', S('Morlu'))
|
||||
nssm_register_egg2 ('morwa', S('Morwa'))
|
||||
nssm_register_egg ('morvalar', S('Morvalar'))
|
||||
|
||||
minetest.register_craftitem("nssm:mese_egg", {
|
||||
description = "Mese Egg",
|
||||
description = S("Mese Egg"),
|
||||
image = "mese_egg.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos1=minetest.get_pointed_thing_position(pointed_thing, true)
|
||||
@ -592,7 +594,7 @@ minetest.register_craftitem("nssm:mese_egg", {
|
||||
|
||||
--experimental morwa statue
|
||||
minetest.register_node("nssm:morwa_statue", {
|
||||
description = 'Morwa Statue',
|
||||
description = S('Morwa Statue'),
|
||||
drawtype = 'mesh',
|
||||
mesh = 'morwa_statue.b3d',
|
||||
tiles = {'morwa_statue.png'},
|
||||
|
@ -1,6 +1,7 @@
|
||||
local nssmleadersfile = minetest.get_worldpath().."/nssm_leaderboard.lua.ser"
|
||||
local steptime = 0
|
||||
local mob_descriptions = {}
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local function save_leaderboard()
|
||||
local serdata = minetest.serialize(nssm.leaderboard)
|
||||
@ -54,10 +55,10 @@ end
|
||||
|
||||
local function list_kills(playername)
|
||||
if not nssm.leaderboard[playername] then
|
||||
return "No stats for "..playername
|
||||
return S("No stats for @1", playername)
|
||||
end
|
||||
|
||||
local killslist = "Kill stats for "..playername.." :"
|
||||
local killslist = S("Kill stats for @1:", playername)
|
||||
for mob,count in pairs(nssm.leaderboard[playername] or {}) do
|
||||
killslist = killslist.."\n"..count.." "..mob_descriptions[mob]
|
||||
end
|
||||
@ -65,7 +66,7 @@ local function list_kills(playername)
|
||||
end
|
||||
|
||||
minetest.register_chatcommand("killstats", {
|
||||
description = "See your kill stats, or that of other players",
|
||||
description = S("See your kill stats, or that of other players"),
|
||||
params = "[<playername>]",
|
||||
func = function(playername, params)
|
||||
if params ~= "" then
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:ant_queen", "Ant Queen", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:ant_queen", S("Ant Queen"), {
|
||||
type = "monster",
|
||||
hp_max = 220,
|
||||
hp_min = 220,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:ant_soldier", "Ant Soldier", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:ant_soldier", S("Ant Soldier"), {
|
||||
type = "monster",
|
||||
hp_max = 32,
|
||||
hp_min = 24,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:ant_worker", "Ant Worker", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:ant_worker", S("Ant Worker"), {
|
||||
type = "monster",
|
||||
passive = true,
|
||||
hp_max = 24,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:black_widow", "Black Widow", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:black_widow", S("Black Widow"), {
|
||||
type = "monster",
|
||||
hp_max = 26,
|
||||
hp_min = 19,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:bloco", "Bloco", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:bloco", S("Bloco"), {
|
||||
type = "monster",
|
||||
hp_max = 24,
|
||||
hp_min = 14,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:crab", "Crab", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:crab", S("Crab"), {
|
||||
type = "monster",
|
||||
hp_max = 32,
|
||||
hp_min = 19,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:crocodile", "Crocodile", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:crocodile", S("Crocodile"), {
|
||||
type = "monster",
|
||||
hp_max = 30,
|
||||
hp_min = 15,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:daddy_long_legs", "Daddy Long Legs", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:daddy_long_legs", S("Daddy Long Legs"), {
|
||||
type = "monster",
|
||||
hp_max = 22,
|
||||
hp_min = 16,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:dolidrosaurus", "Dolidrosaurus", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:dolidrosaurus", S("Dolidrosaurus"), {
|
||||
type = "monster",
|
||||
hp_max = 46,
|
||||
hp_min = 23,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:duck", "Duck", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:duck", S("Duck"), {
|
||||
type = "monster",
|
||||
hp_max = 12,
|
||||
hp_min = 7,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:duckking", "Duck King", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:duckking", S("Duck King"), {
|
||||
type = "monster",
|
||||
hp_max = 180,
|
||||
hp_min = 180,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:echidna", "Echidna", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:echidna", S("Echidna"), {
|
||||
type = "monster",
|
||||
hp_max = 240,
|
||||
hp_min = 240,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:enderduck", "Enderduck", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:enderduck", S("Enderduck"), {
|
||||
type = "monster",
|
||||
hp_max = 28,
|
||||
hp_min = 18,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:felucco", "Felucco", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:felucco", S("Felucco"), {
|
||||
type = "monster",
|
||||
hp_max = 36,
|
||||
hp_min = 27,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:flying_duck", "Flying Duck", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:flying_duck", S("Flying Duck"), {
|
||||
type = "monster",
|
||||
hp_max = 20,
|
||||
hp_min = 10,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:giant_sandworm", "Giant Sandworm", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:giant_sandworm", S("Giant Sandworm"), {
|
||||
type = "monster",
|
||||
hp_max = 330,
|
||||
hp_min = 330,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:icelamander", "Icelamander", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:icelamander", S("Icelamander"), {
|
||||
type = "monster",
|
||||
hp_max = 230,
|
||||
hp_min = 230,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:icesnake", "Ice Snake", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:icesnake", S("Ice Snake"), {
|
||||
type = "monster",
|
||||
hp_max = 27,
|
||||
hp_min = 17,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:kraken", "Kraken", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:kraken", S("Kraken"), {
|
||||
type = "monster",
|
||||
hp_max = 350,
|
||||
hp_min = 350,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:larva", "Mantis Larva", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:larva", S("Mantis Larva"), {
|
||||
type = "monster",
|
||||
hp_max = 12,
|
||||
hp_min = 8,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:lava_titan", "Lava Titan", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:lava_titan", S("Lava Titan"), {
|
||||
type = "monster",
|
||||
hp_max = 180,
|
||||
hp_min = 180,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:manticore", "Manticore", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:manticore", S("Manticore"), {
|
||||
type = "monster",
|
||||
hp_max = 55,
|
||||
hp_min = 34,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:mantis", "Mantis", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:mantis", S("Mantis"), {
|
||||
type = "monster",
|
||||
hp_max = 31,
|
||||
hp_min = 24,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:mantis_beast", "Mantis Beast", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:mantis_beast", S("Mantis Beast"), {
|
||||
type = "monster",
|
||||
hp_max = 30,
|
||||
hp_min = 27,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:masticone", "Masticone", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:masticone", S("Masticone"), {
|
||||
type = "monster",
|
||||
hp_max = 25,
|
||||
hp_min = 24,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:mese_dragon", "Mese Dragon", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:mese_dragon", S("Mese Dragon"), {
|
||||
type = "monster",
|
||||
hp_max = 666,
|
||||
hp_min = 666,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:moonheron", "Moon Heron", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:moonheron", S("Moon Heron"), {
|
||||
type = "monster",
|
||||
hp_max = 33,
|
||||
hp_min = 22,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:mordain", "Mordain", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:mordain", S("Mordain"), {
|
||||
type = "monster",
|
||||
hp_max = 32,
|
||||
hp_min = 23,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:morde", "Morde", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:morde", S("Morde"), {
|
||||
type = "monster",
|
||||
hp_max = 47,
|
||||
hp_min = 37,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:morgre", "Morgre", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:morgre", S("Morgre"), {
|
||||
type = "monster",
|
||||
hp_max = 33,
|
||||
hp_min = 17,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:morgut", "Morgut", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:morgut", S("Morgut"), {
|
||||
type = "monster",
|
||||
hp_max = 35,
|
||||
hp_min = 28,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:morlu", "Morlu", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:morlu", S("Morlu"), {
|
||||
type = "monster",
|
||||
hp_max = 36,
|
||||
hp_min = 26,
|
||||
|
@ -1,3 +1,5 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local first_hit_timelimit = 120
|
||||
posmorvalarblock = {x=827, y=-30094, z=-817}
|
||||
|
||||
@ -13,7 +15,7 @@ local function initiation_timeout(self)
|
||||
else
|
||||
if os.time() - self.stop_timer > first_hit_timelimit then
|
||||
local shout_distance = 64
|
||||
local message = "Summon me ... when you are ready to fight ..."
|
||||
local message = S("Summon me ... when you are ready to fight ...")
|
||||
local pos = self.object:get_pos()
|
||||
local objs = minetest.get_objects_inside_radius(pos, shout_distance)
|
||||
|
||||
@ -757,7 +759,7 @@ mobs:register_mob("nssm:morvalar1", {
|
||||
end,
|
||||
})
|
||||
|
||||
nssm:register_mob("nssm:morvalar0", "Mor Valar", {
|
||||
nssm:register_mob("nssm:morvalar0", S("Mor Valar"), {
|
||||
type = "monster",
|
||||
hp_max = 100,
|
||||
hp_min = 100,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:morvy", "Morvy", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:morvy", S("Morvy"), {
|
||||
type = "monster",
|
||||
hp_max = 39,
|
||||
hp_min = 21,
|
||||
@ -125,7 +127,7 @@ nssm:register_mob("nssm:morvy", "Morvy", {
|
||||
|
||||
--Morbats
|
||||
|
||||
nssm:register_mob("nssm:morbat1", "Morbat I", {
|
||||
nssm:register_mob("nssm:morbat1", S("Morbat I"), {
|
||||
type = "monster",
|
||||
hp_max = 15,
|
||||
hp_min = 13,
|
||||
@ -175,7 +177,7 @@ nssm:register_mob("nssm:morbat1", "Morbat I", {
|
||||
}
|
||||
})
|
||||
|
||||
nssm:register_mob("nssm:morbat2", "Morbat II", {
|
||||
nssm:register_mob("nssm:morbat2", S("Morbat II"), {
|
||||
type = "monster",
|
||||
hp_max = 13,
|
||||
hp_min = 5,
|
||||
@ -227,7 +229,7 @@ nssm:register_mob("nssm:morbat2", "Morbat II", {
|
||||
})
|
||||
|
||||
|
||||
nssm:register_mob("nssm:morbat3", "Morbat III", {
|
||||
nssm:register_mob("nssm:morbat3", S("Morbat III"), {
|
||||
type = "monster",
|
||||
hp_max = 13,
|
||||
hp_min = 12,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:morwa", "Morwa", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:morwa", S("Morwa"), {
|
||||
type = "monster",
|
||||
hp_max = 56,
|
||||
hp_min = 49,
|
||||
|
@ -1,3 +1,5 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
mobs:register_mob("nssm:night_master", {
|
||||
type = "monster",
|
||||
hp_max = 60,
|
||||
@ -130,7 +132,7 @@ mobs:register_mob("nssm:night_master_2", {
|
||||
end,
|
||||
})
|
||||
|
||||
nssm:register_mob("nssm:night_master_1", "Night Master", {
|
||||
nssm:register_mob("nssm:night_master_1", S("Night Master"), {
|
||||
type = "monster",
|
||||
hp_max = 70,
|
||||
hp_min = 70,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:octopus", "Octopus", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:octopus", S("Octopus"), {
|
||||
type = "monster",
|
||||
hp_max = 32,
|
||||
hp_min = 25,
|
||||
@ -57,7 +59,7 @@ nssm:register_mob("nssm:octopus", "Octopus", {
|
||||
},
|
||||
})
|
||||
|
||||
nssm:register_mob("nssm:xgaloctopus", "Mini Octopus", {
|
||||
nssm:register_mob("nssm:xgaloctopus", S("Mini Octopus"), {
|
||||
type = "monster",
|
||||
hp_max = 30,
|
||||
hp_min = 27,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:phoenix", "Phoenix", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:phoenix", S("Phoenix"), {
|
||||
type = "monster",
|
||||
hp_max = 160,
|
||||
hp_min = 160,
|
||||
|
@ -1,5 +1,7 @@
|
||||
local function register_pumpboom(sizename, params)
|
||||
nssm:register_mob("nssm:pumpboom_"..sizename, "Pumpboom ("..sizename..")", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local function register_pumpboom(sizename, sizename_desc, params)
|
||||
nssm:register_mob("nssm:pumpboom_"..sizename, S("Pumpboom (@1)", sizename_desc), {
|
||||
type = "monster",
|
||||
hp_min = params.hp_min,
|
||||
hp_max = params.hp_max,
|
||||
@ -48,7 +50,7 @@ local function register_pumpboom(sizename, params)
|
||||
})
|
||||
end
|
||||
|
||||
register_pumpboom("small",{
|
||||
register_pumpboom("small", S("small"),{
|
||||
hp_min = 14,
|
||||
hp_max = 15,
|
||||
visual_size = {x=3, y=3},
|
||||
@ -67,7 +69,7 @@ register_pumpboom("small",{
|
||||
},
|
||||
})
|
||||
|
||||
register_pumpboom("medium",{
|
||||
register_pumpboom("medium", S("medium"),{
|
||||
hp_min = 17,
|
||||
hp_max = 18,
|
||||
visual_size = {x=5, y=5},
|
||||
@ -86,7 +88,7 @@ register_pumpboom("medium",{
|
||||
},
|
||||
})
|
||||
|
||||
register_pumpboom("large",{
|
||||
register_pumpboom("large", S("large"),{
|
||||
hp_min = 19,
|
||||
hp_max = 20,
|
||||
visual_size = {x=8, y=8},
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:pumpking", "PumpKing", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:pumpking", S("PumpKing"), {
|
||||
type = "monster",
|
||||
hp_max = 220,
|
||||
hp_min = 220,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:sand_bloco", "Sand Bloco", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:sand_bloco", S("Sand Bloco"), {
|
||||
type = "monster",
|
||||
hp_max = 24,
|
||||
hp_min = 17,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:sandworm", "Sandworm", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:sandworm", S("Sandworm"), {
|
||||
type = "monster",
|
||||
hp_max = 40,
|
||||
hp_min = 25,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:scrausics", "Scrausics", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:scrausics", S("Scrausics"), {
|
||||
type = "monster",
|
||||
hp_max = 33,
|
||||
hp_min = 22,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:signosigno", "Signo-Signo", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:signosigno", S("Signo-Signo"), {
|
||||
type = "monster",
|
||||
hp_max = 20,
|
||||
hp_min = 8,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:snow_biter", "Snow Biter", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:snow_biter", S("Snow Biter"), {
|
||||
type = "monster",
|
||||
hp_max = 30,
|
||||
hp_min = 15,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:spiderduck", "Spider-duck", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:spiderduck", S("Spider-duck"), {
|
||||
type = "monster",
|
||||
hp_max = 35,
|
||||
hp_min = 24,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:stone_eater", "Stone Eater", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:stone_eater", S("Stone Eater"), {
|
||||
type = "monster",
|
||||
hp_max = 27,
|
||||
hp_min = 19,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:swimming_duck", "Swimming Duck", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:swimming_duck", S("Swimming Duck"), {
|
||||
type = "monster",
|
||||
hp_max = 25,
|
||||
hp_min = 15,
|
||||
|
@ -1,3 +1,5 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
mobs:register_mob("nssm:tarantula", {
|
||||
type = "monster",
|
||||
hp_max = 50,
|
||||
@ -77,7 +79,7 @@ mobs:register_mob("nssm:tarantula", {
|
||||
})
|
||||
|
||||
|
||||
nssm:register_mob("nssm:tarantula_propower", "Tarantula", {
|
||||
nssm:register_mob("nssm:tarantula_propower", S("Tarantula"), {
|
||||
type = "monster",
|
||||
hp_max = 90,
|
||||
hp_min = 90,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:uloboros", "Uloboros", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:uloboros", S("Uloboros"), {
|
||||
type = "monster",
|
||||
hp_max = 28,
|
||||
hp_min = 17,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:werewolf", "Werewolf", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:werewolf", S("Werewolf"), {
|
||||
type = "monster",
|
||||
hp_max = 40,
|
||||
hp_min = 25,
|
||||
|
@ -1,4 +1,6 @@
|
||||
nssm:register_mob("nssm:white_werewolf", "White Werewolf", {
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
nssm:register_mob("nssm:white_werewolf", S("White Werewolf"), {
|
||||
type = "monster",
|
||||
hp_max = 40,
|
||||
hp_min = 25,
|
||||
|
@ -1,23 +1,25 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
if minetest.get_modpath("3d_armor") then
|
||||
|
||||
--Armors
|
||||
local stats = {
|
||||
wolf = {name="Werewolf", armor=2.8, heal=0, use=800},
|
||||
whitewolf = {name="White Werewolf", armor=2.8, heal=0, use=800},
|
||||
bloco = {name="Bloco", armor=3.2, heal=0, use=500},
|
||||
croco = {name="Crocodile", armor=3, heal=0, use=450},
|
||||
ant = {name="Ant", armor=3, heal=0, use=400},
|
||||
ice = {name="Ice Teeth", armor=3.2, heal=0, use=410},
|
||||
felucco = {name="Felucco", armor=2.8, heal=0, use=800},
|
||||
manticore = {name="Manticore", armor=3.4, heal=0, use=440},
|
||||
duck = {name="Duck", armor=1.5, heal=0, use=1000},
|
||||
black_duck = {name="Black Duck", armor=1.5, heal=0, use=900},
|
||||
mor = {name="Morlu", armor=5.3, heal=0, use=30},
|
||||
sky = {name="Sky", armor=4.2, heal=0, use=100},
|
||||
sandworm = {name="Sandworm", armor=3.4, heal=0, use=400},
|
||||
sandbloco = {name="Sand Bloco", armor=3.2, heal=0, use=500},
|
||||
web = {name="Cobweb String", armor=2.4, heal=0, use=900},
|
||||
denseweb = {name="Dense Cobweb String", armor=3.5, heal=0, use=400},
|
||||
wolf = {name=S("Werewolf"), armor=2.8, heal=0, use=800},
|
||||
whitewolf = {name=S("White Werewolf"), armor=2.8, heal=0, use=800},
|
||||
bloco = {name=S("Bloco"), armor=3.2, heal=0, use=500},
|
||||
croco = {name=S("Crocodile"), armor=3, heal=0, use=450},
|
||||
ant = {name=S("Ant"), armor=3, heal=0, use=400},
|
||||
ice = {name=S("Ice Teeth"), armor=3.2, heal=0, use=410},
|
||||
felucco = {name=S("Felucco"), armor=2.8, heal=0, use=800},
|
||||
manticore = {name=S("Manticore"), armor=3.4, heal=0, use=440},
|
||||
duck = {name=S("Duck"), armor=1.5, heal=0, use=1000},
|
||||
black_duck = {name=S("Black Duck"), armor=1.5, heal=0, use=900},
|
||||
mor = {name=S("Morlu"), armor=5.3, heal=0, use=30},
|
||||
sky = {name=S("Sky"), armor=4.2, heal=0, use=100},
|
||||
sandworm = {name=S("Sandworm"), armor=3.4, heal=0, use=400},
|
||||
sandbloco = {name=S("Sand Bloco"), armor=3.2, heal=0, use=500},
|
||||
web = {name=S("Cobweb String"), armor=2.4, heal=0, use=900},
|
||||
denseweb = {name=S("Dense Cobweb String"), armor=3.5, heal=0, use=400},
|
||||
}
|
||||
|
||||
local materials = {
|
||||
@ -41,28 +43,28 @@ if minetest.get_modpath("3d_armor") then
|
||||
|
||||
for k, v in pairs(stats) do
|
||||
minetest.register_tool("nssm:helmet_"..k, {
|
||||
description = v.name.." Helmet",
|
||||
description = S("@1 Helmet", v.name),
|
||||
inventory_image ="inv_helmet_"..k..".png",
|
||||
groups = {armor_head=math.floor(4*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:chestplate_"..k, {
|
||||
description = v.name.." Chestplate",
|
||||
description = S("@1 Chestplate", v.name),
|
||||
inventory_image ="inv_chestplate_"..k..".png",
|
||||
groups = {armor_torso=math.floor(6*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:leggings_"..k, {
|
||||
description = v.name.." Leggings",
|
||||
description = S("@1 Leggings", v.name),
|
||||
inventory_image = "inv_leggings_"..k..".png",
|
||||
groups = {armor_legs=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:boots_"..k, {
|
||||
description = v.name.." Boots",
|
||||
description = S("@1 Boots", v.name),
|
||||
inventory_image ="inv_boots_"..k..".png",
|
||||
groups = {armor_feet=math.floor(3*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
@ -110,15 +112,15 @@ if minetest.get_modpath("3d_armor") then
|
||||
--Special objects (pumpking helmet, masticone helmet, crowned masticone helmet, crown,)
|
||||
|
||||
local stats = {
|
||||
pumpking = {name="Pumpking Head", armor=4, heal=0, use=100},
|
||||
masticone ={name="Masticone Head", armor=4, heal=0, use=100},
|
||||
crown ={name="Duck King Crown", armor=2, heal=0, use=50},
|
||||
masticone_crowned ={name="Masticone Crowned Head", armor=6, heal=0, use=20},
|
||||
pumpking = {name=S("Pumpking Head"), armor=4, heal=0, use=100},
|
||||
masticone ={name=S("Masticone Head"), armor=4, heal=0, use=100},
|
||||
crown ={name=S("Duck King Crown"), armor=2, heal=0, use=50},
|
||||
masticone_crowned ={name=S("Masticone Crowned Head"), armor=6, heal=0, use=20},
|
||||
}
|
||||
|
||||
for k, v in pairs(stats) do
|
||||
minetest.register_tool("nssm:helmet_"..k, {
|
||||
description = v.name.." ",
|
||||
description = v.name,
|
||||
inventory_image ="inv_helmet_"..k..".png",
|
||||
groups = {armor_head=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
@ -126,7 +128,7 @@ if minetest.get_modpath("3d_armor") then
|
||||
end
|
||||
|
||||
minetest.register_tool("nssm:chestplate_snake", {
|
||||
description = "Snake Scute Chestplate",
|
||||
description = S("Snake Scute Chestplate"),
|
||||
inventory_image ="inv_chestplate_snake.png",
|
||||
groups = {armor_torso=40, armor_heal=0, armor_use=100},
|
||||
wear = 0,
|
||||
@ -164,11 +166,11 @@ end
|
||||
if minetest.get_modpath("shields") then
|
||||
|
||||
local stats = {
|
||||
crab = {name="Crab", armor=4, heal=0, use=500},
|
||||
ice ={name="Ice Teeth", armor=3.5, heal=0, use=600},
|
||||
mor ={name="Morlu", armor=5, use=100},
|
||||
masticone ={name="Masticone", armor=4.5, use=300},
|
||||
mantis ={name="Mantis", armor=3, use=500},
|
||||
crab = {name=S("Crab"), armor=4, heal=0, use=500},
|
||||
ice ={name=S("Ice Teeth"), armor=3.5, heal=0, use=600},
|
||||
mor ={name=S("Morlu"), armor=5, use=100},
|
||||
masticone ={name=S("Masticone"), armor=4.5, use=300},
|
||||
mantis ={name=S("Mantis"), armor=3, use=500},
|
||||
}
|
||||
|
||||
local materials = {
|
||||
@ -181,7 +183,7 @@ if minetest.get_modpath("shields") then
|
||||
|
||||
for k, v in pairs(stats) do
|
||||
minetest.register_tool("nssm:shield_"..k, {
|
||||
description = v.name.." Shield",
|
||||
description = S("@1 Shield", v.name),
|
||||
inventory_image ="inv_shield_"..k..".png",
|
||||
groups = {armor_shield=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
|
@ -1,7 +1,9 @@
|
||||
-- Basic NSSM Tools
|
||||
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
minetest.register_node("nssm:rope", {
|
||||
description = "Rope",
|
||||
description = S("Rope"),
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
@ -16,7 +18,7 @@ minetest.register_node("nssm:rope", {
|
||||
-- Good sword, sets things on fire...
|
||||
|
||||
minetest.register_tool('nssm:sun_sword', {
|
||||
description = 'Sun Sword',
|
||||
description = S('Sun Sword'),
|
||||
inventory_image = 'sun_sword.png',
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.6,
|
||||
@ -40,7 +42,7 @@ end)
|
||||
-- Swords
|
||||
|
||||
minetest.register_tool("nssm:ant_sword", {
|
||||
description = "Ant Sword",
|
||||
description = S("Ant Sword"),
|
||||
inventory_image = "ant_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
@ -53,7 +55,7 @@ minetest.register_tool("nssm:ant_sword", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:mantis_sword", {
|
||||
description = "Mantis Sword",
|
||||
description = S("Mantis Sword"),
|
||||
inventory_image = "mantis_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval =0.7 ,
|
||||
@ -67,7 +69,7 @@ minetest.register_tool("nssm:mantis_sword", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:masticone_fang_sword", {
|
||||
description = "Masticone Fang Sword",
|
||||
description = S("Masticone Fang Sword"),
|
||||
inventory_image = "masticone_fang_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval =0.7 ,
|
||||
@ -81,7 +83,7 @@ minetest.register_tool("nssm:masticone_fang_sword", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:night_sword", {
|
||||
description = "Night Sword",
|
||||
description = S("Night Sword"),
|
||||
inventory_image = "night_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval =0.4 ,
|
||||
@ -97,7 +99,7 @@ minetest.register_tool("nssm:night_sword", {
|
||||
-- Axes
|
||||
|
||||
minetest.register_tool("nssm:mantis_battleaxe", {
|
||||
description = "Mantis Battleaxe",
|
||||
description = S("Mantis Battleaxe"),
|
||||
inventory_image = "mantis_battleaxe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval =3 ,
|
||||
@ -110,7 +112,7 @@ minetest.register_tool("nssm:mantis_battleaxe", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:mantis_axe", {
|
||||
description = "Mantis Axe",
|
||||
description = S("Mantis Axe"),
|
||||
inventory_image = "mantis_axe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
@ -125,7 +127,7 @@ minetest.register_tool("nssm:mantis_axe", {
|
||||
-- Picks
|
||||
|
||||
minetest.register_tool("nssm:duck_beak_pick",{
|
||||
description = "Duck Beak Pickaxe",
|
||||
description = S("Duck Beak Pickaxe"),
|
||||
inventory_image = "duck_beak_pick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.6,
|
||||
@ -138,7 +140,7 @@ minetest.register_tool("nssm:duck_beak_pick",{
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:ant_pick", {
|
||||
description = "Ant Pickaxe",
|
||||
description = S("Ant Pickaxe"),
|
||||
inventory_image = "ant_pick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
@ -151,7 +153,7 @@ minetest.register_tool("nssm:ant_pick", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:mantis_pick", {
|
||||
description = "Mantis Pickaxe",
|
||||
description = S("Mantis Pickaxe"),
|
||||
inventory_image = "mantis_pick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1,
|
||||
@ -164,7 +166,7 @@ minetest.register_tool("nssm:mantis_pick", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:stoneater_pick", {
|
||||
description = "Stoneater Pickaxe",
|
||||
description = S("Stoneater Pickaxe"),
|
||||
inventory_image = "stoneater_pick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
@ -179,7 +181,7 @@ minetest.register_tool("nssm:stoneater_pick", {
|
||||
-- Knives
|
||||
|
||||
minetest.register_tool("nssm:little_ice_tooth_knife", {
|
||||
description = "Little Ice Tooth Knife",
|
||||
description = S("Little Ice Tooth Knife"),
|
||||
inventory_image = "little_ice_tooth_knife.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval =0.3 ,
|
||||
@ -193,7 +195,7 @@ minetest.register_tool("nssm:little_ice_tooth_knife", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:manticore_spine_knife", {
|
||||
description = "Manticore Spine Knife",
|
||||
description = S("Manticore Spine Knife"),
|
||||
inventory_image = "manticore_spine_knife.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval =0.4 ,
|
||||
@ -207,7 +209,7 @@ minetest.register_tool("nssm:manticore_spine_knife", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:felucco_knife", {
|
||||
description = "Felucco Knife",
|
||||
description = S("Felucco Knife"),
|
||||
inventory_image = "felucco_knife.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval =0.4 ,
|
||||
@ -223,7 +225,7 @@ minetest.register_tool("nssm:felucco_knife", {
|
||||
-- Shovels
|
||||
|
||||
minetest.register_tool("nssm:ant_shovel", {
|
||||
description = "Ant Shovel",
|
||||
description = S("Ant Shovel"),
|
||||
inventory_image = "ant_shovel.png",
|
||||
wield_image = "ant_shovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -237,7 +239,7 @@ minetest.register_tool("nssm:ant_shovel", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:duck_beak_shovel", {
|
||||
description = "Duck Beak Shovel",
|
||||
description = S("Duck Beak Shovel"),
|
||||
inventory_image = "duck_beak_shovel.png",
|
||||
wield_image = "duck_beak_shovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -253,7 +255,7 @@ minetest.register_tool("nssm:duck_beak_shovel", {
|
||||
-- Misc
|
||||
|
||||
minetest.register_tool("nssm:ant_billhook", {
|
||||
description = "Ant Billhook",
|
||||
description = S("Ant Billhook"),
|
||||
inventory_image = "ant_billhook.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
@ -267,7 +269,7 @@ minetest.register_tool("nssm:ant_billhook", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:tarantula_warhammer", {
|
||||
description = "Tarantula Warhammer",
|
||||
description = S("Tarantula Warhammer"),
|
||||
inventory_image = "tarantula_warhammer.png",
|
||||
wield_scale= {x=2,y=2,z=1.5},
|
||||
tool_capabilities = {
|
||||
@ -282,7 +284,7 @@ minetest.register_tool("nssm:tarantula_warhammer", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:crab_light_mace", {
|
||||
description = "Light Crab Mace",
|
||||
description = S("Light Crab Mace"),
|
||||
inventory_image = "crab_light_mace.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval =2 ,
|
||||
@ -295,7 +297,7 @@ minetest.register_tool("nssm:crab_light_mace", {
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:crab_heavy_mace", {
|
||||
description = "Heavy Crab Mace",
|
||||
description = S("Heavy Crab Mace"),
|
||||
inventory_image = "crab_heavy_mace.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval =4 ,
|
||||
@ -311,7 +313,7 @@ minetest.register_tool("nssm:crab_heavy_mace", {
|
||||
|
||||
local function register_nssm_scickle(name, description, material, diggerlevel)
|
||||
minetest.register_tool("nssm:"..name.."_scickle", {
|
||||
description = description.." Scickle",
|
||||
description = S("@1 Sickle", description),
|
||||
inventory_image = "nssm_"..name.."_scickle.png",
|
||||
groups = {webdigger = diggerlevel},
|
||||
tool_capabilities = {
|
||||
@ -336,6 +338,6 @@ local function register_nssm_scickle(name, description, material, diggerlevel)
|
||||
minetest.register_alias("nssm:"..name.."_hoe", "nssm:"..name.."_scickle")
|
||||
end
|
||||
|
||||
register_nssm_scickle("ant", "Ant", "nssm:ant_mandible", 1)
|
||||
register_nssm_scickle("felucco", "Felucco", "nssm:felucco_horn", 2)
|
||||
register_nssm_scickle("ant", S("Ant"), "nssm:ant_mandible", 1)
|
||||
register_nssm_scickle("felucco", S("Felucco"), "nssm:felucco_horn", 2)
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
function nssm_register_evocation (evomob, evodescr, numbe, evomob_ingredient)
|
||||
nssm_register_throwegg(evomob, evodescr.." Bomb", {
|
||||
nssm_register_throwegg(evomob, S("@1 Bomb", evodescr), {
|
||||
hit_node = function(self,pos)
|
||||
local pos1 = {x = pos.x, y=pos.y+1, z=pos.z}
|
||||
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
|
||||
@ -18,11 +20,11 @@ function nssm_register_evocation (evomob, evodescr, numbe, evomob_ingredient)
|
||||
})
|
||||
end
|
||||
|
||||
nssm_register_evocation ("duck","Duck Evocation", 4)
|
||||
nssm_register_evocation ("bloco","Bloco Evocation", 3)
|
||||
nssm_register_evocation ("enderduck","Enderduck Evocation", 2)
|
||||
nssm_register_evocation ("flying_duck","Flying Duck Evocation", 3)
|
||||
nssm_register_evocation ("swimming_duck","Swimming Duck Evocation", 3)
|
||||
nssm_register_evocation ("duckking","Duckking Evocation", 1, "duckking_egg")
|
||||
nssm_register_evocation ("spiderduck","Spiderduck Evocation", 2)
|
||||
nssm_register_evocation ("duck",S("Duck Evocation"), 4)
|
||||
nssm_register_evocation ("bloco",S("Bloco Evocation"), 3)
|
||||
nssm_register_evocation ("enderduck",S("Enderduck Evocation"), 2)
|
||||
nssm_register_evocation ("flying_duck",S("Flying Duck Evocation"), 3)
|
||||
nssm_register_evocation ("swimming_duck",S("Swimming Duck Evocation"), 3)
|
||||
nssm_register_evocation ("duckking",S("Duckking Evocation"), 1, "duckking_egg")
|
||||
nssm_register_evocation ("spiderduck",S("Spiderduck Evocation"), 2)
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
function nssm_register_throwitem(name, descr, def)
|
||||
|
||||
minetest.register_craftitem("nssm:"..name.."_bomb", {
|
||||
@ -35,7 +37,7 @@ function nssm_register_throwitem(name, descr, def)
|
||||
})
|
||||
end
|
||||
|
||||
nssm_register_throwitem("cobweb", "Cobweb Bomb", {
|
||||
nssm_register_throwitem("cobweb", S("Cobweb Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = -1,1 do
|
||||
@ -59,7 +61,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("ice", "Ice Bomb", {
|
||||
nssm_register_throwitem("ice", S("Ice Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = 1,3 do
|
||||
@ -87,7 +89,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
if minetest.get_modpath("nssb") then
|
||||
nssm_register_throwitem("mantis", "Mantis Clay Bomb", {
|
||||
nssm_register_throwitem("mantis", S("Mantis Clay Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = 1,3 do
|
||||
@ -116,7 +118,7 @@ if minetest.get_modpath("nssb") then
|
||||
})
|
||||
end
|
||||
|
||||
nssm_register_throwitem("lava", "Lava Bomb", {
|
||||
nssm_register_throwitem("lava", S("Lava Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = -1,0 do
|
||||
@ -140,7 +142,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("water", "Water Bomb", {
|
||||
nssm_register_throwitem("water", S("Water Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -2,2 do
|
||||
for dy = -1,0 do
|
||||
@ -164,7 +166,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("fire", "Fire Bomb", {
|
||||
nssm_register_throwitem("fire", S("Fire Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = 1,1 do
|
||||
@ -189,7 +191,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
if minetest.get_modpath("nssb") then
|
||||
nssm_register_throwitem("mornar", "Mornar Bomb", {
|
||||
nssm_register_throwitem("mornar", S("Mornar Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = 1,1 do
|
||||
@ -214,7 +216,7 @@ if minetest.get_modpath("nssb") then
|
||||
})
|
||||
end
|
||||
|
||||
nssm_register_throwitem("hole", "Hole Bomb", {
|
||||
nssm_register_throwitem("hole", S("Hole Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = -10,0 do
|
||||
@ -238,7 +240,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("food", "Food Bomb", {
|
||||
nssm_register_throwitem("food", S("Food Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = -1,1 do
|
||||
@ -263,7 +265,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("phoenix_fire", "Phoenix Fire Bomb", {
|
||||
nssm_register_throwitem("phoenix_fire", S("Phoenix Fire Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -2,2 do
|
||||
for dy = 0,1 do
|
||||
@ -287,7 +289,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("kaboom", "Explosive Bomb", {
|
||||
nssm_register_throwitem("kaboom", S("Explosive Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
local pos1 = {x = pos.x, y=pos.y, z=pos.z}
|
||||
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
|
||||
@ -305,7 +307,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("teleport", "Teleport Bomb", {
|
||||
nssm_register_throwitem("teleport", S("Teleport Bomb"), {
|
||||
hit_node = function(self,pos,placer)
|
||||
local pos1 = {x = pos.x, y=pos.y+1, z=pos.z}
|
||||
local pos2 = {x = pos.x, y=pos.y+2, z=pos.z}
|
||||
@ -330,7 +332,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("boom", "Boom Bomb", {
|
||||
nssm_register_throwitem("boom", S("Boom Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
local pos1 = {x = pos.x, y=pos.y, z=pos.z}
|
||||
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
|
||||
@ -348,7 +350,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("smoke", "Smoke Bomb", {
|
||||
nssm_register_throwitem("smoke", S("Smoke Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
local pos1 = {x = pos.x, y=pos.y, z=pos.z}
|
||||
minetest.add_particlespawner({
|
||||
@ -379,7 +381,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("thick_web", "Thick Web Bomb", {
|
||||
nssm_register_throwitem("thick_web", S("Thick Web Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
local pos1 = {x = pos.x, y=pos.y+1, z=pos.z}
|
||||
local pos2 = {x = pos.x, y=pos.y+2, z=pos.z}
|
||||
@ -399,7 +401,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("poison", "Poison Bomb", {
|
||||
nssm_register_throwitem("poison", S("Poison Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = 1,3 do
|
||||
@ -423,7 +425,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("stone", "Cobblestone Bomb", {
|
||||
nssm_register_throwitem("stone", S("Cobblestone Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -1,1 do
|
||||
for dy = 1,3 do
|
||||
@ -447,7 +449,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
nssm_register_throwitem("fire_ring", "Fire Ring Bomb", {
|
||||
nssm_register_throwitem("fire_ring", S("Fire Ring Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -2,2 do
|
||||
for dy = 1,2 do
|
||||
@ -480,7 +482,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
if minetest.get_modpath("nssb") then
|
||||
nssm_register_throwitem("cage", "Cage Bomb", {
|
||||
nssm_register_throwitem("cage", S("Cage Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = -2,2 do
|
||||
for dy = 0,3 do
|
||||
@ -513,7 +515,7 @@ if minetest.get_modpath("nssb") then
|
||||
})
|
||||
end
|
||||
|
||||
nssm_register_throwitem("water_column", "Water Column Bomb", {
|
||||
nssm_register_throwitem("water_column", S("Water Column Bomb"), {
|
||||
hit_node = function(self,pos)
|
||||
for dx = 0,0 do
|
||||
for dy = 1,10 do
|
||||
|
@ -1,6 +1,8 @@
|
||||
-- Moranga-based tools
|
||||
-- These can only be crafted with NSSB loaded
|
||||
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
if minetest.get_modpath("nssb") then
|
||||
|
||||
minetest.register_craft({
|
||||
@ -107,7 +109,7 @@ local function find_dropfuel(player, dropfuel_def)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.chat_send_player(pname, "You do not have enough "..dropfuel_def.description)
|
||||
minetest.chat_send_player(pname, S("You do not have enough @1", dropfuel_def.description))
|
||||
return false
|
||||
end
|
||||
|
||||
@ -147,7 +149,7 @@ end
|
||||
|
||||
minetest.register_tool("nssm:axe_of_pride", {
|
||||
-- Damage enemy, heal user by the same amount
|
||||
description = "Axe of Pride",
|
||||
description = S("Axe of Pride"),
|
||||
inventory_image = "axe_of_pride.png",
|
||||
wield_scale= {x=2,y=2,z=1.5},
|
||||
tool_capabilities = {
|
||||
@ -161,7 +163,7 @@ minetest.register_tool("nssm:axe_of_pride", {
|
||||
},
|
||||
on_drop = function(itemstack, dropper, pos)
|
||||
local objects = minetest.get_objects_inside_radius(pos, 10)
|
||||
local dropfuel = {name="nssm:energy_globe", description="energy sphere", quantity=1}
|
||||
local dropfuel = {name="nssm:energy_globe", description=S("energy sphere"), quantity=1}
|
||||
local part = 0
|
||||
|
||||
for _,obj in ipairs(objects) do
|
||||
@ -226,7 +228,7 @@ minetest.register_tool("nssm:axe_of_pride", {
|
||||
|
||||
minetest.register_tool("nssm:gratuitousness_battleaxe", {
|
||||
-- aka Battleaxe of Boom - causes and explosion at <epicenter_distance> nodes from player
|
||||
description = "Gratuitousness Battleaxe",
|
||||
description = S("Gratuitousness Battleaxe"),
|
||||
inventory_image = "gratuitousness_battleaxe.png",
|
||||
wield_scale= {x=2.2,y=2.2,z=1.5},
|
||||
tool_capabilities = {
|
||||
@ -245,7 +247,7 @@ minetest.register_tool("nssm:gratuitousness_battleaxe", {
|
||||
local vec = dropper:get_look_dir()
|
||||
local pos = dropper:get_pos()
|
||||
--vec.y = 0
|
||||
local dropfuel = {name = "nssm:energy_globe", description = "energy globe", quantity = 1}
|
||||
local dropfuel = {name = "nssm:energy_globe", description = S("energy globe"), quantity = 1}
|
||||
|
||||
for i=1,epicenter_distance do
|
||||
pos = vector.add(pos, vec)
|
||||
@ -265,7 +267,7 @@ minetest.register_tool("nssm:gratuitousness_battleaxe", {
|
||||
|
||||
minetest.register_tool("nssm:sword_of_eagerness", {
|
||||
-- Cause enemies to be sent upwards y+20
|
||||
description = "Sword of Eagerness",
|
||||
description = S("Sword of Eagerness"),
|
||||
inventory_image = "sword_of_eagerness.png",
|
||||
wield_scale= {x=2,y=2,z=1},
|
||||
tool_capabilities = {
|
||||
@ -280,7 +282,7 @@ minetest.register_tool("nssm:sword_of_eagerness", {
|
||||
on_drop = function(itemstack, dropper, pos)
|
||||
local objects = minetest.get_objects_inside_radius(pos, 10)
|
||||
local flag = 0
|
||||
local dropfuel = {name = "nssm:energy_globe", description = "energy globe", quantity = 1}
|
||||
local dropfuel = {name = "nssm:energy_globe", description = S("energy globe"), quantity = 1}
|
||||
|
||||
for _,obj in ipairs(objects) do
|
||||
local part = 0
|
||||
@ -339,7 +341,7 @@ minetest.register_tool("nssm:sword_of_eagerness", {
|
||||
|
||||
minetest.register_tool("nssm:falchion_of_eagerness", {
|
||||
-- Sends player 16m in the direction in which they are pointing...
|
||||
description = "Falchion of Eagerness",
|
||||
description = S("Falchion of Eagerness"),
|
||||
inventory_image = "falchion_of_eagerness.png",
|
||||
wield_scale= {x=2,y=2,z=1},
|
||||
tool_capabilities = {
|
||||
@ -355,7 +357,7 @@ minetest.register_tool("nssm:falchion_of_eagerness", {
|
||||
local vec = dropper:get_look_dir()
|
||||
local pos_destination = dropper:get_pos()
|
||||
--vec.y = 0
|
||||
local dropfuel = {name = "nssm:life_energy", description = "life energy", quantity = 5}
|
||||
local dropfuel = {name = "nssm:life_energy", description = S("life energy"), quantity = 5}
|
||||
|
||||
for i=1,16 do
|
||||
pos_destination = vector.add(pos_destination, vec)
|
||||
@ -371,7 +373,7 @@ minetest.register_tool("nssm:falchion_of_eagerness", {
|
||||
return
|
||||
|
||||
elseif minetest.is_protected(pos_destination, pname) or nssm.unswappable_node(pos_destination) then
|
||||
minetest.chat_send_player(pname, "You cannot go to that protected space!")
|
||||
minetest.chat_send_player(pname, S("You cannot go to that protected space!"))
|
||||
return
|
||||
|
||||
else
|
||||
@ -431,7 +433,7 @@ minetest.register_tool("nssm:falchion_of_eagerness", {
|
||||
minetest.register_tool("nssm:sword_of_envy", {
|
||||
-- Switch the health of the enemy with the health of the player
|
||||
-- Particularly useful when enemy's health is way over 20 -- this is pretty much a cheat item when facing a boss...
|
||||
description = "Sword of Envy",
|
||||
description = S("Sword of Envy"),
|
||||
inventory_image = "sword_of_envy.png",
|
||||
wield_scale= {x=2,y=2,z=1},
|
||||
tool_capabilities = {
|
||||
@ -446,7 +448,7 @@ minetest.register_tool("nssm:sword_of_envy", {
|
||||
on_drop = function(itemstack, dropper, pos)
|
||||
local objects = minetest.get_objects_inside_radius(pos, 10)
|
||||
local flag = 0
|
||||
local dropfuel = {name = "nssm:energy_globe", description = "energy globe", quantity = 1}
|
||||
local dropfuel = {name = "nssm:energy_globe", description = S("energy globe"), quantity = 1}
|
||||
|
||||
for _,obj in ipairs(objects) do
|
||||
if flag == 0 then
|
||||
@ -497,7 +499,7 @@ minetest.register_tool("nssm:sword_of_envy", {
|
||||
|
||||
minetest.register_tool("nssm:sword_of_gluttony", {
|
||||
-- Kills nearby monsters and causes them to drop roasted duck legs! :D
|
||||
description = "Sword of Gluttony",
|
||||
description = S("Sword of Gluttony"),
|
||||
inventory_image = "sword_of_gluttony.png",
|
||||
wield_scale= {x=2,y=2,z=1},
|
||||
tool_capabilities = {
|
||||
@ -512,7 +514,7 @@ minetest.register_tool("nssm:sword_of_gluttony", {
|
||||
on_drop = function(itemstack, dropper, pos)
|
||||
local objects = minetest.get_objects_inside_radius(pos, 10)
|
||||
local flag = 0
|
||||
local dropfuel = {name = "nssm:energy_globe", description = "energy globe", quantity = 1}
|
||||
local dropfuel = {name = "nssm:energy_globe", description = S("energy globe"), quantity = 1}
|
||||
|
||||
for _,obj in ipairs(objects) do
|
||||
if flag == 0 then
|
||||
@ -583,7 +585,7 @@ minetest.register_tool("nssm:sword_of_gluttony", {
|
||||
minetest.register_tool("nssm:death_scythe", {
|
||||
-- Kills everything around it, consumes user's life
|
||||
-- Casues dry grass, dry shrubs, and dead leaves, dropping lots of life eergy to drop too
|
||||
description = "Death Scythe",
|
||||
description = S("Death Scythe"),
|
||||
wield_scale= {x=3,y=3,z=1.3},
|
||||
inventory_image = "death_scythe.png",
|
||||
tool_capabilities = {
|
||||
|
@ -6,6 +6,8 @@
|
||||
-- The `nyancat` mod was removed in Minetest 0.4.16+
|
||||
-- The alternative blocks are used when this mod is not/no longer present
|
||||
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local head_block = "nyancat:nyancat"
|
||||
local tail_block = "nyancat:nyancat_rainbow"
|
||||
|
||||
@ -69,7 +71,7 @@ if not nssm.server_rainbow_staff then
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:rainbow_staff", {
|
||||
description = "Rainbow Staff",
|
||||
description = S("Rainbow Staff"),
|
||||
inventory_image = "rainbow_staff.png",
|
||||
groups = {not_in_creative_inventory=1,},
|
||||
on_use = function(itemstack, placer, pointed_thing)
|
||||
@ -86,7 +88,7 @@ if not nssm.server_rainbow_staff then
|
||||
|
||||
else
|
||||
minetest.register_tool("nssm:rainbow_staff", {
|
||||
description = "Rainbow Tool",
|
||||
description = S("Rainbow Tool"),
|
||||
inventory_image = "rainbow_staff.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.2,
|
||||
|
@ -1,3 +1,5 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local creative_mode = minetest.settings:get_bool("creative_mode")
|
||||
|
||||
-- Adjustable speed physics
|
||||
@ -15,13 +17,13 @@ The more lag, the slower the spear needs to move -- the move step of the mob and
|
||||
as it is locally.
|
||||
--]]
|
||||
minetest.register_chatcommand("setspearstat",{
|
||||
description = "Set spear stats modifier - default 1 (somewhat fast)",
|
||||
description = S("Set spear stats modifier - default 1 (somewhat fast)"),
|
||||
params = "<(float)>",
|
||||
privs = {server = 1},
|
||||
func = function(playername, params)
|
||||
statmodifier = tonumber(params) or 1
|
||||
|
||||
minetest.chat_send_player(playername, "Spear stat modifier set to "..tostring(statmodifier))
|
||||
minetest.chat_send_player(playername, S("Spear stat modifier set to @1", tostring(statmodifier)))
|
||||
end,
|
||||
})
|
||||
|
||||
@ -166,7 +168,7 @@ function spears_register_spear(kind, desc, eq, toughness, material, scale)
|
||||
scale = scale or 1
|
||||
|
||||
minetest.register_tool("nssm:spear_" .. kind, {
|
||||
description = desc .. " Spear",
|
||||
description = S("@1 Spear", desc),
|
||||
wield_image = "spear_" .. kind .. ".png",
|
||||
inventory_image = "spear_" .. kind .. ".png^[transform4",
|
||||
wield_scale= {x=2*scale, y=1*scale, z=1*scale},
|
||||
@ -208,18 +210,18 @@ function spears_register_spear(kind, desc, eq, toughness, material, scale)
|
||||
end
|
||||
|
||||
|
||||
spears_register_spear('duck_beak', 'Duck Beak', 5, 12, 'nssm:duck_beak')
|
||||
spears_register_spear('duck_beak', S('Duck Beak'), 5, 12, 'nssm:duck_beak')
|
||||
|
||||
spears_register_spear('manticore', 'Manticore', 8, 16, 'nssm:manticore_spine')
|
||||
spears_register_spear('manticore', S('Manticore'), 8, 16, 'nssm:manticore_spine')
|
||||
|
||||
spears_register_spear('felucco_horn', 'Felucco Horn', 7, 18, 'nssm:felucco_horn')
|
||||
spears_register_spear('felucco_horn', S('Felucco Horn'), 7, 18, 'nssm:felucco_horn')
|
||||
|
||||
spears_register_spear('mantis', 'Mantis', 6, 20, 'nssm:mantis_claw')
|
||||
spears_register_spear('mantis', S('Mantis'), 6, 20, 'nssm:mantis_claw')
|
||||
|
||||
spears_register_spear('little_ice_tooth', 'Little Ice Tooth', 7, 20, 'nssm:little_ice_tooth')
|
||||
spears_register_spear('little_ice_tooth', S('Little Ice Tooth'), 7, 20, 'nssm:little_ice_tooth')
|
||||
|
||||
spears_register_spear('ant', 'Ant', 6, 50, 'nssm:ant_mandible')
|
||||
spears_register_spear('ant', S('Ant'), 6, 50, 'nssm:ant_mandible')
|
||||
|
||||
spears_register_spear('ice_tooth', 'Ice Tooth', 16, 200, 'nssm:ice_tooth')
|
||||
spears_register_spear('ice_tooth', S('Ice Tooth'), 16, 200, 'nssm:ice_tooth')
|
||||
|
||||
spears_register_spear('of_peace', 'Serenity', 30, 300, 'nssm:wrathful_moranga', 2)
|
||||
spears_register_spear('of_peace', S('Serenity'), 30, 300, 'nssm:wrathful_moranga', 2)
|
||||
|
@ -1,3 +1,5 @@
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
--Parameters used by some weapons
|
||||
local default_dir = {
|
||||
x = 1,
|
||||
@ -366,7 +368,7 @@ nssm_register_weapon("kamehameha", {
|
||||
tnt.boom(pos, {damage_radius=10,radius=6,ignore_protection=false})
|
||||
end,
|
||||
material = "default:diamondblock",
|
||||
description = "Gret Wave Energy Release",
|
||||
description = S("Gret Wave Energy Release"),
|
||||
|
||||
})
|
||||
|
||||
@ -378,7 +380,7 @@ nssm_register_weapon("kienzan", {
|
||||
hit_node = function(self, pos, node)
|
||||
end,
|
||||
material = "default:bronzeblock",
|
||||
description = "Destructo Disc",
|
||||
description = S("Destructo Disc"),
|
||||
})
|
||||
|
||||
nssm_register_weapon("spirit_ball", {
|
||||
@ -392,7 +394,7 @@ nssm_register_weapon("spirit_ball", {
|
||||
end,
|
||||
|
||||
material = "default:goldblock",
|
||||
description = "Winding Energy Bullet",
|
||||
description = S("Winding Energy Bullet"),
|
||||
})
|
||||
|
||||
nssm_register_weapon("hellzone_grenade", {
|
||||
@ -410,6 +412,6 @@ nssm_register_weapon("hellzone_grenade", {
|
||||
activate_balls(pos)
|
||||
end,
|
||||
material = "default:mese",
|
||||
description = "Demon Air Beseiging Bullet (press Q to activate)",
|
||||
description = S("Demon Air Beseiging Bullet (press Q to activate)"),
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user