update castles, areas, homedecor, plantlife,
gloopblocks, hotbar, inspector, maptools, mesecons, moreblocks, moreores, technic, teleport_request, and worldedit switched to caverealms_lite (with minor fixes by me) switched to CWz's fork of player_textures The homedecor update brings in the big split, and will require you to re-enable all modpack components in order to avoid loss of content.
@ -1,3 +1,5 @@
|
||||
Anvil mod by Sokomine, originally a part of the Cottages mod but extracted to stand alone.
|
||||
|
||||
This anvil (and its associated hammer) allows a player to repair worn tools. Place the worn tool in the anvil's inventory and strike it with the hammer to improve its condition.
|
||||
This anvil (and its associated hammer) allows a player to repair worn tools. Place the worn tool in the anvil's inventory and strike it with the hammer to improve its condition.
|
||||
|
||||
By default, a hammer can be repaired on the anvil just like any other tool, allowing for infinite recycling of worn tools. Set "anvil_hammer_is_repairable false" to prevent this.
|
@ -7,18 +7,32 @@
|
||||
|
||||
anvil = {
|
||||
setting = {
|
||||
item_displacement = 7/16,
|
||||
item_displacement = 2/16,
|
||||
}
|
||||
}
|
||||
|
||||
minetest.register_alias("castle:anvil", "anvil:anvil")
|
||||
|
||||
local hammer_repairable = minetest.setting_getbool("anvil_hammer_is_repairable")
|
||||
if hammer_repairable == nil then hammer_repairable = true end
|
||||
|
||||
local make_unrepairable = function(item_name)
|
||||
local item_def = minetest.registered_items[item_name]
|
||||
if item_def then
|
||||
item_def.groups.not_repaired_by_anvil = 1
|
||||
minetest.override_item(item_name, {groups = item_def.groups})
|
||||
end
|
||||
end
|
||||
make_unrepairable("technic:water_can")
|
||||
make_unrepairable("technic:lava_can")
|
||||
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
-- the hammer for the anvil
|
||||
minetest.register_tool("anvil:hammer", {
|
||||
|
||||
local hammer_def = {
|
||||
description = S("Steel blacksmithing hammer"),
|
||||
_doc_items_longdesc = S("A tool for repairing other tools at a blacksmith's anvil."),
|
||||
_doc_items_usagehelp = S("Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task."),
|
||||
@ -34,7 +48,13 @@ minetest.register_tool("anvil:hammer", {
|
||||
},
|
||||
damage_groups = {fleshy=6},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if not hammer_repairable then
|
||||
hammer_def.groups = {["not_repaired_by_anvil"] = 1}
|
||||
end
|
||||
|
||||
minetest.register_tool("anvil:hammer", hammer_def)
|
||||
|
||||
local tmp = {}
|
||||
|
||||
@ -92,7 +112,14 @@ local update_item = function(pos, node)
|
||||
tmp.texture = inv:get_stack("input", 1):get_name()
|
||||
local e = minetest.add_entity(pos,"anvil:item")
|
||||
local yaw = math.pi*2 - node.param2 * math.pi/2
|
||||
e:setyaw(yaw)
|
||||
if e.set_rotation == nil then
|
||||
-- This is for 0.4.16 support, remove it eventually
|
||||
e:set_yaw(yaw)
|
||||
pos.y = pos.y + 5/16
|
||||
e:set_pos(pos)
|
||||
else
|
||||
e:set_rotation({x=-1.5708, y=yaw, z=0}) -- x is pitch, 1.5708 is 90 degrees.
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -161,14 +188,17 @@ minetest.register_node("anvil:anvil", {
|
||||
if listname~="input" then
|
||||
return 0
|
||||
end
|
||||
if (listname=='input'
|
||||
and(stack:get_wear() == 0
|
||||
or minetest.get_item_group(stack:get_name(), "not_repaired_by_anvil") ~= 0
|
||||
or stack:get_name() == "technic:water_can"
|
||||
or stack:get_name() == "technic:lava_can" )) then
|
||||
|
||||
minetest.chat_send_player( player:get_player_name(), S('This anvil is for damaged tools only.'))
|
||||
return 0
|
||||
if (listname=='input') then
|
||||
if (stack:get_wear() == 0) then
|
||||
minetest.chat_send_player( player:get_player_name(), S('This anvil is for damaged tools only.'))
|
||||
return 0
|
||||
end
|
||||
|
||||
if (minetest.get_item_group(stack:get_name(), "not_repaired_by_anvil") ~= 0) then
|
||||
local item_def = minetest.registered_items[stack:get_name()]
|
||||
minetest.chat_send_player( player:get_player_name(), S('@1 cannot be repaired with an anvil.', item_def.description))
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
if meta:get_inventory():room_for_item("input", stack) then
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-07 22:17-0700\n"
|
||||
"POT-Creation-Date: 2019-04-14 21:16-0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: XanthinLanguage-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
@ -16,32 +16,32 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: init.lua:19
|
||||
#: init.lua:36
|
||||
msgid "Steel blacksmithing hammer"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:20
|
||||
#: init.lua:37
|
||||
#, fuzzy
|
||||
msgid "A tool for repairing other tools at a blacksmith's anvil."
|
||||
msgstr "Stahlhammer um Werkzeuge auf dem Amboss zu reparieren"
|
||||
|
||||
#: init.lua:21
|
||||
#: init.lua:38
|
||||
msgid ""
|
||||
"Use this hammer to strike blows upon an anvil bearing a damaged tool and you "
|
||||
"can repair it. It can also be used for smashing stone, but it is not well "
|
||||
"suited to this task."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:98
|
||||
#: init.lua:136
|
||||
msgid "Anvil"
|
||||
msgstr "Amboss"
|
||||
|
||||
#: init.lua:99
|
||||
#: init.lua:137
|
||||
msgid ""
|
||||
"A tool for repairing other tools in conjunction with a blacksmith's hammer."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:100
|
||||
#: init.lua:138
|
||||
msgid ""
|
||||
"Right-click on this anvil with a damaged tool to place the damaged tool upon "
|
||||
"it. You can then repair the damaged tool by striking it with a blacksmith's "
|
||||
@ -50,12 +50,16 @@ msgid ""
|
||||
"hand."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:155
|
||||
#: init.lua:193
|
||||
#, fuzzy
|
||||
msgid "This anvil is for damaged tools only."
|
||||
msgstr "Das Werkstueckfeld gilt nur fuer beschaedigtes Werkzeug."
|
||||
|
||||
#: init.lua:267
|
||||
#: init.lua:199
|
||||
msgid "@1 cannot be repaired with an anvil."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:325
|
||||
msgid "Your @1 has been repaired successfully."
|
||||
msgstr ""
|
||||
|
||||
|
@ -60,6 +60,10 @@ msgstr ""
|
||||
msgid "This anvil is for damaged tools only."
|
||||
msgstr "Este yunque es sólo para herramientas dañadas"
|
||||
|
||||
#: init.lua:199
|
||||
msgid "@1 cannot be repaired with an anvil."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:267
|
||||
msgid "Your @1 has been repaired successfully."
|
||||
msgstr "Su @1 ha sido reparado correctamente."
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-06-26 12:18+0200\n"
|
||||
"POT-Creation-Date: 2019-04-14 21:16-0600\n"
|
||||
"PO-Revision-Date: 2017-06-26 12:22+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -18,15 +18,15 @@ msgstr ""
|
||||
"X-Generator: Poedit 2.0.2\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: init.lua:19
|
||||
#: init.lua:36
|
||||
msgid "Steel blacksmithing hammer"
|
||||
msgstr "Marteau de forgeron en acier"
|
||||
|
||||
#: init.lua:20
|
||||
#: init.lua:37
|
||||
msgid "A tool for repairing other tools at a blacksmith's anvil."
|
||||
msgstr "Un outil pour réparer les autres outils avec une enclume de forgeron."
|
||||
|
||||
#: init.lua:21
|
||||
#: init.lua:38
|
||||
msgid ""
|
||||
"Use this hammer to strike blows upon an anvil bearing a damaged tool and you "
|
||||
"can repair it. It can also be used for smashing stone, but it is not well "
|
||||
@ -36,18 +36,18 @@ msgstr ""
|
||||
"ainsi vous pourrez le réparer. Il peut être aussi utilisé pour casser de la "
|
||||
"pierre, mais il n'est pas adapté à cette tâche."
|
||||
|
||||
#: init.lua:98
|
||||
#: init.lua:136
|
||||
msgid "Anvil"
|
||||
msgstr "Enclume"
|
||||
|
||||
#: init.lua:99
|
||||
#: init.lua:137
|
||||
msgid ""
|
||||
"A tool for repairing other tools in conjunction with a blacksmith's hammer."
|
||||
msgstr ""
|
||||
"Un outil pour réparer les autres outils à utiliser avec un marteau de "
|
||||
"forgeron."
|
||||
|
||||
#: init.lua:100
|
||||
#: init.lua:138
|
||||
msgid ""
|
||||
"Right-click on this anvil with a damaged tool to place the damaged tool upon "
|
||||
"it. You can then repair the damaged tool by striking it with a blacksmith's "
|
||||
@ -61,10 +61,14 @@ msgstr ""
|
||||
"l'outil entièrement. Pour récupérer l'outil, frappez dessus ou faites un "
|
||||
"click-droit en ayant la main vide."
|
||||
|
||||
#: init.lua:155
|
||||
#: init.lua:193
|
||||
msgid "This anvil is for damaged tools only."
|
||||
msgstr "L'enclume s'utilise sur les outils endommagés."
|
||||
|
||||
#: init.lua:267
|
||||
#: init.lua:199
|
||||
msgid "@1 cannot be repaired with an anvil."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:325
|
||||
msgid "Your @1 has been repaired successfully."
|
||||
msgstr "Votre @1 a été réparé avec succès."
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Italian locale file for the Anvil module\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-07 22:17-0700\n"
|
||||
"POT-Creation-Date: 2019-04-14 21:16-0600\n"
|
||||
"PO-Revision-Date: 2017-08-18 16:14+0100\n"
|
||||
"Last-Translator: H4mlet <h4mlet@riseup.net>\n"
|
||||
"Language-Team: \n"
|
||||
@ -18,15 +18,15 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 1.6.10\n"
|
||||
|
||||
#: init.lua:19
|
||||
#: init.lua:36
|
||||
msgid "Steel blacksmithing hammer"
|
||||
msgstr "Martello da fabbro di acciaio"
|
||||
|
||||
#: init.lua:20
|
||||
#: init.lua:37
|
||||
msgid "A tool for repairing other tools at a blacksmith's anvil."
|
||||
msgstr "Un attrezzo per riparare altri attrezzi su di una incudine da fabbro."
|
||||
|
||||
#: init.lua:21
|
||||
#: init.lua:38
|
||||
msgid ""
|
||||
"Use this hammer to strike blows upon an anvil bearing a damaged tool and you "
|
||||
"can repair it. It can also be used for smashing stone, but it is not well "
|
||||
@ -36,16 +36,16 @@ msgstr ""
|
||||
"danneggiato e potrete ripararlo. Può anche essere usato per colpire la "
|
||||
"pietra, ma non è molto adatto a questo compito."
|
||||
|
||||
#: init.lua:98
|
||||
#: init.lua:136
|
||||
msgid "Anvil"
|
||||
msgstr "Incudine"
|
||||
|
||||
#: init.lua:99
|
||||
#: init.lua:137
|
||||
msgid ""
|
||||
"A tool for repairing other tools in conjunction with a blacksmith's hammer."
|
||||
msgstr "Un attrezzo per riparare altri attrezzi usando un martello da fabbro."
|
||||
|
||||
#: init.lua:100
|
||||
#: init.lua:138
|
||||
msgid ""
|
||||
"Right-click on this anvil with a damaged tool to place the damaged tool upon "
|
||||
"it. You can then repair the damaged tool by striking it with a blacksmith's "
|
||||
@ -59,10 +59,14 @@ msgstr ""
|
||||
"gravemente danneggiato. Per riprendere l'attrezzo colpite o fate click "
|
||||
"destro sull'incudine a mani vuote."
|
||||
|
||||
#: init.lua:155
|
||||
#: init.lua:193
|
||||
msgid "This anvil is for damaged tools only."
|
||||
msgstr "Questa incudine è solo per attrezzi danneggiati."
|
||||
|
||||
#: init.lua:267
|
||||
#: init.lua:199
|
||||
msgid "@1 cannot be repaired with an anvil."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:325
|
||||
msgid "Your @1 has been repaired successfully."
|
||||
msgstr "La/il vostr* @1 è stat* riparat* con successo."
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-07 22:17-0700\n"
|
||||
"POT-Creation-Date: 2019-04-14 21:16-0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -17,31 +17,31 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: init.lua:19
|
||||
#: init.lua:36
|
||||
msgid "Steel blacksmithing hammer"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:20
|
||||
#: init.lua:37
|
||||
msgid "A tool for repairing other tools at a blacksmith's anvil."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:21
|
||||
#: init.lua:38
|
||||
msgid ""
|
||||
"Use this hammer to strike blows upon an anvil bearing a damaged tool and you "
|
||||
"can repair it. It can also be used for smashing stone, but it is not well "
|
||||
"suited to this task."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:98
|
||||
#: init.lua:136
|
||||
msgid "Anvil"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:99
|
||||
#: init.lua:137
|
||||
msgid ""
|
||||
"A tool for repairing other tools in conjunction with a blacksmith's hammer."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:100
|
||||
#: init.lua:138
|
||||
msgid ""
|
||||
"Right-click on this anvil with a damaged tool to place the damaged tool upon "
|
||||
"it. You can then repair the damaged tool by striking it with a blacksmith's "
|
||||
@ -50,10 +50,14 @@ msgid ""
|
||||
"hand."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:155
|
||||
#: init.lua:193
|
||||
msgid "This anvil is for damaged tools only."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:267
|
||||
#: init.lua:199
|
||||
msgid "@1 cannot be repaired with an anvil."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:325
|
||||
msgid "Your @1 has been repaired successfully."
|
||||
msgstr ""
|
||||
|
6
anvil/locale/update.bat
Normal file
@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
cd ..
|
||||
set LIST=
|
||||
for /r %%X in (*.lua) do set LIST=!LIST! %%X
|
||||
..\intllib\tools\xgettext.bat %LIST%
|
1
anvil/settingtypes.txt
Normal file
@ -0,0 +1 @@
|
||||
anvil_hammer_is_repairable (Hammer can be repaired on anvil) bool true
|
@ -3,13 +3,17 @@ allow_defined_top = true
|
||||
|
||||
read_globals = {
|
||||
"DIR_DELIM",
|
||||
"minetest", "core",
|
||||
"core",
|
||||
"dump",
|
||||
"vector", "nodeupdate",
|
||||
"VoxelManip", "VoxelArea",
|
||||
"PseudoRandom", "ItemStack",
|
||||
"AreaStore",
|
||||
"intllib",
|
||||
"default",
|
||||
table = { fields = { "copy", "getn" } }
|
||||
}
|
||||
|
||||
globals = {
|
||||
"minetest"
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ minetest.register_chatcommand("set_owner", {
|
||||
|
||||
local id = areas:add(ownerName, areaName, pos1, pos2, nil)
|
||||
areas:save()
|
||||
|
||||
|
||||
minetest.chat_send_player(ownerName,
|
||||
"You have been granted control over area #"..
|
||||
id..". Type /list_areas to show your areas.")
|
||||
@ -383,10 +383,10 @@ minetest.register_chatcommand("area_info", {
|
||||
table.insert(lines, ("%s spanning up to %dx%dx%d.")
|
||||
:format(str, size.x, size.y, size.z))
|
||||
end
|
||||
local function priv_limit_info(priv, max_count, max_size)
|
||||
local function priv_limit_info(lpriv, lmax_count, lmax_size)
|
||||
size_info(("Players with the %q privilege"..
|
||||
" can protect up to %d areas"):format(
|
||||
priv, max_count), max_size)
|
||||
lpriv, lmax_count), lmax_size)
|
||||
end
|
||||
if self_prot then
|
||||
if privs.areas then
|
||||
|
@ -10,7 +10,7 @@ minetest.register_chatcommand("legacy_load_areas", {
|
||||
minetest.chat_send_player(name, "Converting areas...")
|
||||
local version = tonumber(param)
|
||||
if version == 0 then
|
||||
err = areas:node_ownership_load()
|
||||
local err = areas:node_ownership_load()
|
||||
if err then
|
||||
minetest.chat_send_player(name, "Error loading legacy file: "..err)
|
||||
return
|
||||
@ -48,6 +48,7 @@ minetest.register_chatcommand("legacy_load_areas", {
|
||||
|
||||
function areas:node_ownership_load()
|
||||
local filename = minetest.get_worldpath().."/owners.tbl"
|
||||
local tables, err
|
||||
tables, err = loadfile(filename)
|
||||
if err then
|
||||
return err
|
||||
|
@ -11,6 +11,16 @@ areas.set_pos = {}
|
||||
areas.pos1 = {}
|
||||
areas.pos2 = {}
|
||||
|
||||
local LIMIT = 30992 -- this is due to MAPBLOCK_SIZE=16!
|
||||
|
||||
local function posLimit(pos)
|
||||
return {
|
||||
x = math.max(math.min(pos.x, LIMIT), -LIMIT),
|
||||
y = math.max(math.min(pos.y, LIMIT), -LIMIT),
|
||||
z = math.max(math.min(pos.z, LIMIT), -LIMIT)
|
||||
}
|
||||
end
|
||||
|
||||
minetest.register_chatcommand("select_area", {
|
||||
params = "<ID>",
|
||||
description = "Select a area by id.",
|
||||
@ -35,7 +45,7 @@ minetest.register_chatcommand("area_pos1", {
|
||||
.." location or the one specified",
|
||||
privs = {},
|
||||
func = function(name, param)
|
||||
local pos = nil
|
||||
local pos
|
||||
local found, _, x, y, z = param:find(
|
||||
"^(-?%d+)[, ](-?%d+)[, ](-?%d+)$")
|
||||
if found then
|
||||
@ -50,7 +60,7 @@ minetest.register_chatcommand("area_pos1", {
|
||||
else
|
||||
return false, "Invalid usage, see /help area_pos1."
|
||||
end
|
||||
pos = vector.round(pos)
|
||||
pos = posLimit(vector.round(pos))
|
||||
areas:setPos1(name, pos)
|
||||
return true, "Area position 1 set to "
|
||||
..minetest.pos_to_string(pos)
|
||||
@ -62,7 +72,7 @@ minetest.register_chatcommand("area_pos2", {
|
||||
description = "Set area protection region position 2 to your"
|
||||
.." location or the one specified",
|
||||
func = function(name, param)
|
||||
local pos = nil
|
||||
local pos
|
||||
local found, _, x, y, z = param:find(
|
||||
"^(-?%d+)[, ](-?%d+)[, ](-?%d+)$")
|
||||
if found then
|
||||
@ -77,7 +87,7 @@ minetest.register_chatcommand("area_pos2", {
|
||||
else
|
||||
return false, "Invalid usage, see /help area_pos2."
|
||||
end
|
||||
pos = vector.round(pos)
|
||||
pos = posLimit(vector.round(pos))
|
||||
areas:setPos2(name, pos)
|
||||
return true, "Area position 2 set to "
|
||||
..minetest.pos_to_string(pos)
|
||||
@ -129,14 +139,6 @@ function areas:getPos(playerName)
|
||||
return areas:sortPos(pos1, pos2)
|
||||
end
|
||||
|
||||
local function posLimit(pos)
|
||||
return {
|
||||
x = math.max(math.min(pos.x, 31000), -31000),
|
||||
y = math.max(math.min(pos.y, 31000), -31000),
|
||||
z = math.max(math.min(pos.z, 31000), -31000)
|
||||
}
|
||||
end
|
||||
|
||||
function areas:setPos1(playerName, pos)
|
||||
areas.pos1[playerName] = posLimit(pos)
|
||||
areas.markPos1(playerName)
|
||||
|
@ -41,7 +41,7 @@ minetest.register_node("basic_materials:concrete_block", {
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "basic_materials:oil_extract 3",
|
||||
output = "basic_materials:oil_extract 1",
|
||||
recipe = {
|
||||
"group:leaves",
|
||||
"group:leaves",
|
||||
|
@ -1,4 +1,4 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
minetest.register_alias("building_blocks:slab_tar", "stairs:slab_Tar")
|
||||
|
@ -1,5 +1,5 @@
|
||||
default
|
||||
homedecor_i18n
|
||||
homedecor_common
|
||||
moreblocks?
|
||||
gloopblocks?
|
||||
stairs?
|
||||
|
@ -1,7 +1,7 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
local modpath = minetest.get_modpath("building_blocks")
|
||||
|
||||
dofile(modpath.."/alias.lua")
|
||||
dofile(modpath.."/node_stairs.lua")
|
||||
dofile(modpath.."/others.lua")
|
||||
dofile(modpath.."/recipes.lua")
|
||||
dofile(modpath.."/recipes.lua")
|
||||
|
@ -1,4 +1,4 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
local stairs_groups_names = {"cracky","choppy","flammable","crumbly","snappy"}
|
||||
|
||||
@ -33,7 +33,7 @@ local function building_blocks_stairs(nodename, def)
|
||||
("%s Slab"):format(def.description),
|
||||
def.sounds
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
minetest.register_craftitem("building_blocks:sticks", {
|
||||
description = S("Small bundle of sticks"),
|
||||
@ -20,4 +20,4 @@ minetest.register_tool("building_blocks:knife", {
|
||||
fleshy={times={[2]=5.50, [3]=2.80}, uses=100, maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local S = homedecor.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_craft({
|
||||
|
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 450 B |
@ -116,6 +116,8 @@ end
|
||||
|
||||
|
||||
local get_door_layout = function(pos, facedir, player)
|
||||
if facedir > 23 then return nil end -- A bug in another mod once resulted in bad param2s being written to nodes, this will at least prevent crashes if something like that happens again.
|
||||
|
||||
-- This method does a flood-fill looking for all nodes that meet the following criteria:
|
||||
-- belongs to a "castle_gate" group
|
||||
-- has the same "back" direction as the initial node
|
||||
@ -153,7 +155,7 @@ local get_door_layout = function(pos, facedir, player)
|
||||
local test_node_def = minetest.registered_nodes[test_node.name]
|
||||
can_slide_to:set_pos(test_pos, test_node_def.buildable_to == true)
|
||||
|
||||
if test_node_def.paramtype2 == "facedir" then -- prospective door nodes need to be of type facedir
|
||||
if test_node_def.paramtype2 == "facedir" and test_node.param2 <= 23 then -- prospective door nodes need to be of type facedir and have a valid param2
|
||||
local test_node_dirs = get_dirs(test_node.param2)
|
||||
local coplanar = vector.equals(test_node_dirs.back, door.directions.back) -- the "back" vector needs to point in the same direction as the rest of the door
|
||||
|
||||
|
@ -2,21 +2,37 @@
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
minetest.register_node("castle_gates:portcullis_bars", {
|
||||
minetest.register_alias("castle_gates:gate_edge", "castle_gates:wood_gate_edge")
|
||||
minetest.register_alias("castle_gates:gate_edge_handle", "castle_gates:wood_gate_edge_handle")
|
||||
minetest.register_alias("castle_gates:gate_hinge", "castle_gates:wood_gate_hinge")
|
||||
minetest.register_alias("castle_gates:gate_panel", "castle_gates:wood_gate_panel")
|
||||
minetest.register_alias("castle_gates:portcullis_bars", "castle_gates:wood_portcullis_bars")
|
||||
minetest.register_alias("castle_gates:portcullis_bars_bottom", "castle_gates:wood_portcullis_bars_bottom")
|
||||
|
||||
local register_gates = function(node_prefix, material_description, material_texture, gate_groups, gate_sounds, portcullis_recipe, panel_recipe)
|
||||
|
||||
local portcullis_groups = {castle_gate = 1, flow_through = 1}
|
||||
local panel_groups = {castle_gate = 1}
|
||||
for group, val in pairs(gate_groups) do
|
||||
portcullis_groups[group] = val
|
||||
panel_groups[group] = val
|
||||
end
|
||||
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_portcullis_bars", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Portcullis Bars"),
|
||||
description = S("@1 Portcullis Bars", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.portcullis_bars_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.portcullis_bars_usagehelp,
|
||||
groups = {castle_gate = 1, choppy = 1, flow_through = 1},
|
||||
groups = portcullis_groups,
|
||||
tiles = {
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -32,21 +48,21 @@ minetest.register_node("castle_gates:portcullis_bars", {
|
||||
on_rightclick = castle_gates.trigger_gate,
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:portcullis_bars_bottom", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_portcullis_bars_bottom", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Portcullis Bottom"),
|
||||
description = S("@1 Portcullis Bottom", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.portcullis_bars_bottom_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.portcullis_bars_bottom_usagehelp,
|
||||
groups = {castle_gate = 1, choppy = 1, flow_through = 1},
|
||||
groups = portcullis_groups,
|
||||
tiles = {
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_portcullis_mask.png)",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -67,53 +83,46 @@ minetest.register_node("castle_gates:portcullis_bars_bottom", {
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:portcullis_bars 3",
|
||||
output = "castle_gates:"..node_prefix.."_portcullis_bars 3",
|
||||
recipe = portcullis_recipe,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:"..node_prefix.."_portcullis_bars",
|
||||
recipe = {
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"castle_gates:"..node_prefix.."_portcullis_bars_bottom"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:portcullis_bars",
|
||||
output = "castle_gates:"..node_prefix.."_portcullis_bars_bottom",
|
||||
recipe = {
|
||||
{"castle_gates:portcullis_bars_bottom"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:portcullis_bars_bottom",
|
||||
recipe = {
|
||||
{"castle_gates:portcullis_bars"}
|
||||
{"castle_gates:"..node_prefix.."_portcullis_bars"}
|
||||
},
|
||||
})
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_panel 8",
|
||||
recipe = {
|
||||
{"stairs:slab_wood","stairs:slab_wood", ""},
|
||||
{"stairs:slab_wood","stairs:slab_wood", ""},
|
||||
},
|
||||
output = "castle_gates:"..node_prefix.."_gate_panel 8",
|
||||
recipe = panel_recipe,
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:gate_panel", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_gate_panel", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Gate Door"),
|
||||
description = S("@1 Gate Door", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.gate_panel_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.gate_panel_usagehelp,
|
||||
groups = {choppy = 1, castle_gate = 1},
|
||||
groups = panel_groups,
|
||||
tiles = {
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -126,26 +135,26 @@ minetest.register_node("castle_gates:gate_panel", {
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_edge",
|
||||
output = "castle_gates:"..node_prefix.."_gate_edge",
|
||||
type = "shapeless",
|
||||
recipe = {"castle_gates:gate_panel"},
|
||||
recipe = {"castle_gates:"..node_prefix.."_gate_panel"},
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:gate_edge", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_gate_edge", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Gate Door Edge"),
|
||||
description = S("@1 Gate Door Edge", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.gate_edge_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.gate_edge_usagehelp,
|
||||
groups = {choppy = 1, castle_gate = 1},
|
||||
groups = panel_groups,
|
||||
tiles = {
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90",
|
||||
"default_wood.png^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png^[transformFX)",
|
||||
"default_wood.png^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png)",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
material_texture.."^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png^[transformFX)",
|
||||
material_texture.."^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png)",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -159,32 +168,32 @@ minetest.register_node("castle_gates:gate_edge", {
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_edge_handle",
|
||||
output = "castle_gates:"..node_prefix.."_gate_edge_handle",
|
||||
type = "shapeless",
|
||||
recipe = {"castle_gates:gate_edge"},
|
||||
recipe = {"castle_gates:"..node_prefix.."_gate_edge"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_panel",
|
||||
output = "castle_gates:"..node_prefix.."_gate_panel",
|
||||
type = "shapeless",
|
||||
recipe = {"castle_gates:gate_edge_handle"},
|
||||
recipe = {"castle_gates:"..node_prefix.."_gate_edge_handle"},
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:gate_edge_handle", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_gate_edge_handle", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Gate Door With Handle"),
|
||||
description = S("@1 Gate Door With Handle", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.gate_edge_handle_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.gate_edge_handle_usagehelp,
|
||||
groups = {choppy = 1, castle_gate = 1},
|
||||
groups = panel_groups,
|
||||
tiles = {
|
||||
"castle_steel.png^(default_wood.png^[mask:castle_door_side_mask.png^[transformR90)",
|
||||
"castle_steel.png^(default_wood.png^[mask:castle_door_side_mask.png^[transformR270)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:castle_door_side_mask.png)",
|
||||
"castle_steel.png^(default_wood.png^[transformR90^[mask:(castle_door_side_mask.png^[transformFX))",
|
||||
"default_wood.png^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png^[transformFX)^(castle_steel.png^[mask:castle_door_handle_mask.png^[transformFX)",
|
||||
"default_wood.png^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png)^(castle_steel.png^[mask:castle_door_handle_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[mask:castle_door_side_mask.png^[transformR90)",
|
||||
"castle_steel.png^("..material_texture.."^[mask:castle_door_side_mask.png^[transformR270)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:castle_door_side_mask.png)",
|
||||
"castle_steel.png^("..material_texture.."^[transformR90^[mask:(castle_door_side_mask.png^[transformFX))",
|
||||
material_texture.."^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png^[transformFX)^(castle_steel.png^[mask:castle_door_handle_mask.png^[transformFX)",
|
||||
material_texture.."^[transformR90^(default_coal_block.png^[mask:castle_door_edge_mask.png)^(castle_steel.png^[mask:castle_door_handle_mask.png)",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
@ -205,24 +214,24 @@ minetest.register_node("castle_gates:gate_edge_handle", {
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_gates:gate_hinge 3",
|
||||
output = "castle_gates:"..node_prefix.."_gate_hinge 3",
|
||||
recipe = {
|
||||
{"", "castle_gates:gate_panel", ""},
|
||||
{"default:steel_ingot", "castle_gates:gate_panel", ""},
|
||||
{"", "castle_gates:gate_panel", ""}
|
||||
{"", "castle_gates:"..node_prefix.."_gate_panel", ""},
|
||||
{"default:steel_ingot", "castle_gates:"..node_prefix.."_gate_panel", ""},
|
||||
{"", "castle_gates:"..node_prefix.."_gate_panel", ""}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("castle_gates:gate_hinge", {
|
||||
minetest.register_node("castle_gates:"..node_prefix.."_gate_hinge", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Gate Door With Hinge"),
|
||||
description = S("@1 Gate Door With Hinge", material_description),
|
||||
_doc_items_longdesc = castle_gates.doc.gate_hinge_longdesc,
|
||||
_doc_items_usagehelp = castle_gates.doc.gate_hinge_usagehelp,
|
||||
groups = {choppy = 1, castle_gate = 1},
|
||||
groups = panel_groups,
|
||||
tiles = {
|
||||
"default_wood.png^[transformR90",
|
||||
material_texture.."^[transformR90",
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = gate_sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
|
||||
@ -241,3 +250,29 @@ minetest.register_node("castle_gates:gate_hinge", {
|
||||
_gate_hinge = {axis="top", offset={"front","left"}},
|
||||
on_rightclick = castle_gates.trigger_gate,
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
register_gates("wood", S("Wooden"), "default_wood.png", {choppy = 1}, default.node_sound_wood_defaults(),
|
||||
{
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
{"group:wood","default:steel_ingot","group:wood" },
|
||||
},
|
||||
{
|
||||
{"stairs:slab_wood","stairs:slab_wood", ""},
|
||||
{"stairs:slab_wood","stairs:slab_wood", ""},
|
||||
}
|
||||
)
|
||||
|
||||
register_gates("steel", S("Steel"), "default_steel_block.png", {cracky = 1, level = 2}, default.node_sound_metal_defaults(),
|
||||
{
|
||||
{"","default:steel_ingot","" },
|
||||
{"default:steel_ingot","default:steel_ingot","default:steel_ingot" },
|
||||
{"","default:steel_ingot","" },
|
||||
},
|
||||
{
|
||||
{"stairs:slab_steelblock","stairs:slab_steelblock", ""},
|
||||
{"stairs:slab_steelblock","stairs:slab_steelblock", ""},
|
||||
}
|
||||
)
|
||||
|
@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-01 23:41-0700\n"
|
||||
"POT-Creation-Date: 2019-04-14 22:15-0600\n"
|
||||
"PO-Revision-Date: 2017-04-28 11:56-0400\n"
|
||||
"Last-Translator: Carlos Barraza\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -31,8 +31,8 @@ msgid ""
|
||||
"The bottom edge of a portcullis gate, with knobs to lock securely into the "
|
||||
"floor."
|
||||
msgstr ""
|
||||
"Es el borde inferior de una puerta rastrillo, con perillas para bloquearla con "
|
||||
"seguridad en el piso"
|
||||
"Es el borde inferior de una puerta rastrillo, con perillas para bloquearla "
|
||||
"con seguridad en el piso"
|
||||
|
||||
#: doc.lua:15
|
||||
msgid ""
|
||||
@ -41,8 +41,8 @@ msgid ""
|
||||
"just decorative."
|
||||
msgstr ""
|
||||
"Este bloque puede ser usado para definir el borde de una puerta rastrillo "
|
||||
"que esta cerca de otra puerta, si tiene varias puertas independientes, "
|
||||
"de lo contrario es simplemente decorativo"
|
||||
"que esta cerca de otra puerta, si tiene varias puertas independientes, de "
|
||||
"lo contrario es simplemente decorativo"
|
||||
|
||||
#: doc.lua:17
|
||||
msgid "A basic gate panel."
|
||||
@ -67,10 +67,10 @@ msgid ""
|
||||
"separately, for example. Note that edges aren't strictly necessary for gates "
|
||||
"that stand alone."
|
||||
msgstr ""
|
||||
"El borde oscurecido de este panel marca el limite de la puerta."
|
||||
"Usted puede utilizar estos bloques para construir puertas dobles para asegurar "
|
||||
"que las dos puertas funcionen por separado, por ejemplo. Tenga en cuenta que "
|
||||
"los bordes no son estrictamente necesarios para las puertas individuales"
|
||||
"El borde oscurecido de este panel marca el limite de la puerta. Usted puede "
|
||||
"utilizar estos bloques para construir puertas dobles para asegurar que las "
|
||||
"dos puertas funcionen por separado, por ejemplo. Tenga en cuenta que los "
|
||||
"bordes no son estrictamente necesarios para las puertas individuales"
|
||||
|
||||
#: doc.lua:23
|
||||
msgid "A gate edge with a handle."
|
||||
@ -106,7 +106,7 @@ msgstr ""
|
||||
msgid "A block with a slot to allow an adjacent sliding gate through."
|
||||
msgstr ""
|
||||
"Un bloque con una ranura en el medio para que una puerta deslizante pueda "
|
||||
"pasar a través de ella."
|
||||
"pasar a travs de ella."
|
||||
|
||||
#: doc.lua:30
|
||||
msgid ""
|
||||
@ -146,8 +146,8 @@ msgid ""
|
||||
"Gates are large multi-node constructions that swing on hinges or slide out "
|
||||
"of the way when triggered."
|
||||
msgstr ""
|
||||
"Las puertas grandes son construcciones multi nodo que se abren usando bisagras "
|
||||
"o se deslizan hacia arriba cuando se activan"
|
||||
"Las puertas grandes son construcciones multi nodo que se abren usando "
|
||||
"bisagras o se deslizan hacia arriba cuando se activan"
|
||||
|
||||
#: doc.lua:43
|
||||
msgid "Gate construction"
|
||||
@ -211,19 +211,56 @@ msgstr ""
|
||||
"puerta todavía busca obstrucciones en la región que está moviéndose y no "
|
||||
"girara si hay algo en el camino."
|
||||
|
||||
|
||||
#: doors.lua:8
|
||||
msgid "Oak Door"
|
||||
msgstr "Puerta de Roble"
|
||||
|
||||
#: doors.lua:22
|
||||
#: doors.lua:37
|
||||
msgid "Jail Door"
|
||||
msgstr "Puerta de Cárcel"
|
||||
|
||||
#: doors.lua:43
|
||||
#: doors.lua:54
|
||||
msgid "Jail Bars"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:23
|
||||
#, fuzzy
|
||||
msgid "@1 Portcullis Bars"
|
||||
msgstr "Barras de la Puerta Rastrillo"
|
||||
|
||||
#: gates.lua:53
|
||||
#, fuzzy
|
||||
msgid "@1 Portcullis Bottom"
|
||||
msgstr "Terminación de la Puerta Rastrillo"
|
||||
|
||||
#: gates.lua:113
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door"
|
||||
msgstr "Porción de la Puerta"
|
||||
|
||||
#: gates.lua:145
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door Edge"
|
||||
msgstr "Borde de la Puerta"
|
||||
|
||||
#: gates.lua:184
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door With Handle"
|
||||
msgstr "Pestillo de la Puerta"
|
||||
|
||||
#: gates.lua:227
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door With Hinge"
|
||||
msgstr "Bisagra de la Puerta"
|
||||
|
||||
#: gates.lua:256
|
||||
msgid "Wooden"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:268
|
||||
msgid "Steel"
|
||||
msgstr ""
|
||||
|
||||
#: gate_slots.lua:36
|
||||
msgid "Stonebrick"
|
||||
msgstr "Ladrillo de Piedra"
|
||||
@ -235,27 +272,3 @@ msgstr "Espacio para Puerta de @1"
|
||||
#: gate_slots.lua:70
|
||||
msgid "@1 Gate Slot Reverse"
|
||||
msgstr "Espacio para Puerta Invertido de @1"
|
||||
|
||||
#: gates.lua:7
|
||||
msgid "Portcullis Bars"
|
||||
msgstr "Barras de la Puerta Rastrillo"
|
||||
|
||||
#: gates.lua:37
|
||||
msgid "Portcullis Bottom"
|
||||
msgstr "Terminación de la Puerta Rastrillo"
|
||||
|
||||
#: gates.lua:104
|
||||
msgid "Gate Door"
|
||||
msgstr "Porción de la Puerta"
|
||||
|
||||
#: gates.lua:136
|
||||
msgid "Gate Door Edge"
|
||||
msgstr "Borde de la Puerta"
|
||||
|
||||
#: gates.lua:175
|
||||
msgid "Gate Door With Handle"
|
||||
msgstr "Pestillo de la Puerta"
|
||||
|
||||
#: gates.lua:218
|
||||
msgid "Gate Door With Hinge"
|
||||
msgstr "Bisagra de la Puerta"
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Castle Gates\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-01 23:41-0700\n"
|
||||
"POT-Creation-Date: 2019-04-14 22:15-0600\n"
|
||||
"PO-Revision-Date: 2017-09-26 23:51+0100\n"
|
||||
"Last-Translator: Hamlet <h4mlet@riseup.net>\n"
|
||||
"Language-Team: \n"
|
||||
@ -228,14 +228,52 @@ msgstr ""
|
||||
msgid "Oak Door"
|
||||
msgstr "Porta di quercia"
|
||||
|
||||
#: doors.lua:22
|
||||
#: doors.lua:37
|
||||
msgid "Jail Door"
|
||||
msgstr "Porta della prigione"
|
||||
|
||||
#: doors.lua:43
|
||||
#: doors.lua:54
|
||||
msgid "Jail Bars"
|
||||
msgstr "Sbarre della prigione"
|
||||
|
||||
#: gates.lua:23
|
||||
#, fuzzy
|
||||
msgid "@1 Portcullis Bars"
|
||||
msgstr "Sbarre della saracinesca"
|
||||
|
||||
#: gates.lua:53
|
||||
#, fuzzy
|
||||
msgid "@1 Portcullis Bottom"
|
||||
msgstr "Estremità inferiore della saracinesca"
|
||||
|
||||
#: gates.lua:113
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door"
|
||||
msgstr "Segmento di cancello, porta o portone"
|
||||
|
||||
#: gates.lua:145
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door Edge"
|
||||
msgstr "Estremità di cancello, porta o portone"
|
||||
|
||||
#: gates.lua:184
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door With Handle"
|
||||
msgstr "Cancello, porta o portone con maniglia"
|
||||
|
||||
#: gates.lua:227
|
||||
#, fuzzy
|
||||
msgid "@1 Gate Door With Hinge"
|
||||
msgstr "Cancello, porta o portone con cardine"
|
||||
|
||||
#: gates.lua:256
|
||||
msgid "Wooden"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:268
|
||||
msgid "Steel"
|
||||
msgstr ""
|
||||
|
||||
#: gate_slots.lua:36
|
||||
msgid "Stonebrick"
|
||||
msgstr "Mattoni di pietra"
|
||||
@ -248,27 +286,3 @@ msgstr "Alloggio di @1 per cancelli, porte, portoni e saracinesche"
|
||||
msgid "@1 Gate Slot Reverse"
|
||||
msgstr ""
|
||||
"Rovescio dell'alloggio di @1 per cancelli, porte, portoni e saracinesche."
|
||||
|
||||
#: gates.lua:7
|
||||
msgid "Portcullis Bars"
|
||||
msgstr "Sbarre della saracinesca"
|
||||
|
||||
#: gates.lua:37
|
||||
msgid "Portcullis Bottom"
|
||||
msgstr "Estremità inferiore della saracinesca"
|
||||
|
||||
#: gates.lua:104
|
||||
msgid "Gate Door"
|
||||
msgstr "Segmento di cancello, porta o portone"
|
||||
|
||||
#: gates.lua:136
|
||||
msgid "Gate Door Edge"
|
||||
msgstr "Estremità di cancello, porta o portone"
|
||||
|
||||
#: gates.lua:175
|
||||
msgid "Gate Door With Handle"
|
||||
msgstr "Cancello, porta o portone con maniglia"
|
||||
|
||||
#: gates.lua:218
|
||||
msgid "Gate Door With Hinge"
|
||||
msgstr "Cancello, porta o portone con cardine"
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-01 23:41-0700\n"
|
||||
"POT-Creation-Date: 2019-04-14 22:15-0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -157,14 +157,46 @@ msgstr ""
|
||||
msgid "Oak Door"
|
||||
msgstr ""
|
||||
|
||||
#: doors.lua:22
|
||||
#: doors.lua:37
|
||||
msgid "Jail Door"
|
||||
msgstr ""
|
||||
|
||||
#: doors.lua:43
|
||||
#: doors.lua:54
|
||||
msgid "Jail Bars"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:23
|
||||
msgid "@1 Portcullis Bars"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:53
|
||||
msgid "@1 Portcullis Bottom"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:113
|
||||
msgid "@1 Gate Door"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:145
|
||||
msgid "@1 Gate Door Edge"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:184
|
||||
msgid "@1 Gate Door With Handle"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:227
|
||||
msgid "@1 Gate Door With Hinge"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:256
|
||||
msgid "Wooden"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:268
|
||||
msgid "Steel"
|
||||
msgstr ""
|
||||
|
||||
#: gate_slots.lua:36
|
||||
msgid "Stonebrick"
|
||||
msgstr ""
|
||||
@ -176,27 +208,3 @@ msgstr ""
|
||||
#: gate_slots.lua:70
|
||||
msgid "@1 Gate Slot Reverse"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:7
|
||||
msgid "Portcullis Bars"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:37
|
||||
msgid "Portcullis Bottom"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:104
|
||||
msgid "Gate Door"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:136
|
||||
msgid "Gate Door Edge"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:175
|
||||
msgid "Gate Door With Handle"
|
||||
msgstr ""
|
||||
|
||||
#: gates.lua:218
|
||||
msgid "Gate Door With Hinge"
|
||||
msgstr ""
|
||||
|
6
castle_gates/locale/update.bat
Normal file
@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
cd ..
|
||||
set LIST=
|
||||
for /r %%X in (*.lua) do set LIST=!LIST! %%X
|
||||
..\intllib\tools\xgettext.bat %LIST%
|
@ -1,14 +0,0 @@
|
||||
minetest-caverealms
|
||||
===================
|
||||
|
||||
A mod for Minetest to add underground realms
|
||||
|
||||
For more information, view the official forum topic at:
|
||||
https://forum.minetest.net/viewtopic.php?f=9&t=9522
|
||||
|
||||
Contributors:
|
||||
HeroOfTheWinds - everything
|
||||
|
|
||||
Zeno- - additional ideas and fine tuning
|
||||
|
||||
Licensed under the WTFPL
|
@ -1,43 +0,0 @@
|
||||
--CaveRealms crafting.lua
|
||||
|
||||
--CRAFT ITEMS--
|
||||
|
||||
--mycena powder
|
||||
minetest.register_craftitem("caverealms:mycena_powder", {
|
||||
description = "Mycena Powder",
|
||||
inventory_image = "caverealms_mycena_powder.png",
|
||||
})
|
||||
|
||||
--CRAFT RECIPES--
|
||||
|
||||
--mycena powder
|
||||
minetest.register_craft({
|
||||
output = "caverealms:mycena_powder",
|
||||
type = "shapeless",
|
||||
recipe = {"caverealms:mycena"}
|
||||
})
|
||||
|
||||
|
||||
--glow mese block
|
||||
minetest.register_craft({
|
||||
output = "caverealms:glow_mese",
|
||||
recipe = {
|
||||
{"default:mese_crystal_fragment","default:mese_crystal_fragment","default:mese_crystal_fragment"},
|
||||
{"default:mese_crystal_fragment","caverealms:mycena_powder","default:mese_crystal_fragment"},
|
||||
{"default:mese_crystal_fragment","default:mese_crystal_fragment","default:mese_crystal_fragment"}
|
||||
}
|
||||
})
|
||||
|
||||
--reverse craft for glow mese
|
||||
minetest.register_craft({
|
||||
output = "default:mese_crystal_fragment 8",
|
||||
type = "shapeless",
|
||||
recipe = {"caverealms:glow_mese"}
|
||||
})
|
||||
|
||||
--thin ice to water
|
||||
minetest.register_craft({
|
||||
output = "default:water_source",
|
||||
type = "shapeless",
|
||||
recipe = {"caverealms:thin_ice"}
|
||||
})
|
@ -1 +0,0 @@
|
||||
default
|
@ -1,210 +0,0 @@
|
||||
-- CaveRealms: falling icicles
|
||||
-- borrowed from base MineTest game's falling.lua
|
||||
|
||||
--
|
||||
-- Falling ice
|
||||
--
|
||||
|
||||
minetest.register_entity("caverealms:falling_ice", {
|
||||
initial_properties = {
|
||||
physical = true,
|
||||
collide_with_objects = false,
|
||||
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
|
||||
visual = "wielditem",
|
||||
textures = {},
|
||||
visual_size = {x=0.667, y=0.667},
|
||||
},
|
||||
|
||||
node = {},
|
||||
|
||||
set_node = function(self, node)
|
||||
self.node = node
|
||||
local stack = ItemStack(node.name)
|
||||
local itemtable = stack:to_table()
|
||||
local itemname = nil
|
||||
if itemtable then
|
||||
itemname = stack:to_table().name
|
||||
end
|
||||
local item_texture = nil
|
||||
local item_type = ""
|
||||
if minetest.registered_items[itemname] then
|
||||
item_texture = minetest.registered_items[itemname].inventory_image
|
||||
item_type = minetest.registered_items[itemname].type
|
||||
end
|
||||
prop = {
|
||||
is_visible = true,
|
||||
textures = {node.name},
|
||||
}
|
||||
self.object:set_properties(prop)
|
||||
end,
|
||||
|
||||
get_staticdata = function(self)
|
||||
return self.node.name
|
||||
end,
|
||||
|
||||
on_activate = function(self, staticdata)
|
||||
self.object:set_armor_groups({immortal=1})
|
||||
--self.object:setacceleration({x=0, y=-10, z=0})
|
||||
self:set_node({name=staticdata})
|
||||
end,
|
||||
|
||||
on_step = function(self, dtime)
|
||||
-- Set gravity
|
||||
self.object:setacceleration({x=0, y=-10, z=0})
|
||||
-- Destroy when collides to ground or just move
|
||||
local pos = self.object:getpos()
|
||||
local bcp = {x=pos.x, y=pos.y-0.7, z=pos.z} -- Position of bottom center point
|
||||
local bcn = minetest.get_node(bcp)
|
||||
local bcd = minetest.registered_nodes[bcn.name]
|
||||
--check for players next to this and hurt them >:D
|
||||
local all_objects = minetest.get_objects_inside_radius(pos, 1)
|
||||
local _,obj
|
||||
for _,obj in ipairs(all_objects) do
|
||||
if obj:is_player() then
|
||||
obj:set_hp(obj:get_hp() - 8)
|
||||
end
|
||||
end
|
||||
-- Note: walkable is in the node definition, not in item groups
|
||||
if not bcd or
|
||||
(bcd.walkable or
|
||||
(minetest.get_item_group(self.node.name, "float") ~= 0 and
|
||||
bcd.liquidtype ~= "none")) then
|
||||
if bcd and bcd.leveled and
|
||||
bcn.name == self.node.name then
|
||||
local addlevel = self.node.level
|
||||
if addlevel == nil or addlevel <= 0 then
|
||||
addlevel = bcd.leveled
|
||||
end
|
||||
if minetest.add_node_level(bcp, addlevel) == 0 then
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
elseif bcd and bcd.buildable_to and
|
||||
(minetest.get_item_group(self.node.name, "float") == 0 or
|
||||
bcd.liquidtype == "none") then
|
||||
minetest.remove_node(bcp)
|
||||
return
|
||||
end
|
||||
local np = {x=bcp.x, y=bcp.y+1, z=bcp.z}
|
||||
-- Check what's here
|
||||
local n2 = minetest.get_node(np)
|
||||
-- remove node and replace it with it's drops
|
||||
local drops = minetest.get_node_drops(n2.name, "")
|
||||
minetest.remove_node(np)
|
||||
local _, dropped_item
|
||||
for _, dropped_item in ipairs(drops) do
|
||||
minetest.add_item(np, dropped_item)
|
||||
end
|
||||
-- Run script hook
|
||||
local _, callback
|
||||
for _, callback in ipairs(minetest.registered_on_dignodes) do
|
||||
callback(np, n2, nil)
|
||||
end
|
||||
-- remove entity
|
||||
--minetest.add_node(np, self.node)
|
||||
self.object:remove()
|
||||
caverealms:nodeupdate(np)
|
||||
else
|
||||
-- Do nothing
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
function caverealms:spawn_falling_node(p, node)
|
||||
obj = minetest.add_entity(p, "caverealms:falling_ice")
|
||||
obj:get_luaentity():set_node(node)
|
||||
end
|
||||
|
||||
function caverealms:drop_attached_node(p)
|
||||
local nn = minetest.get_node(p).name
|
||||
minetest.remove_node(p)
|
||||
for _,item in ipairs(minetest.get_node_drops(nn, "")) do
|
||||
local pos = {
|
||||
x = p.x + math.random()/2 - 0.25,
|
||||
y = p.y + math.random()/2 - 0.25,
|
||||
z = p.z + math.random()/2 - 0.25,
|
||||
}
|
||||
minetest.add_item(pos, item)
|
||||
end
|
||||
end
|
||||
|
||||
function caverealms:check_attached_node(p, n)
|
||||
local def = minetest.registered_nodes[n.name]
|
||||
local d = {x=0, y=0, z=0}
|
||||
if def.paramtype2 == "wallmounted" then
|
||||
if n.param2 == 0 then
|
||||
d.y = 1
|
||||
elseif n.param2 == 1 then
|
||||
d.y = -1
|
||||
elseif n.param2 == 2 then
|
||||
d.x = 1
|
||||
elseif n.param2 == 3 then
|
||||
d.x = -1
|
||||
elseif n.param2 == 4 then
|
||||
d.z = 1
|
||||
elseif n.param2 == 5 then
|
||||
d.z = -1
|
||||
end
|
||||
else
|
||||
d.y = -1
|
||||
end
|
||||
local p2 = {x=p.x+d.x, y=p.y+d.y, z=p.z+d.z}
|
||||
local nn = minetest.get_node(p2).name
|
||||
local def2 = minetest.registered_nodes[nn]
|
||||
if def2 and not def2.walkable then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--
|
||||
-- Some common functions
|
||||
--
|
||||
|
||||
function caverealms:nodeupdate_single(p, delay)
|
||||
n = minetest.get_node(p)
|
||||
if minetest.get_item_group(n.name, "falling_node") ~= 0 then
|
||||
p_bottom = {x=p.x, y=p.y-1, z=p.z}
|
||||
n_bottom = minetest.get_node(p_bottom)
|
||||
-- Note: walkable is in the node definition, not in item groups
|
||||
if minetest.registered_nodes[n_bottom.name] and
|
||||
(minetest.get_item_group(n.name, "float") == 0 or
|
||||
minetest.registered_nodes[n_bottom.name].liquidtype == "none") and
|
||||
(n.name ~= n_bottom.name or (minetest.registered_nodes[n_bottom.name].leveled and
|
||||
minetest.get_node_level(p_bottom) < minetest.get_node_max_level(p_bottom))) and
|
||||
(not minetest.registered_nodes[n_bottom.name].walkable or
|
||||
minetest.registered_nodes[n_bottom.name].buildable_to) then
|
||||
if delay then
|
||||
minetest.after(0.1, caverealms.nodeupdate_single, {x=p.x, y=p.y, z=p.z}, false)
|
||||
else
|
||||
n.level = minetest.get_node_level(p)
|
||||
minetest.remove_node(p)
|
||||
caverealms:spawn_falling_node(p, n)
|
||||
caverealms:nodeupdate(p)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if minetest.get_item_group(n.name, "attached_node") ~= 0 then
|
||||
if not caverealms:check_attached_node(p, n) then
|
||||
caverealms:drop_attached_node(p)
|
||||
caverealms:nodeupdate(p)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function caverealms:nodeupdate(p, delay)
|
||||
-- Round p to prevent falling entities to get stuck
|
||||
p.x = math.floor(p.x+0.5)
|
||||
p.y = math.floor(p.y+0.5)
|
||||
p.z = math.floor(p.z+0.5)
|
||||
|
||||
for x = -1,1 do
|
||||
for y = -1,1 do
|
||||
for z = -1,1 do
|
||||
caverealms:nodeupdate_single({x=p.x+x, y=p.y+y, z=p.z+z}, delay or not (x==0 and y==0 and z==0))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,351 +0,0 @@
|
||||
-- CaveRealms nodes.lua
|
||||
|
||||
--NODES--
|
||||
|
||||
local FALLING_ICICLES = caverealms.config.falling_icicles --true --toggle to turn on or off falling icicles in glaciated biome
|
||||
local FALLCHA = caverealms.config.fallcha --0.33 --chance of causing the structure to fall
|
||||
|
||||
|
||||
--glowing crystal
|
||||
minetest.register_node("caverealms:glow_crystal", {
|
||||
description = "Glow Crystal",
|
||||
tiles = {"caverealms_glow_crystal.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 13,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
--glowing emerald
|
||||
minetest.register_node("caverealms:glow_emerald", {
|
||||
description = "Glow Emerald",
|
||||
tiles = {"caverealms_glow_emerald.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 13,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
--glowing mese crystal blocks
|
||||
minetest.register_node("caverealms:glow_mese", {
|
||||
description = "Mese Crystal Block",
|
||||
tiles = {"caverealms_glow_mese.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 13,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
--embedded crystal
|
||||
minetest.register_node("caverealms:glow_ore", {
|
||||
description = "Glow Crystal Ore",
|
||||
tiles = {"caverealms_glow_ore.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 12,
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
--embedded emerald
|
||||
minetest.register_node("caverealms:glow_emerald_ore", {
|
||||
description = "Glow Emerald Ore",
|
||||
tiles = {"caverealms_glow_emerald_ore.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 12,
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
--thin (transparent) ice
|
||||
minetest.register_node("caverealms:thin_ice", {
|
||||
description = "Thin Ice",
|
||||
tiles = {"caverealms_thin_ice.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
freezemelt = "default:water_source",
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
--alternate version for stalactites
|
||||
minetest.register_node("caverealms:hanging_thin_ice", {
|
||||
description = "Thin Ice (hanging)",
|
||||
tiles = {"caverealms_thin_ice.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
drop = "caverealms:thin_ice",
|
||||
freezemelt = "default:water_flowing",
|
||||
paramtype = "light",
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
if FALLING_ICICLES then
|
||||
if math.random() <= FALLCHA then
|
||||
obj = minetest.add_entity(pos, "caverealms:falling_ice")
|
||||
obj:get_luaentity():set_node(oldnode)
|
||||
for y = -13, 13 do
|
||||
for x = -3, 3 do
|
||||
for z = -3, 3 do
|
||||
local npos = {x=pos.x+x, y=pos.y+y, z=pos.z+z}
|
||||
if minetest.get_node(npos).name == "caverealms:hanging_thin_ice" then
|
||||
nobj = minetest.add_entity(npos, "caverealms:falling_ice")
|
||||
nobj:get_luaentity():set_node(oldnode)
|
||||
minetest.remove_node(npos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
minetest.remove_node(pos)
|
||||
else
|
||||
return 1
|
||||
end
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
--glowing crystal gem
|
||||
local glow_gem_size = { 1.0, 1.2, 1.4, 1.6, 1.7 }
|
||||
|
||||
for i in ipairs(glow_gem_size) do
|
||||
if i == 1 then
|
||||
nodename = "caverealms:glow_gem"
|
||||
else
|
||||
nodename = "caverealms:glow_gem_"..i
|
||||
end
|
||||
|
||||
vs = glow_gem_size[i]
|
||||
|
||||
minetest.register_node(nodename, {
|
||||
description = "Glow Gem",
|
||||
tiles = {"caverealms_glow_gem.png"},
|
||||
inventory_image = "caverealms_glow_gem.png",
|
||||
wield_image = "caverealms_glow_gem.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 12,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = vs,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5*vs, -0.5*vs, -0.5*vs, 0.5*vs, -5/16*vs, 0.5*vs},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
--upward pointing icicle
|
||||
minetest.register_node("caverealms:icicle_up", {
|
||||
description = "Icicle",
|
||||
tiles = {"caverealms_icicle_up.png"},
|
||||
inventory_image = "caverealms_icicle_up.png",
|
||||
wield_image = "caverealms_icicle_up.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 8,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
--downward pointing icicle
|
||||
minetest.register_node("caverealms:icicle_down", {
|
||||
description = "Icicle",
|
||||
tiles = {"caverealms_icicle_down.png"},
|
||||
inventory_image = "caverealms_icicle_down.png",
|
||||
wield_image = "caverealms_icicle_down.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 8,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
--cave mossy cobble - bluish?
|
||||
minetest.register_node("caverealms:stone_with_moss", {
|
||||
description = "Cave Stone with Moss",
|
||||
tiles = {"default_cobble.png^caverealms_moss.png", "default_cobble.png", "default_cobble.png^caverealms_moss_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, soil=1},
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
--cave lichen-covered cobble - purple-ish
|
||||
minetest.register_node("caverealms:stone_with_lichen", {
|
||||
description = "Cave Stone with Lichen",
|
||||
tiles = {"default_cobble.png^caverealms_lichen.png", "default_cobble.png", "default_cobble.png^caverealms_lichen_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, soil=1},
|
||||
drop = 'default:cobble',
|
||||
light_source = 2,
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
--cave algae-covered cobble - yellow-ish
|
||||
minetest.register_node("caverealms:stone_with_algae", {
|
||||
description = "Cave Stone with Algae",
|
||||
tiles = {"default_cobble.png^caverealms_algae.png", "default_cobble.png", "default_cobble.png^caverealms_algae_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, soil=1},
|
||||
light_source = 2,
|
||||
paramtype = "light",
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
--glow worms
|
||||
minetest.register_node("caverealms:glow_worm", {
|
||||
description = "Glow Worms",
|
||||
tiles = {"caverealms_glow_worm.png"},
|
||||
inventory_image = "caverealms_glow_worm.png",
|
||||
wield_image = "caverealms_glow_worm.png",
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=3},
|
||||
light_source = 9,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.5, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
--cave plants go here
|
||||
|
||||
--glowing fungi
|
||||
minetest.register_node("caverealms:fungus", {
|
||||
description = "Glowing Fungus",
|
||||
tiles = {"caverealms_fungi.png"},
|
||||
inventory_image = "caverealms_fungi.png",
|
||||
wield_image = "caverealms_fungi.png",
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=3},
|
||||
light_source = 5,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
--mycena mushroom
|
||||
minetest.register_node("caverealms:mycena", {
|
||||
description = "Mycena Mushroom",
|
||||
tiles = {"caverealms_mycena.png"},
|
||||
inventory_image = "caverealms_mycena.png",
|
||||
wield_image = "caverealms_mycena.png",
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=3},
|
||||
light_source = 8,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
--giant mushroom
|
||||
--stem
|
||||
minetest.register_node("caverealms:mushroom_stem", {
|
||||
description = "Giant Mushroom Stem",
|
||||
tiles = {"caverealms_mushroom_stem.png"},
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=1},
|
||||
})
|
||||
|
||||
--cap
|
||||
minetest.register_node("caverealms:mushroom_cap", {
|
||||
description = "Giant Mushroom Cap",
|
||||
tiles = {"caverealms_mushroom_cap.png"},
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=1},
|
||||
})
|
||||
|
||||
--gills
|
||||
minetest.register_node("caverealms:mushroom_gills", {
|
||||
description = "Giant Mushroom Gills",
|
||||
tiles = {"caverealms_mushroom_gills.png"},
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=1},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
local obsidian_glow = {7, 5, 2, 0}
|
||||
|
||||
for i in ipairs(obsidian_glow) do
|
||||
if i == 1 then
|
||||
nodename = "caverealms:obsidian"
|
||||
else
|
||||
nodename = "caverealms:obsidian_" .. i
|
||||
end
|
||||
minetest.register_node(nodename, {
|
||||
description = "Obsidian",
|
||||
tiles = {"default_obsidian.png"},
|
||||
is_ground_content = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
groups = {
|
||||
cracky=1, level=2, not_in_creative_inventory = 1
|
||||
},
|
||||
light_source = obsidian_glow[i],
|
||||
drop = "default:obsidian",
|
||||
paramtype = "light",
|
||||
})
|
||||
end
|
Before Width: | Height: | Size: 971 B |
Before Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 735 B |
Before Width: | Height: | Size: 714 B |
Before Width: | Height: | Size: 686 B |
Before Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 756 B |
Before Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 533 B |
Before Width: | Height: | Size: 947 B |
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 451 B |
Before Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 290 B |
Before Width: | Height: | Size: 870 B |
26
caverealms_lite/LICENSE.txt
Normal file
@ -0,0 +1,26 @@
|
||||
Copyright (c) 2017, Craig Robbins and contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
31
caverealms_lite/README.md
Normal file
@ -0,0 +1,31 @@
|
||||
# caverealms-lite
|
||||
|
||||
Based on the original minetest-caverealms mod (https://github.com/HeroOfTheWinds/minetest-caverealms/).
|
||||
|
||||
Adds underground realms to minetest.
|
||||
|
||||
This caverealms fork provides all the biomes and decorations from the original caverealms, with several additions and without the overhead of generating caves. This lowers the server resources the mod requires, for example CPU and RAM. This also removes the large lava spills created by the original caverealms.
|
||||
|
||||
It is specifically written to work with the mgvalleys mapgen, but will work using other mapgens as well. The mapgen used will determine the shape and size of individual caves. Mapgens that generate only smaller caves may be less suitable for use with this fork than mgvalleys.
|
||||
|
||||
Note: For worlds where the original caverealms is already in use, this fork is not advised as a replacement. If used in this way, some unknown nodes and other minor issues should be expected.
|
||||
|
||||
|
||||
## License and Contributors
|
||||
|
||||
Source code: FreeBSD License (Simplified)
|
||||
The original caverealms was licensed as WTFPL.
|
||||
|
||||
Contributors:
|
||||
- Zeno, Shara RedCat - This rewrite
|
||||
- HeroOfTheWinds, Zeno - Original mod
|
||||
|
||||
|
||||
## Recommended Additions
|
||||
|
||||
- VanessaE's HDX texturepacks provide alternative textures. For example,
|
||||
https://gitlab.com/VanessaE/hdx-128.
|
||||
- ethereal mod unlocks additional content (https://notabug.org/tenplus1/ethereal).
|
||||
- mobs_monster mod allows Dungeon Masters to spawn in the Dungeon Master's Lair biome (https://notabug.org/tenplus1/mobs_monster).
|
||||
- mobs_redo is required to run mobs_monster (https://notabug.org/tenplus1/mobs_redo).
|
||||
- abritorch adds coloured torches made with caverealms items (https://github.com/Ezhh/abritorch).
|
@ -1,4 +1,3 @@
|
||||
|
||||
local CONFIG_FILE_PREFIX = "caverealms."
|
||||
|
||||
caverealms.config = {}
|
||||
@ -22,26 +21,33 @@ end
|
||||
|
||||
--generation settings
|
||||
setting("number", "ymin", -33000) --bottom realm limit
|
||||
setting("number", "ymax", -700) --top realm limit
|
||||
setting("number", "tcave", 0.5) --cave threshold
|
||||
setting("number", "deepcaves_ymax", -10000) -- depth when deepcave biomes start
|
||||
setting("number", "deepdeepcaves_ymax", -20000)
|
||||
|
||||
--falling icicles
|
||||
setting("bool", "falling_icicles", true) --enable/disable falling icicles
|
||||
setting("number", "fallcha", 0.33) --chance of icicles falling when dug
|
||||
setting("number", "ymax", -1500) --top realm limit
|
||||
setting("number", "tcave", 0.75) --cave threshold
|
||||
|
||||
--decoration chances
|
||||
setting("number", "stagcha", 0.002) --chance of stalagmites
|
||||
setting("number", "stagcha", 0.003) --chance of stalagmites
|
||||
setting("number", "stalcha", 0.003) --chance of stalactites
|
||||
setting("number", "h_lag", 15) --max height for stalagmites
|
||||
setting("number", "h_lac", 20) --...stalactites
|
||||
setting("number", "crystal", 0.007) --chance of glow crystal formations
|
||||
setting("number", "h_cry", 9) --max height of glow crystals
|
||||
setting("number", "h_clac", 13) --max height of glow crystal stalactites
|
||||
|
||||
setting("number", "h_lag", 8) --max height for stalagmites
|
||||
setting("number", "h_lac", 8) --...stalactites
|
||||
setting("number", "crystal", 0.0002) --chance of glow crystal formations
|
||||
setting("number", "h_cry", 8) --max height of glow crystals
|
||||
setting("number", "h_clac", 8) --max height of glow crystal stalactites
|
||||
|
||||
setting("number", "gemcha", 0.03) --chance of small glow gems
|
||||
setting("number", "mushcha", 0.04) --chance of mushrooms
|
||||
setting("number", "myccha", 0.03) --chance of mycena mushrooms
|
||||
setting("number", "wormcha", 0.02) --chance of glow worms
|
||||
setting("number", "wormcha", 0.015) --chance of glow worms
|
||||
setting("number", "giantcha", 0.001) --chance of giant mushrooms
|
||||
setting("number", "icicha", 0.035) --chance of icicles
|
||||
setting("number", "flacha", 0.04) --chance of constant flames
|
||||
|
||||
--realm limits for Dungeon Masters' Lair
|
||||
setting("number", "dm_top", -14000) --upper limit
|
||||
setting("number", "dm_bot", -16000) --lower limit
|
||||
|
||||
--should DMs spawn in DM Lair?
|
||||
setting("bool", "dm_spawn", true)
|
||||
|
||||
--Deep cave settings
|
||||
setting("number", "deep_cave", -7000) -- upper limit
|
145
caverealms_lite/crafting.lua
Normal file
@ -0,0 +1,145 @@
|
||||
--thin ice to water
|
||||
minetest.register_craft({
|
||||
output = "default:water_source",
|
||||
type = "shapeless",
|
||||
recipe = {"caverealms:thin_ice"}
|
||||
})
|
||||
|
||||
--use for coal dust
|
||||
minetest.register_craft({
|
||||
output = "default:coalblock",
|
||||
recipe = {
|
||||
{"caverealms:coal_dust","caverealms:coal_dust","caverealms:coal_dust"},
|
||||
{"caverealms:coal_dust","caverealms:coal_dust","caverealms:coal_dust"},
|
||||
{"caverealms:coal_dust","caverealms:coal_dust","caverealms:coal_dust"}
|
||||
}
|
||||
})
|
||||
|
||||
-- DM statue
|
||||
minetest.register_craft({
|
||||
output = "caverealms:dm_statue",
|
||||
recipe = {
|
||||
{"caverealms:glow_ore","caverealms:hot_cobble","caverealms:glow_ore"},
|
||||
{"caverealms:hot_cobble","caverealms:hot_cobble","caverealms:hot_cobble"},
|
||||
{"caverealms:hot_cobble","caverealms:hot_cobble","caverealms:hot_cobble"}
|
||||
}
|
||||
})
|
||||
|
||||
-- Glow obsidian brick
|
||||
minetest.register_craft({
|
||||
output = "caverealms:glow_obsidian_brick 4",
|
||||
recipe = {
|
||||
{"caverealms:glow_obsidian", "caverealms:glow_obsidian"},
|
||||
{"caverealms:glow_obsidian", "caverealms:glow_obsidian"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "caverealms:glow_obsidian_brick_2 4",
|
||||
recipe = {
|
||||
{"caverealms:glow_obsidian_2", "caverealms:glow_obsidian_2"},
|
||||
{"caverealms:glow_obsidian_2", "caverealms:glow_obsidian_2"}
|
||||
}
|
||||
})
|
||||
|
||||
-- Glow obsidian glass
|
||||
minetest.register_craft({
|
||||
output = "caverealms:glow_obsidian_glass 5",
|
||||
recipe = {
|
||||
{"default:glass", "default:glass", "default:glass"},
|
||||
{"default:glass", "default:glass", "caverealms:glow_obsidian"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "caverealms:glow_obsidian_glass 5",
|
||||
recipe = {
|
||||
{"default:glass", "default:glass", "default:glass"},
|
||||
{"default:glass", "default:glass", "caverealms:glow_obsidian_2"}
|
||||
}
|
||||
})
|
||||
|
||||
-- Requires ethereal:fish_raw
|
||||
if minetest.get_modpath("ethereal") then
|
||||
|
||||
-- Professional Fishing Rod
|
||||
minetest.register_craftitem("caverealms:angler_rod", {
|
||||
description = "Pro Fishing Rod",
|
||||
inventory_image = "caverealms_angler_rod.png",
|
||||
wield_image = "caverealms_angler_rod.png"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "caverealms:angler_rod",
|
||||
recipe = {
|
||||
{"","","default:steel_ingot"},
|
||||
{"", "default:steel_ingot", "caverealms:mushroom_gills"},
|
||||
{"default:steel_ingot", "", "caverealms:mushroom_gills"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Glow Bait
|
||||
minetest.register_craftitem("caverealms:glow_bait", {
|
||||
description = "Glow Bait",
|
||||
inventory_image = "caverealms_glow_bait.png",
|
||||
wield_image = "caverealms_glow_bait.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "caverealms:glow_bait 9",
|
||||
recipe = {
|
||||
{"caverealms:glow_worm_green"},
|
||||
}
|
||||
})
|
||||
|
||||
-- default ethereal fish
|
||||
local fish = {
|
||||
{"ethereal:fish_raw"},
|
||||
}
|
||||
|
||||
-- Pro Fishing Rod (Baited)
|
||||
minetest.register_craftitem("caverealms:angler_rod_baited", {
|
||||
description = "Baited Pro Fishing Rod",
|
||||
inventory_image = "caverealms_angler_rod_baited.png",
|
||||
wield_image = "caverealms_angler_rod_weild.png",
|
||||
stack_max = 1,
|
||||
liquids_pointable = true,
|
||||
|
||||
on_use = function (itemstack, user, pointed_thing)
|
||||
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local node = minetest.get_node(pointed_thing.under).name
|
||||
|
||||
if (node == "default:water_source"
|
||||
or node == "default:river_water_source")
|
||||
and math.random(1, 100) < 35 then
|
||||
|
||||
local type = fish[math.random(1, #fish)][1]
|
||||
local inv = user:get_inventory()
|
||||
|
||||
if inv:room_for_item("main", {name = type}) then
|
||||
|
||||
inv:add_item("main", {name = type})
|
||||
|
||||
if (math.random() < 0.6) then
|
||||
return ItemStack("caverealms:angler_rod_baited")
|
||||
else
|
||||
return ItemStack("caverealms:angler_rod")
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(user:get_player_name(),
|
||||
"Inventory full, Fish Got Away!")
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "caverealms:angler_rod_baited",
|
||||
recipe = {"caverealms:angler_rod", "caverealms:glow_bait"},
|
||||
})
|
||||
end
|
4
caverealms_lite/depends.txt
Normal file
@ -0,0 +1,4 @@
|
||||
default
|
||||
stairs
|
||||
ethereal?
|
||||
mobs?
|
1
caverealms_lite/description.txt
Normal file
@ -0,0 +1 @@
|
||||
A mod for Minetest to add underground realms.
|
19
caverealms_lite/docs/caverealms_lite_biomes.txt
Normal file
@ -0,0 +1,19 @@
|
||||
Biome #, Biome name, "floor node"
|
||||
|
||||
|
||||
0, None
|
||||
1, Moss, "caverealms:stone_with_moss"
|
||||
2, Fungal, "caverealms:stone_with_lichen"
|
||||
3, Algae, "caverealms:stone_with_algae"
|
||||
4, Glaciated, "caverealms:thin_ice"
|
||||
|
||||
The following are "deep realms"
|
||||
|
||||
5, Deep Glaciated, "default:ice"
|
||||
6, DM, "caverealms:hot_cobble"
|
||||
7, Salt Crystal, "caverealms:stone_with_salt"
|
||||
8, Glow Obsidian, "caverealms:glow_obsidian"
|
||||
OR "caverealms:glow_obsidian2"
|
||||
9, Coal, "default:coalblock"
|
||||
OR "caverealms:coal_dust"
|
||||
OR "default:desert_sand"
|
16
caverealms_lite/dungeon_master.lua
Normal file
@ -0,0 +1,16 @@
|
||||
mobs:spawn({
|
||||
name = "mobs_monster:dungeon_master",
|
||||
nodes = {"caverealms:hot_cobble"},
|
||||
max_light = 12,
|
||||
min_light = 0,
|
||||
chance = 7000,
|
||||
active_object_count = 2,
|
||||
max_height = -8000,
|
||||
on_spawn = function(self, pos)
|
||||
self.hp_max = 70
|
||||
self.health = 70
|
||||
self.damage = 5
|
||||
self.shoot_interval = 1.5
|
||||
self.dogshoot_switch = 0
|
||||
end
|
||||
})
|
@ -1,7 +1,3 @@
|
||||
--CaveRealms functions.lua
|
||||
|
||||
--FUNCTIONS--
|
||||
|
||||
local H_LAG = caverealms.config.h_lag --15 --max height for stalagmites
|
||||
local H_LAC = caverealms.config.h_lac --20 --...stalactites
|
||||
local H_CRY = caverealms.config.h_cry --9 --max height of glow crystals
|
||||
@ -9,6 +5,7 @@ local H_CLAC = caverealms.config.h_clac --13 --max height of glow crystal stalac
|
||||
|
||||
function caverealms:above_solid(x,y,z,area,data)
|
||||
local c_air = minetest.get_content_id("air")
|
||||
|
||||
local ai = area:index(x,y+1,z-3)
|
||||
if data[ai] == c_air then
|
||||
return false
|
||||
@ -16,8 +13,10 @@ function caverealms:above_solid(x,y,z,area,data)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
function caverealms:below_solid(x,y,z,area,data)
|
||||
local c_air = minetest.get_content_id("air")
|
||||
|
||||
local ai = area:index(x,y-1,z-3)
|
||||
if data[ai] == c_air then
|
||||
return false
|
||||
@ -117,15 +116,12 @@ function caverealms:crystal_stalagmite(x,y,z, area, data, biome)
|
||||
local c_emore = minetest.get_content_id("caverealms:glow_emerald_ore")
|
||||
local c_mesecry = minetest.get_content_id("caverealms:glow_mese")
|
||||
local c_meseore = minetest.get_content_id("default:stone_with_mese")
|
||||
local c_ruby = minetest.get_content_id("caverealms:glow_ruby")
|
||||
local c_rubore = minetest.get_content_id("caverealms:glow_ruby_ore")
|
||||
local c_ameth = minetest.get_content_id("caverealms:glow_amethyst")
|
||||
local c_amethore = minetest.get_content_id("caverealms:glow_amethyst_ore")
|
||||
local c_ice = minetest.get_content_id("default:ice")
|
||||
local c_thinice = minetest.get_content_id("caverealms:thin_ice")
|
||||
local c_obsidian = {
|
||||
minetest.get_content_id("caverealms:obsidian"),
|
||||
minetest.get_content_id("caverealms:obsidian_2"),
|
||||
minetest.get_content_id("caverealms:obsidian_3"),
|
||||
minetest.get_content_id("caverealms:obsidian_4"),
|
||||
}
|
||||
local c_embers = minetest.get_content_id("fake_fire:embers");
|
||||
|
||||
--for randomness
|
||||
local mode = 1
|
||||
@ -139,7 +135,7 @@ function caverealms:crystal_stalagmite(x,y,z, area, data, biome)
|
||||
mode = 1
|
||||
end
|
||||
end
|
||||
if biome > 4 then
|
||||
if biome == 4 or biome == 5 then
|
||||
if math.random(3) == 1 then
|
||||
mode = 2
|
||||
end
|
||||
@ -149,40 +145,34 @@ function caverealms:crystal_stalagmite(x,y,z, area, data, biome)
|
||||
{ {c_crystore, c_crystal}, {c_emore, c_emerald} },
|
||||
{ {c_emore, c_emerald}, {c_crystore, c_crystal} },
|
||||
{ {c_emore, c_emerald}, {c_meseore, c_mesecry} },
|
||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}}
|
||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
|
||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
|
||||
{ {c_rubore, c_ruby}, {c_meseore, c_mesecry}},
|
||||
{ {c_crystore, c_crystal}, {c_rubore, c_ruby} },
|
||||
{ {c_rubore, c_ruby}, {c_emore, c_emerald}},
|
||||
{ {c_amethore, c_ameth}, {c_meseore, c_mesecry} },
|
||||
}
|
||||
|
||||
local nid_a
|
||||
local nid_b
|
||||
local nid_s = c_stone --stone base, will be rewritten to ice in certain biomes
|
||||
|
||||
local hell = false
|
||||
|
||||
if biome > 3 then
|
||||
if biome == 6 then
|
||||
nid_s = c_obsidian[math.random(1, #c_obsidian)]
|
||||
biome = 1
|
||||
hell = true
|
||||
if biome > 3 and biome < 6 then
|
||||
if mode == 1 then
|
||||
nid_a = c_ice
|
||||
nid_b = c_thinice
|
||||
nid_s = c_ice
|
||||
else
|
||||
if mode == 1 then
|
||||
nid_s = c_ice
|
||||
end
|
||||
biome = 4
|
||||
end
|
||||
end
|
||||
|
||||
if (hell) then
|
||||
nid_a = c_embers
|
||||
nid_b = c_embers
|
||||
else
|
||||
if mode == 1 then
|
||||
nid_a = stalids[biome][1][1]
|
||||
nid_b = stalids[biome][1][2]
|
||||
else
|
||||
nid_a = stalids[biome][2][1]
|
||||
nid_b = stalids[biome][2][2]
|
||||
end
|
||||
end
|
||||
nid_a = c_crystore
|
||||
nid_b = c_crystal
|
||||
end
|
||||
elseif mode == 1 then
|
||||
nid_a = stalids[biome][1][1]
|
||||
nid_b = stalids[biome][1][2]
|
||||
else
|
||||
nid_a = stalids[biome][2][1]
|
||||
nid_b = stalids[biome][2][2]
|
||||
end
|
||||
|
||||
local top = math.random(5,H_CRY) --grab a random height for the stalagmite
|
||||
for j = 0, top do --y
|
||||
@ -227,15 +217,12 @@ function caverealms:crystal_stalactite(x,y,z, area, data, biome)
|
||||
local c_emore = minetest.get_content_id("caverealms:glow_emerald_ore")
|
||||
local c_mesecry = minetest.get_content_id("caverealms:glow_mese")
|
||||
local c_meseore = minetest.get_content_id("default:stone_with_mese")
|
||||
local c_ruby = minetest.get_content_id("caverealms:glow_ruby")
|
||||
local c_rubore = minetest.get_content_id("caverealms:glow_ruby_ore")
|
||||
local c_ameth = minetest.get_content_id("caverealms:glow_amethyst")
|
||||
local c_amethore = minetest.get_content_id("caverealms:glow_amethyst_ore")
|
||||
local c_ice = minetest.get_content_id("default:ice")
|
||||
local c_thinice = minetest.get_content_id("caverealms:hanging_thin_ice")
|
||||
local c_obsidian = {
|
||||
minetest.get_content_id("caverealms:obsidian"),
|
||||
minetest.get_content_id("caverealms:obsidian_2"),
|
||||
minetest.get_content_id("caverealms:obsidian_3"),
|
||||
minetest.get_content_id("caverealms:obsidian_4"),
|
||||
minetest.get_content_id("caverealms:obsidian_5"),
|
||||
}
|
||||
|
||||
--for randomness
|
||||
local mode = 1
|
||||
@ -259,26 +246,28 @@ function caverealms:crystal_stalactite(x,y,z, area, data, biome)
|
||||
{ {c_crystore, c_crystal}, {c_emore, c_emerald} },
|
||||
{ {c_emore, c_emerald}, {c_crystore, c_crystal} },
|
||||
{ {c_emore, c_emerald}, {c_meseore, c_mesecry} },
|
||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}}
|
||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
|
||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
|
||||
{ {c_rubore, c_ruby}, {c_meseore, c_mesecry}},
|
||||
{ {c_crystore, c_crystal}, {c_rubore, c_ruby} },
|
||||
{ {c_rubore, c_ruby}, {c_emore, c_emerald}},
|
||||
{ {c_amethore, c_ameth}, {c_meseore, c_mesecry} },
|
||||
}
|
||||
|
||||
local nid_a
|
||||
local nid_b
|
||||
local nid_s = c_stone --stone base, will be rewritten to ice in certain biomes
|
||||
|
||||
if biome > 3 then
|
||||
if biome == 6 then
|
||||
nid_s = c_obsidian[math.random(1, #c_obsidian)]
|
||||
biome = 1
|
||||
if biome > 3 and biome < 6 then
|
||||
if mode == 1 then
|
||||
nid_a = c_ice
|
||||
nid_b = c_thinice
|
||||
nid_s = c_ice
|
||||
else
|
||||
if mode == 1 then
|
||||
nid_s = c_ice
|
||||
end
|
||||
biome = 4
|
||||
end
|
||||
end
|
||||
|
||||
if mode == 1 then
|
||||
nid_a = c_crystore
|
||||
nid_b = c_crystal
|
||||
end
|
||||
elseif mode == 1 then
|
||||
nid_a = stalids[biome][1][1]
|
||||
nid_b = stalids[biome][1][2]
|
||||
else
|
||||
@ -314,6 +303,51 @@ function caverealms:crystal_stalactite(x,y,z, area, data, biome)
|
||||
end
|
||||
end
|
||||
|
||||
--glowing crystal stalagmite spawner
|
||||
function caverealms:salt_stalagmite(x,y,z, area, data, biome)
|
||||
|
||||
if not caverealms:below_solid(x,y,z,area,data) then
|
||||
return
|
||||
end
|
||||
|
||||
--contest ids
|
||||
local c_stone = minetest.get_content_id("default:stone")
|
||||
local c_salt = minetest.get_content_id("caverealms:salt_crystal")
|
||||
|
||||
local scale = math.random(2, 4)
|
||||
if scale == 2 then
|
||||
for j = -3, 3 do
|
||||
for k = -3, 3 do
|
||||
local vi = area:index(x+j, y, z+k)
|
||||
data[vi] = c_stone
|
||||
if math.abs(j) ~= 3 and math.abs(k) ~= 3 then
|
||||
local vi = area:index(x+j, y+1, z+k)
|
||||
data[vi] = c_stone
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
for j = -4, 4 do
|
||||
for k = -4, 4 do
|
||||
local vi = area:index(x+j, y, z+k)
|
||||
data[vi] = c_stone
|
||||
if math.abs(j) ~= 4 and math.abs(k) ~= 4 then
|
||||
local vi = area:index(x+j, y+1, z+k)
|
||||
data[vi] = c_stone
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for j = 2, scale + 2 do --y
|
||||
for k = -2, scale - 2 do
|
||||
for l = -2, scale - 2 do
|
||||
local vi = area:index(x+k, y+j, z+l)
|
||||
data[vi] = c_salt -- make cube
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--function to create giant 'shrooms
|
||||
function caverealms:giant_shroom(x, y, z, area, data)
|
||||
|
||||
@ -321,9 +355,18 @@ function caverealms:giant_shroom(x, y, z, area, data)
|
||||
return
|
||||
end
|
||||
|
||||
local c_cap
|
||||
local c_stem
|
||||
|
||||
--as usual, grab the content ID's
|
||||
local c_stem = minetest.get_content_id("caverealms:mushroom_stem")
|
||||
local c_cap = minetest.get_content_id("caverealms:mushroom_cap")
|
||||
if minetest.get_modpath("ethereal") then
|
||||
c_stem = minetest.get_content_id("ethereal:mushroom_trunk")
|
||||
c_cap = minetest.get_content_id("ethereal:mushroom")
|
||||
else
|
||||
c_stem = minetest.get_content_id("caverealms:mushroom_stem")
|
||||
c_cap = minetest.get_content_id("caverealms:mushroom_cap")
|
||||
end
|
||||
|
||||
local c_gills = minetest.get_content_id("caverealms:mushroom_gills")
|
||||
|
||||
z = z - 5
|
||||
@ -364,43 +407,3 @@ function caverealms:giant_shroom(x, y, z, area, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function caverealms:legacy_giant_shroom(x, y, z, area, data) --leftovers :P
|
||||
--as usual, grab the content ID's
|
||||
local c_stem = minetest.get_content_id("caverealms:mushroom_stem")
|
||||
local c_cap = minetest.get_content_id("caverealms:mushroom_cap")
|
||||
|
||||
z = z - 4
|
||||
--cap
|
||||
for k = -4, 4 do
|
||||
for l = -4, 4 do
|
||||
if k*k + l*l <= 16 then
|
||||
local vi = area:index(x+k, y+5, z+l)
|
||||
data[vi] = c_cap
|
||||
end
|
||||
if k*k + l*l <= 9 then
|
||||
local vi = area:index(x+k, y+4, z+l)
|
||||
data[vi] = c_cap
|
||||
vi = area:index(x+k, y+6, z+l)
|
||||
data[vi] = c_cap
|
||||
end
|
||||
if k*k + l*l <= 4 then
|
||||
local vi = area:index(x+k, y+7, z+l)
|
||||
data[vi] = c_cap
|
||||
end
|
||||
end
|
||||
end
|
||||
--stem
|
||||
for j = 0, 4 do
|
||||
for k = -1,1 do
|
||||
local vi = area:index(x+k, y+j, z)
|
||||
data[vi] = c_stem
|
||||
if k == 0 then
|
||||
local ai = area:index(x, y+j, z+1)
|
||||
data[ai] = c_stem
|
||||
ai = area:index(x, y+j, z-1)
|
||||
data[ai] = c_stem
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -1,10 +1,3 @@
|
||||
-- caverealms v.0.3 by HeroOfTheWinds
|
||||
-- original cave code modified from paramat's subterrain
|
||||
-- For Minetest 0.4.8 stable
|
||||
-- Depends default
|
||||
-- License: code WTFPL
|
||||
|
||||
|
||||
caverealms = {} --create a container for functions and constants
|
||||
|
||||
--grab a shorthand for the filepath of the mod
|
||||
@ -15,18 +8,18 @@ dofile(modpath.."/config.lua") --configuration file; holds various constants
|
||||
dofile(modpath.."/crafting.lua") --crafting recipes
|
||||
dofile(modpath.."/nodes.lua") --node definitions
|
||||
dofile(modpath.."/functions.lua") --function definitions
|
||||
dofile(modpath.."/plants.lua")
|
||||
|
||||
if caverealms.config.falling_icicles == true then
|
||||
dofile(modpath.."/falling_ice.lua") --complicated function for falling icicles
|
||||
print("[caverealms] falling icicles enabled.")
|
||||
if minetest.get_modpath("mobs_monster") then
|
||||
if caverealms.config.dm_spawn == true then
|
||||
dofile(modpath.."/dungeon_master.lua") --special DMs for DM's Lair biome
|
||||
end
|
||||
end
|
||||
|
||||
-- Parameters
|
||||
|
||||
local YMIN = caverealms.config.ymin -- Approximate realm limits.
|
||||
local YMAX = caverealms.config.ymax
|
||||
local DEEPCAVES_YMAX = caverealms.config.deepcaves_ymax
|
||||
local DEEP_DEEP_CAVES_YMAZ = caverealms.config.deepdeepcaves_ymax
|
||||
local TCAVE = caverealms.config.tcave --0.5 -- Cave threshold. 1 = small rare caves, 0.5 = 1/3rd ground volume, 0 = 1/2 ground volume
|
||||
local BLEND = 128 -- Cave blend distance near YMIN, YMAX
|
||||
|
||||
@ -39,35 +32,18 @@ local MYCCHA = caverealms.config.myccha --0.03 --chance of mycena mushrooms
|
||||
local WORMCHA = caverealms.config.wormcha --0.03 --chance of glow worms
|
||||
local GIANTCHA = caverealms.config.giantcha --0.001 -- chance of giant mushrooms
|
||||
local ICICHA = caverealms.config.icicha --0.035 -- chance of icicles
|
||||
local FLACHA = caverealms.config.flacha --0.04 --chance of constant flames
|
||||
|
||||
-- 3D noise for caves
|
||||
|
||||
local np_cave = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = {x=512, y=256, z=512}, -- squashed 2:1
|
||||
seed = 59033,
|
||||
octaves = 6,
|
||||
persist = 0.63
|
||||
}
|
||||
|
||||
-- 3D noise for wave
|
||||
|
||||
local np_wave = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = {x=256, y=256, z=256},
|
||||
seed = -400000000089,
|
||||
octaves = 3,
|
||||
persist = 0.67
|
||||
}
|
||||
local DM_TOP = caverealms.config.dm_top -- -4000 --level at which Dungeon Master Realms start to appear
|
||||
local DM_BOT = caverealms.config.dm_bot -- -5000 --level at which "" ends
|
||||
local DEEP_CAVE = caverealms.config.deep_cave -- -7000 --level at which deep cave biomes take over
|
||||
|
||||
-- 2D noise for biome
|
||||
|
||||
local np_biome = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = {x=250, y=250, z=250},
|
||||
spread = {x=200, y=200, z=200},
|
||||
seed = 9130,
|
||||
octaves = 3,
|
||||
persist = 0.5
|
||||
@ -77,8 +53,6 @@ local np_biome = {
|
||||
|
||||
subterrain = {}
|
||||
|
||||
local yblmin = YMIN + BLEND * 1.5
|
||||
local yblmax = YMAX - BLEND * 1.5
|
||||
|
||||
-- On generated function
|
||||
|
||||
@ -89,180 +63,150 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
end
|
||||
|
||||
--easy reference to commonly used values
|
||||
--local t1 = os.clock()
|
||||
local t1 = os.clock()
|
||||
local x1 = maxp.x
|
||||
local y1 = maxp.y
|
||||
local z1 = maxp.z
|
||||
local x0 = minp.x
|
||||
local y0 = minp.y
|
||||
local z0 = minp.z
|
||||
|
||||
|
||||
--print ("[caverealms] chunk minp ("..x0.." "..y0.." "..z0..")") --tell people you are generating a chunk
|
||||
|
||||
|
||||
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
||||
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
|
||||
local data = vm:get_data()
|
||||
|
||||
|
||||
--grab content IDs
|
||||
local c_air = minetest.get_content_id("air")
|
||||
local c_stone = minetest.get_content_id("default:stone")
|
||||
|
||||
local c_water = minetest.get_content_id("default:water_source")
|
||||
local c_lava = minetest.get_content_id("default:lava_source")
|
||||
local c_lava_flowing = minetest.get_content_id("default:lava_flowing")
|
||||
local c_ice = minetest.get_content_id("default:ice")
|
||||
local c_thinice = minetest.get_content_id("caverealms:thin_ice")
|
||||
local c_crystal = minetest.get_content_id("caverealms:glow_crystal")
|
||||
local c_gem1 = minetest.get_content_id("caverealms:glow_gem")
|
||||
local c_gem2 = minetest.get_content_id("caverealms:glow_gem_2")
|
||||
local c_gem3 = minetest.get_content_id("caverealms:glow_gem_3")
|
||||
local c_gem4 = minetest.get_content_id("caverealms:glow_gem_4")
|
||||
local c_gem5 = minetest.get_content_id("caverealms:glow_gem_5")
|
||||
local c_gem = minetest.get_content_id("caverealms:glow_gem")
|
||||
local c_saltgem = minetest.get_content_id("caverealms:salt_gem")
|
||||
local c_spike = minetest.get_content_id("caverealms:spike")
|
||||
local c_moss = minetest.get_content_id("caverealms:stone_with_moss")
|
||||
local c_lichen = minetest.get_content_id("caverealms:stone_with_lichen")
|
||||
local c_algae = minetest.get_content_id("caverealms:stone_with_algae")
|
||||
local c_salt = minetest.get_content_id("caverealms:stone_with_salt")
|
||||
local c_hcobble = minetest.get_content_id("caverealms:hot_cobble")
|
||||
local c_gobsidian = minetest.get_content_id("caverealms:glow_obsidian")
|
||||
local c_gobsidian2 = minetest.get_content_id("caverealms:glow_obsidian_2")
|
||||
local c_coalblock = minetest.get_content_id("default:coalblock")
|
||||
local c_desand = minetest.get_content_id("default:desert_sand")
|
||||
local c_coaldust = minetest.get_content_id("caverealms:coal_dust")
|
||||
local c_fungus = minetest.get_content_id("caverealms:fungus")
|
||||
local c_mycena = minetest.get_content_id("caverealms:mycena")
|
||||
local c_worm = minetest.get_content_id("caverealms:glow_worm")
|
||||
local c_worm_green = minetest.get_content_id("caverealms:glow_worm_green")
|
||||
local c_fire_vine = minetest.get_content_id("caverealms:fire_vine")
|
||||
local c_iciu = minetest.get_content_id("caverealms:icicle_up")
|
||||
local c_icid = minetest.get_content_id("caverealms:icicle_down")
|
||||
local c_coal_block = minetest.get_content_id("default:coalblock")
|
||||
local c_diamond_block = minetest.get_content_id("default:diamondblock")
|
||||
|
||||
|
||||
local c_obsidian = {
|
||||
minetest.get_content_id("caverealms:obsidian"),
|
||||
minetest.get_content_id("caverealms:obsidian_2"),
|
||||
minetest.get_content_id("caverealms:obsidian_3"),
|
||||
minetest.get_content_id("caverealms:obsidian_4"),
|
||||
}
|
||||
|
||||
local allow_deep_cave_biomes = false
|
||||
if minp.y <= DEEPCAVES_YMAX then
|
||||
allow_deep_cave_biomes = true
|
||||
end
|
||||
|
||||
local c_hard_rock
|
||||
if minetest.get_modpath("morestones") then
|
||||
if (minp.y <= DEEP_DEEP_CAVES_YMAZ) then
|
||||
c_hard_rock = minetest.get_content_id("morestones:travertine")
|
||||
else
|
||||
c_hard_rock = minetest.get_content_id("morestones:comendite")
|
||||
end
|
||||
elseif minetest.get_modpath("gloopblocks") then
|
||||
c_hard_rock = minetest.get_content_id("default:basalt")
|
||||
else
|
||||
c_hard_rock = minetest.get_content_id("default:stone_with_diamond")
|
||||
end
|
||||
|
||||
|
||||
local deep_cave_shell_type = math.random()
|
||||
|
||||
local c_flame = minetest.get_content_id("caverealms:constant_flame")
|
||||
|
||||
--mandatory values
|
||||
local sidelen = x1 - x0 + 1 --length of a mapblock
|
||||
local chulens = {x=sidelen, y=sidelen, z=sidelen} --table of chunk edges
|
||||
local chulens2D = {x=sidelen, y=sidelen, z=1}
|
||||
local minposxyz = {x=x0, y=y0, z=z0} --bottom corner
|
||||
local minposxz = {x=x0, y=z0} --2D bottom corner
|
||||
|
||||
local nvals_cave = minetest.get_perlin_map(np_cave, chulens):get3dMap_flat(minposxyz) --cave noise for structure
|
||||
local nvals_wave = minetest.get_perlin_map(np_wave, chulens):get3dMap_flat(minposxyz) --wavy structure of cavern ceilings and floors
|
||||
local nvals_biome = minetest.get_perlin_map(np_biome, chulens):get2dMap_flat({x=x0+150, y=z0+50}) --2D noise for biomes (will be 3D humidity/temp later)
|
||||
|
||||
|
||||
local nvals_biome = minetest.get_perlin_map(np_biome, chulens2D):get2dMap_flat({x=x0+150, y=z0+50}) --2D noise for biomes (will be 3D humidity/temp later)
|
||||
|
||||
local nixyz = 1 --3D node index
|
||||
local nixz = 1 --2D node index
|
||||
local nixyz2 = 1 --second 3D index for second loop
|
||||
|
||||
|
||||
|
||||
for z = z0, z1 do -- for each xy plane progressing northwards
|
||||
--structure loop
|
||||
for y = y0, y1 do -- for each x row progressing upwards
|
||||
local tcave --declare variable
|
||||
--determine the overal cave threshold
|
||||
if y < yblmin then
|
||||
tcave = TCAVE + ((yblmin - y) / BLEND) ^ 2
|
||||
elseif y > yblmax then
|
||||
tcave = TCAVE + ((y - yblmax) / BLEND) ^ 2
|
||||
else
|
||||
tcave = TCAVE
|
||||
end
|
||||
local vi = area:index(x0, y, z) --current node index
|
||||
for x = x0, x1 do -- for each node do
|
||||
if (nvals_cave[nixyz] + nvals_wave[nixyz])/2 > tcave then --if node falls within cave threshold
|
||||
data[vi] = c_air --hollow it out to make the cave
|
||||
end
|
||||
--increment indices
|
||||
nixyz = nixyz + 1
|
||||
vi = vi + 1
|
||||
end
|
||||
end
|
||||
--increment indices
|
||||
nixyz = nixyz + 1
|
||||
|
||||
|
||||
--decoration loop
|
||||
for y = y0, y1 do -- for each x row progressing upwards
|
||||
local tcave --same as above
|
||||
if y < yblmin then
|
||||
tcave = TCAVE + ((yblmin - y) / BLEND) ^ 2
|
||||
elseif y > yblmax then
|
||||
tcave = TCAVE + ((y - yblmax) / BLEND) ^ 2
|
||||
else
|
||||
tcave = TCAVE
|
||||
|
||||
local c_selected_worm = c_worm
|
||||
|
||||
local is_deep = false
|
||||
if y < DEEP_CAVE then
|
||||
is_deep = true
|
||||
end
|
||||
|
||||
|
||||
local vi = area:index(x0, y, z)
|
||||
for x = x0, x1 do -- for each node do
|
||||
|
||||
|
||||
--determine biome
|
||||
local biome = false --preliminary declaration
|
||||
n_biome = nvals_biome[nixz] --make an easier reference to the noise
|
||||
local biome = 0 --preliminary declaration
|
||||
local n_biome = nvals_biome[nixz] --make an easier reference to the noise
|
||||
|
||||
--compare noise values to determine a biome
|
||||
if n_biome >= 0 and n_biome < 0.5 then
|
||||
if allow_deep_cave_biomes then --and n_biome >= 0.25 then
|
||||
biome = 6 -- obsidian
|
||||
if n_biome <= -0.5 then
|
||||
if is_deep and n_biome <= -0.25 then
|
||||
biome = 8 --glow obsidian
|
||||
else
|
||||
biome = 2 --fungal
|
||||
c_selected_worm = c_worm_green
|
||||
end
|
||||
|
||||
elseif n_biome < 0 then
|
||||
biome = 0 -- none
|
||||
|
||||
elseif n_biome < 0.5 then
|
||||
if is_deep and n_biome <= 0.25 then
|
||||
biome = 7 --salt crystal
|
||||
else
|
||||
biome = 1 --moss
|
||||
end
|
||||
elseif n_biome <= -0.5 then
|
||||
biome = 2 --fungal
|
||||
elseif n_biome >= 0.5 then
|
||||
if n_biome >= 0.7 then
|
||||
biome = 5 -- deep glaciated
|
||||
|
||||
elseif n_biome < 0.65 then
|
||||
biome = 0
|
||||
|
||||
elseif n_biome < 0.85 then
|
||||
if is_deep and n_biome <= 0.75 then
|
||||
biome = 9 --coal dust
|
||||
else
|
||||
biome = 4 -- glaciated
|
||||
biome = 3 --algae
|
||||
c_selected_worm = c_worm_green
|
||||
end
|
||||
|
||||
else
|
||||
biome = 3 --algae
|
||||
if is_deep and n_biome <= .95 then
|
||||
biome = 5 --deep glaciated
|
||||
else
|
||||
biome = 4 --glaciated
|
||||
end
|
||||
end
|
||||
|
||||
if math.floor(((nvals_cave[nixyz2] + nvals_wave[nixyz2])/2)*100) == math.floor(tcave*100) then
|
||||
--print(biome)
|
||||
|
||||
if biome > 0 then
|
||||
if y <= DM_TOP and y >= DM_BOT then
|
||||
biome = 6 --DUNGEON MASTER'S LAIR
|
||||
c_selected_worm = c_fire_vine
|
||||
end
|
||||
|
||||
--ceiling
|
||||
local ai = area:index(x,y+1,z) --above index
|
||||
if data[ai] == c_stone and data[vi] == c_air then --ceiling
|
||||
if biome == 6 then
|
||||
if deep_cave_shell_type > 0.65 then
|
||||
data[ai] = c_obsidian[math.random(1, #c_obsidian)]
|
||||
data[vi] = c_obsidian[math.random(1, #c_obsidian)]
|
||||
elseif deep_cave_shell_type > 0.35 then
|
||||
data[ai] = c_coal_block
|
||||
data[vi] = c_coal_block
|
||||
elseif deep_cave_shell_type > 0.15 then
|
||||
data[ai] = c_hard_rock
|
||||
data[vi] = c_hard_rock
|
||||
else
|
||||
data[ai] = c_diamond_block
|
||||
data[vi] = c_diamond_block
|
||||
end
|
||||
end
|
||||
|
||||
if math.random() < ICICHA and (biome == 4 or biome == 5) then
|
||||
data[vi] = c_icid
|
||||
end
|
||||
if math.random() < WORMCHA then
|
||||
data[vi] = c_worm
|
||||
data[vi] = c_selected_worm
|
||||
local bi = area:index(x,y-1,z)
|
||||
data[bi] = c_worm
|
||||
data[bi] = c_selected_worm
|
||||
if math.random(2) == 1 then
|
||||
local bbi = area:index(x,y-2,z)
|
||||
data[bbi] = c_worm
|
||||
data[bbi] = c_selected_worm
|
||||
if math.random(2) ==1 then
|
||||
local bbbi = area:index(x,y-3,z)
|
||||
data[bbbi] = c_worm
|
||||
data[bbbi] = c_selected_worm
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -281,13 +225,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
if biome == 1 then
|
||||
data[vi] = c_moss
|
||||
if math.random() < GEMCHA then
|
||||
-- gems of random size
|
||||
local gems = { c_gem1, c_gem2, c_gem3, c_gem4, c_gem5 }
|
||||
local gidx = math.random(1, 12)
|
||||
if gidx > 5 then
|
||||
gidx = 1
|
||||
end
|
||||
data[ai] = gems[gidx]
|
||||
data[ai] = c_gem
|
||||
end
|
||||
elseif biome == 2 then
|
||||
data[vi] = c_lichen
|
||||
@ -317,25 +255,56 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
data[ai] = c_iciu
|
||||
end
|
||||
elseif biome == 6 then
|
||||
local bi = area:index(x,y-1,z)
|
||||
if deep_cave_shell_type > 0.65 then
|
||||
data[bi] = c_obsidian[math.random(1, #c_obsidian)]
|
||||
data[vi] = c_obsidian[math.random(1, #c_obsidian)]
|
||||
elseif deep_cave_shell_type > 0.35 then
|
||||
data[bi] = c_coal_block
|
||||
data[vi] = c_coal_block
|
||||
else
|
||||
data[bi] = c_hard_rock
|
||||
data[vi] = c_hard_rock
|
||||
data[vi] = c_hcobble
|
||||
if math.random() < FLACHA then --neverending flames
|
||||
data[ai] = c_flame
|
||||
end
|
||||
elseif biome == 7 then
|
||||
local bi = area:index(x,y-1,z)
|
||||
data[vi] = c_salt
|
||||
data[bi] = c_salt
|
||||
if math.random() < GEMCHA then
|
||||
data[ai] = c_saltgem
|
||||
end
|
||||
if math.random() < STAGCHA then
|
||||
caverealms:salt_stalagmite(x,y,z, area, data)
|
||||
end
|
||||
elseif biome == 8 then
|
||||
local bi = area:index(x,y-1,z)
|
||||
if math.random() < 0.5 then
|
||||
data[vi] = c_gobsidian
|
||||
data[bi] = c_gobsidian
|
||||
else
|
||||
data[vi] = c_gobsidian2
|
||||
data[bi] = c_gobsidian2
|
||||
end
|
||||
if math.random() < FLACHA then --neverending flames
|
||||
data[ai] = c_flame
|
||||
end
|
||||
elseif biome == 9 then
|
||||
local bi = area:index(x,y-1,z)
|
||||
if math.random() < 0.05 then
|
||||
data[vi] = c_coalblock
|
||||
data[bi] = c_coalblock
|
||||
elseif math.random() < 0.15 then
|
||||
data[vi] = c_coaldust
|
||||
data[bi] = c_coaldust
|
||||
else
|
||||
data[vi] = c_desand
|
||||
data[bi] = c_desand
|
||||
end
|
||||
if math.random() < FLACHA * 0.75 then --neverending flames
|
||||
data[ai] = c_flame
|
||||
end
|
||||
if math.random() < GEMCHA then
|
||||
data[ai] = c_spike
|
||||
end
|
||||
else
|
||||
print("[caverealms] Unknown cave biome")
|
||||
end
|
||||
|
||||
if math.random() < STAGCHA then
|
||||
caverealms:stalagmite(x,y,z, area, data)
|
||||
end
|
||||
if math.random() < CRYSTAL or (biome == 6 and math.random() < CRYSTAL*1.5) then
|
||||
if math.random() < CRYSTAL then
|
||||
caverealms:crystal_stalagmite(x,y,z, area, data, biome)
|
||||
end
|
||||
end
|
||||
@ -356,11 +325,9 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
vm:set_lighting({day=0, night=0})
|
||||
vm:calc_lighting()
|
||||
--write it to world
|
||||
vm:write_to_map()
|
||||
vm:write_to_map(data)
|
||||
|
||||
--local chugent = math.ceil((os.clock() - t1) * 1000) --grab how long it took
|
||||
--print ("[caverealms] "..chugent.." ms") --tell people how long
|
||||
end)
|
||||
|
||||
|
||||
print("[caverealms] loaded!")
|
1
caverealms_lite/mod.conf
Normal file
@ -0,0 +1 @@
|
||||
name = caverealms
|
528
caverealms_lite/nodes.lua
Normal file
@ -0,0 +1,528 @@
|
||||
--glowing crystal
|
||||
minetest.register_node("caverealms:glow_crystal", {
|
||||
description = "Glow Sapphire",
|
||||
tiles = {"caverealms_glow_crystal.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 13,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
--glowing emerald
|
||||
minetest.register_node("caverealms:glow_emerald", {
|
||||
description = "Glow Emerald",
|
||||
tiles = {"caverealms_glow_emerald.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 13,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
--glowing mese crystal blocks
|
||||
minetest.register_node("caverealms:glow_mese", {
|
||||
description = "Glow Mese Crystal",
|
||||
tiles = {"caverealms_glow_mese.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 13,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
--glowing ruby
|
||||
minetest.register_node("caverealms:glow_ruby", {
|
||||
description = "Glow Ruby",
|
||||
tiles = {"caverealms_glow_ruby.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 13,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
--glowing amethyst
|
||||
minetest.register_node("caverealms:glow_amethyst", {
|
||||
description = "Glow Amethyst",
|
||||
tiles = {"caverealms_glow_amethyst.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 13,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
--embedded crystal
|
||||
minetest.register_node("caverealms:glow_ore", {
|
||||
description = "Glow Crystal Ore",
|
||||
tiles = {"caverealms_glow_ore.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
--embedded emerald
|
||||
minetest.register_node("caverealms:glow_emerald_ore", {
|
||||
description = "Glow Emerald Ore",
|
||||
tiles = {"caverealms_glow_emerald_ore.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
--embedded ruby
|
||||
minetest.register_node("caverealms:glow_ruby_ore", {
|
||||
description = "Glow Ruby Ore",
|
||||
tiles = {"caverealms_glow_ruby_ore.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
--embedded amethyst
|
||||
minetest.register_node("caverealms:glow_amethyst_ore", {
|
||||
description = "Glow Amethyst Ore",
|
||||
tiles = {"caverealms_glow_amethyst_ore.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
--thin (transparent) ice
|
||||
minetest.register_node("caverealms:thin_ice", {
|
||||
description = "Thin Ice",
|
||||
tiles = {"caverealms_thin_ice.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
freezemelt = "default:water_source",
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
--salt crystal
|
||||
minetest.register_node("caverealms:salt_crystal", {
|
||||
description = "Salt Crystal",
|
||||
tiles = {"caverealms_salt_crystal.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 11,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
--glowing crystal gem
|
||||
minetest.register_node("caverealms:glow_gem", {
|
||||
description = "Glow Gem",
|
||||
tiles = {"caverealms_glow_gem.png"},
|
||||
inventory_image = "caverealms_glow_gem.png",
|
||||
wield_image = "caverealms_glow_gem.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 1, attached_node = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 11,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 0.75,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
}
|
||||
})
|
||||
|
||||
--glowing salt gem
|
||||
minetest.register_node("caverealms:salt_gem", {
|
||||
description = "Salt Gem",
|
||||
tiles = {"caverealms_salt_gem.png"},
|
||||
inventory_image = "caverealms_salt_gem.png",
|
||||
wield_image = "caverealms_salt_gem.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 1, attached_node = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 11,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 0.75,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
}
|
||||
})
|
||||
|
||||
--stone spike
|
||||
minetest.register_node("caverealms:spike", {
|
||||
description = "Stone Spike",
|
||||
tiles = {"caverealms_spike.png"},
|
||||
inventory_image = "caverealms_spike.png",
|
||||
wield_image = "caverealms_spike.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 1, attached_node = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
light_source = 3,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 0.75,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
--upward pointing icicle
|
||||
minetest.register_node("caverealms:icicle_up", {
|
||||
description = "Icicle",
|
||||
tiles = {"caverealms_icicle_up.png"},
|
||||
inventory_image = "caverealms_icicle_up.png",
|
||||
wield_image = "caverealms_icicle_up.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 8,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
--downward pointing icicle
|
||||
minetest.register_node("caverealms:icicle_down", {
|
||||
description = "Icicle",
|
||||
tiles = {"caverealms_icicle_down.png"},
|
||||
inventory_image = "caverealms_icicle_down.png",
|
||||
wield_image = "caverealms_icicle_down.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
light_source = 8,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, 7/16, -0.5, 0.5, 0.5, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
--cave mossy cobble - bluish?
|
||||
minetest.register_node("caverealms:stone_with_moss", {
|
||||
description = "Cave Stone with Moss",
|
||||
tiles = {"default_cobble.png^caverealms_moss.png", "default_cobble.png", "default_cobble.png^caverealms_moss_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=1, cracky=3},
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
--cave lichen-covered cobble - purple-ish
|
||||
minetest.register_node("caverealms:stone_with_lichen", {
|
||||
description = "Cave Stone with Lichen",
|
||||
tiles = {"default_cobble.png^caverealms_lichen.png", "default_cobble.png", "default_cobble.png^caverealms_lichen_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=1, cracky=3},
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
--cave algae-covered cobble - yellow-ish
|
||||
minetest.register_node("caverealms:stone_with_algae", {
|
||||
description = "Cave Stone with Algae",
|
||||
tiles = {"default_cobble.png^caverealms_algae.png", "default_cobble.png", "default_cobble.png^caverealms_algae_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=1, cracky=3},
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
--tiny-salt-crystal-covered cobble - pink-ish
|
||||
minetest.register_node("caverealms:stone_with_salt", {
|
||||
description = "Salt Crystal",
|
||||
tiles = {"caverealms_salty2.png"},
|
||||
light_source = 9,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = true,
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
--Hot Cobble - cobble with lava instead of mortar XD
|
||||
minetest.register_node("caverealms:hot_cobble", {
|
||||
description = "Hot Cobble",
|
||||
tiles = {"caverealms_hot_cobble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1, hot=1, unbreakable = 1},
|
||||
damage_per_second = 1,
|
||||
light_source = 3,
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="default_stone_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
--Glow Obsidian
|
||||
minetest.register_node("caverealms:glow_obsidian", {
|
||||
description = "Glowing Obsidian",
|
||||
tiles = {"caverealms_glow_obsidian.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1, level=2},
|
||||
light_source = 7,
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="default_stone_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
--Glow Obsidian 2 - has traces of lava
|
||||
minetest.register_node("caverealms:glow_obsidian_2", {
|
||||
description = "Hot Glowing Obsidian",
|
||||
tiles = {"caverealms_glow_obsidian2.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1, hot=1, level=2},
|
||||
light_source = 9,
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="default_stone_footstep", gain=0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
--Glow Obsidian Bricks
|
||||
minetest.register_node("caverealms:glow_obsidian_brick", {
|
||||
description = "Glow Obsidian Brick",
|
||||
tiles = {"caverealms_glow_obsidian_brick.png"},
|
||||
light_source = 7,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("caverealms:glow_obsidian_brick_2", {
|
||||
description = "Glow Obsidian Brick",
|
||||
tiles = {"caverealms_glow_obsidian_brick_2.png"},
|
||||
light_source = 9,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--Glow Obsidian Stairs/Slabs
|
||||
stairs.register_stair_and_slab(
|
||||
"glow_obsidian_brick",
|
||||
"caverealms:glow_obsidian_brick",
|
||||
{cracky = 1, level = 2},
|
||||
{"caverealms_glow_obsidian_brick.png"},
|
||||
"Glow Obsidian Brick Stair",
|
||||
"Glow Obsidian Brick Slab",
|
||||
default.node_sound_stone_defaults())
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"glow_obsidian_brick_2",
|
||||
"caverealms:glow_obsidian_brick_2",
|
||||
{cracky = 1, level = 2},
|
||||
{"caverealms_glow_obsidian_brick_2.png"},
|
||||
"Glow Obsidian Brick Stair",
|
||||
"Glow Obsidian Brick Slab",
|
||||
default.node_sound_stone_defaults())
|
||||
|
||||
--Glow Obsidian Glass
|
||||
minetest.register_node("caverealms:glow_obsidian_glass", {
|
||||
description = "Glow Obsidian Glass",
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"caverealms_glow_obsidian_glass.png", "default_obsidian_glass_detail.png"},
|
||||
paramtype = "light",
|
||||
light_source = 13,
|
||||
sunlight_propagates = true,
|
||||
groups = {cracky = 3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
--Coal Dust
|
||||
minetest.register_node("caverealms:coal_dust", {
|
||||
description = "Coal Dust",
|
||||
tiles = {"caverealms_coal_dust.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, falling_node=1, sand=1},
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
--glow worms
|
||||
minetest.register_node("caverealms:glow_worm", {
|
||||
description = "Blue Glow Worms",
|
||||
tiles = {"caverealms_glow_worm.png"},
|
||||
inventory_image = "caverealms_glow_worm.png",
|
||||
wield_image = "caverealms_glow_worm.png",
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=3},
|
||||
light_source = 9,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("caverealms:glow_worm_green", {
|
||||
description = "Green Glow Worms",
|
||||
tiles = {"caverealms_glow_worm_green.png"},
|
||||
inventory_image = "caverealms_glow_worm_green.png",
|
||||
wield_image = "caverealms_glow_worm_green.png",
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand=3},
|
||||
light_source = 9,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("caverealms:fire_vine", {
|
||||
description = "Fire Vine",
|
||||
tiles = {"caverealms_fire_vine.png"},
|
||||
inventory_image = "caverealms_fire_vine.png",
|
||||
wield_image = "caverealms_fire_vine.png",
|
||||
is_ground_content = true,
|
||||
damage_per_second = 1,
|
||||
groups = {oddly_breakable_by_hand=3},
|
||||
light_source = 9,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
--define special flame so that it does not expire
|
||||
minetest.register_node("caverealms:constant_flame", {
|
||||
description = "Fire",
|
||||
drawtype = "plantlike",
|
||||
tiles = {{
|
||||
name="fire_basic_flame_animated.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1},
|
||||
}},
|
||||
inventory_image = "fire_basic_flame.png",
|
||||
light_source = 14,
|
||||
groups = {igniter=2, dig_immediate=3, hot=3, not_in_creative_inventory=1},
|
||||
paramtype = "light",
|
||||
drop = '',
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
damage_per_second = 4,
|
||||
})
|
||||
|
||||
--dungeon master statue (nodebox)
|
||||
minetest.register_node("caverealms:dm_statue", {
|
||||
description = "Dungeon Master Statue",
|
||||
tiles = {
|
||||
"caverealms_dm_stone.png",
|
||||
"caverealms_dm_stone.png",
|
||||
"caverealms_dm_stone.png",
|
||||
"caverealms_dm_stone.png",
|
||||
"caverealms_dm_stone.png",
|
||||
"caverealms_stone_eyes.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=2},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, -- NodeBox1
|
||||
{-0.25, -0.125, -0.1875, 0.25, 0.5, 0.1875}, -- NodeBox2
|
||||
{-0.375, 0, -0.125, -0.25, 0.4375, 0.125}, -- NodeBox3
|
||||
{0.25, 0.125, -0.4375, 0.375, 0.375, 0.1875}, -- NodeBox4
|
||||
{-0.25, -0.5, -0.125, -0.125, -0.125, 0.125}, -- NodeBox5
|
||||
{0.125, -0.3125, -0.125, 0.25, 0, 0.125}, -- NodeBox6
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "regular"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Compatibility
|
||||
minetest.register_alias("caverealms:hanging_thin_ice", "caverealms:thin_ice")
|
||||
|
||||
minetest.register_alias("caverealms:spike_2", "caverealms:spike")
|
||||
minetest.register_alias("caverealms:spike_3", "caverealms:spike")
|
||||
minetest.register_alias("caverealms:spike_4", "caverealms:spike")
|
||||
minetest.register_alias("caverealms:spike_5", "caverealms:spike")
|
||||
|
||||
minetest.register_alias("caverealms:salt_gem_2", "caverealms:salt_gem")
|
||||
minetest.register_alias("caverealms:salt_gem_3", "caverealms:salt_gem")
|
||||
minetest.register_alias("caverealms:salt_gem_4", "caverealms:salt_gem")
|
||||
minetest.register_alias("caverealms:salt_gem_5", "caverealms:salt_gem")
|
||||
|
||||
minetest.register_alias("caverealms:glow_gem_2", "caverealms:glow_gem")
|
||||
minetest.register_alias("caverealms:glow_gem_3", "caverealms:glow_gem")
|
||||
minetest.register_alias("caverealms:glow_gem_4", "caverealms:glow_gem")
|
||||
minetest.register_alias("caverealms:glow_gem_5", "caverealms:glow_gem")
|
||||
|
||||
minetest.register_alias("caverealms:obsidian", "default:obsidian")
|
||||
minetest.register_alias("caverealms:obsidian_1", "default:obsidian")
|
||||
minetest.register_alias("caverealms:obsidian_2", "default:obsidian")
|
||||
minetest.register_alias("caverealms:obsidian_3", "default:obsidian")
|
||||
minetest.register_alias("caverealms:obsidian_4", "default:obsidian")
|
188
caverealms_lite/plants.lua
Normal file
@ -0,0 +1,188 @@
|
||||
-- Lichen biome
|
||||
|
||||
-- glowing fungi
|
||||
minetest.register_node("caverealms:fungus", {
|
||||
description = "Glowing Fungus",
|
||||
tiles = {"caverealms_fungi.png"},
|
||||
inventory_image = "caverealms_fungi.png",
|
||||
wield_image = "caverealms_fungi.png",
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand = 3, attached_node = 1},
|
||||
light_source = 5,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
-- mycena mushroom
|
||||
minetest.register_node("caverealms:mycena", {
|
||||
description = "Mycena Mushroom",
|
||||
tiles = {"caverealms_mycena.png"},
|
||||
inventory_image = "caverealms_mycena.png",
|
||||
wield_image = "caverealms_mycena.png",
|
||||
is_ground_content = true,
|
||||
groups = {oddly_breakable_by_hand = 3, attached_node = 1},
|
||||
light_source = 6,
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
visual_scale = 1.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
-- giant mushroom
|
||||
if minetest.get_modpath("ethereal") then
|
||||
minetest.register_alias("caverealms:mushroom_cap", "ethereal:mushroom")
|
||||
minetest.register_alias("caverealms:mushroom_stem", "ethereal:mushroom_trunk")
|
||||
else
|
||||
-- stem
|
||||
minetest.register_node("caverealms:mushroom_stem", {
|
||||
description = "Giant Mushroom Stem",
|
||||
tiles = {"caverealms_mushroom_stem.png"},
|
||||
is_ground_content = true,
|
||||
groups = {choppy=2, oddly_breakable_by_hand=1},
|
||||
})
|
||||
|
||||
-- cap
|
||||
minetest.register_node("caverealms:mushroom_cap", {
|
||||
description = "Giant Mushroom Cap",
|
||||
tiles = {"caverealms_mushroom_cap.png"},
|
||||
is_ground_content = true,
|
||||
groups = {choppy=2, oddly_breakable_by_hand=1,},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"caverealms:mushroom_sapling"}, rarity = 20},
|
||||
{items = {"caverealms:mushroom_cap"}}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
-- sapling
|
||||
minetest.register_node("caverealms:mushroom_sapling", {
|
||||
description = "Mushroom Tree Sapling",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"caverealms_mushroom_sapling.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
-- gills
|
||||
minetest.register_node("caverealms:mushroom_gills", {
|
||||
description = "Giant Mushroom Gills",
|
||||
tiles = {"caverealms_mushroom_gills.png"},
|
||||
is_ground_content = true,
|
||||
light_source = 10,
|
||||
groups = {choppy=2, oddly_breakable_by_hand=1},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
|
||||
-- Saplings
|
||||
|
||||
-- grow trees
|
||||
local add_tree = function (pos, ofx, ofy, ofz, schem)
|
||||
if not schem then
|
||||
print ("Schematic not found")
|
||||
return
|
||||
end
|
||||
minetest.swap_node(pos, {name = "air"})
|
||||
minetest.place_schematic(
|
||||
{x = pos.x - ofx, y = pos.y - ofy, z = pos.z - ofz},
|
||||
schem, 0, nil, false)
|
||||
end
|
||||
|
||||
local path = minetest.get_modpath("caverealms").."/schematics/"
|
||||
|
||||
-- giant mushrooms
|
||||
function grow_caverealms_mushroom(pos)
|
||||
add_tree(pos, 5, 0, 5, path .. "shroom.mts")
|
||||
end
|
||||
|
||||
-- height check
|
||||
local function enough_height(pos, height)
|
||||
local nod = minetest.line_of_sight(
|
||||
{x = pos.x, y = pos.y + 1, z = pos.z},
|
||||
{x = pos.x, y = pos.y + height, z = pos.z})
|
||||
if not nod then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Caverealms grow sapling",
|
||||
nodenames = {"ethereal:mushroom_sapling", "caverealms:mushroom_sapling"},
|
||||
interval = 10,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
local light_level = minetest.get_node_light(pos)
|
||||
-- check light level
|
||||
if not light_level or light_level > 10 then
|
||||
return
|
||||
end
|
||||
-- get node under sapling
|
||||
local under = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name
|
||||
-- check if registered
|
||||
if not minetest.registered_nodes[node.name] then
|
||||
return
|
||||
end
|
||||
-- ethereal sapling on lichen stone
|
||||
if node.name == "ethereal:mushroom_sapling"
|
||||
and under == "caverealms:stone_with_lichen"
|
||||
and enough_height(pos, 10) then
|
||||
grow_caverealms_mushroom(pos)
|
||||
-- caverealms sapling on lichen stone
|
||||
elseif node.name == "caverealms:mushroom_sapling"
|
||||
and under == "caverealms:stone_with_lichen"
|
||||
and enough_height(pos, 10) then
|
||||
grow_caverealms_mushroom(pos)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
-- spread moss/lichen/algae to nearby cobblestone
|
||||
minetest.register_abm({
|
||||
label = "Caverealms stone spread",
|
||||
nodenames = {
|
||||
"caverealms:stone_with_moss",
|
||||
"caverealms:stone_with_lichen",
|
||||
"caverealms:stone_with_algae",
|
||||
},
|
||||
neighbors = {"air"},
|
||||
interval = 16,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
local num = minetest.find_nodes_in_area_under_air(
|
||||
{x = pos.x - 1, y = pos.y - 2, z = pos.z - 1},
|
||||
{x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
|
||||
"default:cobble")
|
||||
if #num > 0 then
|
||||
minetest.set_node(num[math.random(#num)], {name = node.name})
|
||||
end
|
||||
end,
|
||||
})
|
BIN
caverealms_lite/schematics/shroom.mts
Normal file
BIN
caverealms_lite/screenshot.png
Normal file
After Width: | Height: | Size: 153 KiB |
BIN
caverealms_lite/textures/caverealms_algae.png
Normal file
After Width: | Height: | Size: 739 B |
BIN
caverealms_lite/textures/caverealms_algae_side.png
Normal file
After Width: | Height: | Size: 446 B |
BIN
caverealms_lite/textures/caverealms_angler_rod.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
caverealms_lite/textures/caverealms_angler_rod_baited.png
Normal file
After Width: | Height: | Size: 273 B |
BIN
caverealms_lite/textures/caverealms_angler_rod_weild.png
Normal file
After Width: | Height: | Size: 260 B |
BIN
caverealms_lite/textures/caverealms_coal_dust.png
Normal file
After Width: | Height: | Size: 288 B |
BIN
caverealms_lite/textures/caverealms_dm_stone.png
Normal file
After Width: | Height: | Size: 590 B |
BIN
caverealms_lite/textures/caverealms_fire_vine.png
Normal file
After Width: | Height: | Size: 554 B |
BIN
caverealms_lite/textures/caverealms_fungi.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
caverealms_lite/textures/caverealms_glow_amethyst.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
caverealms_lite/textures/caverealms_glow_amethyst_ore.png
Normal file
After Width: | Height: | Size: 329 B |
BIN
caverealms_lite/textures/caverealms_glow_bait.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
caverealms_lite/textures/caverealms_glow_crystal.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
caverealms_lite/textures/caverealms_glow_emerald.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
caverealms_lite/textures/caverealms_glow_emerald_ore.png
Normal file
After Width: | Height: | Size: 329 B |
BIN
caverealms_lite/textures/caverealms_glow_gem.png
Normal file
After Width: | Height: | Size: 248 B |
BIN
caverealms_lite/textures/caverealms_glow_mese.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
caverealms_lite/textures/caverealms_glow_obsidian.png
Normal file
After Width: | Height: | Size: 162 B |
BIN
caverealms_lite/textures/caverealms_glow_obsidian2.png
Normal file
After Width: | Height: | Size: 245 B |
BIN
caverealms_lite/textures/caverealms_glow_obsidian_brick.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
caverealms_lite/textures/caverealms_glow_obsidian_brick_2.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
caverealms_lite/textures/caverealms_glow_obsidian_glass.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
caverealms_lite/textures/caverealms_glow_ore.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
caverealms_lite/textures/caverealms_glow_ruby.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
caverealms_lite/textures/caverealms_glow_ruby_ore.png
Normal file
After Width: | Height: | Size: 329 B |
BIN
caverealms_lite/textures/caverealms_glow_worm.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
caverealms_lite/textures/caverealms_glow_worm_green.png
Normal file
After Width: | Height: | Size: 351 B |
BIN
caverealms_lite/textures/caverealms_hot_cobble.png
Normal file
After Width: | Height: | Size: 431 B |
BIN
caverealms_lite/textures/caverealms_icicle_down.png
Normal file
After Width: | Height: | Size: 161 B |
BIN
caverealms_lite/textures/caverealms_icicle_up.png
Normal file
After Width: | Height: | Size: 158 B |