44 Commits

Author SHA1 Message Date
1dbea13f67 fix undeclared local 2021-03-28 15:38:30 -06:00
9b7e71c675 Chasms (#19)
* initial chasms mod

* tweak default chasm settings

* prevent chasms from breaching oil and magma seas, make veinstone actually do something

* overgenerate caverns to eliminate floating stalactites

* make veinstone punchable instead of right-clickable

* ensure dfcaverns get carved before chasms

this has an unfortunate tradeoff. Chasms will no longer have floating giant columns in them, but will also no longer have smaller stalactites and stalagmites. Also will carve chasms through lake water. Not sure if this is ideal.

* add rare big webs to the chasms, to give them a unique feature

* reverse the dependencies for df_caverns and chasms, let chasms go first.

* fix web generator

* add webs to level 3 tunnels, fix sunless sea chasms

* fix up tunnel webs

* make webs snappy

* make webs slightly more prevalent

* add chasms to the guide

* final touch-ups before merging

* allow anchoring against unloaded blocks
2021-03-28 15:20:52 -06:00
0acb3ab09b update use_texture_alpha properties 2021-03-13 02:21:13 -07:00
9a53e49fa8 make primordial gills climbable, make spore trees more likely to produce spawn 2021-03-12 18:29:05 -07:00
ae4d0ebe81 it's been a few months since name_generator's name was changed on contentDB, remove temp backwards compatibility 2021-01-19 22:00:32 -07:00
b6ffd7fc97 made the pit plasma abm much more selective to reduce cpu load 2021-01-16 01:07:48 -07:00
b4a4d54877 Merge pull request #17 from FaceDeer/ground_covers
Ground covers and guardians
2020-12-05 00:56:24 -07:00
7b8c1e547e update subterrane 2020-12-05 00:38:46 -07:00
2b8f808605 since I don't know when contentdb will accept the changed name for namegen, adding support for both names temporarily 2020-12-01 21:54:10 -07:00
d2ed498f45 add a few edibles to the primordial layer 2020-12-01 00:08:38 -07:00
f5954dfdc5 add hunger_ng support 2020-11-30 19:42:00 -07:00
fc2bc52203 Place new ground covers. Also, had to change namegen's name to avoid a collision on ContentDB 2020-11-22 16:30:56 -07:00
dab827bf8f update map colours 2020-11-19 21:29:51 -07:00
9c93d9c4e3 slightly reduce the density of hunter statues 2020-11-19 21:17:50 -07:00
d1cf8927af make statue a bit quieter 2020-11-19 18:35:49 -07:00
0f04fd94e5 png optimize a few more textures 2020-11-19 18:32:19 -07:00
e2d43c466d texture the hunter statue better 2020-11-19 18:28:04 -07:00
3d8508605d more stubbed in translations 2020-11-15 19:07:42 -07:00
82056c0421 moving tree default dependencies into one file (mostly), adding stub translations 2020-11-15 19:06:45 -07:00
9452f69509 move dependencies into one source file for mapitems, stub in some translations 2020-11-15 17:54:56 -07:00
e18174b971 move farming dependencies into one file, add stub translations 2020-11-15 15:37:42 -07:00
212b88b227 centralize node id lookups, add stub translations 2020-11-15 15:25:05 -07:00
b31618e5b0 isolate primordial item default dependencies to one file, add stub translations 2020-11-15 15:06:20 -07:00
92d9cb1399 add statues to underworld mapgen 2020-11-10 21:04:11 -07:00
14fcdd30c6 fix thud sounds 2020-11-10 20:57:45 -07:00
54424710d7 add something nasty to the underworld 2020-11-10 20:51:37 -07:00
5847fa74fc add glowstone veins to the primordial layer, limit fire so the jungles don't become infernos 2020-11-04 18:27:26 -07:00
e6ebf1a14d add new carpet vegetation to some cavern layers 2020-07-11 13:05:33 -06:00
24615891d6 make ground covers spread 2020-02-27 16:43:58 -07:00
703a638360 make footprints more visible 2020-02-27 15:37:00 -07:00
53605f1005 create some new ground cover types 2020-02-27 15:28:47 -07:00
c328f05de4 shut down gas seeps that are close to lava to reduce endless explosions 2020-02-23 12:01:38 -07:00
9370cbbdb4 re-add smoke to torchspines now that smoke underground doesn't last forever 2020-02-23 10:52:57 -07:00
7ddf1ff7cb switch trail mod to footprints mod 2020-02-19 21:07:15 -07:00
947cb72f5a fix the textdomain headers 2020-02-19 13:42:36 -07:00
b519280f1c update translation string formatting, fix a typo in ice sprites 2020-02-19 12:21:59 -07:00
8ce754b234 resort localized strings, add color groups to spindlestem extract 2020-02-19 00:27:24 -07:00
d59bc8d489 switch over to native translation system 2020-02-17 22:36:53 -07:00
a9559bcbcf add vines group to roots and ivy, fuel recipe for plant matter 2020-02-17 18:50:37 -07:00
ad1d03819c update various translation templates 2020-02-16 00:33:21 -07:00
2eaffe6939 add modpack.conf 2020-02-15 23:41:29 -07:00
64020d1384 update readme. There's always *something* you overlook when making a major release 2020-02-13 00:51:29 -07:00
98fb313eb1 Primordial cavern layer (#12)
* bring in the art assets from ClockGen's "better_caves_modpack" under CC BY 4.0,, code written from scratch.

* update mapgen_helper

* import ClockGen's giant mushroom schematics, make them and giant ferns growable

* add giant jungle mushroom, rough out actual cavern layer code framework

* fungal ceiling decorations

* decorate fungal floor a bit

* update mapgen_helper

* update primordial mushroom schematic placement to ensure it fits

* add giant mycelium fungoidal structure

* add giant mycelium to mapgen

* fix settings for giant mycelium

* make mycelium grow when players aren't present

* allow mycelium growth to pause when it hits unloaded areas

* add a use for giant mycelium

* make giant mushrooms edible, make jungle trees growable

* rough out the jungle biome

* Make a spectrum of jungle growth

* optimize pngs, add is_ground_content to everything

* use custom is_ground_content method

* fix a crash with veinstone, and simplify nvals_cave lookup now that overgen covers the same area

* more fixes for overgen support

* remove unintentional airspace from underside of slade

* fix for overgen crash in level 2

* primordial column material, add sealed shafts to underworld

* add seal block

* Set up puzzle seals to be able to dig a staircase shaft through the slade layer. TODO: the puzzle to guard the trigger.

* puzzle seals now fully functional. Need to add clues for decoding the keys next.

* add a small bit of anti-griefing - the seal breach bell only tolls globally 13 times per activation

* add flowers to the underworld warrior bones

* switch to a different key bell

* fancy up the puzzle seal temples with some custom blocks, add sub-slade grid passages

* add a clue to the seal formspec

* tweak background of inscription 2 so it's less obviously a copy of the background for inscription 1

* switch to compositing to save a few bytes

* fancy up the seal's upper surface with inscriptions to make the formspec feel consistent

* puzzle particle, bones were only spawning on top of structures

* fix ice/oil on level 3, tweak some loot probabilities

* add trail mod support

* remove deprecated files

* boost default plant growth delay, add growing selection boxes

* update map colours

* add named waypoints to the underworld

* try a more efficient way of changing the interiors of columns

* polishing up the Primordial layer

* update guide with some Primordial teasers

* updated magma sea screenshot

* update mapgen_helper and subterrane

* reduce density of megaflora a bit - was too hard to walk through

* spreading_dirt_type depends on light, create my own ABM instead

* add names to the glowing pits and some of the ruins

* separate setting for ruin markers

* record identity of slade-breachers

* make mycelia climbable

* update subterrane

* change surface tunnel detection to allow above-ground stalactites and stalagmites

* add rare thicker Goblin Caps, suitable for use as huts.

* better goblin cap schematics

* update colours

* make it slightly harder to dig down through amethyst sheathing of pits

* fixing up fungus light sensitivity, tree growth code

* fix a few minor bugs

* update deprecated functions

* add various eating sounds

* make mapping kit requirement more flexible

* update spindlestem growth code, remove deprecated functions

* fix leftover undefined variable

* add fireflies to primordial, spread out the post-mapgen node timer for plant matter a bit more.

* fix bones formspec

* add lbm to upgrade old bones

* fix slade undiggability

* make torchspines smokey and manually lightable

* fix drop definitions

* generate dry stalactites in near-surface caverns.

* caverns become far too smokey, alas

* add pitter patter of spore tree spores, alternate paper recipe

* new mapgen_helper metrics

* add smokey back to torchspine now that it can be dialed down a bit

* replace glowstone texture with a new animated one

* switch from ABM to node timer for mapgen mycelium growth

* make mapgen mycelium timer delay configurable

* improve the efficiency of giant mycelium growth using flat node array, fewer dereferences

* remove the smoke from torchspines again - it doesn't dissipate that deep underground

* give slade a more muted, gloomy hue to differentiate it from nether stone

* update screenshots with new slade colors

* update mapgen_helper
2020-02-12 23:49:17 -07:00
12919e9a16 Small stuff (#8)
* cave pearls and spindleshrooms (name subject to change) now are things. Not in mapgen yet.

* add the wandering "gas wisp" to light up some of the gas-filled caverns

* make wisps rarely spawned by gas explosions

* revamp spindlestems into a sort of mineral detector, add glowing extract bottles

* optimize pngs

* add gas wisps to mapgen

* add spindlestems to cavern level 1, most level 1 warrens are now lit up

* update internal names, adjust mineral detection range

* add cave pearls to some level 2 warrens and tunnels

* switch experimental simplecrafting_lib support to crafting mod

* Pearls don't grow on falling nodes

* put spindlestems with goblin caps, make them always grow red when near those

* bunch of documentation

* add castle coral to replace cave coral, which has been repurposed into column decoration

* documentation for cave coral, update some locale text

* add a recipe for cooking oil into paraffin

* add old bones to the underworld

* MIT license for bones_loot

* also cook black cap gills into paraffin, they're oily

* add salt crystals to the bloodthorn caverns, illuminating the floor

* documentation for salt crystals

* auto-generate minetestmapper colors.

need to update the spindlestem colours manually

* add spindlestem to fungiwood caverns too, and increase warren coverage

* in anticipation of eventually adding stuff below the Slade, making glowing pit erosion self-limiting.

* add a bit of displacement to the underside of the slade layer

* Unique images and names for cooking recipes.

* revamp bones loot

* add softer footsteps for some fungus types

* update mapgen_helper

* update cave coral screenshot

* mention glowing salts in bloodthorn caverns
2019-08-18 22:20:07 -05:00
332 changed files with 11982 additions and 4293 deletions

View File

@ -16,6 +16,8 @@ Below the Sunless Sea are seas of a more dangerous sort: lakes of oil and the ma
At the very foundation of the world lies an ancient impenetrable realm. There are signs that life once existed here but it is now long gone. Its dead hollows rest on a layer of Slade, a dense material impervious to conventional mining efforts.
Unconventional methods of penetrating the Slade do exist, however. And should it be breached, the exotic Primordial cavern layer can be found beneath.
## Other Features
The giant caverns generated by this mod differ slightly from the default giant caverns found in some mapgens, they use an additional source of noise to generate more ledges and horizontal floors. They also contain stalactites and stalagmites of various sizes - from single-node spikes decorating the default twisty tunnels to mountainous behemoths in the main caverns that can reach tens of meters in diameter and hundreds of meters in height.
@ -34,6 +36,8 @@ Some of the other cave decorations provide dim bioluminescent lighting in some c
The "[doc](https://forum.minetest.net/viewtopic.php?f=9&t=15912&p=240152)" mod is supported to provide in-game documentation for all of the new items and nodes this mod adds.
"[ropes](https://github.com/minetest-mods/ropes)" are very useful for navigating some of the large open spaces this mod provides.
"[ropes](https://github.com/minetest-mods/ropes)" are very useful for navigating some of the large open spaces this mod provides. Some are large enough that a [glider](https://github.com/CBugDCoder/glider) may be well suited.
"[radiant damage](https://github.com/FaceDeer/radiant_damage)" greatly increases the danger of the Magma Sea if heat radiance is enabled, as well as several of the rare crystals in the deeper layers that emit Mese radiation if that damage type is enabled.
"[radiant damage](https://github.com/FaceDeer/radiant_damage)" greatly increases the danger of the Magma Sea if heat radiance is enabled, as well as several of the rare crystals in the deeper layers that emit Mese radiation if that damage type is enabled.
Adding "[named_waypoints](https://github.com/FaceDeer/named_waypoints)" and "[namegen](https://github.com/FaceDeer/namegen)" will provide some landmarks in the Underworld that a player can use to navigate by.

24
big_webs/LICENSE.txt Normal file
View File

@ -0,0 +1,24 @@
Sounds and textures are under various licenses, see the license.txt file in the /sounds and /textures directories for details.
License for Code
----------------
Copyright (C) 2021 FaceDeer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

199
big_webs/init.lua Normal file
View File

@ -0,0 +1,199 @@
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
local default_path = minetest.get_modpath("default")
local get_node_box = function(connector_thickness)
return {
type = "connected",
--fixed = {-hub_thickness,-hub_thickness,-hub_thickness,hub_thickness,hub_thickness,hub_thickness},
connect_top = {-connector_thickness, 0, -connector_thickness, connector_thickness, 0.5, connector_thickness},
connect_bottom = {-connector_thickness, -0.5, -connector_thickness, connector_thickness, 0, connector_thickness},
connect_back = {-connector_thickness, -connector_thickness, 0, connector_thickness, connector_thickness, 0.5},
connect_right = {0, -connector_thickness, -connector_thickness, 0.5, connector_thickness, connector_thickness},
connect_front = {-connector_thickness, -connector_thickness, -0.5, connector_thickness, connector_thickness, 0},
connect_left = {-0.5, -connector_thickness, -connector_thickness, 0, connector_thickness, connector_thickness},
disconnected = {-connector_thickness, -connector_thickness, -connector_thickness, connector_thickness, connector_thickness, connector_thickness},
}
end
local in_anchor_group = function(name)
return
minetest.get_item_group(name, "soil") > 0 or
minetest.get_item_group(name, "stone") > 0 or
minetest.get_item_group(name, "tree") > 0 or
minetest.get_item_group(name, "leaves") > 0 or
minetest.get_item_group(name, "sand") > 0 or
minetest.get_item_group(name, "wood") > 0 or
name == "ignore"
end
local cardinal_directions = {
{x=1,y=0,z=0},
{x=-1,y=0,z=0},
{x=0,y=1,z=0},
{x=0,y=-1,z=0},
{x=0,y=0,z=1},
{x=0,y=0,z=-1}
}
local cardinal_planes = {
{3,5},
{3,5},
{1,5},
{1,5},
{1,3},
{1,3},
}
local insert_if_not_in_hashtable = function(pos, insert_into, if_not_in)
local hash = minetest.hash_node_position(pos)
if if_not_in[hash] then
return
end
table.insert(insert_into, pos)
end
-- flood fill through the web to get all web and anchor locations
local get_web_nodes = function(pos, webs, anchors)
local to_check = {}
table.insert(to_check, pos)
while next(to_check) ~= nil do
local check_pos = table.remove(to_check)
local check_node = minetest.get_node(check_pos)
if minetest.get_item_group(check_node.name, "webbing") > 0 then
webs[minetest.hash_node_position(check_pos)] = true
for _, dir in pairs(cardinal_directions) do
insert_if_not_in_hashtable(vector.add(check_pos, dir), to_check, webs)
end
elseif in_anchor_group(check_node.name) then
anchors[minetest.hash_node_position(check_pos)] = true
end
end
end
local sound
if default_path then
sound = default.node_sound_leaves_defaults()
end
local web_line = function(pos, dir, distance)
local anchored
local web_spine = {}
for i = 0, distance do
local web_pos = vector.add(pos, vector.multiply(dir,i))
local node_name = minetest.get_node(web_pos).name
if node_name == "air" or node_name == "big_webs:webbing" then
table.insert(web_spine, web_pos)
elseif in_anchor_group(node_name) then
anchored=true
break
else
anchored=false
break
end
end
if anchored then
for _, web_pos in pairs(web_spine) do
if math.random() < 0.9 then
minetest.set_node(web_pos, {name="big_webs:webbing"})
end
end
return web_spine
end
return nil
end
local generate_web = function(pos)
local dir_choice = math.random(1, 6)
local dir = cardinal_directions[dir_choice]
local web_spine = web_line(pos, dir, 30)
if web_spine then
local dir2 = cardinal_directions[cardinal_planes[dir_choice][math.random(1, 2)]]
local dir2_opposite = vector.multiply(dir2, -1)
for _, web_pos in pairs(web_spine) do
web_line(web_pos, dir2, 15)
web_line(web_pos, dir2_opposite, 15)
end
end
end
minetest.register_node("big_webs:webbing", {
description = S("Giant Cave Spider Webbing"),
_doc_items_longdesc = S("Thick ropes of sticky, springy silk, strung between cavern walls in hopes of catching bats and even larger beasts."),
_doc_items_usagehelp = S("Webbing can be collected and re-strung elsewhere to aid in climbing. It absorbs all falling damage when you land on it."),
tiles = {
{name="big_webs.png"},
},
use_texture_alpha = "blend",
connects_to = {"group:soil", "group:stone", "group:tree", "group:leaves", "group:sand", "group:wood", "group:webbing"},
connect_sides = { "top", "bottom", "front", "left", "back", "right" },
drawtype = "nodebox",
node_box = get_node_box(0.0625),
collision_box = get_node_box(0.0625),
inventory_image = "big_webs_item.png",
wield_image = "big_webs_item.png",
paramtype = "light",
is_ground_content = false,
climbable = true,
floodable = true,
groups = {snappy = 2, choppy = 2, webbing = 1, flammable=1, fall_damage_add_percent=-100, bouncy=20},
sounds = sound,
on_construct = function(pos)
minetest.get_node_timer(pos):start(30)
end,
on_destruct = function(pos)
for _, dir in pairs(cardinal_directions) do
local neighbor_pos = vector.add(pos, dir)
if minetest.get_item_group(minetest.get_node(neighbor_pos).name, "webbing") > 0 then
minetest.get_node_timer(neighbor_pos):start(30)
end
end
minetest.get_node_timer(pos):stop()
end,
on_timer = function(pos, elapsed)
local webs = {}
local anchors = {}
get_web_nodes(pos, webs, anchors)
local first_anchor = next(anchors)
for hash, _ in pairs(webs) do
local web_pos = minetest.get_position_from_hash(hash)
if first_anchor == nil then
-- unsupported web
minetest.set_node(web_pos, {name="air"})
minetest.item_drop(ItemStack("big_webs:webbing"), nil, web_pos)
end
minetest.get_node_timer(web_pos):stop() -- no need to recheck
end
end,
})
minetest.register_node("big_webs:web_egg", {
description = S("Giant Cave Spider Web Generator"),
tiles = {
{name="big_webs.png"},
},
use_texture_alpha = "blend",
connects_to = {"group:soil", "group:stone", "group:tree", "group:leaves", "group:sand", "group:wood", "group:webbing"},
connect_sides = { "top", "bottom", "front", "left", "back", "right" },
drawtype = "nodebox",
node_box = get_node_box(0.0625),
collision_box = get_node_box(0.0625),
inventory_image = "big_webs_item.png",
wield_image = "big_webs_item.png",
paramtype = "light",
is_ground_content = false,
climbable = true,
floodable = true,
groups = {snappy = 2, choppy = 2, webbing = 1, flammable=1, fall_damage_add_percent=-100, bouncy=20},
sounds = sound,
on_construct = function(pos)
minetest.get_node_timer(pos):start(1)
end,
on_timer = function(pos, elapsed)
minetest.set_node(pos, {name="air"})
generate_web(pos)
end,
})

View File

@ -0,0 +1,12 @@
# textdomain: big_webs
### init.lua ###
Giant Cave Spider Web Generator=
Giant Cave Spider Webbing=
Thick ropes of sticky, springy silk, strung between cavern walls in hopes of catching bats and even larger beasts.=
Webbing can be collected and re-strung elsewhere to aid in climbing. It absorbs all falling damage when you land on it.=

2
big_webs/mod.conf Normal file
View File

@ -0,0 +1,2 @@
name=big_webs
optional_depends=default

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

View File

@ -1,3 +0,0 @@
bones
dungeon_loot?
intllib?

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = minetest.get_translator(minetest.get_current_modname())
local dungeon_loot_path = minetest.get_modpath("dungeon_loot")
@ -106,6 +104,17 @@ bones_loot.get_loot = function(pos, loot_type, max_stacks, exclusive_loot_type)
return items
end
local bones_formspec =
"size[8,9]" ..
"list[current_name;main;0,0.3;8,4;]" ..
"list[current_player;main;0,4.85;8,1;]" ..
"list[current_player;main;0,6.08;8,3;8]" ..
"listring[current_name;main]" ..
"listring[current_player;main]"
if minetest.get_modpath("default") then
bones_formspec = bones_formspec .. default.get_hotbar_bg(0,4.85)
end
bones_loot.place_bones = function(pos, loot_type, max_stacks, infotext, exclusive_loot_type)
minetest.set_node(pos, {name="bones:bones", param2 = math.random(1,4)-1})
local meta = minetest.get_meta(pos)
@ -113,6 +122,7 @@ bones_loot.place_bones = function(pos, loot_type, max_stacks, infotext, exclusiv
infotext = S("Someone's old bones")
end
meta:set_string("infotext", infotext)
meta:set_string("formspec", bones_formspec)
if max_stacks and max_stacks > 0 then
local loot = bones_loot.get_loot(pos, loot_type, max_stacks, exclusive_loot_type)
@ -123,3 +133,15 @@ bones_loot.place_bones = function(pos, loot_type, max_stacks, infotext, exclusiv
end
end
end
minetest.register_lbm({
label = "Repair underworld bones formspec",
name = "bones_loot:repair_underworld_bones_formspec",
nodenames = {"bones:bones"},
action = function(pos, node)
local meta = minetest.get_meta(pos)
if not meta:get("formspec") then
meta:set_string("formspec", bones_formspec)
end
end,
})

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

View File

@ -0,0 +1,7 @@
# textdomain: bones_loot
### init.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Someone's old bones=Jemandes alte Knochen

View File

@ -0,0 +1,7 @@
# textdomain: bones_loot
### init.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Someone's old bones=Le vecchie ossa di qualcuno

View File

@ -1,22 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-07 00:58-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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: bones_loot\init.lua:65
msgid "Someone's old bones"
msgstr ""

View File

@ -0,0 +1,6 @@
# textdomain: bones_loot
### init.lua ###
Someone's old bones=

View File

@ -1,6 +0,0 @@
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
cd ..
set LIST=
for /r %%X in (*.lua) do set LIST=!LIST! %%X
..\..\intllib\tools\xgettext.bat %LIST%

View File

@ -1,4 +1,4 @@
name = bones_loot
description = An API that allows bones to be placed procedurally with randomly generated loot
depends = bones
optional_depends = dungeon_loot, intllib
optional_depends = dungeon_loot, default

21
chasms/LICENSE.txt Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 FaceDeer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

169
chasms/init.lua Normal file
View File

@ -0,0 +1,169 @@
local data = {}
chasms = {}
local maxy = tonumber(minetest.settings:get("chasms_maxy")) or -50
local miny = tonumber(minetest.settings:get("chasms_miny")) or -2500
local falloff = tonumber(minetest.settings:get("chasms_falloff")) or 100
local web_probability = 0.15 -- the chance that a given mapblock will have webbing criss-crossing the chasm
local chasms_threshold = tonumber(minetest.settings:get("chasms_threshold")) or 0.9
local np_chasms_default = {
offset = 0,
scale = 1,
spread = {x = 50, y = 1000, z = 3000},
seed = 94586,
octaves = 2,
persist = 0.63,
lacunarity = 2.0,
}
local np_chasms = minetest.settings:get_np_group("chasms_params") or np_chasms_default
-- For some reason, these numbers are returned as strings by get_np_group.
local tonumberize_params = function(params)
params.scale = tonumber(params.scale)
params.lacunarity = tonumber(params.lacunarity)
params.spread.x = tonumber(params.spread.x)
params.spread.y = tonumber(params.spread.y)
params.spread.z = tonumber(params.spread.z)
params.offset = tonumber(params.offset)
params.persistence = tonumber(params.persistence)
end
tonumberize_params(np_chasms)
local nobj_chasm
local chasm_data = {}
local waver_strength = 8
local waver_vector = {x=waver_strength, y=0, z=0}
local np_waver = {
offset = 0,
scale = waver_strength,
spread = {x = 50, y = 50, z = 50},
seed = 49585,
octaves = 2,
persist = 0.63,
lacunarity = 2.0,
}
local nobj_waver
local waver_data = {}
local minfalloff = miny + falloff
local maxfalloff = maxy - falloff
local get_intensity = function(y)
if y < miny or y > maxy then
return 0
end
if y <= maxfalloff and y >= minfalloff then
return 1
end
if y < minfalloff then
return (y-miny)/falloff
end
-- if y > maxfalloff then
return (maxy-y)/falloff
-- end
end
local c_air = minetest.get_content_id("air")
local c_web
local big_webs_path = minetest.get_modpath("big_webs")
if big_webs_path then
c_web = minetest.get_content_id("big_webs:webbing")
end
local z_displace = 10000
local calculate_web_array = function(minp, maxp)
local seed = math.random()*10000000
math.randomseed(minp.y + z_displace*minp.z) -- use consistent seeds across the x axis
local webs = {}
for count = 1, math.random(5,20) do
local width = math.random(5, 25)
local direction_vertical = math.random() > 0.5
local web_y = math.random(minp.y+8, maxp.y-8)
local web_z = math.random(minp.z+8, maxp.z-8)
for i = -math.floor(width/2), math.ceil(width/2) do
if direction_vertical then
webs[(web_y+i) + web_z*z_displace] = true
else
webs[web_y + (web_z+i)*z_displace] = true
end
end
end
math.randomseed(seed)
return webs
end
minetest.register_on_generated(function(minp, maxp, seed)
if minp.y >= maxy or maxp.y <= miny then
return
end
-- check if webs are present
local webs
local webs_present = false
if big_webs_path then
local seed = math.random()*10000000
math.randomseed(minp.y + z_displace*minp.z) -- use consistent seeds across the x axis
if math.random() < web_probability then
webs_present = true
end
math.randomseed(seed)
end
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
vm:get_data(data)
nobj_chasm = nobj_chasm or minetest.get_perlin_map(np_chasms, {x = emax.x - emin.x + 1 + waver_strength*2, y = emax.y - emin.y + 1, z = emax.z - emin.z + 1})
nobj_chasm:get_3d_map_flat(vector.subtract(emin, waver_vector), chasm_data)
nobj_waver = nobj_waver or minetest.get_perlin_map(np_waver, {x = emax.x - emin.x + 1, y = emax.y - emin.y + 1, z = emax.z - emin.z + 1})
nobj_waver:get_3d_map_flat(emin, waver_data)
local chasm_area = VoxelArea:new{MinEdge = vector.subtract(emin, waver_vector), MaxEdge = vector.add(emax, waver_vector)}
local data_area = VoxelArea:new{MinEdge = emin, MaxEdge = emax}
for i, x, y, z in data_area:iterp_xyz(emin, emax) do
local waver = math.min(math.max(math.floor(waver_data[i]+0.5), -waver_strength), waver_strength)
local intensity = get_intensity(y)
if chasm_data[chasm_area:index(x+waver, y, z)]*intensity > chasms_threshold then
if webs_present then
webs = webs or calculate_web_array(minp, maxp) -- only calculate webs when we know we're in a chasm
if webs[y + z*z_displace] and math.random() < 0.85 then -- random holes in the web
data[i] = c_web
minetest.get_node_timer({x=x,y=y,z=z}):start(1) -- this timer will check for unsupported webs
else
data[i] = c_air
end
else
data[i] = c_air
end
end
end
vm:set_data(data)
vm:calc_lighting()
vm:write_to_map()
end)
local nobj_local_chasm = minetest.get_perlin(np_chasms)
local nobj_local_waver = minetest.get_perlin(np_waver)
chasms.is_in_chasm = function(pos)
nobj_local_chasm = nobj_local_chasm or minetest.get_perlin(np_chasms)
nobj_local_waver = nobj_local_waver or minetest.get_perlin(np_waver)
local waver = math.min(math.max(math.floor(nobj_local_waver:get_3d(pos)+0.5), -waver_strength), waver_strength)
local chasm_value = nobj_local_chasm:get_3d({x=pos.x+waver, y=pos.y, z=pos.z})
return chasm_value*get_intensity(pos.y) > chasms_threshold
end
-- A little cheaper to run, for mapgens that know they don't have to worry about the tops and bottoms of chasms
chasms.is_in_chasm_without_taper = function(pos)
nobj_local_chasm = nobj_local_chasm or minetest.get_perlin(np_chasms)
nobj_local_waver = nobj_local_waver or minetest.get_perlin(np_waver)
local waver = math.min(math.max(math.floor(nobj_local_waver:get_3d(pos)+0.5), -waver_strength), waver_strength)
local chasm_value = nobj_local_chasm:get_3d({x=pos.x+waver, y=pos.y, z=pos.z})
return chasm_value > chasms_threshold
end

3
chasms/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name=chasms
depends=mapgen_helper
optional_depends=big_webs

5
chasms/settingtypes.txt Normal file
View File

@ -0,0 +1,5 @@
chasms_params (Noise params for chasms) noise_params_3d 0, 1, (50, 1000, 3000), 94586, 2, 0.63, 2.0
chasms_threshold (Noise threshold for chasms) float 0.9
chasms_maxy (Maximum Y) int -50
chasms_miny (Minimum Y) int -2500
chasms_falloff (Taper range when approaching max or min) int 100

View File

@ -7,11 +7,11 @@ local print_settingtypes = false
local function setting(stype, name, default, description)
local value
if stype == "bool" then
value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name)
value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name, default)
elseif stype == "string" then
value = minetest.setting_get(CONFIG_FILE_PREFIX..name)
value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
elseif stype == "int" or stype == "float" then
value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name))
value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
end
if value == nil then
value = default
@ -48,3 +48,7 @@ setting("bool", "enable_underworld", true, "Enable underworld")
df_caverns.config.enable_underworld = df_caverns.config.enable_underworld and minetest.get_modpath("df_underworld_items") ~= nil
setting("int", "underworld_level", -3200, "Underworld level")
setting("int", "underworld_glowing_pit_mapblocks", 8, "Average pit spacing measured in mapblocks")
setting("bool", "enable_primordial", true, "Enable primordial cavern")
setting("int", "primordial_max", -3393, "Upper limit to primordial caverns")
setting("int", "primordial_min", -4032, "Lower limit to primordial caverns")

View File

@ -1,10 +0,0 @@
default
subterrane
df_farming?
df_trees
df_mapitems
ice_sprites?
oil?
df_underworld_items?
magma_conduits?
bones_loot?

View File

@ -1 +0,0 @@
Adds vast underground caverns in the style of Dwarf Fortress, complete with underground flora in diverse biomes. Also adds stalactite/stalagmite decorations in the smaller tunnels.

View File

@ -49,8 +49,14 @@ bones_loot.register_loot({
{name = "binoculars:binoculars", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "boats:boat", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "bucket:bucket_empty", chance = 0.3, count = {1,1}, types = {"underworld_warrior"}},
{name = "fire:flint_and_steel", chance = 0.3, count = {1,2}, types = {"underworld_warrior"}},
{name = "flowers:tulip_black", chance = 0.01, count = {1,1}, types = {"underworld_warrior"}},
{name = "fire:flint_and_steel", chance = 0.3, count = {1,1}, types = {"underworld_warrior"}},
{name = "flowers:tulip_black", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "flowers:dandelion_white", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "flowers:dandelion_yellow", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "flowers:rose", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "flowers:tulip", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "flowers:chrysanthemum_green", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "flowers:geranium", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "map:mapping_kit", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
{name = "screwdriver:screwdriver", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
-- don't give the player tnt:tnt, they can craft that from this if tnt is enabled for them
@ -70,10 +76,10 @@ bones_loot.register_loot({
{name = "default:pick_steel", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:pick_mese", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:pick_diamond", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:shovel_bronze", chance = 0.15, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:shovel_steel", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:shovel_mese", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:shovel_diamond", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:shovel_bronze", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:shovel_steel", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:shovel_mese", chance = 0.025, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:shovel_diamond", chance = 0.025, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:axe_bronze", chance = 0.3, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:axe_steel", chance = 0.5, count = {1,1}, types = {"underworld_warrior"}},
{name = "default:axe_mese", chance = 0.15, count = {1,1}, types = {"underworld_warrior"}},

View File

@ -6,6 +6,8 @@ local modpath = minetest.get_modpath(minetest.get_current_modname())
--load companion lua files
dofile(modpath.."/config.lua")
dofile(modpath.."/node_ids.lua")
dofile(modpath.."/shared.lua")
dofile(modpath.."/surface_tunnels.lua")
dofile(modpath.."/level1.lua")
@ -15,4 +17,5 @@ dofile(modpath.."/sunless_sea.lua")
dofile(modpath.."/oil_sea.lua")
dofile(modpath.."/lava_sea.lua")
dofile(modpath.."/underworld.lua")
dofile(modpath.."/dungeon_loot.lua")
dofile(modpath.."/primordial.lua")
dofile(modpath.."/dungeon_loot.lua")

View File

@ -2,12 +2,12 @@ if not df_caverns.config.enable_lava_sea then
return
end
local c_air = minetest.get_content_id("air")
local c_lava = minetest.get_content_id("default:lava_source")
local c_meseore = minetest.get_content_id("default:stone_with_mese")
local c_mese_crystal = minetest.get_content_id("df_mapitems:mese_crystal")
local c_mese_crystal_block = minetest.get_content_id("df_mapitems:glow_mese")
local c_obsidian = minetest.get_content_id("default:obsidian")
local c_air = df_caverns.node_id.air
local c_lava = df_caverns.node_id.lava
local c_meseore = df_caverns.node_id.meseore
local c_mese_crystal = df_caverns.node_id.mese_crystal
local c_mese_crystal_block = df_caverns.node_id.mese_crystal_block
local c_obsidian = df_caverns.node_id.obsidian
-------------------------------------------------------------------------------------------
@ -137,11 +137,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
--write it to world
vm:write_to_map()
local chunk_generation_time = math.ceil((os.clock() - t_start) * 1000) --grab how long it took
if chunk_generation_time < 1000 then
minetest.log("info", "[df_caverns] lava sea mapblock generation took "..chunk_generation_time.." ms") --tell people how long
else
minetest.log("warning", "[df_caverns] lava sea took "..chunk_generation_time.." ms to generate map block "
.. minetest.pos_to_string(minp) .. minetest.pos_to_string(maxp))
end
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
mapgen_helper.record_time("df_caverns lava sea", time_taken)
end)

View File

@ -1,16 +1,17 @@
local c_water = minetest.get_content_id("default:water_source")
local c_air = minetest.get_content_id("air")
local c_dirt = minetest.get_content_id("default:dirt")
local c_dirt_moss = minetest.get_content_id("df_mapitems:dirt_with_cave_moss")
local c_wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
local c_dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")
local c_spindlestem_white = minetest.get_content_id("df_trees:spindlestem_cap_white")
local c_water = df_caverns.node_id.water
local c_air = df_caverns.node_id.air
local c_dirt = df_caverns.node_id.dirt
local c_dirt_moss = df_caverns.node_id.dirt_moss
local c_gravel = df_caverns.node_id.gravel
local c_wet_flowstone = df_caverns.node_id.wet_flowstone
local c_dry_flowstone = df_caverns.node_id.dry_flowstone
local c_spindlestem_white = df_caverns.node_id.spindlestem_white
local tower_cap_shrublist
local fungiwood_shrublist
local chasms_path = minetest.get_modpath("chasms")
if minetest.get_modpath("df_farming") then
tower_cap_shrublist = {
df_farming.spawn_plump_helmet_vm,
@ -96,8 +97,9 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
-- Partly fill flooded caverns and warrens
if minp.y <= subsea_level then
for vi in area:iterp(minp, maxp) do
if data[vi] == c_air and area:get_y(vi) <= subsea_level and nvals_cave[cave_area:transform(area, vi)] < -flooding_threshold then
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
-- convert all air below sea level into water
if y <= subsea_level and data[vi] == c_air and nvals_cave[vi] < -flooding_threshold then
data[vi] = c_water
end
end
@ -111,7 +113,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local abs_cracks = math.abs(nvals_cracks[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if minp.y < subsea_level and area:get_y(vi) < subsea_level and flooded_caverns then
-- underwater floor
@ -137,7 +139,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local abs_cracks = math.abs(nvals_cracks[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level then
-- underwater ceiling, do nothing
@ -164,14 +166,14 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.tunnel_floor_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
if flooded_caverns or biome_name ~= "barren" then
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end
@ -182,7 +184,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.tunnel_ceiling_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
if flooded_caverns or biome_name ~= "barren" then
@ -210,7 +212,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.warren_floor_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local ystride = area.ystride
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
@ -218,7 +220,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
if biome_name ~= "barren" then
@ -249,7 +251,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.warren_ceiling_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
if flooded_caverns or biome_name ~= "barren" then
@ -268,11 +270,23 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.column_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local dry = (biome_name == "barren") and (nvals_cave[cave_area:transform(area, vi)] > 0)
local dry = (biome_name == "barren") and (nvals_cave[vi] > 0)
if dry and data[vi] == c_wet_flowstone then
data[vi] = c_dry_flowstone
end
if chasms_path then
local pos = area:position(vi)
if chasms.is_in_chasm_without_taper(pos) then
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if flooded_caverns and pos.y < subsea_level then
data[vi] = c_water
else
data[vi] = c_air
end
end
end
end
vm:set_param2_data(data_param2)
@ -300,4 +314,5 @@ subterrane.register_layer({
decorate = decorate_level_1,
warren_region_variability_threshold = 0.33,
double_frequency = true,
is_ground_content = df_caverns.is_ground_content,
})

View File

@ -1,12 +1,22 @@
local c_water = minetest.get_content_id("default:water_source")
local c_air = minetest.get_content_id("air")
local c_dirt = minetest.get_content_id("default:dirt")
local c_dirt_moss = minetest.get_content_id("df_mapitems:dirt_with_cave_moss")
local c_water = df_caverns.node_id.water
local c_air = df_caverns.node_id.air
local c_dirt = df_caverns.node_id.dirt
local c_dirt_moss = df_caverns.node_id.dirt_moss
local c_gravel = df_caverns.node_id.gravel
local c_stillworm = df_caverns.node_id.stillworm
local c_pebble_fungus = df_caverns.node_id.pebble_fungus
local c_red = df_caverns.node_id.spindlestem_red
local c_wet_flowstone = df_caverns.node_id.wet_flowstone
local c_dry_flowstone = df_caverns.node_id.dry_flowstone
local c_veinstone = df_caverns.node_id.veinstone
local c_pearls = df_caverns.node_id.pearls
local chasms_path = minetest.get_modpath("chasms")
local c_wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
local c_dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")
local c_veinstone = minetest.get_content_id("df_mapitems:veinstone")
local wall_vein_perlin_params = {
offset = 0,
scale = 1,
@ -18,8 +28,6 @@ local wall_vein_perlin_params = {
flags = "eased",
}
local c_pearls = minetest.get_content_id("df_mapitems:cave_pearls")
local subsea_level = df_caverns.config.level2_min - (df_caverns.config.level2_min - df_caverns.config.level1_min) * 0.33 -- "sea level" for the flooded caverns.
local flooding_threshold = math.min(df_caverns.config.tunnel_flooding_threshold, df_caverns.config.cavern_threshold) -- cavern value out to which we're flooding tunnels and warrens
@ -62,8 +70,6 @@ if minetest.get_modpath("df_farming") then
}
end
local c_red = minetest.get_content_id("df_trees:spindlestem_cap_red")
local goblin_cap_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, data_param2)
local ystride = area.ystride
if abs_cracks < 0.1 then
@ -79,7 +85,7 @@ local goblin_cap_cavern_floor = function(abs_cracks, vert_rand, vi, area, data,
elseif math.random() < 0.02 then
df_trees.spawn_spindlestem_vm(vi+ystride, area, data, data_param2, c_red)
elseif math.random() < 0.015 then
df_trees.spawn_goblin_cap_vm(vi+ystride, area, data)
df_trees.spawn_goblin_cap_vm(vi+ystride, area, data, data_param2)
end
end
@ -93,12 +99,12 @@ local spore_tree_cavern_floor = function(abs_cracks, vert_rand, vi, area, data,
if math.random() < 0.25 then
data[vi] = c_dirt
else
data[vi] = c_dirt_moss
data[vi] = c_pebble_fungus
end
if math.random() < 0.1 then
df_caverns.place_shrub(vi+ystride, area, data, data_param2, spore_tree_shrublist)
elseif math.random() < 0.05 then
df_trees.spawn_spore_tree_vm(vi+ystride, area, data)
df_trees.spawn_spore_tree_vm(vi+ystride, area, data, data_param2)
end
end
end
@ -112,7 +118,7 @@ local tunnel_tube_cavern_floor = function(abs_cracks, vert_rand, vi, area, data,
if math.random() < 0.25 then
data[vi] = c_dirt
else
data[vi] = c_dirt_moss
data[vi] = c_stillworm
end
if math.random() < 0.1 then
df_caverns.place_shrub(vi+ystride, area, data, data_param2, tunnel_tube_shrublist)
@ -135,28 +141,29 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
local cavern_def = node_arrays.cavern_def
local vein_noise
local vein_area
-- Partly fill flooded caverns and warrens
for vi in area:iterp(minp, maxp) do
local cave_val = nvals_cave[cave_area:transform(area, vi)]
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
local cave_val = nvals_cave[vi]
if cave_val < -flooding_threshold then
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local cave_threshold = cavern_def.cave_threshold
if mapgen_helper.is_pos_within_box({x=x, y=y, z=z}, minp, maxp) then
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local cave_threshold = cavern_def.cave_threshold
--check if we're just inside the boundary of the (negazone) cavern threshold
if biome_name == "barren" and cave_val < -cave_threshold and cave_val > -cave_threshold - 0.01 then
-- add giant rooty structures to the flooded barren caverns
if vein_noise == nil then
vein_noise = mapgen_helper.perlin3d("df_caverns:wall_veins", minp, maxp, wall_vein_perlin_params)
end
-- we can reuse cave_area here, its extents are minp, maxp too.
if data[vi] == c_air and math.abs(vein_noise[cave_area:transform(area, vi)]) < 0.02 then
data[vi] = c_veinstone
--check if we're just inside the boundary of the (negazone) cavern threshold
if biome_name == "barren" and cave_val < -cave_threshold and cave_val > -cave_threshold - 0.01 then
-- add giant rooty structures to the flooded barren caverns
if vein_noise == nil then
vein_noise, vein_area = mapgen_helper.perlin3d("df_caverns:wall_veins", minp, maxp, wall_vein_perlin_params)
end
if data[vi] == c_air and math.abs(vein_noise[vein_area:transform(area, vi)]) < 0.02 then
data[vi] = c_veinstone
end
end
end
if data[vi] == c_air and area:get_y(vi) <= subsea_level then
if data[vi] == c_air and y <= subsea_level then
data[vi] = c_water -- otherwise, fill air with water when below sea level
end
end
@ -170,7 +177,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local abs_cracks = math.abs(nvals_cracks[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if minp.y < subsea_level and area:get_y(vi) < subsea_level and flooded_caverns then
-- underwater floor
@ -198,7 +205,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local abs_cracks = math.abs(nvals_cracks[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level then
-- underwater ceiling, do nothing
@ -230,14 +237,14 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.tunnel_floor_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
if flooded_caverns or biome_name ~= "barren" then
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end
@ -248,7 +255,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.tunnel_ceiling_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local ystride = area.ystride
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
@ -287,14 +294,14 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.warren_floor_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
if flooded_caverns or biome_name ~= "barren" then
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end
@ -305,7 +312,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.warren_ceiling_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local ystride = area.ystride
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
@ -345,11 +352,24 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.column_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local dry = (biome_name == "barren") and (nvals_cave[cave_area:transform(area, vi)] > 0)
local dry = (biome_name == "barren") and (nvals_cave[vi] > 0)
if dry and data[vi] == c_wet_flowstone then
data[vi] = c_dry_flowstone
end
if chasms_path then
local pos = area:position(vi)
if chasms.is_in_chasm_without_taper(pos) then
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if flooded_caverns and pos.y < subsea_level then
data[vi] = c_water
else
data[vi] = c_air
end
end
end
end
vm:set_param2_data(data_param2)
@ -375,5 +395,6 @@ subterrane.register_layer({
decorate = decorate_level_2,
warren_region_variability_threshold = 0.33,
double_frequency = true,
is_ground_content = df_caverns.is_ground_content,
})

View File

@ -1,34 +1,27 @@
local c_water = minetest.get_content_id("default:water_source")
local c_air = minetest.get_content_id("air")
local c_desert_sand = minetest.get_content_id("default:desert_sand")
local c_stone_with_coal = minetest.get_content_id("default:stone_with_coal")
local c_water = df_caverns.node_id.water
local c_air = df_caverns.node_id.air
local c_desert_sand = df_caverns.node_id.desert_sand
local c_stone_with_coal = df_caverns.node_id.stone_with_coal
local c_silver_sand = df_caverns.node_id.silver_sand
local c_snow = df_caverns.node_id.snow
local c_ice = df_caverns.node_id.ice
local c_hoar_moss = df_caverns.node_id.hoar_moss
local c_gravel = df_caverns.node_id.gravel
local c_oil = df_caverns.node_id.oil
local c_cobble_fungus_fine = df_caverns.node_id.cobble_fungus_fine
local c_cobble_fungus = df_caverns.node_id.cobble_fungus
local c_cobble = df_caverns.node_id.cobble
local c_wet_flowstone = df_caverns.node_id.wet_flowstone
local c_dry_flowstone = df_caverns.node_id.dry_flowstone
local c_glow_ore = df_caverns.node_id.glow_ore
local c_salty_cobble = df_caverns.node_id.salty_cobble
local c_salt_crystal = df_caverns.node_id.salt_crystal
local c_sprite = df_caverns.node_id.sprite
local c_webs_egg = df_caverns.node_id.big_webs_egg
local c_silver_sand = minetest.get_content_id("default:silver_sand")
local c_snow = minetest.get_content_id("default:snow")
local c_ice = minetest.get_content_id("default:ice")
local c_hoar_moss = minetest.get_content_id("df_mapitems:ice_with_hoar_moss")
local c_gravel = minetest.get_content_id("default:gravel")
local chasms_path = minetest.get_modpath("chasms")
local c_oil = minetest.get_content_id("oil:oil_source")
local c_cobble_fungus_fine = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus_fine")
local c_cobble_fungus = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus")
local c_cobble = minetest.get_content_id("default:cobble")
local c_wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
local c_dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")
local c_glow_ore = minetest.get_content_id("df_mapitems:glow_ruby_ore")
local c_salty_cobble = minetest.get_content_id("df_mapitems:salty_cobble")
local c_salt_crystal = minetest.get_content_id("df_mapitems:salt_crystal")
local c_sprite
if minetest.get_modpath("ice_sprites") then
c_sprite = minetest.get_content_id("ice_sprites:ice_sprite")
end
local subsea_level = df_caverns.config.level3_min - (df_caverns.config.level3_min - df_caverns.config.level2_min) * 0.33
local subsea_level = math.floor(df_caverns.config.level3_min - (df_caverns.config.level3_min - df_caverns.config.level2_min) * 0.33)
local flooding_threshold = math.min(df_caverns.config.tunnel_flooding_threshold, df_caverns.config.cavern_threshold)
local ice_thickness = 3
@ -165,7 +158,7 @@ local blood_thorn_cavern_floor = function(abs_cracks, vert_rand, vi, area, data,
if abs_cracks < 0.075 then
if vert_rand < 0.004 then
subterrane.big_stalagmite(ai, area, data, 6, 15, c_dry_flowstone, c_dry_flowstone, c_dry_flowstone)
elseif data[vi] ~= air and math.random() < 0.5 then
elseif data[vi] ~= c_air and math.random() < 0.5 then
data[vi] = c_salty_cobble
if data[ai] == c_air and math.random() < 0.25 then
data[ai] = c_salt_crystal
@ -207,25 +200,25 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
-- Partly fill flooded caverns and warrens
if minp.y <= subsea_level then
for vi in area:iterp(minp, maxp) do
local y = area:get_y(vi)
if y <= subsea_level and nvals_cave[cave_area:transform(area, vi)] < -flooding_threshold then
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
local cave = nvals_cave[vi]
if y <= subsea_level and cave < -flooding_threshold then
if data[vi] == c_air and y <= subsea_level then
data[vi] = c_water
end
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
if biome_name == "blackcap" then
-- oil slick
local cave = math.abs(nvals_cave[cave_area:transform(area, vi)])
if y == subsea_level and data[vi] == c_water and cave + nvals_cracks[index2d]*0.025 < cavern_def.cave_threshold + 0.1 then
data[vi] = c_oil
if (mapgen_helper.is_pos_within_box({x=x, y=y, z=z}, minp, maxp)) then
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
if biome_name == "blackcap" then
-- oil slick
if y == subsea_level and data[vi] == c_water and math.abs(cave) + nvals_cracks[index2d]*0.025 < cavern_def.cave_threshold + 0.1 then
data[vi] = c_oil
end
elseif biome_name == "bloodnether" and y <= subsea_level and y > subsea_level - ice_thickness and data[vi] == c_water then
-- floating ice
data[vi] = c_ice
end
elseif biome_name == "bloodnether" and y <= subsea_level and y > subsea_level - ice_thickness and data[vi] == c_water then
-- floating ice
data[vi] = c_ice
end
end
end
@ -240,7 +233,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local cracks = nvals_cracks[index2d]
local abs_cracks = math.abs(cracks)
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level then
-- underwater floor
@ -285,7 +278,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local abs_cracks = math.abs(nvals_cracks[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level then
-- underwater ceiling, do nothing
@ -321,7 +314,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
else
-- bloodthorn ceiling
if abs_cracks < 0.075 then
if data[vi] ~= air and math.random() < 0.5 then
if data[vi] ~= c_air and math.random() < 0.5 then
data[vi] = c_salty_cobble
local bi = vi - area.ystride
if data[bi] == c_air and math.random() < 0.25 then
@ -346,14 +339,14 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.tunnel_floor_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
if flooded_caverns or biome_name == "blackcap" then
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end
@ -364,7 +357,8 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.tunnel_ceiling_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local ystride = area.ystride
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
if flooded_caverns or biome_name == "blackcap" then
@ -373,9 +367,15 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
else
df_caverns.tunnel_ceiling(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
end
if c_webs_egg and (biome_name == "barren" or biome_name == "blackcap") and nvals_cracks[index2d] > 0.5 and math.random() < 0.1 then
local index = vi-ystride
if data[index] == c_air then
data[index] = c_webs_egg
minetest.get_node_timer(area:position(index)):start(1)
end
end
else
-- air pockets
local ystride = area.ystride
local cracks = nvals_cracks[index2d]
if cracks > 0.5 and data[vi-ystride] == c_water then
data[vi-ystride] = c_air
@ -393,7 +393,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.warren_ceiling_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level then
-- underwater ceiling, do nothing
@ -431,7 +431,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
for _, vi in ipairs(node_arrays.warren_floor_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0 -- this indicates if we're in the "flooded" set of caves or not.
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
if minp.y < subsea_level and area:get_y(vi) < subsea_level and flooded_caverns then
-- underwater floor, do nothing
@ -463,17 +463,17 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
if flooded_caverns or biome_name == "blackcap" then
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end
----------------------------------------------
-- Column material override for dry biome
-- Column material override for dry and icy biomes
for _, vi in ipairs(node_arrays.column_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
local flooded_caverns = nvals_cave[cave_area:transform(area, vi)] < 0
local flooded_caverns = nvals_cave[vi] < 0
if biome_name == "bloodnether" and data[vi] == c_wet_flowstone then
if not flooded_caverns then
@ -486,7 +486,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
-- with the full blown generated array rigamarole.
hoar_moss_generator = hoar_moss_generator or minetest.get_perlin(hoar_moss_perlin_params)
local pos = area:position(vi)
if hoar_moss_generator.get_3d and hoar_moss_generator:get_3d({x=pos.z, y=pos.y, z=pos.x}) > 0.5 then -- TODO: version 0.4.16 gets no hoar moss
if hoar_moss_generator:get_3d({x=pos.z, y=pos.y, z=pos.x}) > 0.5 then
data[vi] = c_hoar_moss
else
data[vi] = c_ice
@ -501,6 +501,19 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
elseif biome_name == "barren" and not flooded_caverns and data[vi] == c_wet_flowstone then
data[vi] = c_dry_flowstone
end
if chasms_path then
local pos = area:position(vi)
if chasms.is_in_chasm_without_taper(pos) then
if flooded_caverns and pos.y < subsea_level then
data[vi] = c_water -- this puts a crack in the ice of icy biomes, but why not? A crack in the ice is interesting.
else
data[vi] = c_air
end
end
end
end
vm:set_param2_data(data_param2)
@ -527,4 +540,5 @@ subterrane.register_layer({
decorate = decorate_level_3,
warren_region_variability_threshold = 0.33,
double_frequency = true,
is_ground_content = df_caverns.is_ground_content,
})

View File

@ -0,0 +1,11 @@
# textdomain: df_caverns
### underworld.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A glowing pit=Eine leuchtende Grube
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Ancient ruin=Alte Ruine
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Mysterious seal=Geheimnisvolles Siegel

View File

@ -0,0 +1,11 @@
# textdomain: df_caverns
### underworld.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A glowing pit=Un pozzo luminoso
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Ancient ruin=Antica rovina
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Mysterious seal=Sigillo misterioso

View File

@ -0,0 +1,8 @@
# textdomain: df_caverns
### underworld.lua ###
A glowing pit=
Ancient ruin=
Mysterious seal=

View File

@ -1,4 +1,4 @@
name = df_caverns
description = Adds vast underground caverns in the style of Dwarf Fortress, complete with underground flora in diverse biomes. Also adds stalactite/stalagmite decorations in the smaller tunnels.
depends = default, subterrane, df_trees, df_mapitems
optional_depends = df_farming, ice_sprites, oil, df_underworld_items, magma_conduits, bones_loot
optional_depends = df_farming, ice_sprites, oil, df_underworld_items, magma_conduits, bones_loot, named_waypoints, name_generator, fireflies, chasms, big_webs

81
df_caverns/node_ids.lua Normal file
View File

@ -0,0 +1,81 @@
df_caverns.node_id = {}
minetest.after(1, function() df_caverns.node_id = nil end) -- should only be used during initialization.
if minetest.get_modpath("ice_sprites") then
df_caverns.node_id.sprite = minetest.get_content_id("ice_sprites:ice_sprite")
end
if minetest.get_modpath("fireflies") then
df_caverns.node_id.fireflies = minetest.get_content_id("fireflies:firefly")
end
if minetest.get_modpath("df_farming") then
df_caverns.node_id.dead_fungus = minetest.get_content_id("df_farming:dead_fungus")
end
if minetest.get_modpath("big_webs") then
df_caverns.node_id.big_webs = minetest.get_content_id("big_webs:webbing")
df_caverns.node_id.big_webs_egg = minetest.get_content_id("big_webs:web_egg")
end
df_caverns.node_id.air = minetest.get_content_id("air")
df_caverns.node_id.cobble = minetest.get_content_id("default:cobble")
df_caverns.node_id.desert_sand = minetest.get_content_id("default:desert_sand")
df_caverns.node_id.dirt = minetest.get_content_id("default:dirt")
df_caverns.node_id.gravel = minetest.get_content_id("default:gravel")
df_caverns.node_id.ice = minetest.get_content_id("default:ice")
df_caverns.node_id.lava = minetest.get_content_id("default:lava_source")
df_caverns.node_id.meseore = minetest.get_content_id("default:stone_with_mese")
df_caverns.node_id.mossycobble = minetest.get_content_id("default:mossycobble")
df_caverns.node_id.obsidian = minetest.get_content_id("default:obsidian")
df_caverns.node_id.sand = minetest.get_content_id("default:sand")
df_caverns.node_id.silver_sand = minetest.get_content_id("default:silver_sand")
df_caverns.node_id.snow = minetest.get_content_id("default:snow")
df_caverns.node_id.stone = minetest.get_content_id("default:stone")
df_caverns.node_id.stone_with_coal = minetest.get_content_id("default:stone_with_coal")
df_caverns.node_id.water = minetest.get_content_id("default:water_source")
df_caverns.node_id.cobble_fungus = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus")
df_caverns.node_id.cobble_fungus_fine = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus_fine")
df_caverns.node_id.dirt_moss = minetest.get_content_id("df_mapitems:dirt_with_cave_moss")
df_caverns.node_id.dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")
df_caverns.node_id.glow_ore = minetest.get_content_id("df_mapitems:glow_ruby_ore")
df_caverns.node_id.hoar_moss = minetest.get_content_id("df_mapitems:ice_with_hoar_moss")
df_caverns.node_id.mese_crystal = minetest.get_content_id("df_mapitems:mese_crystal")
df_caverns.node_id.mese_crystal_block = minetest.get_content_id("df_mapitems:glow_mese")
df_caverns.node_id.pearls = minetest.get_content_id("df_mapitems:cave_pearls")
df_caverns.node_id.pebble_fungus = minetest.get_content_id("df_mapitems:dirt_with_pebble_fungus")
df_caverns.node_id.rock_rot = minetest.get_content_id("df_mapitems:rock_rot")
df_caverns.node_id.spongestone = minetest.get_content_id("df_mapitems:spongestone")
df_caverns.node_id.salt_crystal = minetest.get_content_id("df_mapitems:salt_crystal")
df_caverns.node_id.salty_cobble = minetest.get_content_id("df_mapitems:salty_cobble")
df_caverns.node_id.sand_scum = minetest.get_content_id("df_mapitems:sand_scum")
df_caverns.node_id.stillworm = minetest.get_content_id("df_mapitems:dirt_with_stillworm")
df_caverns.node_id.veinstone = minetest.get_content_id("df_mapitems:veinstone")
df_caverns.node_id.wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
df_caverns.node_id.spindlestem_red = minetest.get_content_id("df_trees:spindlestem_cap_red")
df_caverns.node_id.spindlestem_white = minetest.get_content_id("df_trees:spindlestem_cap_white")
df_caverns.node_id.amethyst = minetest.get_content_id("df_underworld_items:glow_amethyst")
df_caverns.node_id.glowstone = minetest.get_content_id("df_underworld_items:glowstone")
df_caverns.node_id.pit_plasma = minetest.get_content_id("df_underworld_items:pit_plasma")
df_caverns.node_id.slade = minetest.get_content_id("df_underworld_items:slade")
df_caverns.node_id.slade_block = minetest.get_content_id("df_underworld_items:slade_block")
df_caverns.node_id.oil = minetest.get_content_id("oil:oil_source")
df_caverns.node_id.gas = minetest.get_content_id("mine_gas:gas")
df_caverns.node_id.gas_wisp = minetest.get_content_id("mine_gas:gas_wisp")
df_caverns.node_id.giant_mycelium = minetest.get_content_id("df_primordial_items:giant_hypha_apical_mapgen")
df_caverns.node_id.ivy = minetest.get_content_id("df_primordial_items:jungle_ivy")
df_caverns.node_id.jungle_dirt = minetest.get_content_id("df_primordial_items:dirt_with_jungle_grass")
df_caverns.node_id.mycelial_dirt = minetest.get_content_id("df_primordial_items:dirt_with_mycelium")
df_caverns.node_id.orb = minetest.get_content_id("df_primordial_items:glow_orb_hanging")
df_caverns.node_id.packed_roots = minetest.get_content_id("df_primordial_items:packed_roots")
df_caverns.node_id.plant_matter = minetest.get_content_id("df_primordial_items:plant_matter")
df_caverns.node_id.root_1 = minetest.get_content_id("df_primordial_items:jungle_roots_1")
df_caverns.node_id.root_2 = minetest.get_content_id("df_primordial_items:jungle_roots_2")

View File

@ -2,11 +2,11 @@ if not df_caverns.config.enable_oil_sea then
return
end
local c_oil = minetest.get_content_id("oil:oil_source")
local c_gas = minetest.get_content_id("mine_gas:gas")
local c_gas_wisp = minetest.get_content_id("mine_gas:gas_wisp")
local c_lava = minetest.get_content_id("default:lava_source")
local c_obsidian = minetest.get_content_id("default:obsidian")
local c_oil = df_caverns.node_id.oil
local c_gas = df_caverns.node_id.gas
local c_gas_wisp = df_caverns.node_id.gas_wisp
local c_lava = df_caverns.node_id.lava
local c_obsidian = df_caverns.node_id.obsidian
-------------------------------------------------------------------------------------------
@ -102,13 +102,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
--write it to world
vm:write_to_map()
local chunk_generation_time = math.ceil((os.clock() - t_start) * 1000) --grab how long it took
if chunk_generation_time < 1000 then
minetest.log("info", "[df_caverns] oil sea mapblock generation took "..chunk_generation_time.." ms") --tell people how long
else
minetest.log("warning", "[df_caverns] oil sea took "..chunk_generation_time.." ms to generate map block "
.. minetest.pos_to_string(minp) .. minetest.pos_to_string(maxp))
end
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
mapgen_helper.record_time("df_caverns oil sea", time_taken)
end)
minetest.register_ore({

478
df_caverns/primordial.lua Normal file
View File

@ -0,0 +1,478 @@
if not df_caverns.config.enable_primordial or not minetest.get_modpath("df_primordial_items") then
return
end
local c_air = df_caverns.node_id.air
local perlin_cave_primordial = {
offset = 0,
scale = 1,
spread = {x=df_caverns.config.horizontal_cavern_scale, y=df_caverns.config.vertical_cavern_scale*0.5, z=df_caverns.config.horizontal_cavern_scale},
seed = 14055553,
octaves = 3,
persist = 0.67
}
local perlin_wave_primordial = {
offset = 0,
scale = 1,
spread = {x=df_caverns.config.horizontal_cavern_scale, y=df_caverns.config.vertical_cavern_scale*0.5, z=df_caverns.config.horizontal_cavern_scale},
seed = 923444,
octaves = 6,
persist = 0.63
}
local giant_mycelium_timer_spread = tonumber(minetest.settings:get("dcaverns_giant_mycelium_timer_spread")) or 10
-----------------------------------------------------------------------------------------
-- Fungal biome
local c_orb = df_caverns.node_id.orb
local c_mycelial_dirt = df_caverns.node_id.mycelial_dirt
local c_dirt = df_caverns.node_id.dirt
local c_giant_mycelium = df_caverns.node_id.giant_mycelium
local fungal_plant_names = {}
local fungal_plants = {}
for node_name, node_def in pairs(minetest.registered_nodes) do
if minetest.get_item_group(node_name, "primordial_fungal_plant") > 0 then
table.insert(fungal_plant_names, node_name)
table.insert(fungal_plants, minetest.get_content_id(node_name))
end
end
local mushroom_cavern_floor = function(abs_cracks, humidity, vi, area, data, data_param2)
local ystride = area.ystride
local humidityfactor = humidity/200 + 0.5
abs_cracks = abs_cracks * humidityfactor
if abs_cracks < 0.7 then
data[vi] = c_mycelial_dirt
elseif abs_cracks < 1 then
data[vi] = c_dirt
end
local rand = math.random() * math.min(abs_cracks, 1) * humidityfactor
if rand < 0.0005 then
local mycelium_index = vi+ystride
data[mycelium_index] = c_giant_mycelium
minetest.get_node_timer(area:position(mycelium_index)):start(math.random(1,giant_mycelium_timer_spread))
elseif rand < 0.003 then
local schematic = df_primordial_items.get_primordial_mushroom()
local rotation = (math.random(1,4)-1)*90
mapgen_helper.place_schematic_on_data_if_it_fits(data, data_param2, area, area:position(vi+ystride), schematic, rotation)
elseif rand < 0.05 then
data[vi+ystride] = fungal_plants[math.random(1,5)]
end
end
local mushroom_cavern_ceiling = function(abs_cracks, humidity, vi, area, data, data_param2)
local ystride = area.ystride
local humidityfactor = humidity/200 + 0.5
abs_cracks = abs_cracks * humidityfactor
if abs_cracks < 0.5 then
data[vi] = c_mycelial_dirt
if abs_cracks < 0.3 then
local rand = math.random() * humidityfactor
if rand < 0.002 then
local mycelium_index = vi-ystride
data[mycelium_index] = c_giant_mycelium
minetest.get_node_timer(area:position(mycelium_index)):start(math.random(1,giant_mycelium_timer_spread))
elseif rand < 0.03 then
df_primordial_items.spawn_ceiling_spire_vm(vi, area, data)
elseif rand < 0.2 then
data[vi-ystride] = c_orb
data_param2[vi-ystride] = math.random(0,179)
end
end
end
end
local mushroom_warren_ceiling = function(abs_cracks, vi, area, data, data_param2)
local ystride = area.ystride
if abs_cracks < 0.3 then
data[vi] = c_mycelial_dirt
if abs_cracks < 0.2 then
local rand = math.random()
if rand < 0.001 then
local mycelium_index = vi-ystride
data[mycelium_index] = c_giant_mycelium
minetest.get_node_timer(area:position(mycelium_index)):start(math.random(1,giant_mycelium_timer_spread))
elseif rand < 0.2 then
data[vi-ystride] = c_orb
data_param2[vi-ystride] = math.random(0,179)
end
end
end
end
local mushroom_warren_floor = function(abs_cracks, vi, area, data, data_param2)
local ystride = area.ystride
if abs_cracks < 0.7 then
data[vi] = c_mycelial_dirt
elseif abs_cracks < 1 then
data[vi] = c_dirt
end
local rand = math.random() * math.min(abs_cracks, 1)
if rand < 0.001 then
local mycelium_index = vi+ystride
data[mycelium_index] = c_giant_mycelium
minetest.get_node_timer(area:position(mycelium_index)):start(math.random(1,giant_mycelium_timer_spread))
elseif rand < 0.03 then
data[vi+ystride] = fungal_plants[math.random(1,5)]
end
end
--------------------------------------------------------------------------------------------------
-- Jungle biome
local jungle_plant_names = {}
local jungle_plants = {}
for node_name, node_def in pairs(minetest.registered_nodes) do
if minetest.get_item_group(node_name, "primordial_jungle_plant") > 0 then
table.insert(jungle_plant_names, node_name)
table.insert(jungle_plants, minetest.get_content_id(node_name))
end
end
local c_jungle_dirt = df_caverns.node_id.jungle_dirt
local c_plant_matter = df_caverns.node_id.plant_matter
local c_packed_roots = df_caverns.node_id.packed_roots
local c_glowstone = df_caverns.node_id.glowstone
local c_ivy = df_caverns.node_id.ivy
local c_root_2 = df_caverns.node_id.root_2
local c_root_1 = df_caverns.node_id.root_1
local c_fireflies = df_caverns.node_id.fireflies
local jungle_cavern_floor = function(abs_cracks, humidity, vi, area, data, data_param2)
local ystride = area.ystride
local humidityfactor = humidity/100
data[vi] = c_jungle_dirt
local rand = math.random()
if rand < 0.025 * humidityfactor then
local fern_schematic = df_primordial_items.get_fern_schematic()
local rotation = (math.random(1,4)-1)*90
mapgen_helper.place_schematic_on_data_if_it_fits(data, data_param2, area, area:position(vi+ystride), fern_schematic, rotation)
elseif rand < 0.025 * (1-humidityfactor) then
df_primordial_items.spawn_jungle_mushroom_vm(vi+ystride, area, data)
elseif rand < 0.05 * (1-humidityfactor) then
df_primordial_items.spawn_jungle_tree_vm(math.random(8,14), vi+ystride, area, data)
elseif rand < 0.3 then
data[vi+ystride] = jungle_plants[math.random(1,#jungle_plants)]
end
if c_fireflies and math.random() < 0.01 then
local firefly_vi = vi + ystride * math.random(1, 5)
if data[firefly_vi] == c_air then
data[firefly_vi] = c_fireflies
end
end
end
local jungle_cavern_ceiling = function(abs_cracks, vi, area, data, data_param2)
if abs_cracks < 0.25 then
data[vi] = c_glowstone
elseif abs_cracks > 0.75 and math.random() < 0.1 then
local ystride = area.ystride
data[vi] = c_dirt
local index = vi - ystride
local hanging_node
if math.random() < 0.5 then
hanging_node = c_ivy
else
hanging_node = c_root_2
end
for i = 1, math.random(16) do
if data[index] == c_air then
data[index] = hanging_node
index = index - ystride
else
break
end
end
end
end
local jungle_warren_ceiling = function(abs_cracks, vi, area, data, data_param2)
if abs_cracks < 0.1 then
data[vi] = c_glowstone
elseif abs_cracks > 0.75 and math.random() < 0.1 then
local ystride = area.ystride
data[vi] = c_dirt
local index = vi - ystride
local hanging_node
if math.random() < 0.5 then
hanging_node = c_root_1
else
hanging_node = c_root_2
end
for i = 1, math.random(8) do
if data[index] == c_air then
data[index] = hanging_node
index = index - ystride
else
break
end
end
end
end
local jungle_warren_floor = function(abs_cracks, vi, area, data, data_param2)
local ystride = area.ystride
if abs_cracks < 0.7 then
data[vi] = c_jungle_dirt
local rand = math.random() * abs_cracks
if rand < 0.1 then
data[vi+ystride] = jungle_plants[math.random(1,#jungle_plants)]
end
elseif abs_cracks < 1 then
data[vi] = c_dirt
end
if c_fireflies and math.random() < 0.005 then
local firefly_vi = vi + ystride * math.random(1, 5)
if data[firefly_vi] == c_air then
data[firefly_vi] = c_fireflies
end
end
end
---------------------------------------------------------------------------------------------------------
local decorate_primordial = function(minp, maxp, seed, vm, node_arrays, area, data)
math.randomseed(minp.x + minp.y*2^8 + minp.z*2^16 + seed) -- make decorations consistent between runs
local data_param2 = df_caverns.data_param2
vm:get_param2_data(data_param2)
local nvals_cracks = mapgen_helper.perlin2d("df_cavern:cracks", minp, maxp, df_caverns.np_cracks)
local cave_area = node_arrays.cave_area
local nvals_cave = node_arrays.nvals_cave
local humiditymap = minetest.get_mapgen_object("humiditymap")
---------------------------------------------------------
-- Cavern floors
for _, vi in ipairs(node_arrays.cavern_floor_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local cracks = nvals_cracks[index2d]
local abs_cracks = math.abs(cracks)
local humidity = humiditymap[index2d]
local jungle = nvals_cave[vi] < 0
if jungle then
jungle_cavern_floor(abs_cracks, humidity, vi, area, data, data_param2)
else
mushroom_cavern_floor(abs_cracks, humidity, vi, area, data, data_param2)
end
end
--------------------------------------
-- Cavern ceilings
for _, vi in ipairs(node_arrays.cavern_ceiling_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local cracks = nvals_cracks[index2d]
local abs_cracks = math.abs(cracks)
local jungle = nvals_cave[vi] < 0
local humidity = humiditymap[index2d]
if jungle then
jungle_cavern_ceiling(abs_cracks, vi, area, data, data_param2)
else
mushroom_cavern_ceiling(abs_cracks, humidity, vi, area, data, data_param2)
end
end
----------------------------------------------
-- Tunnel floors
-- for _, vi in ipairs(node_arrays.tunnel_floor_nodes) do
-- end
------------------------------------------------------
-- Tunnel ceiling
-- for _, vi in ipairs(node_arrays.tunnel_ceiling_nodes) do
-- end
------------------------------------------------------
-- Warren ceiling
for _, vi in ipairs(node_arrays.warren_ceiling_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local cracks = nvals_cracks[index2d]
local abs_cracks = math.abs(cracks)
local jungle = nvals_cave[vi] < 0
if jungle then
jungle_warren_ceiling(abs_cracks, vi, area, data, data_param2)
else
mushroom_warren_ceiling(abs_cracks, vi, area, data, data_param2)
end
end
----------------------------------------------
-- Warren floors
for _, vi in ipairs(node_arrays.warren_floor_nodes) do
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local cracks = nvals_cracks[index2d]
local abs_cracks = math.abs(cracks)
local jungle = nvals_cave[vi] < 0
if jungle then
jungle_warren_floor(abs_cracks, vi, area, data, data_param2)
else
mushroom_warren_floor(abs_cracks, vi, area, data, data_param2)
end
end
-- columns
-- no flowstone below the Sunless Sea, replace with something else
local random_dir = {1, -1, area.zstride, -area.zstride}
for _, vi in ipairs(node_arrays.column_nodes) do
local jungle = nvals_cave[vi] < 0
if jungle then
data[vi] = c_plant_matter
minetest.get_node_timer(area:position(vi)):start(math.random(30, 120))
else
data[vi] = c_mycelial_dirt
if math.random() < 0.05 then
local rand_vi = vi + random_dir[math.random(1,4)]
if data[rand_vi] == c_air then
data[rand_vi] = c_giant_mycelium
minetest.get_node_timer(area:position(rand_vi)):start(math.random(1,giant_mycelium_timer_spread))
end
end
end
end
vm:set_param2_data(data_param2)
end
--Primordial Caverns
subterrane.register_layer({
name = "primordial",
y_max = df_caverns.config.primordial_max,
y_min = df_caverns.config.primordial_min,
cave_threshold = df_caverns.config.sunless_sea_threshold, -- Make the caves a bit bigger than above
perlin_cave = perlin_cave_primordial,
perlin_wave = perlin_wave_primordial,
solidify_lava = true,
columns = {
maximum_radius = 20,
minimum_radius = 5,
node = "default:stone", -- no flowstone below the Sunless Sea, replace with something else
weight = 0.5,
maximum_count = 60,
minimum_count = 10,
},
decorate = decorate_primordial,
double_frequency = true,
is_ground_content = df_caverns.is_ground_content,
})
minetest.register_ore({
ore_type = "vein",
ore = "df_underworld_items:glowstone",
wherein = {
"default:stone",
"default:stone_with_coal",
"default:stone_with_iron",
"default:stone_with_copper",
"default:stone_with_tin",
"default:stone_with_gold",
"default:stone_with_diamond",
"default:dirt",
"default:sand",
"default:desert_sand",
"default:silver_sand",
"default:gravel",
},
column_height_min = 2,
column_height_max = 6,
y_min = df_caverns.config.primordial_min,
y_max = df_caverns.config.primordial_max,
noise_threshold = 0.9,
noise_params = {
offset = 0,
scale = 3,
spread = {x=400, y=400, z=400},
seed = 25111,
octaves = 4,
persist = 0.5,
flags = "eased",
},
random_factor = 0,
})
-- Rather than make plants farmable, have them randomly respawn in jungle soil. You can only get them down there.
minetest.register_abm({
label = "Primordial plant growth",
nodenames = {"df_primordial_items:dirt_with_jungle_grass"},
neighbors = {"air"},
interval = 60.0,
chance = 50,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, 2, {"group:primordial_jungle_plant"}) == nil then
local pos_above = {x=pos.x, y=pos.y+1, z=pos.z}
local node_above = minetest.get_node(pos_above)
if node_above.name == "air" then
minetest.set_node(pos_above, {name = jungle_plant_names[math.random(1,#jungle_plant_names)]})
end
end
end,
})
minetest.register_abm({
label = "Primordial fungus growth",
nodenames = {"df_primordial_items:dirt_with_mycelium"},
neighbors = {"air"},
interval = 60.0,
chance = 50,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, 3, {"group:primordial_fungal_plant"}) == nil then
local pos_above = {x=pos.x, y=pos.y+1, z=pos.z}
local node_above = minetest.get_node(pos_above)
if node_above.name == "air" then
minetest.set_node(pos_above, {name = fungal_plant_names[math.random(1,#fungal_plant_names)]})
end
end
end,
})
-- an ABM to extinguish fires on the primordial layer. Glowstone next to plant life equals too much fire.
local fire_enabled = minetest.settings:get_bool("enable_fire")
if fire_enabled == nil then
-- enable_fire setting not specified, check for disable_fire
local fire_disabled = minetest.settings:get_bool("disable_fire")
if fire_disabled == nil then
-- Neither setting specified, check whether singleplayer
fire_enabled = minetest.is_singleplayer()
else
fire_enabled = not fire_disabled
end
end
if fire_enabled and minetest.get_modpath("fire") then
local primordial_min = df_caverns.config.primordial_min
local primordial_max = df_caverns.config.primordial_max
minetest.register_abm({
label = "Remove fire in the primordial layer",
nodenames = {"fire:basic_flame"},
--neighbors = {"fire:basic_flame"},
interval = 3,
chance = 3,
catch_up = false,
action = function(pos)
local pos_y = pos.y
if pos_y > primordial_min and pos_y < primordial_max then
minetest.remove_node(pos)
end
end
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -1,4 +1,5 @@
[Cavern dimensions]
#Note that this doesn't guarantee caverns of this setting's size. This setting
#affects the scale of features in the perlin noise that is used to build caverns.
#Most caverns will be smaller than this (and a few might be larger)
@ -17,6 +18,7 @@ dfcaverns_sunless_sea_threshold (Cavern threshold for sunless sea) float 0.4 0.0
dfcaverns_tunnel_flooding_threshold (Tunnel flooding threshold) float 0.25 0.0 1.0
[Cavern depth borders]
#maximum boundary for cavern depths are most efficient when they fit the formula (x*80-32-1)
#where x is an integer. That way you don't get map blocks that straddle two cavern layers.
dfcaverns_ymax (Upper limit of level 1) int -193
@ -28,6 +30,7 @@ dfcaverns_level3_min (Upper limit of the sunless sea) int -2112
dfcaverns_sunless_sea_min (Lower limit of the sunless sea) int -2512
[Lower Levels]
dfcaverns_enable_oil_sea (Generate oil sea) bool true
dfcaverns_oil_sea_level (Oil sea level) int -2700
@ -37,4 +40,37 @@ dfcaverns_lava_sea_level (Lava sea level) int -2900
dfcaverns_enable_underworld (Generate underworld) bool true
dfcaverns_underworld_level (Underworld level) int -3200
#Set this to 0 to disable glowing pit generation entirely.
dfcaverns_underworld_glowing_pit_mapblocks(Average pit spacing measured in mapblocks) int 8
dfcaverns_underworld_glowing_pit_mapblocks(Average pit spacing measured in mapblocks) int 8
[Underworld feature HUD]
dfcaverns_underworld_hud_requires_item (Require an item to view waypoints) bool true
#Players can still discover the locations of volcanoes without this, but waypoints
#will only be visible in their hud if they have this item in their inventory. You can also
#specify "group:groupname" here. Leave it blank to default to map:mapping_kit.
dfcaverns_underworld_hud_item_required (Specify the item or group required) string map:mapping_kit
dfcaverns_show_pits_in_hud (Show pit locations in HUD) bool true
dfcaverns_pit_discovery_range (Pit discovery range) int 60
dfcaverns_pit_visibility_range (Pit visibility range) int 500
dfcaverns_show_seals_in_hud (Seal locations in HUD) bool true
dfcaverns_seal_discovery_range (Seal discovery range) int 10
dfcaverns_seal_visibility_range (Seal visibility range) int 200
dfcaverns_show_ruins_in_hud (Ruin locations visible in HUD) bool true
dfcaverns_ruin_discovery_range (Ruin discovery range) int 40
dfcaverns_ruin_visibility_range (Ruin visibility range) int 250
[Primordial]
dfcaverns_enable_primordial (Generate primordial caverns) bool true
dfcaverns_primordial_max (Upper limit of primordial caverns) int -3393
dfcaverns_primordial_min (Lower limit of primordial caverns) int -4032
# This setting is pretty technical, it spreads out the
# construction of giant mycelium networks on mapgen
# over this many seconds. If you're experiencing lag spikes
# during mapgen of Primordial cavern layer mushroom caverns
# then increasing this number may help.
dcaverns_giant_mycelium_timer_spread (Giant Mycelium mapgen timer spread) int 10

View File

@ -1,24 +1,47 @@
-- This file contains code that is used by multiple different cavern layers.
local c_water = minetest.get_content_id("default:water_source")
local c_air = minetest.get_content_id("air")
local c_dirt = minetest.get_content_id("default:dirt")
local c_gravel = minetest.get_content_id("default:gravel")
local c_dirt_moss = minetest.get_content_id("df_mapitems:dirt_with_cave_moss")
local c_cobble_fungus = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus")
local c_cobble_fungus_fine = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus_fine")
local c_cobble = minetest.get_content_id("default:cobble")
local c_mossycobble = minetest.get_content_id("default:mossycobble")
local c_wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
local c_dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")
local c_air = df_caverns.node_id.air
local c_cobble = df_caverns.node_id.cobble
local c_cobble_fungus = df_caverns.node_id.cobble_fungus
local c_cobble_fungus_fine = df_caverns.node_id.cobble_fungus_fine
local c_dead_fungus = df_caverns.node_id.dead_fungus
local c_dirt = df_caverns.node_id.dirt
local c_dirt_moss = df_caverns.node_id.dirt_moss
local c_dry_flowstone = df_caverns.node_id.dry_flowstone
local c_fireflies = df_caverns.node_id.fireflies
local c_glowstone = df_caverns.node_id.glowstone
local c_ice = df_caverns.node_id.ice
local c_mossycobble = df_caverns.node_id.mossycobble
local c_oil = df_caverns.node_id.oil
local c_sand_scum = df_caverns.node_id.sand_scum
local c_spongestone = df_caverns.node_id.spongestone
local c_rock_rot = df_caverns.node_id.rock_rot
local c_water = df_caverns.node_id.water
local c_wet_flowstone = df_caverns.node_id.wet_flowstone
local c_webs = df_caverns.node_id.big_webs
local c_webs_egg = df_caverns.node_id.big_webs_egg
df_caverns.data_param2 = {}
-- prevent mapgen from using these nodes as a base for stalactites or stalagmites
local dont_build_speleothems_on = {}
for _, content_id in pairs(df_mapitems.wet_stalagmite_ids) do
dont_build_speleothems_on[content_id] = true
end
for _, content_id in pairs(df_mapitems.dry_stalagmite_ids) do
dont_build_speleothems_on[content_id] = true
end
if minetest.get_modpath("big_webs") then
dont_build_speleothems_on[c_webs] = true
dont_build_speleothems_on[c_webs_egg] = true
end
--------------------------------------------------
df_caverns.stalagmites = function(abs_cracks, vert_rand, vi, area, data, data_param2, wet, reverse_sign)
if dont_build_speleothems_on[data[vi]] then
return
end
local flowstone
local stalagmite_ids
if wet then
@ -62,7 +85,7 @@ df_caverns.flooded_cavern_floor = function(abs_cracks, vert_rand, vi, area, data
if abs_cracks < 0.25 then
data[vi] = c_mossycobble
elseif data[vi-ystride] ~= c_water then
data[vi] = c_dirt
data[vi] = c_sand_scum
end
-- put in only the large stalagmites that won't get in the way of the water
@ -73,11 +96,6 @@ df_caverns.flooded_cavern_floor = function(abs_cracks, vert_rand, vi, area, data
end
end
local c_dead_fungus
if minetest.get_modpath("df_farming") then
c_dead_fungus = minetest.get_content_id("df_farming:dead_fungus")
end
df_caverns.dry_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, data_param2)
if abs_cracks < 0.075 then
df_caverns.stalagmites(abs_cracks, vert_rand, vi, area, data, data_param2, false)
@ -98,8 +116,10 @@ df_caverns.wet_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, da
df_caverns.stalagmites(abs_cracks, vert_rand, vi, area, data, data_param2, true)
elseif abs_cracks < 0.6 then
data[vi] = c_cobble
elseif abs_cracks < 0.8 then
data[vi] = c_rock_rot
else
data[vi] = c_mossycobble
data[vi] = c_spongestone
if c_dead_fungus and math.random() < 0.05 then
data[vi+area.ystride] = c_dead_fungus
end
@ -116,52 +136,54 @@ df_caverns.glow_worm_cavern_ceiling = function(abs_cracks, vert_rand, vi, area,
end
end
local content_in_list=function(content, list)
for i, v in ipairs(list) do
if content == v then return true end
df_caverns.tunnel_floor = function(minp, maxp, area, vi, nvals_cracks, data, data_param2, wet, dirt_node)
if maxp.y > -30 then
wet = false
end
return false
end
df_caverns.tunnel_floor = function(minp, maxp, area, vi, nvals_cracks, data, data_param2, wet)
local ystride = area.ystride
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local cracks = nvals_cracks[index2d]
local abs_cracks = math.abs(cracks)
if wet then
if abs_cracks < 0.05 and data[vi+ystride] == c_air and not content_in_list(data[vi], df_mapitems.wet_stalagmite_ids) then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
if abs_cracks < 0.05 and data[vi+ystride] == c_air and not dont_build_speleothems_on[data[vi]] then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
local param2 = abs_cracks*1000000 - math.floor(abs_cracks*1000000/4)*4
local height = math.floor(abs_cracks * 100)
subterrane.stalagmite(vi+ystride, area, data, data_param2, param2, height, df_mapitems.wet_stalagmite_ids)
data[vi] = c_wet_flowstone
elseif dirt_node and abs_cracks > 0.5 and data[vi-ystride] ~= c_air then
data[vi] = dirt_node
end
else
if abs_cracks < 0.025 and data[vi+ystride] == c_air and not content_in_list(data[vi], df_mapitems.dry_stalagmite_ids) then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
if abs_cracks < 0.025 and data[vi+ystride] == c_air and not dont_build_speleothems_on[data[vi]] then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
local param2 = abs_cracks*1000000 - math.floor(abs_cracks*1000000/4)*4
local height = math.floor(abs_cracks * 100)
subterrane.stalagmite(vi+ystride, area, data, data_param2, param2, height, df_mapitems.dry_stalagmite_ids)
elseif cracks > 0.5 and data[vi-ystride] ~= c_air then
data[vi] = c_gravel
elseif dirt_node and cracks > 0.5 and data[vi-ystride] ~= c_air then
data[vi] = dirt_node
end
end
end
df_caverns.tunnel_ceiling = function(minp, maxp, area, vi, nvals_cracks, data, data_param2, wet)
if maxp.y > -30 then
wet = false
end
local ystride = area.ystride
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
local cracks = nvals_cracks[index2d]
local abs_cracks = math.abs(cracks)
if wet then
if abs_cracks < 0.05 and data[vi-ystride] == c_air and not content_in_list(data[vi], df_mapitems.wet_stalagmite_ids) then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
if abs_cracks < 0.05 and data[vi-ystride] == c_air and not dont_build_speleothems_on[data[vi]] then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
local param2 = abs_cracks*1000000 - math.floor(abs_cracks*1000000/4)*4
local height = math.floor(abs_cracks * 100)
subterrane.stalactite(vi-ystride, area, data, data_param2, param2, height, df_mapitems.wet_stalagmite_ids)
data[vi] = c_wet_flowstone
end
else
if abs_cracks < 0.025 and data[vi-ystride] == c_air and not content_in_list(data[vi], df_mapitems.dry_stalagmite_ids) then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
if abs_cracks < 0.025 and data[vi-ystride] == c_air and not dont_build_speleothems_on[data[vi]] then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
local param2 = abs_cracks*1000000 - math.floor(abs_cracks*1000000/4)*4
local height = math.floor(abs_cracks * 100)
subterrane.stalactite(vi-ystride, area, data, data_param2, param2, height, df_mapitems.dry_stalagmite_ids)
@ -207,4 +229,39 @@ df_caverns.place_shrub = function(vi, area, data, param2_data, shrub_list)
local shrub = shrub_list[math.random(#shrub_list)]
shrub(vi, area, data, param2_data)
end
---------------------------------------------------------------------------------
-- This method allows subterrane to overgenerate caves without destroying any of the decorations
local dfcaverns_nodes = nil
local dfcaverns_mods = {
"df_farming:",
"df_mapitems:",
"df_primordial_items:",
"df_trees:",
"df_underworld_items:",
"ice_sprites:",
"mine_gas:",
}
df_caverns.is_ground_content = function(c_node)
if dfcaverns_nodes then
return not dfcaverns_nodes[c_node]
end
dfcaverns_nodes = {}
for k, v in pairs(minetest.registered_nodes) do
for _, prefix in ipairs(dfcaverns_mods) do
if k:sub(1, #prefix) == prefix then
dfcaverns_nodes[minetest.get_content_id(k)] = true
end
end
end
dfcaverns_nodes[c_ice] = true -- needed for nethercap cavern water covering
dfcaverns_nodes[c_oil] = true -- needed for blackcap oil slicks
if c_fireflies then
dfcaverns_nodes[c_fireflies] = true -- used in the primordial caverns
end
dfcaverns_nodes[c_glowstone] = nil
dfcaverns_mods = nil
return not dfcaverns_nodes[c_node]
end

View File

@ -1,19 +1,22 @@
local c_water = minetest.get_content_id("default:water_source")
local c_air = minetest.get_content_id("air")
local c_dirt = minetest.get_content_id("default:dirt")
local c_dirt_moss = minetest.get_content_id("df_mapitems:dirt_with_cave_moss")
local c_sand = minetest.get_content_id("default:sand")
local c_gravel = minetest.get_content_id("default:gravel")
local c_wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
local c_dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")
local c_lava = minetest.get_content_id("default:lava_source")
local c_obsidian = minetest.get_content_id("default:obsidian")
local c_water = df_caverns.node_id.water
local c_air = df_caverns.node_id.air
local c_dirt = df_caverns.node_id.dirt
local c_dirt_moss = df_caverns.node_id.dirt_moss
local c_sand = df_caverns.node_id.sand
local c_gravel = df_caverns.node_id.gravel
local c_wet_flowstone = df_caverns.node_id.wet_flowstone
local c_dry_flowstone = df_caverns.node_id.dry_flowstone
local c_lava = df_caverns.node_id.lava
local c_obsidian = df_caverns.node_id.obsidian
local c_coral_table = {
minetest.get_content_id("df_mapitems:cave_coral_1"),
minetest.get_content_id("df_mapitems:cave_coral_2"),
minetest.get_content_id("df_mapitems:cave_coral_3")
}
local chasms_path = minetest.get_modpath("chasms")
local c_coral_table = {}
for node_name, node_def in pairs(minetest.registered_nodes) do
if minetest.get_item_group(node_name, "dfcaverns_cave_coral") > 0 then
table.insert(c_coral_table, minetest.get_content_id(node_name))
end
end
local mushroom_shrublist
local fungispore_shrublist
@ -107,7 +110,7 @@ local mushroom_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, da
if math.random() < 0.01 then
df_trees.spawn_tower_cap_vm(vi+ystride, area, data)
elseif math.random() < 0.01 then
df_trees.spawn_goblin_cap_vm(vi+ystride, area, data)
df_trees.spawn_goblin_cap_vm(vi+ystride, area, data, data_param2)
elseif math.random() < 0.02 then
df_trees.spawn_spindlestem_vm(vi+ystride, area, data, data_param2)
end
@ -131,7 +134,7 @@ local fungispore_cavern_floor = function(abs_cracks, vert_rand, vi, area, data,
if math.random() < 0.025 then
df_trees.spawn_fungiwood_vm(vi+ystride, area, data)
elseif math.random() < 0.025 then
df_trees.spawn_spore_tree_vm(vi+ystride, area, data)
df_trees.spawn_spore_tree_vm(vi+ystride, area, data, data_param2)
end
end
end
@ -223,15 +226,20 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
data[vi] = c_obsidian
end
end
-- convert all air below sea level into water
if y <= sea_level and data[vi] == c_air then
data[vi] = c_water
end
else
skip_next = false
end
end
if minp.y <= sea_level then
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
-- convert all air below sea level into water
if y <= sea_level and data[vi] == c_air then
data[vi] = c_water
end
end
end
---------------------------------------------------------
-- Cavern floors
@ -375,6 +383,18 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
else
data[vi] = c_coral_table[math.random(1,3)]
data_param2[vi] = math.random(1,4)-1
minetest.get_node_timer(area:position(vi)):start(math.random(10, 60))
end
if chasms_path then
local pos = area:position(vi)
if chasms.is_in_chasm(pos) then
if pos.y <= sea_level then
data[vi] = c_water
else
data[vi] = c_air
end
end
end
end
end
@ -401,4 +421,5 @@ subterrane.register_layer({
},
decorate = decorate_sunless_sea,
double_frequency = false,
is_ground_content = df_caverns.is_ground_content,
})

View File

@ -1,8 +1,11 @@
-- surface tunnels
local y_max = -10
local y_max = 200
local y_min = df_caverns.config.ymax
local c_stone = df_caverns.node_id.stone
local c_air = df_caverns.node_id.air
minetest.register_on_generated(function(minp, maxp, seed)
--if out of range of cave definition limits, abort
if minp.y > y_max or maxp.y < y_min then
@ -12,36 +15,55 @@ minetest.register_on_generated(function(minp, maxp, seed)
local t_start = os.clock()
local vm, data, data_param2, area = mapgen_helper.mapgen_vm_data_param2()
local eminp = {x=minp.x, y=area.MinEdge.y, z=minp.z}
local emaxp = {x=maxp.x, y=area.MaxEdge.y, z=maxp.z}
local minp_y = minp.y
local maxp_y = maxp.y
local humiditymap = minetest.get_mapgen_object("humiditymap")
local nvals_cracks = mapgen_helper.perlin2d("df_cavern:cracks", minp, maxp, df_caverns.np_cracks)
local previous_state = "outside_region"
local previous_y = minp.y
local previous_y = eminp.y-1
for vi, x, y, z in area:iterp_yxz(minp, maxp) do
local previous_potential_floor_vi
local previous_potential_floor_y
local previous_node
for vi, x, y, z in area:iterp_yxz(eminp, emaxp) do
if y < previous_y then
previous_state = "outside_region"
-- we've started a new column, initialize everything
previous_potential_floor_vi = nil
previous_potential_floor_y = nil
previous_node = nil
end
previous_y = y
if y < y_max then
if mapgen_helper.buildable_to(data[vi]) then
if previous_state == "in_rock" and not mapgen_helper.buildable_to(data[vi-area.ystride]) then
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
local humidity = humiditymap[index2d]
df_caverns.tunnel_floor(minp, maxp, area, vi-area.ystride, nvals_cracks, data, data_param2, humidity > 30)
local current_node = data[vi]
if previous_node and y < y_max then
if current_node == c_air and previous_node == c_stone then
-- this may be a floor, but only if we eventually hit a ceiling in this column
previous_potential_floor_vi = vi-area.ystride
previous_potential_floor_y = y-1
elseif current_node == c_stone and previous_node == c_air and previous_potential_floor_vi then
-- we hit a ceiling after passing through a floor
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
local humidity = humiditymap[index2d]
if previous_potential_floor_y <= maxp_y and previous_potential_floor_y >= minp_y then
df_caverns.tunnel_floor(minp, maxp, area, previous_potential_floor_vi, nvals_cracks, data, data_param2, humidity > 30)
end
previous_state = "in_tunnel"
else
if previous_state == "in_tunnel" and not mapgen_helper.buildable_to(data[vi]) then
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
local humidity = humiditymap[index2d]
if y <= maxp_y and y >= minp_y then
df_caverns.tunnel_ceiling(minp, maxp, area, vi, nvals_cracks, data, data_param2, humidity > 30)
end
previous_state = "in_rock"
previous_potential_floor_vi = nil
elseif not mapgen_helper.buildable_to(current_node) then
-- we've entered a non-stone ceiling of some kind. Abort potential floor-ceiling pair detection.
previous_potential_floor_vi = nil
end
end
previous_node = current_node
end
--send data back to voxelmanip
@ -55,12 +77,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
--write it to world
vm:write_to_map()
local chunk_generation_time = math.ceil((os.clock() - t_start) * 1000) --grab how long it took
if chunk_generation_time < 1000 then
minetest.log("info", "[df_caverns surface tunnels] "..chunk_generation_time.." ms") --tell people how long
else
minetest.log("warning", "[df_caverns surface tunnels] took "..chunk_generation_time.." ms to generate map block "
.. minetest.pos_to_string(minp) .. minetest.pos_to_string(maxp))
end
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
mapgen_helper.record_time("df_caverns surface tunnels", time_taken)
end)

View File

@ -1,16 +1,90 @@
if not df_caverns.config.enable_underworld or not minetest.get_modpath("df_underworld_items") then
return
end
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
local bones_loot_path = minetest.get_modpath("bones_loot")
local named_waypoints_path = minetest.get_modpath("named_waypoints")
local name_generator_path = minetest.get_modpath("name_generator")
local c_slade = minetest.get_content_id("df_underworld_items:slade")
local c_air = minetest.get_content_id("air")
local c_water = minetest.get_content_id("default:water_source")
local hunters_enabled = minetest.get_modpath("hunter_statue") and df_underworld_items.config.underworld_hunter_statues
local c_glowstone = minetest.get_content_id("df_underworld_items:glowstone")
local c_amethyst = minetest.get_content_id("df_underworld_items:glow_amethyst")
local c_pit_plasma = minetest.get_content_id("df_underworld_items:pit_plasma")
local name_pit = function() end
local name_ruin = function() end
if named_waypoints_path then
local item_required = nil
if minetest.settings:get_bool("dfcaverns_underworld_hud_requires_item", true) then
local setting_item_required = minetest.settings:get("dfcaverns_underworld_hud_item_required")
if setting_item_required == nil or setting_item_required == "" then
setting_item_required = "map:mapping_kit"
end
item_required = setting_item_required
end
local pit_waypoint_def = {
default_name = S("A glowing pit"),
default_color = 0xFF88FF,
discovery_volume_radius = tonumber(minetest.settings:get("dfcaverns_pit_discovery_range")) or 60,
visibility_requires_item = item_required,
}
if minetest.settings:get_bool("dfcaverns_show_pits_in_hud", true) then
pit_waypoint_def.visibility_volume_radius = tonumber(minetest.settings:get("dfcaverns_pit_visibility_range")) or 500
pit_waypoint_def.on_discovery = named_waypoints.default_discovery_popup
end
named_waypoints.register_named_waypoints("glowing_pits", pit_waypoint_def)
local seal_waypoint_def = {
default_name = S("Mysterious seal"),
default_color = 0x9C2233,
discovery_volume_radius = tonumber(minetest.settings:get("dfcaverns_seal_discovery_range")) or 10,
visibility_requires_item = item_required,
}
if minetest.settings:get_bool("dfcaverns_show_seals_in_hud", true) then
seal_waypoint_def.visibility_volume_radius = tonumber(minetest.settings:get("dfcaverns_seal_visibility_range")) or 200
seal_waypoint_def.on_discovery = named_waypoints.default_discovery_popup
end
named_waypoints.register_named_waypoints("puzzle_seals", seal_waypoint_def)
if name_generator_path then
name_generator.parse_lines(io.lines(modpath.."/underworld_names.cfg"))
name_pit = function()
return name_generator.generate("glowing_pits")
end
name_ruin = function()
return name_generator.generate("underworld_ruins")
end
local underworld_ruin_def = {
default_name = S("Ancient ruin"),
discovery_volume_radius = tonumber(minetest.settings:get("dfcaverns_ruin_discovery_range")) or 40,
visibility_requires_item = item_required,
}
if minetest.settings:get_bool("dfcaverns_show_ruins_in_hud", true) then
underworld_ruin_def.visibility_volume_radius = tonumber(minetest.settings:get("dfcaverns_ruin_visibility_range")) or 250
underworld_ruin_def.on_discovery = named_waypoints.default_discovery_popup
end
named_waypoints.register_named_waypoints("underworld_ruins", underworld_ruin_def)
end
end
local c_slade = df_caverns.node_id.slade
local c_slade_block = df_caverns.node_id.slade_block
local c_air = df_caverns.node_id.air
local c_water = df_caverns.node_id.water
local c_glowstone = df_caverns.node_id.glowstone
local c_amethyst = df_caverns.node_id.amethyst
local c_pit_plasma = df_caverns.node_id.pit_plasma
local MP = minetest.get_modpath(minetest.get_current_modname())
local oubliette_schematic = dofile(MP.."/schematics/oubliette.lua")
@ -60,6 +134,9 @@ local y_min = median - 2*wave_mult + floor_displace - 2*floor_mult
--df_caverns.config.underworld_min = y_min
--local poisson = mapgen_helper.get_poisson_points({x=-32000, z=-32000}, {x=32000, z=32000}, 1000)
--minetest.debug(dump(poisson.objects))
---------------------------------------------------------
-- Buildings
@ -67,8 +144,11 @@ local oubliette_threshold = 0.8
local town_threshold = 1.1
local local_random = function(x, z)
local next_seed = math.floor(math.random()*2^21)
math.randomseed(x + z*2^16)
return math.random()
local ret = math.random()
math.randomseed(next_seed)
return ret
end
-- create a deterministic list of buildings
@ -196,9 +276,9 @@ local pit_region_size = region_mapblocks * mapgen_chunksize * 16
local scatter_2d = function(min_xz, gridscale, border_width)
local bordered_scale = gridscale - 2 * border_width
local point = {}
point.x = math.random() * bordered_scale + min_xz.x + border_width
point.x = math.floor(math.random() * bordered_scale + min_xz.x + border_width)
point.y = 0
point.z = math.random() * bordered_scale + min_xz.z + border_width
point.z = math.floor(math.random() * bordered_scale + min_xz.z + border_width)
return point
end
@ -207,19 +287,19 @@ local get_corner = function(pos)
return {x = math.floor((pos.x+32) / pit_region_size) * pit_region_size - 32, z = math.floor((pos.z+32) / pit_region_size) * pit_region_size - 32}
end
local mapgen_seed = tonumber(minetest.get_mapgen_setting("seed"))
local mapgen_seed = tonumber(minetest.get_mapgen_setting("seed")) % 2^21
local get_pit = function(pos)
if region_mapblocks < 1 then return nil end
local corner_xz = get_corner(pos)
local next_seed = math.floor(math.random() * 2^31)
local next_seed = math.floor(math.random() * 2^21)
math.randomseed(corner_xz.x + corner_xz.z * 2 ^ 8 + mapgen_seed)
local location = scatter_2d(corner_xz, pit_region_size, radius_pit_max + radius_pit_variance)
local variance_multiplier = math.random()
local radius = variance_multiplier * (radius_pit_max - 15) + 15
local variance = radius_pit_variance/2 + radius_pit_variance*variance_multiplier/2
local depth = math.random(plasma_depth_min, plasma_depth_max)
local depth = math.random(plasma_depth_min, plasma_depth_max)
math.randomseed(next_seed)
return {location = location, radius = radius, variance = variance, depth = depth}
end
@ -242,11 +322,12 @@ minetest.register_chatcommand("find_pit", {
func = function(name, param)
local player = minetest.get_player_by_name(name)
local pit = get_pit(player:get_pos())
minetest.chat_send_player(name, "Pit location: x=" .. math.floor(pit.location.x) .. " z=" .. math.floor(pit.location.z))
if pit then
minetest.chat_send_player(name, "Pit location: x=" .. math.floor(pit.location.x) .. " z=" .. math.floor(pit.location.z))
end
end,
})
minetest.register_on_generated(function(minp, maxp, seed)
--if out of range of cave definition limits, abort
@ -266,7 +347,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
local pit = get_pit(minp)
--minetest.chat_send_all(minetest.pos_to_string(pit.location))
local buildings = get_buildings(emin, emax, nvals_zone)
local pit_uninitialized = true
@ -279,8 +360,16 @@ minetest.register_on_generated(function(minp, maxp, seed)
local wave = nvals_wave[index2d] * wave_mult
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)
if named_waypoints_path and floor_height == y and pit and pit.location.x == x and pit.location.z == z then
named_waypoints.add_waypoint("glowing_pits", {x=x, y=y, z=z}, {name=name_pit()})
end
local underside_height = math.floor(y_min + math.abs(wave) / 5)+2 -- divide wave by five to smooth out the underside of the slade, we only want the interface to ripple a little down here
local ceiling_height = math.floor(abs_cave * ceiling_mult + median + ceiling_displace + wave)
if y < floor_height and y > y_min + math.abs(wave) / 5 then -- divide wave by five to smooth out the underside of the slade, we only want the interface to ripple a little down here
if (y == underside_height or y == underside_height - 1) and (x % 8 == 0 or z % 8 == 0) then
data[vi] = c_air
elseif y < floor_height and y > underside_height then
data[vi] = c_slade
if pit and
pit.location.x - radius_pit_max - radius_pit_variance < maxp.x and
@ -290,13 +379,13 @@ minetest.register_on_generated(function(minp, maxp, seed)
then
-- there's a pit nearby
if pit_uninitialized then
nvals_pit, area_pit = mapgen_helper.perlin3d("df_cavern:perlin_cave", minp, maxp, perlin_pit) -- determine which areas are spongey with warrens
nvals_pit, area_pit = mapgen_helper.perlin3d("df_cavern:perlin_cave", minp, maxp, perlin_pit)
pit_uninitialized = false
end
local pit_value = nvals_pit[area_pit:index(x,y,z)] * pit.variance
local distance = vector.distance({x=x, y=y, z=z}, {x=pit.location.x, y=y, z=pit.location.z}) + pit_value
if distance < pit.radius -3 then
if y < median + floor_displace + wave - pit.depth then
if distance < pit.radius -2.5 then
if y < median + floor_displace + wave - pit.depth or y < underside_height + plasma_depth_min then
data[vi] = c_pit_plasma
else
data[vi] = c_air
@ -308,8 +397,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
df_underworld_items.underworld_shard(data, area, vi)
end
end
end
elseif y < ceiling_height and data[vi] ~= c_amethyst then
end
elseif y >= floor_height and y < ceiling_height and data[vi] ~= c_amethyst then
data[vi] = c_air
elseif data[vi] == c_water then
data[vi] = c_air -- no water down here
@ -369,7 +458,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
building.pos.y = floor_height
--minetest.chat_send_all("placing " .. building.building_type .. " at " .. minetest.pos_to_string(building.pos))
if building.building_type == "oubliette" then
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, oubliette_schematic)
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, oubliette_schematic)
elseif building.building_type == "open oubliette" then
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, oubliette_schematic, 0, {["df_underworld_items:slade_seal"] = "air"})
elseif building.building_type == "lamppost" then
@ -378,6 +467,11 @@ minetest.register_on_generated(function(minp, maxp, seed)
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, small_building_schematic, building.rotation)
elseif building.building_type == "medium building" then
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, medium_building_schematic, building.rotation)
if name_generator_path then
if not next(named_waypoints.get_waypoints_in_area("underworld_ruins", vector.subtract(building.pos, 250), vector.add(building.pos, 250))) then
named_waypoints.add_waypoint("underworld_ruins", {x=building.pos.x, y=floor_height+1, z=building.pos.z}, {name=name_ruin()})
end
end
elseif building.building_type == "small slab" then
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, small_slab_schematic, building.rotation)
else
@ -388,6 +482,25 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
end
end
-- puzzle seal
local puzzle_seal = nil
if pit_uninitialized and math.random() < 0.05 then
local index2d = mapgen_helper.index2d(emin, emax, minp.x + 3, minp.z + 3)
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
local wave = nvals_wave[index2d] * wave_mult
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)
local underside_height = math.floor(y_min + math.abs(wave) / 5)
if floor_height < maxp.y and floor_height > minp.y then
for plat_vi in area:iter(minp.x, floor_height-6, minp.z, minp.x+6, floor_height, minp.z+6) do
data[plat_vi] = c_slade_block
end
puzzle_seal = {x=minp.x+3, y=floor_height+1, z=minp.z+3}
minetest.log("info", "Puzzle seal generated at " .. minetest.pos_to_string(puzzle_seal))
end
end
--send data back to voxelmanip
vm:set_data(data)
@ -399,6 +512,17 @@ minetest.register_on_generated(function(minp, maxp, seed)
--write it to world
vm:write_to_map()
if puzzle_seal ~= nil then
if named_waypoints_path then
named_waypoints.add_waypoint("puzzle_seals", puzzle_seal)
end
minetest.place_schematic({x=puzzle_seal.x-3, y=puzzle_seal.y, z=puzzle_seal.z-3}, df_underworld_items.seal_temple_schem, 0, {}, true)
local node_name = minetest.get_node(puzzle_seal).name
local node_def = minetest.registered_nodes[node_name]
node_def.on_construct(puzzle_seal)
end
if bones_loot_path then
for i = 1, 30 do
local x = math.random(minp.x, maxp.x)
@ -406,7 +530,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
local index2d = mapgen_helper.index2d(emin, emax, x, z)
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
local wave = nvals_wave[index2d] * wave_mult
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)-1
local ceiling_height = math.floor(abs_cave * ceiling_mult + median + ceiling_displace + wave)
if floor_height < ceiling_height then
local zone = math.abs(nvals_zone[index2d])
@ -433,11 +557,27 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
end
local chunk_generation_time = math.ceil((os.clock() - t_start) * 1000) --grab how long it took
if chunk_generation_time < 1000 then
minetest.log("info", "[df_caverns] underworld mapblock generation took "..chunk_generation_time.." ms") --tell people how long
else
minetest.log("warning", "[df_caverns] underworld took "..chunk_generation_time.." ms to generate map block "
.. minetest.pos_to_string(minp) .. minetest.pos_to_string(maxp))
if hunters_enabled then
local x = math.random(minp.x, maxp.x)
local z = math.random(minp.z, maxp.z)
local index2d = mapgen_helper.index2d(emin, emax, x, z)
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
local wave = nvals_wave[index2d] * wave_mult
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)-1
local zone = math.abs(nvals_zone[index2d])
if math.random() < zone / 4 then -- hunters are more common in the built-up areas. zone/4 gives ~ 400 hunters per square kilometer.
for y = floor_height, floor_height+20 do
local target_pos = {x=x, y=y, z=z}
local target_node = minetest.get_node(target_pos)
if minetest.get_item_group(target_node.name, "slade") == 0 then
minetest.set_node(target_pos, {name="df_underworld_items:hunter_statue"})
break
end
end
end
end
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
mapgen_helper.record_time("df_caverns underworld", time_taken)
end)

View File

@ -0,0 +1,18 @@
name "glowing_pits" {
customGroupA = "Actinic, Amethyst, Angry, Atrocious, Bad, Blighted, Baneful, Baleful, Beastly, Calamitous, Corrupt, Crazed, Damnable, Demoniacal, Demonic, Depraved, Destructive, Devilish, Diabolical, Disastrous, Execrable, Fiendish, Foul, Frenzied, Glaring, Harmful, Hateful, Heinous, Hellish, Hideous, Infernal, Iniquitous, Injurious, Loathsome, Lost, Maleficent, Malevolent, Malicious, Malignant, Manic, Nefarious, Nightmare, Obscene, Offensive, Pernicious, Poison, Possessed, Rancorous, Repugnant, Repulsive, Revolting, Spiteful, Unhallowed, Unpleasant, Vicious, Vile, Villainous, Violent, Wicked, Wrathful"
customGroupB = "Abyss, Aperture, Breach, Cavity, Chasm, Crevasse, Depth, Deep, Fissure, Funnel, Gate, Gulf, Hell, Hole, Hollow, Inferno, Maw, Mouth, Opening, Pit, Portal, Puncture, Ravager, Rent, Rift, Rim, Schism, Shaft, Split, Throat, Void, Well"
customGroupC = "Adversity, Affliction, Annihilation, Bale, Bane, Blight, Calamity, Cataclysm, Catastrophe, Collapse, Conclusion, Condemnation, Death, Defeat, Destiny, Destruction, Disaster, Doom, Downfall, Failure, Grief, Harm, Hazard, Judgment, Karma, Misadventure, Mischance, Misfortune, Mishap, Ruin, Ruination, Tragedy, Undoing, Verdict, Woe"
rules = "%50The_$A_$B, The_$B_of_$C, %10The_$A_$B_of_$C"
}
name "underworld_ruins" {
customGroupA = "Abandoned, Absent, Adrift, Alien, Anonymous, Bare, Barren, Blank, Buried, Clandestine, Cloaked, Concealed, Covered, Cryptic, Dark, Dead, Depleted, Deserted, Desolate, Despoiled, Destitute, Devoid, Disappeared, Distant, Exhausted, Empty, Forfeit, Forfeited, Forsaken, Hidden, Incognito, Indiscernible, Invisible, Irretrievable, Irrevocable, Masked, Mislaid, Misplaced, Mystic, Mystical, Nameless, Obscured, Secluded, Secret, Sequestered, Shadowy, Shrouded, Stark, Strange, Uncelebrated, Uncharted, Undiscovered, Unexplained, Unexplored, Unfamiliar, Unfilled, Unidentified, Unknown, Unnamed, Unredeemed, Unsung, Untold, Vacant, Vacated, Vanished, Veiled, Wayward, Warrior's, King's, Knave's, Coward's, Cardinal's, Priest's, Soldier's, Noble, Steadfast, Children's, Howling, Silent, Grinding, Dusty"
customGroupB = "Temple, Chapel, House, Sanctuary, Shrine, Fortress, Tomb, Crypt, Graves, Citadel, Garrison, Rampart, Redoubt, Refuge, Asylum, Haven, Hideout, Retreat, Shelter, Stronghold, Covert, Den, Settlement, Preserve, Seat, Watch, Bulwark, Necropolis, Catacomb, Ruin, Hulk, Wreck"
rules = "The_$A_$B"
}

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_farming.S
local wheat_grow_time = df_farming.config.plant_growth_time * df_farming.config.cave_wheat_delay_multiplier / 8
@ -17,11 +15,18 @@ local register_cave_wheat = function(number)
inventory_image = "dfcaverns_cave_wheat_"..tostring(number)..".png",
paramtype = "light",
walkable = false,
is_ground_content = false,
buildable_to = true,
floodable = true,
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11},
sounds = default.node_sound_leaves_defaults(),
sounds = df_farming.sounds.leaves,
selection_box = {
type = "fixed",
fixed = {
{-8/16, -8/16, -8/16, 8/16, -8/16 + 2*number/16, 8/16},
},
},
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, name, elapsed)
end,
@ -96,12 +101,15 @@ minetest.register_craft({
burntime = 2
})
-------------
--- Flour and bread
minetest.register_craftitem("df_farming:cave_flour", {
description = S("Cave Wheat Flour"),
_doc_items_longdesc = df_farming.doc.cave_flour_desc,
_doc_items_usagehelp = df_farming.doc.cave_flour_usage,
inventory_image = "dfcaverns_flour.png",
groups = {flammable = 1, dfcaverns_cookable = 1},
groups = {flammable = 1, dfcaverns_cookable = 1, food_flour = 1},
})
minetest.register_craftitem("df_farming:cave_bread", {
@ -109,7 +117,9 @@ minetest.register_craftitem("df_farming:cave_bread", {
_doc_items_longdesc = df_farming.doc.cave_bread_desc,
_doc_items_usagehelp = df_farming.doc.cave_bread_usage,
inventory_image = "dfcaverns_prepared_food13x16.png",
sound = {eat = {name = "df_farming_chomp_crunch", gain = 1.0}},
on_use = minetest.item_eat(5),
_hunger_ng = {satiates = 5},
groups = {flammable = 2, food = 5},
})
@ -146,3 +156,72 @@ minetest.register_craft({
output = "df_farming:cave_bread",
recipe = "df_farming:cave_flour"
})
--------
-- Straw
minetest.register_node("df_farming:cave_straw", {
description = S("Cave Straw"),
tiles = {"dfcaverns_cave_straw.png"},
is_ground_content = false,
groups = {snappy=3, flammable=4, fall_damage_add_percent=-30, straw=1},
sounds = df_farming.sounds.leaves,
})
minetest.register_craft({
output = "df_farming:cave_straw 3",
recipe = {
{"df_farming:cave_wheat", "df_farming:cave_wheat", "df_farming:cave_wheat"},
{"df_farming:cave_wheat", "df_farming:cave_wheat", "df_farming:cave_wheat"},
{"df_farming:cave_wheat", "df_farming:cave_wheat", "df_farming:cave_wheat"},
}
})
minetest.register_craft({
output = "df_farming:cave_wheat 3",
recipe = {
{"df_farming:cave_straw"},
}
})
---------
-- Trample support
if minetest.get_modpath("footprints") then
minetest.register_node("df_farming:wheat_trampled", {
description = S("Flattened Cave Wheat"),
tiles = {"dfcaverns_cave_wheat_flattened.png"},
inventory_image = "dfcaverns_cave_wheat_flattened.png",
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
buildable_to = true,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -3 / 8, 0.5}
},
},
groups = {snappy = 3, flammable = 2, attached_node = 1},
drop = "",
sounds = df_farming.sounds.leaves,
})
footprints.register_trample_node("df_farming:cave_wheat_5", {
trampled_node_name = "df_farming:wheat_trampled",
randomize_trampled_param2 = true,
})
footprints.register_trample_node("df_farming:cave_wheat_6", {
trampled_node_name = "df_farming:wheat_trampled",
randomize_trampled_param2 = true,
})
footprints.register_trample_node("df_farming:cave_wheat_7", {
trampled_node_name = "df_farming:wheat_trampled",
randomize_trampled_param2 = true,
})
footprints.register_trample_node("df_farming:cave_wheat_8", {
trampled_node_name = "df_farming:wheat_trampled",
randomize_trampled_param2 = true,
})
end

View File

@ -7,11 +7,11 @@ local print_settingtypes = false
local function setting(stype, name, default, description)
local value
if stype == "bool" then
value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name)
value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name, default)
elseif stype == "string" then
value = minetest.setting_get(CONFIG_FILE_PREFIX..name)
value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
elseif stype == "int" or stype == "float" then
value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name))
value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
end
if value == nil then
value = default
@ -34,7 +34,7 @@ local plants = {
--Plants
setting("int", "plant_growth_time", 500, "Base plant growth time")
setting("int", "plant_growth_time", 3600, "Base plant growth time") -- 60 minutes
for _, plant in pairs(plants) do
setting("float", plant.name.."_delay_multiplier", plant.delay_multiplier, plant.name.." growth delay multiplier")

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_farming.S
local register_cooking_recipes = function(def)
local prefix = def.prefix
@ -11,26 +9,32 @@ local register_cooking_recipes = function(def)
_doc_items_longdesc = df_farming.doc.simple_meal_desc,
_doc_items_usagehelp = df_farming.doc.simple_meal_usage,
inventory_image = def.simple.image,
sound = def.simple.sound,
on_use = minetest.item_eat(4),
groups = {food = 4},
})
_hunger_ng = {satiates = 4},
})
minetest.register_craftitem("df_farming:"..item.."_medium_meal", {
description = def.medium.name,
_doc_items_longdesc = df_farming.doc.medium_meal_desc,
_doc_items_usagehelp = df_farming.doc.medium_meal_usage,
inventory_image = def.medium.image,
sound = def.medium.sound,
on_use = minetest.item_eat(6),
groups = {food = 6},
_hunger_ng = {satiates = 6},
})
minetest.register_craftitem("df_farming:"..item.."_complex_meal", {
description = def.complex.name,
_doc_items_longdesc = df_farming.doc.complex_meal_desc,
_doc_items_usagehelp = df_farming.doc.complex_meal_usage,
inventory_image = def.complex.image,
sound = def.complex.sound,
on_use = minetest.item_eat(8),
groups = {food = 8},
_hunger_ng = {satiates = 8},
})
minetest.register_alias("dfcaverns:"..item.."_biscuit", "df_farming:"..item.."_simple_meal")
minetest.register_alias("dfcaverns:"..item.."_stew", "df_farming:"..item.."_medium_meal")
minetest.register_alias("dfcaverns:"..item.."_roast", "df_farming:"..item.."_complex_meal")
@ -58,70 +62,75 @@ local register_cooking_recipes = function(def)
})
end
--{
-- prefix =,
-- item =,
-- replacements =,
-- simple = {name = , image = },
-- medium = {name = , image = },
-- complex = {name = , image = },
-- simple = {name = , image = , sound = },
-- medium = {name = , image = , sound = },
-- complex = {name = , image = , sound = },
--}
local chomp = {eat = {name = "df_farming_chomp_crunch", gain = 1.0}}
local crisp = {eat = {name = "df_farming_crisp_chew", gain = 1.0}}
local gummy = {eat = {name = "df_farming_gummy_chew", gain = 1.0}}
local mushy = {eat = {name = "df_farming_mushy_chew", gain = 1.0}}
local soft = {eat = {name = "df_farming_soft_chew", gain = 1.0}}
register_cooking_recipes({prefix="df_farming", item="cave_flour",
simple = {name=S("Cave Wheat Flour Biscuit"), image="dfcaverns_prepared_food08x16.png"},
medium = {name=S("Cave Wheat Flour Bun"), image="dfcaverns_prepared_food11x16.png"},
complex = {name=S("Cave Wheat Flour Pancake"), image="dfcaverns_prepared_food07x16.png"},
simple = {name=S("Cave Wheat Flour Biscuit"), image="dfcaverns_prepared_food08x16.png", sound = crisp},
medium = {name=S("Cave Wheat Flour Bun"), image="dfcaverns_prepared_food11x16.png", sound = mushy},
complex = {name=S("Cave Wheat Flour Pancake"), image="dfcaverns_prepared_food07x16.png", sound = mushy},
})
register_cooking_recipes({prefix="df_farming", item="cave_wheat_seed",
simple = {name=S("Cave Wheat Seed Loaf"), image="dfcaverns_prepared_food17x16.png"},
medium = {name=S("Cave Wheat Seed Puffs"), image="dfcaverns_prepared_food33x16.png"},
complex = {name=S("Cave Wheat Seed Risotto"), image="dfcaverns_prepared_food14x16.png"},
simple = {name=S("Cave Wheat Seed Loaf"), image="dfcaverns_prepared_food17x16.png", sound = crisp},
medium = {name=S("Cave Wheat Seed Puffs"), image="dfcaverns_prepared_food33x16.png", sound = soft},
complex = {name=S("Cave Wheat Seed Risotto"), image="dfcaverns_prepared_food14x16.png", sound = gummy},
})
register_cooking_recipes({prefix="df_farming", item="sweet_pod_seed",
simple = {name=S("Sweet Pod Spore Dumplings"), image="dfcaverns_prepared_food09x16.png"},
medium = {name=S("Sweet Pod Spore Single Crust Pie"), image="dfcaverns_prepared_food05x16.png"},
complex = {name=S("Sweet Pod Spore Brule"), image="dfcaverns_prepared_food22x16.png"},
simple = {name=S("Sweet Pod Spore Dumplings"), image="dfcaverns_prepared_food09x16.png", sound = mushy},
medium = {name=S("Sweet Pod Spore Single Crust Pie"), image="dfcaverns_prepared_food05x16.png", sound = mushy},
complex = {name=S("Sweet Pod Spore Brule"), image="dfcaverns_prepared_food22x16.png", sound = soft},
})
register_cooking_recipes({prefix="df_farming", item="sugar",
simple = {name=S("Sweet Pod Sugar Cookie"), image="dfcaverns_prepared_food02x16.png"},
medium = {name=S("Sweet Pod Sugar Gingerbread"), image="dfcaverns_prepared_food21x16.png"},
complex = {name=S("Sweet Pod Sugar Roll"), image="dfcaverns_prepared_food25x16.png"},
simple = {name=S("Sweet Pod Sugar Cookie"), image="dfcaverns_prepared_food02x16.png", sound = crisp},
medium = {name=S("Sweet Pod Sugar Gingerbread"), image="dfcaverns_prepared_food21x16.png", sound = chomp},
complex = {name=S("Sweet Pod Sugar Roll"), image="dfcaverns_prepared_food25x16.png", sound = crisp},
})
register_cooking_recipes({prefix="group", item="plump_helmet",
simple = {name=S("Plump Helmet Mince"), image="dfcaverns_prepared_food15x16.png"},
medium = {name=S("Plump Helmet Stalk Sausage"), image="dfcaverns_prepared_food18x16.png"},
complex = {name=S("Plump Helmet Roast"), image="dfcaverns_prepared_food04x16.png"},
simple = {name=S("Plump Helmet Mince"), image="dfcaverns_prepared_food15x16.png", sound = mushy},
medium = {name=S("Plump Helmet Stalk Sausage"), image="dfcaverns_prepared_food18x16.png", sound = gummy},
complex = {name=S("Plump Helmet Roast"), image="dfcaverns_prepared_food04x16.png", sound = mushy},
})
register_cooking_recipes({prefix="df_farming", item="plump_helmet_spawn",
simple = {name=S("Plump Helmet Spawn Soup"), image="dfcaverns_prepared_food10x16.png"},
medium = {name=S("Plump Helmet Spawn Jambalaya"), image="dfcaverns_prepared_food01x16.png"},
complex = {name=S("Plump Helmet Sprout Stew"), image="dfcaverns_prepared_food26x16.png"},
simple = {name=S("Plump Helmet Spawn Soup"), image="dfcaverns_prepared_food10x16.png", sound = gummy},
medium = {name=S("Plump Helmet Spawn Jambalaya"), image="dfcaverns_prepared_food01x16.png", sound = soft},
complex = {name=S("Plump Helmet Sprout Stew"), image="dfcaverns_prepared_food26x16.png", sound = gummy},
})
register_cooking_recipes({prefix="df_farming", item="quarry_bush_leaves",
simple = {name=S("Quarry Bush Leaf Spicy Bun"), image="dfcaverns_prepared_food23x16.png"},
medium = {name=S("Quarry Bush Leaf Croissant"), image="dfcaverns_prepared_food29x16.png"},
complex = {name=S("Stuffed Quarry Bush Leaf"), image="dfcaverns_prepared_food27x16.png"},
simple = {name=S("Quarry Bush Leaf Spicy Bun"), image="dfcaverns_prepared_food23x16.png", sound = soft},
medium = {name=S("Quarry Bush Leaf Croissant"), image="dfcaverns_prepared_food29x16.png", sound = soft},
complex = {name=S("Stuffed Quarry Bush Leaf"), image="dfcaverns_prepared_food27x16.png", sound = chomp},
})
register_cooking_recipes({prefix="df_farming", item="quarry_bush_seed",
simple = {name=S("Rock Nut Bread"), image="dfcaverns_prepared_food16x16.png"},
medium = {name=S("Rock Nut Cookie"), image="dfcaverns_prepared_food07x16.png"},
complex = {name=S("Rock Nut Cake"), image="dfcaverns_prepared_food03x16.png"},
simple = {name=S("Rock Nut Bread"), image="dfcaverns_prepared_food16x16.png", sound = soft},
medium = {name=S("Rock Nut Cookie"), image="dfcaverns_prepared_food07x16.png", sound = chomp},
complex = {name=S("Rock Nut Cake"), image="dfcaverns_prepared_food03x16.png", sound = soft},
})
register_cooking_recipes({prefix="df_farming", item="dimple_cup_seed",
simple = {name=S("Dimple Cup Spore Flatbread"), image="dfcaverns_prepared_food12x16.png"},
medium = {name=S("Dimple Cup Spore Scone"), image="dfcaverns_prepared_food32x16.png"},
complex = {name=S("Dimple Cup Spore Roll"), image="dfcaverns_prepared_food31x16.png"},
simple = {name=S("Dimple Cup Spore Flatbread"), image="dfcaverns_prepared_food12x16.png", sound = crisp},
medium = {name=S("Dimple Cup Spore Scone"), image="dfcaverns_prepared_food32x16.png", sound = chomp},
complex = {name=S("Dimple Cup Spore Roll"), image="dfcaverns_prepared_food31x16.png", sound = soft},
})
register_cooking_recipes({prefix="df_farming", item="pig_tail_seed",
simple = {name=S("Pig Tail Spore Sandwich"), image="dfcaverns_prepared_food20x16.png"},
medium = {name=S("Pig Tail Spore Tofu"), image="dfcaverns_prepared_food30x16.png"},
complex = {name=S("Pig Tail Spore Casserole"), image="dfcaverns_prepared_food34x16.png"},
simple = {name=S("Pig Tail Spore Sandwich"), image="dfcaverns_prepared_food20x16.png", sound = soft},
medium = {name=S("Pig Tail Spore Tofu"), image="dfcaverns_prepared_food30x16.png", sound = gummy},
complex = {name=S("Pig Tail Spore Casserole"), image="dfcaverns_prepared_food34x16.png", sound = mushy},
})
register_cooking_recipes({prefix="df_farming", item="dwarven_syrup_bucket", replacements={{"df_farming:dwarven_syrup_bucket", "bucket:bucket_empty"}},
simple = {name=S("Dwarven Syrup Taffy"), image="dfcaverns_prepared_food19x16.png"},
medium = {name=S("Dwarven Syrup Jellies"), image="dfcaverns_prepared_food06x16.png"},
complex = {name=S("Dwarven Syrup Delight"), image="dfcaverns_prepared_food24x16.png"},
simple = {name=S("Dwarven Syrup Taffy"), image="dfcaverns_prepared_food19x16.png", sound = gummy},
medium = {name=S("Dwarven Syrup Jellies"), image="dfcaverns_prepared_food06x16.png", sound = gummy},
complex = {name=S("Dwarven Syrup Delight"), image="dfcaverns_prepared_food24x16.png", sound = mushy},
})
-- dfcaverns_prepared_food28 is currently unused

View File

@ -0,0 +1,21 @@
df_farming.sounds = {}
df_farming.sounds.leaves = default.node_sound_leaves_defaults()
df_farming.sounds.water = default.node_sound_water_defaults()
df_farming.node_names = {}
df_farming.node_names.dirt = "default:dirt"
df_farming.node_names.dirt_moss = "df_farming:dirt_with_cave_moss"
df_farming.node_names.floor_fungus = "df_farming:cobble_with_floor_fungus"
df_farming.node_names.dirt_wet = "farming:soil_wet"
df_farming.node_names.mortar_pestle = "farming:mortar_pestle"
df_farming.node_names.bucket = "bucket:bucket_empty"
df_farming.node_names.wool_white = "wool:white"
-- these are only for initialization
minetest.after(0, function()
df_farming.sounds = nil
df_farming.node_names = nil
end)

View File

@ -1,9 +0,0 @@
default
farming?
cottages?
bucket?
dynamic_liquid?
wool?
intllib?
doc?
crafting?

View File

@ -1 +0,0 @@
Adds farmable underground plants that die in sunlight. Also includes various cooking reactions.

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_farming.S
local dimple_grow_time = df_farming.config.plant_growth_time * df_farming.config.dimple_cup_delay_multiplier / 4
@ -16,9 +14,16 @@ local register_dimple_cup = function(number)
paramtype = "light",
walkable = false,
floodable = true,
is_ground_content = false,
buildable_to = true,
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, color_blue = 1, light_sensitive_fungus = 11, flower = 1},
sounds = default.node_sound_leaves_defaults(),
sounds = df_farming.sounds.leaves,
selection_box = {
type = "fixed",
fixed = {
{-8/16, -8/16, -8/16, 8/16, -8/16 + 4*number/16, 8/16},
},
},
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, name, elapsed)

View File

@ -4,9 +4,7 @@ if not minetest.get_modpath("doc") then
return
end
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_farming.S
df_farming.doc.simple_meal_desc = S("A meal made from the admixture of two ingredients, it keeps well but are not a rich source of nutrients.")
df_farming.doc.simple_meal_usage = nil

View File

@ -1,10 +1,12 @@
df_farming = {}
--grab a shorthand for the filepath of the mod
local modpath = minetest.get_modpath(minetest.get_current_modname())
local modname = minetest.get_current_modname()
df_farming.S = minetest.get_translator(modname)
local modpath = minetest.get_modpath(modname)
--load companion lua files
dofile(modpath.."/config.lua")
dofile(modpath.."/dependencies.lua")
dofile(modpath.."/doc.lua")
dofile(modpath.."/aliases.lua")

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

View File

@ -0,0 +1,234 @@
# textdomain: df_farming
### cave_wheat.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave Straw=Höhlenstroh
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave Wheat=Höhlenweizen
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave Wheat Flour=Höhlenweizenmehl
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave Wheat Seed=Höhlenweizensamen
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dwarven Bread=Zwergenbrot
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Flattened Cave Wheat=Abgeflachter Höhlenweizen
### cooking.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave Wheat Flour Biscuit=Höhlenweizenmehlkeks
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave Wheat Flour Bun=Höhlenweizenmehlbrötchen
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave Wheat Flour Pancake=Höhlenweizenmehlpfannkuchen
Cave Wheat Seed Loaf=
Cave Wheat Seed Puffs=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave Wheat Seed Risotto=Höhlenweizensamen-Risotto
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dimple Cup Spore Flatbread=Dimple Cup Spore Fladenbrot
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dimple Cup Spore Roll=Dimple Cup Sporenrolle
Dimple Cup Spore Scone=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dwarven Syrup Delight=Zwergensirup-Freude
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dwarven Syrup Jellies=Zwergsirupgelees
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dwarven Syrup Taffy=Zwergensirup Taffy
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig Tail Spore Casserole=Schweineschwanz-Sporenauflauf
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig Tail Spore Sandwich=Schweineschwanz-Sporensandwich
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig Tail Spore Tofu=Schweineschwanzsporentofu
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump Helmet Mince=Pralles Helmhackfleisch
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump Helmet Roast=Praller Helmbraten
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump Helmet Spawn Jambalaya=Praller Helmlaich Jambalaya
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump Helmet Spawn Soup=Pralle Helmlaichsuppe
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump Helmet Sprout Stew=Praller Helmsprosseneintopf
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump Helmet Stalk Sausage=Pralle Helmstielwurst
Quarry Bush Leaf Croissant=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Quarry Bush Leaf Spicy Bun=Steinbruch Bush Leaf Spicy Bun
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Rock Nut Bread=Steinnussbrot
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Rock Nut Cake=Steinnusskuchen
Rock Nut Cookie=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Stuffed Quarry Bush Leaf=Gefülltes Steinbruch-Buschblatt
Sweet Pod Spore Brule=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet Pod Spore Dumplings=Sweet Pod Sporenknödel
Sweet Pod Spore Single Crust Pie=
Sweet Pod Sugar Cookie=
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet Pod Sugar Gingerbread=Sweet Pod Sugar Lebkuchen
Sweet Pod Sugar Roll=
### dimple_cup.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dimple Cup=Grübchen Tasse
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dimple Cup Spores=Grübchen Cup Sporen
### doc.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A crafting item that can be woven into textiles and other similar items.=Ein Handwerksgegenstand, der in Textilien und ähnliche Gegenstände eingewebt werden kann.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A meal made from the admixture of two ingredients, it keeps well but are not a rich source of nutrients.=Eine Mahlzeit, die aus der Beimischung von zwei Zutaten hergestellt wird. Sie ist gut haltbar, aber keine reichhaltige Nährstoffquelle.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A meal made from three ingredients mixed together. They're more wholesome, packing more nutrition into a single serving.=Eine Mahlzeit aus drei Zutaten gemischt. Sie sind gesünder und verpacken mehr Nahrung in einer einzigen Portion.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A rare breed of fungus from deep underground that produces a bushy cluster of rumpled gray 'blades'. The biological function of these blades is not known, as quarry bushes reproduce via hard-shelled nodules that grow down at the blade's base.=Eine seltene Pilzrasse aus dem tiefen Untergrund, die eine buschige Ansammlung zerknitterter grauer "Klingen" erzeugt. Die biologische Funktion dieser Klingen ist nicht bekannt, da sich Steinbruchbüsche über hartschalige Knötchen vermehren, die an der Klingenbasis nachwachsen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A species of lavender mushroom ubiquitous in caves that is most notable for the soft bioluminescence it produces.=Eine in Höhlen allgegenwärtige Lavendelpilzart, die sich vor allem durch ihre weiche Biolumineszenz auszeichnet.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Bread baked from cave wheat flour is tough and durable. A useful ration for long expeditions.=Aus Höhlenweizenmehl gebackenes Brot ist zäh und haltbar. Ein nützliches Verhältnis für lange Expeditionen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave wheat is literally a breed of grain-producing grass that somehow lost its ability to photosynthesize and adapted to a more fungal style of life.=Höhlenweizen ist buchstäblich eine Rasse von Getreide produzierendem Gras, das irgendwie seine Fähigkeit zur Photosynthese verloren hat und sich an einen eher pilzartigen Lebensstil anpasst.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave wheat seed ground into a powder suitable for cooking.=Den gemahlenen Weizensamen zu einem zum Kochen geeigneten Pulver aushöhlen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Crushing them in a bucket squeezes out a flavorful syrup.=Wenn man sie in einem Eimer zerquetscht, wird ein aromatischer Sirup herausgedrückt.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dead fungus quickly decays into an unrecognizable mess. It can be used as weak fuel or terrible decor.=Toter Pilz zerfällt schnell in ein nicht wiederzuerkennendes Chaos. Es kann als schwacher Kraftstoff oder schreckliches Dekor verwendet werden.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dimple cups can be dried, ground, and processed to extract a deep blue dye.=Grübchenbecher können getrocknet, gemahlen und verarbeitet werden, um einen tiefblauen Farbstoff zu extrahieren.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Four finely minced ingredients combine into a fine, full meal.=Vier fein gehackte Zutaten ergeben eine feine, vollständige Mahlzeit.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
It's not tasty, but it keeps you going.=Es ist nicht lecker, aber es hält dich am Laufen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Like its surface cousin, cave wheat produces grain that can be ground into a form of flour.=Höhlenweizen produziert wie sein Cousin an der Oberfläche Getreide, das zu Mehl gemahlen werden kann.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig tail stalks can be processed to extract fibers useful as thread.=Schweineschwanzstiele können verarbeitet werden, um Fasern zu extrahieren, die als Faden nützlich sind.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig tails are a fibrous fungal growth that's most notable for its twisting stalks. In a mature stand of pig tails the helical stalks intertwine into a dense mesh.=Schweineschwänze sind ein faseriges Pilzwachstum, das sich vor allem durch seine verdrehten Stiele auszeichnet. In einem ausgewachsenen Schweineschwanzbestand verflechten sich die helikalen Stiele zu einem dichten Netz.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump helmets are a thick, fleshy mushroom that's edible picked straight from the ground. They form a staple diet for both lost cave explorers and the fauna that preys on them.=Pralle Helme sind dicke, fleischige Pilze, die essbar direkt vom Boden gepflückt werden. Sie bilden eine Grundnahrungsmittel sowohl für verlorene Höhlenforscher als auch für die Fauna, die ihnen nachjagt.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are edible with processing.=Steinbruchbuschblätter und Knötchen (sogenannte Steinnüsse) können geerntet werden und sind bei der Verarbeitung essbar.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Quarry bush leaves can be used as an ingredient in foodstuffs.=Steinbruch Buschblätter können als Zutat in Lebensmitteln verwendet werden.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet pod sugar has a pink tint to it.=Süßer Schotenzucker hat eine rosa Tönung.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet pod syrup is thick and flavorful.=Süßer Schotensirup ist dick und aromatisch.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet pods grow in rich soil, and once they reach maturity they draw that supply of nutrients up to concentrate it in their fruiting bodies. They turn bright red when ripe and can be processed in a variety of ways to extract the sugars they contain.=Süße Schoten wachsen auf reichem Boden und sobald sie reif sind, ziehen sie diese Nährstoffversorgung auf, um sie in ihren Fruchtkörpern zu konzentrieren. Sie werden im reifen Zustand leuchtend rot und können auf verschiedene Weise verarbeitet werden, um den darin enthaltenen Zucker zu extrahieren.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The distinctive midnight-blue caps of these mushrooms are inverted, exposing their gills to any breeze that might pass, and have dimpled edges that give them their name.=Die markanten nachtblauen Kappen dieser Pilze sind umgedreht und setzen ihre Kiemen einer Brise aus, die vorbeiziehen könnte. Sie haben Noppenkanten, die ihnen ihren Namen geben.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The dried blades of a quarry bush add a welcome zing to recipes containing otherwise-bland subterranean foodstuffs, but they're too spicy to be eaten on their own.=Die getrockneten Klingen eines Steinbruchstrauchs verleihen Rezepten mit ansonsten milden unterirdischen Lebensmitteln eine willkommene Note, aber sie sind zu scharf, um allein gegessen zu werden.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
This mushroom is inedible but continues producing modest levels of light long after it's picked.=Dieser Pilz ist ungenießbar, produziert aber noch lange nach seiner Ernte bescheidene Lichtmengen.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Threads of pig tail fiber.=Fäden aus Schweineschwanzfaser.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Too strong and thick to drink straight, sweet pod syrup is useful in food recipes.=Zu stark und zu dick, um gerade zu trinken, ist süßer Schotensirup in Lebensmittelrezepten nützlich.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Too sweet to be eaten directly, it makes an excellent ingredient in food recipes.=Zu süß, um direkt gegessen zu werden, ist eine hervorragende Zutat für Lebensmittelrezepte.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Whatever this fungus was in life, it is now dead.=Was auch immer dieser Pilz im Leben war, er ist jetzt tot.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
When baked alone it forms an edible bread, but it combines well with other more flavorful ingredients.=Wenn es alleine gebacken wird, bildet es ein essbares Brot, das sich jedoch gut mit anderen geschmackvolleren Zutaten kombinieren lässt.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
When dried in an oven, sweet pods produce a granular sugary substance.=Wenn süße Schoten im Ofen getrocknet werden, entsteht eine körnige zuckerhaltige Substanz.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
When milled, sweet pods produce a granular sugary substance.=Süße Schoten produzieren beim Mahlen eine körnige zuckerhaltige Substanz.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
While they can be eaten fresh, they can be monotonous fare and are perhaps better appreciated as part of a more complex prepared dish.=Während sie frisch gegessen werden können, können sie eintönig sein und werden vielleicht besser als Teil eines komplexeren zubereiteten Gerichts geschätzt.
### pig_tail.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Flattened Pig Tail=Abgeflachter Schweineschwanz
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig Tail=Schweineschwanz
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig Tail Spore=Schweineschwanzspore
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig tail thread=Schweineschwanzfaden
### plants.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cavern Fungi=Höhlenpilze
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dead Fungus=Toter Pilz
### plump_helmet.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump Helmet=Praller Helm
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump Helmet Spawn=Praller Helmlaich
### quarry_bush.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Quarry Bush=Steinbruch Bush
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Quarry Bush Leaves=Steinbruch Bush Blätter
Rock Nuts=
### sweet_pod.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dwarven Syrup Bucket=Zwergen-Sirup-Eimer
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dwarven Syrup Source=Zwergensirupquelle
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Flowing Dwarven Syrup=Fließender Zwergensirup
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet Pod=Süße Schote
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet Pod Spores=Süße Schotensporen
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet Pod Sugar=Süßer Schotenzucker
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet Pods=Süße Schoten

View File

@ -0,0 +1,185 @@
# textdomain: df_farming
### cave_wheat.lua ###
Cave Straw=Grano di caverna
Cave Wheat=Grano di caverna
Cave Wheat Flour=Farina di grano di caverna
Cave Wheat Seed=Seme di grano di caverna
Dwarven Bread=Pane nanico
Flattened Cave Wheat=Grano di caverna
### cooking.lua ###
Cave Wheat Flour Biscuit=Farina di grano di caverna
Cave Wheat Flour Bun=Farina di grano di caverna
Cave Wheat Flour Pancake=Farina di grano di caverna
Cave Wheat Seed Loaf=Seme di grano di caverna
Cave Wheat Seed Puffs=Seme di grano di caverna
Cave Wheat Seed Risotto=Seme di grano di caverna
Dimple Cup Spore Flatbread=Spora di coppa increspata
Dimple Cup Spore Roll=Spora di coppa increspata
Dimple Cup Spore Scone=Spora di coppa increspata
Dwarven Syrup Delight=Secchio di sciroppo nanico
Dwarven Syrup Jellies=Sciroppo nanico
Dwarven Syrup Taffy=Sciroppo nanico
Pig Tail Spore Casserole=Spora di coda di maiale
Pig Tail Spore Sandwich=Spora di coda di maiale
Pig Tail Spore Tofu=Spora di coda di maiale
Plump Helmet Mince=Elmo rotondo
Plump Helmet Roast=Elmo rotondo
Plump Helmet Spawn Jambalaya=Prole di elmo rotondo
Plump Helmet Spawn Soup=Prole di elmo rotondo
Plump Helmet Sprout Stew=Prole di elmo rotondo
Plump Helmet Stalk Sausage=Prole di elmo rotondo
Quarry Bush Leaf Croissant=Foglia di cespuglio di cava
Quarry Bush Leaf Spicy Bun=Foglia di cespuglio di cava
Rock Nut Bread=Noce di roccia
Rock Nut Cake=Noce di roccia
Rock Nut Cookie=Noce di roccia
Stuffed Quarry Bush Leaf=Foglia di cespuglio di cava
Sweet Pod Spore Brule=Spora di baccello dolce
Sweet Pod Spore Dumplings=Spore di baccello dolce
Sweet Pod Spore Single Crust Pie=Spore di baccello dolce
Sweet Pod Sugar Cookie=Zucchero di baccello dolce
Sweet Pod Sugar Gingerbread=Zucchero di baccello dolce
Sweet Pod Sugar Roll=Zucchero di baccello dolce
### dimple_cup.lua ###
Dimple Cup=Coppa increspata
Dimple Cup Spores=Spore di coppa increspata
### doc.lua ###
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A crafting item that can be woven into textiles and other similar items.=Un oggetto di artigianato che può essere tessuto in tessuti e altri oggetti simili.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A meal made from the admixture of two ingredients, it keeps well but are not a rich source of nutrients.=Un pasto composto dalla miscela di due ingredienti, si conserva bene ma non è una ricca fonte di nutrienti.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A meal made from three ingredients mixed together. They're more wholesome, packing more nutrition into a single serving.=Un pasto composto da tre ingredienti mescolati insieme. Sono più sani e contengono più nutrimento in una singola porzione.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A rare breed of fungus from deep underground that produces a bushy cluster of rumpled gray 'blades'. The biological function of these blades is not known, as quarry bushes reproduce via hard-shelled nodules that grow down at the blade's base.=Una rara razza di fungo proveniente dal sottosuolo profondo che produce un folto gruppo di "lame" grigie spiegazzate. La funzione biologica di queste lame non è nota, poiché i cespugli di cava si riproducono tramite noduli a guscio duro che crescono alla base della lama.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A species of lavender mushroom ubiquitous in caves that is most notable for the soft bioluminescence it produces.=Una specie di fungo lavanda onnipresente nelle grotte che è più notevole per la morbida bioluminescenza che produce.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Bread baked from cave wheat flour is tough and durable. A useful ration for long expeditions.=Il pane cotto dalla farina di grano di grotta è duro e durevole. Un rapporto utile per lunghe spedizioni.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave wheat is literally a breed of grain-producing grass that somehow lost its ability to photosynthesize and adapted to a more fungal style of life.=Il grano delle caverne è letteralmente una razza di erba che produce grano che in qualche modo ha perso la sua capacità di fotosintetizzare e adattata a uno stile di vita più fungino.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Cave wheat seed ground into a powder suitable for cooking.=Semi di grano di caverna macinati in una polvere adatta alla cottura.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Crushing them in a bucket squeezes out a flavorful syrup.=Schiacciandoli in un secchio spreme uno sciroppo saporito.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dead fungus quickly decays into an unrecognizable mess. It can be used as weak fuel or terrible decor.=Il fungo morto decade rapidamente in un pasticcio irriconoscibile. Può essere usato come combustibile debole o arredamento terribile.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Dimple cups can be dried, ground, and processed to extract a deep blue dye.=Le coppe fossette possono essere asciugate, macinate e lavorate per estrarre un colorante blu intenso.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Four finely minced ingredients combine into a fine, full meal.=Quattro ingredienti finemente tritati si combinano in un fine pasto completo.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
It's not tasty, but it keeps you going.=Non è gustoso, ma ti fa andare avanti.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Like its surface cousin, cave wheat produces grain that can be ground into a form of flour.=Come il suo cugino di superficie, il grano delle caverne produce grano che può essere macinato in una forma di farina.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig tail stalks can be processed to extract fibers useful as thread.=Gli steli della coda di maiale possono essere lavorati per estrarre fibre utili come filo.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Pig tails are a fibrous fungal growth that's most notable for its twisting stalks. In a mature stand of pig tails the helical stalks intertwine into a dense mesh.=Le code di maiale sono una crescita fungina fibrosa che è più notevole per i suoi gambi contorti. In un gruppo maturo di code di maiale, gli steli elicoidali si intrecciano in una fitta rete.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Plump helmets are a thick, fleshy mushroom that's edible picked straight from the ground. They form a staple diet for both lost cave explorers and the fauna that preys on them.=I caschi paffuti sono un fungo spesso e carnoso che è commestibile raccolto direttamente da terra. Costituiscono una dieta base sia per gli esploratori di caverne perduti che per la fauna che li preda.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are edible with processing.=Le foglie ei noduli di arbusti di cava (chiamati "noci di roccia") possono essere raccolti e sono commestibili con la lavorazione.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Quarry bush leaves can be used as an ingredient in foodstuffs.=Le foglie di cespuglio di cava possono essere utilizzate come ingrediente nei prodotti alimentari.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet pod sugar has a pink tint to it.=Lo zucchero di baccello dolce ha una sfumatura rosa.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet pod syrup is thick and flavorful.=Lo sciroppo di baccello dolce è denso e saporito.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Sweet pods grow in rich soil, and once they reach maturity they draw that supply of nutrients up to concentrate it in their fruiting bodies. They turn bright red when ripe and can be processed in a variety of ways to extract the sugars they contain.=I baccelli dolci crescono in un terreno fertile e, una volta raggiunta la maturità, assorbono quella scorta di sostanze nutritive per concentrarla nei loro corpi fruttiferi. Diventano di un rosso brillante quando sono maturi e possono essere lavorati in vari modi per estrarre gli zuccheri che contengono.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The distinctive midnight-blue caps of these mushrooms are inverted, exposing their gills to any breeze that might pass, and have dimpled edges that give them their name.=I caratteristici cappucci blu notte di questi funghi sono invertiti, esponendo le loro branchie a qualsiasi brezza che potrebbe passare, e hanno bordi increspati che danno loro il nome.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
The dried blades of a quarry bush add a welcome zing to recipes containing otherwise-bland subterranean foodstuffs, but they're too spicy to be eaten on their own.=Le lame essiccate di un cespuglio di cava aggiungono un tocco di benvenuto alle ricette che contengono cibi sotterranei altrimenti blandi, ma sono troppo piccanti per essere mangiati da soli.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
This mushroom is inedible but continues producing modest levels of light long after it's picked.=Questo fungo non è commestibile ma continua a produrre livelli modesti di luce molto tempo dopo essere stato raccolto.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Threads of pig tail fiber.=Fili di fibra di coda di maiale.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Too strong and thick to drink straight, sweet pod syrup is useful in food recipes.=Troppo forte e denso per essere bevuto liscio, lo sciroppo di baccelli dolce è utile nelle ricette alimentari.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Too sweet to be eaten directly, it makes an excellent ingredient in food recipes.=Troppo dolce per essere consumato direttamente, è un ottimo ingrediente nelle ricette alimentari.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Whatever this fungus was in life, it is now dead.=Qualunque cosa fosse questo fungo in vita, ora è morto.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
When baked alone it forms an edible bread, but it combines well with other more flavorful ingredients.=Cotto da solo forma un pane commestibile, ma si abbina bene con altri ingredienti più saporiti.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
When dried in an oven, sweet pods produce a granular sugary substance.=Quando essiccati in un forno, i baccelli dolci producono una sostanza zuccherina granulare.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
When milled, sweet pods produce a granular sugary substance.=Quando vengono macinati, i baccelli dolci producono una sostanza zuccherina granulare.
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
While they can be eaten fresh, they can be monotonous fare and are perhaps better appreciated as part of a more complex prepared dish.=Sebbene possano essere consumati freschi, possono essere piatti monotoni e forse sono meglio apprezzati come parte di un piatto preparato più complesso.
### pig_tail.lua ###
Flattened Pig Tail=Coda di maiale
Pig Tail=Coda di maiale
Pig Tail Spore=Spora di coda di maiale
Pig tail thread=Filo di coda di maiale
### plants.lua ###
Cavern Fungi=Funghi di caverna
Dead Fungus=Fungo morto
### plump_helmet.lua ###
Plump Helmet=Elmo rotondo
Plump Helmet Spawn=Prole di elmo rotondo
### quarry_bush.lua ###
Quarry Bush=Cespuglio di cava
Quarry Bush Leaves=Foglie di cespuglio di cava
Rock Nuts=Noci di roccia
### sweet_pod.lua ###
Dwarven Syrup Bucket=Secchio di sciroppo nanico
Dwarven Syrup Source=Fonte di sciroppo nanico
Flowing Dwarven Syrup=Sciroppo nanico che scorre
Sweet Pod=Baccello dolce
Sweet Pod Spores=Spore di baccello dolce
Sweet Pod Sugar=Zucchero di baccello dolce
Sweet Pods=Baccelli dolci

View File

@ -1,470 +0,0 @@
# ITALIAN LOCALE FOR THE DFCAVERNS MODULE
# Copyright (C) 2017 FaceDeer <derksenmobile@gmail.com>
# This file is distributed under the same license as the DFCAVERNS package.
# Hamlet <h4mlet@riseup.net>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: dfcaverns module's Italian locale\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-11 03:51-0600\n"
"PO-Revision-Date: 2017-08-17 23:01+0100\n"
"Last-Translator: H4mlet <h4mlet@riseup.net>\n"
"Language-Team: ITALIANO\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.10\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: df_farming\cave_wheat.lua:10
#: df_farming\cave_wheat.lua:87
msgid "Cave Wheat"
msgstr "Grano di caverna"
#: df_farming\cave_wheat.lua:79
msgid "Cave Wheat Seed"
msgstr "Seme di grano di caverna"
#: df_farming\cave_wheat.lua:100
msgid "Cave Wheat Flour"
msgstr "Farina di grano di caverna"
#: df_farming\cave_wheat.lua:108
msgid "Dwarven Bread"
msgstr "Pane nanico"
#: df_farming\cooking.lua:72
#, fuzzy
msgid "Cave Wheat Flour Biscuit"
msgstr "Farina di grano di caverna"
#: df_farming\cooking.lua:73
#, fuzzy
msgid "Cave Wheat Flour Bun"
msgstr "Farina di grano di caverna"
#: df_farming\cooking.lua:74
#, fuzzy
msgid "Cave Wheat Flour Pancake"
msgstr "Farina di grano di caverna"
#: df_farming\cooking.lua:77
#, fuzzy
msgid "Cave Wheat Seed Loaf"
msgstr "Seme di grano di caverna"
#: df_farming\cooking.lua:78
#, fuzzy
msgid "Cave Wheat Seed Puffs"
msgstr "Seme di grano di caverna"
#: df_farming\cooking.lua:79
#, fuzzy
msgid "Cave Wheat Seed Risotto"
msgstr "Seme di grano di caverna"
#: df_farming\cooking.lua:82
#, fuzzy
msgid "Sweet Pod Spore Dumplings"
msgstr "Spore di baccello dolce"
#: df_farming\cooking.lua:83
#, fuzzy
msgid "Sweet Pod Spore Single Crust Pie"
msgstr "Spore di baccello dolce"
#: df_farming\cooking.lua:84
#, fuzzy
msgid "Sweet Pod Spore Brule"
msgstr "Spora di baccello dolce"
#: df_farming\cooking.lua:87
#, fuzzy
msgid "Sweet Pod Sugar Cookie"
msgstr "Zucchero di baccello dolce"
#: df_farming\cooking.lua:88
#, fuzzy
msgid "Sweet Pod Sugar Gingerbread"
msgstr "Zucchero di baccello dolce"
#: df_farming\cooking.lua:89
#, fuzzy
msgid "Sweet Pod Sugar Roll"
msgstr "Zucchero di baccello dolce"
#: df_farming\cooking.lua:92
#, fuzzy
msgid "Plump Helmet Mince"
msgstr "Elmo rotondo"
#: df_farming\cooking.lua:93
#, fuzzy
msgid "Plump Helmet Stalk Sausage"
msgstr "Prole di elmo rotondo"
#: df_farming\cooking.lua:94
#, fuzzy
msgid "Plump Helmet Roast"
msgstr "Elmo rotondo"
#: df_farming\cooking.lua:97
#, fuzzy
msgid "Plump Helmet Spawn Soup"
msgstr "Prole di elmo rotondo"
#: df_farming\cooking.lua:98
#, fuzzy
msgid "Plump Helmet Spawn Jambalaya"
msgstr "Prole di elmo rotondo"
#: df_farming\cooking.lua:99
#, fuzzy
msgid "Plump Helmet Sprout Stew"
msgstr "Prole di elmo rotondo"
#: df_farming\cooking.lua:102
#, fuzzy
msgid "Quarry Bush Leaf Spicy Bun"
msgstr "Foglia di cespuglio di cava"
#: df_farming\cooking.lua:103
#, fuzzy
msgid "Quarry Bush Leaf Croissant"
msgstr "Foglia di cespuglio di cava"
#: df_farming\cooking.lua:104
#, fuzzy
msgid "Stuffed Quarry Bush Leaf"
msgstr "Foglia di cespuglio di cava"
#: df_farming\cooking.lua:107
#, fuzzy
msgid "Rock Nut Bread"
msgstr "Noce di roccia"
#: df_farming\cooking.lua:108
#, fuzzy
msgid "Rock Nut Cookie"
msgstr "Noce di roccia"
#: df_farming\cooking.lua:109
#, fuzzy
msgid "Rock Nut Cake"
msgstr "Noce di roccia"
#: df_farming\cooking.lua:112
#, fuzzy
msgid "Dimple Cup Spore Flatbread"
msgstr "Spora di coppa increspata"
#: df_farming\cooking.lua:113
#, fuzzy
msgid "Dimple Cup Spore Scone"
msgstr "Spora di coppa increspata"
#: df_farming\cooking.lua:114
#, fuzzy
msgid "Dimple Cup Spore Roll"
msgstr "Spora di coppa increspata"
#: df_farming\cooking.lua:117
#, fuzzy
msgid "Pig Tail Spore Sandwich"
msgstr "Spora di coda di maiale"
#: df_farming\cooking.lua:118
#, fuzzy
msgid "Pig Tail Spore Tofu"
msgstr "Spora di coda di maiale"
#: df_farming\cooking.lua:119
#, fuzzy
msgid "Pig Tail Spore Casserole"
msgstr "Spora di coda di maiale"
#: df_farming\cooking.lua:122
#, fuzzy
msgid "Dwarven Syrup Taffy"
msgstr "Sciroppo nanico"
#: df_farming\cooking.lua:123
#, fuzzy
msgid "Dwarven Syrup Jellies"
msgstr "Sciroppo nanico"
#: df_farming\cooking.lua:124
#, fuzzy
msgid "Dwarven Syrup Delight"
msgstr "Secchio di sciroppo nanico"
#: df_farming\dimple_cup.lua:10
msgid "Dimple Cup"
msgstr "Coppa increspata"
#: df_farming\dimple_cup.lua:68
msgid "Dimple Cup Spores"
msgstr "Spore di coppa increspata"
#: df_farming\doc.lua:11
msgid ""
"A meal made from the admixture of two ingredients, it keeps well but are not "
"a rich source of nutrients."
msgstr ""
#: df_farming\doc.lua:13
msgid ""
"A meal made from three ingredients mixed together. They're more wholesome, "
"packing more nutrition into a single serving."
msgstr ""
#: df_farming\doc.lua:15
msgid "Four finely minced ingredients combine into a fine, full meal."
msgstr ""
#: df_farming\doc.lua:21
msgid "Whatever this fungus was in life, it is now dead."
msgstr ""
#: df_farming\doc.lua:22
msgid ""
"Dead fungus quickly decays into an unrecognizable mess. It can be used as "
"weak fuel or terrible decor."
msgstr ""
#: df_farming\doc.lua:24
msgid ""
"A species of lavender mushroom ubiquitous in caves that is most notable for "
"the soft bioluminescence it produces."
msgstr ""
#: df_farming\doc.lua:25
msgid ""
"This mushroom is inedible but continues producing modest levels of light "
"long after it's picked."
msgstr ""
#: df_farming\doc.lua:27
msgid ""
"Cave wheat is literally a breed of grain-producing grass that somehow lost "
"its ability to photosynthesize and adapted to a more fungal style of life."
msgstr ""
#: df_farming\doc.lua:28
msgid ""
"Like its surface cousin, cave wheat produces grain that can be ground into a "
"form of flour."
msgstr ""
#: df_farming\doc.lua:29
msgid "Cave wheat seed ground into a powder suitable for cooking."
msgstr ""
#: df_farming\doc.lua:30
msgid ""
"When baked alone it forms an edible bread, but it combines well with other "
"more flavorful ingredients."
msgstr ""
#: df_farming\doc.lua:31
msgid ""
"Bread baked from cave wheat flour is tough and durable. A useful ration for "
"long expeditions."
msgstr ""
#: df_farming\doc.lua:32
msgid "It's not tasty, but it keeps you going."
msgstr ""
#: df_farming\doc.lua:34
msgid ""
"The distinctive midnight-blue caps of these mushrooms are inverted, exposing "
"their gills to any breeze that might pass, and have dimpled edges that give "
"them their name."
msgstr ""
#: df_farming\doc.lua:35
msgid ""
"Dimple cups can be dried, ground, and processed to extract a deep blue dye."
msgstr ""
#: df_farming\doc.lua:37
msgid ""
"Pig tails are a fibrous fungal growth that's most notable for its twisting "
"stalks. In a mature stand of pig tails the helical stalks intertwine into a "
"dense mesh."
msgstr ""
#: df_farming\doc.lua:38
msgid "Pig tail stalks can be processed to extract fibers useful as thread."
msgstr ""
#: df_farming\doc.lua:39
msgid "Threads of pig tail fiber."
msgstr ""
#: df_farming\doc.lua:40
msgid ""
"A crafting item that can be woven into textiles and other similar items."
msgstr ""
#: df_farming\doc.lua:42
msgid ""
"Plump helmets are a thick, fleshy mushroom that's edible picked straight "
"from the ground. They form a staple diet for both lost cave explorers and "
"the fauna that preys on them."
msgstr ""
#: df_farming\doc.lua:43
msgid ""
"While they can be eaten fresh, they can be monotonous fare and are perhaps "
"better appreciated as part of a more complex prepared dish."
msgstr ""
#: df_farming\doc.lua:45
msgid ""
"A rare breed of fungus from deep underground that produces a bushy cluster "
"of rumpled gray 'blades'. The biological function of these blades is not "
"known, as quarry bushes reproduce via hard-shelled nodules that grow down at "
"the blade's base."
msgstr ""
#: df_farming\doc.lua:46
msgid ""
"Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are "
"edible with processing."
msgstr ""
#: df_farming\doc.lua:47
msgid ""
"The dried blades of a quarry bush add a welcome zing to recipes containing "
"otherwise-bland subterranean foodstuffs, but they're too spicy to be eaten "
"on their own."
msgstr ""
#: df_farming\doc.lua:48
msgid "Quarry bush leaves can be used as an ingredient in foodstuffs."
msgstr ""
#: df_farming\doc.lua:50
msgid ""
"Sweet pods grow in rich soil, and once they reach maturity they draw that "
"supply of nutrients up to concentrate it in their fruiting bodies. They turn "
"bright red when ripe and can be processed in a variety of ways to extract "
"the sugars they contain."
msgstr ""
#: df_farming\doc.lua:53
msgid "When milled, sweet pods produce a granular sugary substance."
msgstr ""
#: df_farming\doc.lua:55
msgid "When dried in an oven, sweet pods produce a granular sugary substance."
msgstr ""
#: df_farming\doc.lua:57
msgid "Crushing them in a bucket squeezes out a flavorful syrup."
msgstr ""
#: df_farming\doc.lua:59
msgid "Sweet pod sugar has a pink tint to it."
msgstr ""
#: df_farming\doc.lua:60
msgid ""
"Too sweet to be eaten directly, it makes an excellent ingredient in food "
"recipes."
msgstr ""
#: df_farming\doc.lua:61
msgid "Sweet pod syrup is thick and flavorful."
msgstr ""
#: df_farming\doc.lua:62
msgid ""
"Too strong and thick to drink straight, sweet pod syrup is useful in food "
"recipes."
msgstr ""
#: df_farming\pig_tail.lua:10
msgid "Pig Tail"
msgstr "Coda di maiale"
#: df_farming\pig_tail.lua:78
msgid "Pig Tail Spore"
msgstr "Spora di coda di maiale"
#: df_farming\pig_tail.lua:86
msgid "Pig tail thread"
msgstr "Filo di coda di maiale"
#: df_farming\plants.lua:10
msgid "Dead Fungus"
msgstr "Fungo morto"
#: df_farming\plants.lua:42
msgid "Cavern Fungi"
msgstr "Funghi di caverna"
#: df_farming\plump_helmet.lua:61
msgid "Plump Helmet Spawn"
msgstr "Prole di elmo rotondo"
#: df_farming\plump_helmet.lua:92
#: df_farming\plump_helmet.lua:129
#: df_farming\plump_helmet.lua:164
#: df_farming\plump_helmet.lua:199
#: df_farming\plump_helmet.lua:251
msgid "Plump Helmet"
msgstr "Elmo rotondo"
#: df_farming\quarry_bush.lua:10
msgid "Quarry Bush"
msgstr "Cespuglio di cava"
#: df_farming\quarry_bush.lua:75
msgid "Rock Nuts"
msgstr "Noci di roccia"
#: df_farming\quarry_bush.lua:84
msgid "Quarry Bush Leaves"
msgstr "Foglie di cespuglio di cava"
#: df_farming\sweet_pod.lua:10
msgid "Sweet Pod"
msgstr "Baccello dolce"
#: df_farming\sweet_pod.lua:74
msgid "Sweet Pod Spores"
msgstr "Spore di baccello dolce"
#: df_farming\sweet_pod.lua:82
msgid "Sweet Pods"
msgstr "Baccelli dolci"
#: df_farming\sweet_pod.lua:98
msgid "Sweet Pod Sugar"
msgstr "Zucchero di baccello dolce"
#: df_farming\sweet_pod.lua:138
msgid "Dwarven Syrup Source"
msgstr "Fonte di sciroppo nanico"
#: df_farming\sweet_pod.lua:186
msgid "Flowing Dwarven Syrup"
msgstr "Sciroppo nanico che scorre"
#: df_farming\sweet_pod.lua:239
msgid "Dwarven Syrup Bucket"
msgstr "Secchio di sciroppo nanico"
#~ msgid "@1 Biscuit"
#~ msgstr "Biscotto di @1"
#~ msgid "@1 Stew"
#~ msgstr "Stufato di @1"
#~ msgid "@1 Roast"
#~ msgstr "Arrosto di @1"

View File

@ -1,427 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-11 03:51-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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: df_farming\cave_wheat.lua:10
#: df_farming\cave_wheat.lua:87
msgid "Cave Wheat"
msgstr ""
#: df_farming\cave_wheat.lua:79
msgid "Cave Wheat Seed"
msgstr ""
#: df_farming\cave_wheat.lua:100
msgid "Cave Wheat Flour"
msgstr ""
#: df_farming\cave_wheat.lua:108
msgid "Dwarven Bread"
msgstr ""
#: df_farming\cooking.lua:72
msgid "Cave Wheat Flour Biscuit"
msgstr ""
#: df_farming\cooking.lua:73
msgid "Cave Wheat Flour Bun"
msgstr ""
#: df_farming\cooking.lua:74
msgid "Cave Wheat Flour Pancake"
msgstr ""
#: df_farming\cooking.lua:77
msgid "Cave Wheat Seed Loaf"
msgstr ""
#: df_farming\cooking.lua:78
msgid "Cave Wheat Seed Puffs"
msgstr ""
#: df_farming\cooking.lua:79
msgid "Cave Wheat Seed Risotto"
msgstr ""
#: df_farming\cooking.lua:82
msgid "Sweet Pod Spore Dumplings"
msgstr ""
#: df_farming\cooking.lua:83
msgid "Sweet Pod Spore Single Crust Pie"
msgstr ""
#: df_farming\cooking.lua:84
msgid "Sweet Pod Spore Brule"
msgstr ""
#: df_farming\cooking.lua:87
msgid "Sweet Pod Sugar Cookie"
msgstr ""
#: df_farming\cooking.lua:88
msgid "Sweet Pod Sugar Gingerbread"
msgstr ""
#: df_farming\cooking.lua:89
msgid "Sweet Pod Sugar Roll"
msgstr ""
#: df_farming\cooking.lua:92
msgid "Plump Helmet Mince"
msgstr ""
#: df_farming\cooking.lua:93
msgid "Plump Helmet Stalk Sausage"
msgstr ""
#: df_farming\cooking.lua:94
msgid "Plump Helmet Roast"
msgstr ""
#: df_farming\cooking.lua:97
msgid "Plump Helmet Spawn Soup"
msgstr ""
#: df_farming\cooking.lua:98
msgid "Plump Helmet Spawn Jambalaya"
msgstr ""
#: df_farming\cooking.lua:99
msgid "Plump Helmet Sprout Stew"
msgstr ""
#: df_farming\cooking.lua:102
msgid "Quarry Bush Leaf Spicy Bun"
msgstr ""
#: df_farming\cooking.lua:103
msgid "Quarry Bush Leaf Croissant"
msgstr ""
#: df_farming\cooking.lua:104
msgid "Stuffed Quarry Bush Leaf"
msgstr ""
#: df_farming\cooking.lua:107
msgid "Rock Nut Bread"
msgstr ""
#: df_farming\cooking.lua:108
msgid "Rock Nut Cookie"
msgstr ""
#: df_farming\cooking.lua:109
msgid "Rock Nut Cake"
msgstr ""
#: df_farming\cooking.lua:112
msgid "Dimple Cup Spore Flatbread"
msgstr ""
#: df_farming\cooking.lua:113
msgid "Dimple Cup Spore Scone"
msgstr ""
#: df_farming\cooking.lua:114
msgid "Dimple Cup Spore Roll"
msgstr ""
#: df_farming\cooking.lua:117
msgid "Pig Tail Spore Sandwich"
msgstr ""
#: df_farming\cooking.lua:118
msgid "Pig Tail Spore Tofu"
msgstr ""
#: df_farming\cooking.lua:119
msgid "Pig Tail Spore Casserole"
msgstr ""
#: df_farming\cooking.lua:122
msgid "Dwarven Syrup Taffy"
msgstr ""
#: df_farming\cooking.lua:123
msgid "Dwarven Syrup Jellies"
msgstr ""
#: df_farming\cooking.lua:124
msgid "Dwarven Syrup Delight"
msgstr ""
#: df_farming\dimple_cup.lua:10
msgid "Dimple Cup"
msgstr ""
#: df_farming\dimple_cup.lua:68
msgid "Dimple Cup Spores"
msgstr ""
#: df_farming\doc.lua:11
msgid ""
"A meal made from the admixture of two ingredients, it keeps well but are not "
"a rich source of nutrients."
msgstr ""
#: df_farming\doc.lua:13
msgid ""
"A meal made from three ingredients mixed together. They're more wholesome, "
"packing more nutrition into a single serving."
msgstr ""
#: df_farming\doc.lua:15
msgid "Four finely minced ingredients combine into a fine, full meal."
msgstr ""
#: df_farming\doc.lua:21
msgid "Whatever this fungus was in life, it is now dead."
msgstr ""
#: df_farming\doc.lua:22
msgid ""
"Dead fungus quickly decays into an unrecognizable mess. It can be used as "
"weak fuel or terrible decor."
msgstr ""
#: df_farming\doc.lua:24
msgid ""
"A species of lavender mushroom ubiquitous in caves that is most notable for "
"the soft bioluminescence it produces."
msgstr ""
#: df_farming\doc.lua:25
msgid ""
"This mushroom is inedible but continues producing modest levels of light "
"long after it's picked."
msgstr ""
#: df_farming\doc.lua:27
msgid ""
"Cave wheat is literally a breed of grain-producing grass that somehow lost "
"its ability to photosynthesize and adapted to a more fungal style of life."
msgstr ""
#: df_farming\doc.lua:28
msgid ""
"Like its surface cousin, cave wheat produces grain that can be ground into a "
"form of flour."
msgstr ""
#: df_farming\doc.lua:29
msgid "Cave wheat seed ground into a powder suitable for cooking."
msgstr ""
#: df_farming\doc.lua:30
msgid ""
"When baked alone it forms an edible bread, but it combines well with other "
"more flavorful ingredients."
msgstr ""
#: df_farming\doc.lua:31
msgid ""
"Bread baked from cave wheat flour is tough and durable. A useful ration for "
"long expeditions."
msgstr ""
#: df_farming\doc.lua:32
msgid "It's not tasty, but it keeps you going."
msgstr ""
#: df_farming\doc.lua:34
msgid ""
"The distinctive midnight-blue caps of these mushrooms are inverted, exposing "
"their gills to any breeze that might pass, and have dimpled edges that give "
"them their name."
msgstr ""
#: df_farming\doc.lua:35
msgid ""
"Dimple cups can be dried, ground, and processed to extract a deep blue dye."
msgstr ""
#: df_farming\doc.lua:37
msgid ""
"Pig tails are a fibrous fungal growth that's most notable for its twisting "
"stalks. In a mature stand of pig tails the helical stalks intertwine into a "
"dense mesh."
msgstr ""
#: df_farming\doc.lua:38
msgid "Pig tail stalks can be processed to extract fibers useful as thread."
msgstr ""
#: df_farming\doc.lua:39
msgid "Threads of pig tail fiber."
msgstr ""
#: df_farming\doc.lua:40
msgid ""
"A crafting item that can be woven into textiles and other similar items."
msgstr ""
#: df_farming\doc.lua:42
msgid ""
"Plump helmets are a thick, fleshy mushroom that's edible picked straight "
"from the ground. They form a staple diet for both lost cave explorers and "
"the fauna that preys on them."
msgstr ""
#: df_farming\doc.lua:43
msgid ""
"While they can be eaten fresh, they can be monotonous fare and are perhaps "
"better appreciated as part of a more complex prepared dish."
msgstr ""
#: df_farming\doc.lua:45
msgid ""
"A rare breed of fungus from deep underground that produces a bushy cluster "
"of rumpled gray 'blades'. The biological function of these blades is not "
"known, as quarry bushes reproduce via hard-shelled nodules that grow down at "
"the blade's base."
msgstr ""
#: df_farming\doc.lua:46
msgid ""
"Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are "
"edible with processing."
msgstr ""
#: df_farming\doc.lua:47
msgid ""
"The dried blades of a quarry bush add a welcome zing to recipes containing "
"otherwise-bland subterranean foodstuffs, but they're too spicy to be eaten "
"on their own."
msgstr ""
#: df_farming\doc.lua:48
msgid "Quarry bush leaves can be used as an ingredient in foodstuffs."
msgstr ""
#: df_farming\doc.lua:50
msgid ""
"Sweet pods grow in rich soil, and once they reach maturity they draw that "
"supply of nutrients up to concentrate it in their fruiting bodies. They turn "
"bright red when ripe and can be processed in a variety of ways to extract "
"the sugars they contain."
msgstr ""
#: df_farming\doc.lua:53
msgid "When milled, sweet pods produce a granular sugary substance."
msgstr ""
#: df_farming\doc.lua:55
msgid "When dried in an oven, sweet pods produce a granular sugary substance."
msgstr ""
#: df_farming\doc.lua:57
msgid "Crushing them in a bucket squeezes out a flavorful syrup."
msgstr ""
#: df_farming\doc.lua:59
msgid "Sweet pod sugar has a pink tint to it."
msgstr ""
#: df_farming\doc.lua:60
msgid ""
"Too sweet to be eaten directly, it makes an excellent ingredient in food "
"recipes."
msgstr ""
#: df_farming\doc.lua:61
msgid "Sweet pod syrup is thick and flavorful."
msgstr ""
#: df_farming\doc.lua:62
msgid ""
"Too strong and thick to drink straight, sweet pod syrup is useful in food "
"recipes."
msgstr ""
#: df_farming\pig_tail.lua:10
msgid "Pig Tail"
msgstr ""
#: df_farming\pig_tail.lua:78
msgid "Pig Tail Spore"
msgstr ""
#: df_farming\pig_tail.lua:86
msgid "Pig tail thread"
msgstr ""
#: df_farming\plants.lua:10
msgid "Dead Fungus"
msgstr ""
#: df_farming\plants.lua:42
msgid "Cavern Fungi"
msgstr ""
#: df_farming\plump_helmet.lua:61
msgid "Plump Helmet Spawn"
msgstr ""
#: df_farming\plump_helmet.lua:92
#: df_farming\plump_helmet.lua:129
#: df_farming\plump_helmet.lua:164
#: df_farming\plump_helmet.lua:199
#: df_farming\plump_helmet.lua:251
msgid "Plump Helmet"
msgstr ""
#: df_farming\quarry_bush.lua:10
msgid "Quarry Bush"
msgstr ""
#: df_farming\quarry_bush.lua:75
msgid "Rock Nuts"
msgstr ""
#: df_farming\quarry_bush.lua:84
msgid "Quarry Bush Leaves"
msgstr ""
#: df_farming\sweet_pod.lua:10
msgid "Sweet Pod"
msgstr ""
#: df_farming\sweet_pod.lua:74
msgid "Sweet Pod Spores"
msgstr ""
#: df_farming\sweet_pod.lua:82
msgid "Sweet Pods"
msgstr ""
#: df_farming\sweet_pod.lua:98
msgid "Sweet Pod Sugar"
msgstr ""
#: df_farming\sweet_pod.lua:138
msgid "Dwarven Syrup Source"
msgstr ""
#: df_farming\sweet_pod.lua:186
msgid "Flowing Dwarven Syrup"
msgstr ""
#: df_farming\sweet_pod.lua:239
msgid "Dwarven Syrup Bucket"
msgstr ""

View File

@ -0,0 +1,152 @@
# textdomain: df_farming
### cave_wheat.lua ###
Cave Straw=
Cave Wheat=
Cave Wheat Flour=
Cave Wheat Seed=
Dwarven Bread=
Flattened Cave Wheat=
### cooking.lua ###
Cave Wheat Flour Biscuit=
Cave Wheat Flour Bun=
Cave Wheat Flour Pancake=
Cave Wheat Seed Loaf=
Cave Wheat Seed Puffs=
Cave Wheat Seed Risotto=
Dimple Cup Spore Flatbread=
Dimple Cup Spore Roll=
Dimple Cup Spore Scone=
Dwarven Syrup Delight=
Dwarven Syrup Jellies=
Dwarven Syrup Taffy=
Pig Tail Spore Casserole=
Pig Tail Spore Sandwich=
Pig Tail Spore Tofu=
Plump Helmet Mince=
Plump Helmet Roast=
Plump Helmet Spawn Jambalaya=
Plump Helmet Spawn Soup=
Plump Helmet Sprout Stew=
Plump Helmet Stalk Sausage=
Quarry Bush Leaf Croissant=
Quarry Bush Leaf Spicy Bun=
Rock Nut Bread=
Rock Nut Cake=
Rock Nut Cookie=
Stuffed Quarry Bush Leaf=
Sweet Pod Spore Brule=
Sweet Pod Spore Dumplings=
Sweet Pod Spore Single Crust Pie=
Sweet Pod Sugar Cookie=
Sweet Pod Sugar Gingerbread=
Sweet Pod Sugar Roll=
### dimple_cup.lua ###
Dimple Cup=
Dimple Cup Spores=
### doc.lua ###
A crafting item that can be woven into textiles and other similar items.=
A meal made from the admixture of two ingredients, it keeps well but are not a rich source of nutrients.=
A meal made from three ingredients mixed together. They're more wholesome, packing more nutrition into a single serving.=
A rare breed of fungus from deep underground that produces a bushy cluster of rumpled gray 'blades'. The biological function of these blades is not known, as quarry bushes reproduce via hard-shelled nodules that grow down at the blade's base.=
A species of lavender mushroom ubiquitous in caves that is most notable for the soft bioluminescence it produces.=
Bread baked from cave wheat flour is tough and durable. A useful ration for long expeditions.=
Cave wheat is literally a breed of grain-producing grass that somehow lost its ability to photosynthesize and adapted to a more fungal style of life.=
Cave wheat seed ground into a powder suitable for cooking.=
Crushing them in a bucket squeezes out a flavorful syrup.=
Dead fungus quickly decays into an unrecognizable mess. It can be used as weak fuel or terrible decor.=
Dimple cups can be dried, ground, and processed to extract a deep blue dye.=
Four finely minced ingredients combine into a fine, full meal.=
It's not tasty, but it keeps you going.=
Like its surface cousin, cave wheat produces grain that can be ground into a form of flour.=
Pig tail stalks can be processed to extract fibers useful as thread.=
Pig tails are a fibrous fungal growth that's most notable for its twisting stalks. In a mature stand of pig tails the helical stalks intertwine into a dense mesh.=
Plump helmets are a thick, fleshy mushroom that's edible picked straight from the ground. They form a staple diet for both lost cave explorers and the fauna that preys on them.=
Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are edible with processing.=
Quarry bush leaves can be used as an ingredient in foodstuffs.=
Sweet pod sugar has a pink tint to it.=
Sweet pod syrup is thick and flavorful.=
Sweet pods grow in rich soil, and once they reach maturity they draw that supply of nutrients up to concentrate it in their fruiting bodies. They turn bright red when ripe and can be processed in a variety of ways to extract the sugars they contain.=
The distinctive midnight-blue caps of these mushrooms are inverted, exposing their gills to any breeze that might pass, and have dimpled edges that give them their name.=
The dried blades of a quarry bush add a welcome zing to recipes containing otherwise-bland subterranean foodstuffs, but they're too spicy to be eaten on their own.=
This mushroom is inedible but continues producing modest levels of light long after it's picked.=
Threads of pig tail fiber.=
Too strong and thick to drink straight, sweet pod syrup is useful in food recipes.=
Too sweet to be eaten directly, it makes an excellent ingredient in food recipes.=
Whatever this fungus was in life, it is now dead.=
When baked alone it forms an edible bread, but it combines well with other more flavorful ingredients.=
When dried in an oven, sweet pods produce a granular sugary substance.=
When milled, sweet pods produce a granular sugary substance.=
While they can be eaten fresh, they can be monotonous fare and are perhaps better appreciated as part of a more complex prepared dish.=
### pig_tail.lua ###
Flattened Pig Tail=
Pig Tail=
Pig Tail Spore=
Pig tail thread=
### plants.lua ###
Cavern Fungi=
Dead Fungus=
### plump_helmet.lua ###
Plump Helmet=
Plump Helmet Spawn=
### quarry_bush.lua ###
Quarry Bush=
Quarry Bush Leaves=
Rock Nuts=
### sweet_pod.lua ###
Dwarven Syrup Bucket=
Dwarven Syrup Source=
Flowing Dwarven Syrup=
Sweet Pod=
Sweet Pod Spores=
Sweet Pod Sugar=
Sweet Pods=

View File

@ -1,6 +0,0 @@
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
cd ..
set LIST=
for /r %%X in (*.lua) do set LIST=!LIST! %%X
..\..\intllib\tools\xgettext.bat %LIST%

View File

@ -1,4 +1,4 @@
name = df_farming
description = Adds farmable underground plants that die in sunlight. Also includes various cooking reactions.
depends = default
optional_depends = farming, cottages, bucket, dynamic_liquid, wool, intllib, doc, crafting
optional_depends = farming, cottages, bucket, dynamic_liquid, wool, doc, crafting, footprints

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_farming.S
local pig_tail_grow_time = df_farming.config.plant_growth_time * df_farming.config.pig_tail_delay_multiplier / 8
@ -17,10 +15,17 @@ local register_pig_tail = function(number)
inventory_image = "dfcaverns_pig_tail_"..tostring(number)..".png",
paramtype = "light",
walkable = false,
is_ground_content = false,
floodable = true,
buildable_to = true,
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11},
sounds = default.node_sound_leaves_defaults(),
sounds = df_farming.sounds.leaves,
selection_box = {
type = "fixed",
fixed = {
{-8/16, -8/16, -8/16, 8/16, -8/16 + 2*number/16, 8/16},
},
},
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, name, elapsed)
@ -92,7 +97,7 @@ minetest.register_craftitem("df_farming:pig_tail_thread", {
if minetest.get_modpath("wool") then
minetest.register_craft({
output = "wool:white",
output = df_farming.node_names.wool_white,
recipe = {
{"group:thread", "group:thread"},
{"group:thread", "group:thread"},
@ -115,3 +120,40 @@ minetest.register_craft({
burntime = 1,
})
if minetest.get_modpath("footprints") then
minetest.register_node("df_farming:pig_tail_trampled", {
description = S("Flattened Pig Tail"),
tiles = {"dfcaverns_pig_tail_flattened.png"},
inventory_image = "dfcaverns_pig_tail_flattened.png",
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
buildable_to = true,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -3 / 8, 0.5}
},
},
groups = {snappy = 3, flammable = 2, attached_node = 1},
drop = "",
sounds = df_farming.sounds.leaves,
})
footprints.register_trample_node("df_farming:pig_tail_5", {
trampled_node_name = "df_farming:pig_tail_trampled",
randomize_trampled_param2 = true,
})
footprints.register_trample_node("df_farming:pig_tail_6", {
trampled_node_name = "df_farming:pig_tail_trampled",
randomize_trampled_param2 = true,
})
footprints.register_trample_node("df_farming:pig_tail_7", {
trampled_node_name = "df_farming:pig_tail_trampled",
randomize_trampled_param2 = true,
})
footprints.register_trample_node("df_farming:pig_tail_8", {
trampled_node_name = "df_farming:pig_tail_trampled",
randomize_trampled_param2 = true,
})
end

View File

@ -1,11 +1,8 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_farming.S
-----------------------------------------------------------------------
-- Plants
minetest.register_node("df_farming:dead_fungus", {
description = S("Dead Fungus"),
_doc_items_longdesc = df_farming.doc.dead_fungus_desc,
@ -15,10 +12,11 @@ minetest.register_node("df_farming:dead_fungus", {
inventory_image = "dfcaverns_dead_fungus.png",
paramtype = "light",
walkable = false,
is_ground_content = false,
buildable_to = true,
floodable = true,
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, flow_through = 1},
sounds = default.node_sound_leaves_defaults(),
sounds = df_farming.sounds.leaves,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
@ -47,11 +45,12 @@ minetest.register_node("df_farming:cavern_fungi", {
inventory_image = "dfcaverns_fungi.png",
paramtype = "light",
walkable = false,
is_ground_content = false,
buildable_to = true,
floodable = true,
light_source = 6,
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11, flow_through = 1},
sounds = default.node_sound_leaves_defaults(),
sounds = df_farming.sounds.leaves,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
@ -72,8 +71,8 @@ end
-----------------------------------------------------------------------------------------
local marginal = {["default:dirt"] = true, ["df_farming:dirt_with_cave_moss"] = true, ["df_farming:cobble_with_floor_fungus"] = true}
local growable = {["farming:soil_wet"] = true, ["default:dirt"] = true, ["df_farming:dirt_with_cave_moss"] = true, ["df_farming:cobble_with_floor_fungus"] = true}
local marginal = {[df_farming.node_names.dirt] = true, [df_farming.node_names.dirt_moss] = true, [df_farming.node_names.floor_fungus] = true}
local growable = {[df_farming.node_names.dirt_wet] = true, [df_farming.node_names.dirt] = true, [df_farming.node_names.dirt_moss] = true, [df_farming.node_names.floor_fungus] = true}
df_farming.plant_timer = function(pos, plantname, elapsed)
local next_stage_time = minetest.registered_nodes[plantname]._dfcaverns_next_stage_time
@ -134,7 +133,7 @@ local place_seed = function(itemstack, placer, pointed_thing, plantname)
-- add the node and remove 1 item from the itemstack
minetest.add_node(pt.above, {name = plantname, param2 = 1})
df_farming.plant_timer(pt.above, plantname)
if not minetest.setting_getbool("creative_mode") then
if not minetest.settings:get_bool("creative_mode", false) then
itemstack:take_item()
end
return itemstack
@ -155,6 +154,7 @@ df_farming.register_seed = function(name, description, image, stage_one, grow_ti
_dfcaverns_next_stage_time = grow_time,
paramtype = "light",
walkable = false,
is_ground_content = false,
floodable = true,
sunlight_propagates = true,
selection_box = {
@ -180,6 +180,9 @@ df_farming.register_seed = function(name, description, image, stage_one, grow_ti
end
df_farming.grow_underground_plant = function(pos, plant_name, elapsed)
if df_farming.kill_if_sunlit(pos) then
return
end
local node_def = minetest.registered_nodes[plant_name]
local next_stage = node_def._dfcaverns_next_stage
if next_stage then
@ -195,7 +198,33 @@ df_farming.grow_underground_plant = function(pos, plant_name, elapsed)
end
end
df_farming.kill_if_sunlit = function(pos, node)
return false
end
if df_farming.config.light_kills_fungus then
local kill_if_sunlit = function(pos, node)
if not node then
node = minetest.get_node(pos)
end
local node_def = minetest.registered_nodes[node.name]
local light_sensitive_fungus_level = node_def.groups.light_sensitive_fungus
-- This should never be the case, but I've received a report of it happening anyway in the ABM so guarding against it.
if not light_sensitive_fungus_level then return false end
local dead_node = node_def._dfcaverns_dead_node or "df_farming:dead_fungus"
-- 11 is the value adjacent to a torch
local light_level = minetest.get_node_light(pos, 0.5) -- check at 0.5 to get how bright it would be here at noon,
-- prevents fungus from growing on the surface world by happenstance
if light_level and light_level > light_sensitive_fungus_level then
minetest.set_node(pos, {name=dead_node, param2 = node.param2})
return true
end
return false
end
df_farming.kill_if_sunlit = kill_if_sunlit
minetest.register_abm({
label = "df_farming:kill_light_sensitive_fungus",
nodenames = {"group:light_sensitive_fungus"},
@ -203,15 +232,7 @@ if df_farming.config.light_kills_fungus then
interval = 30,
chance = 5,
action = function(pos, node)
local node_def = minetest.registered_nodes[node.name]
local light_sensitive_fungus_level = node_def.groups.light_sensitive_fungus
if not light_sensitive_fungus_level then return end -- This should never be the case, but I've received a report of it happening anyway so guarding against it.
local dead_node = node_def._dfcaverns_dead_node or "df_farming:dead_fungus"
-- 11 is the value adjacent to a torch
local light_level = minetest.get_node_light(pos)
if light_level and light_level > light_sensitive_fungus_level then
minetest.set_node(pos, {name=dead_node, param2 = node.param2})
end
kill_if_sunlit(pos, node)
end
})
end

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_farming.S
local displace_x = 0.125
local displace_z = 0.125
@ -50,7 +48,7 @@ local plump_helmet_on_place = function(itemstack, placer, pointed_thing, plantn
-- add the node and remove 1 item from the itemstack
minetest.add_node(pt.above, {name = plantname, param2 = math.random(0,3)})
df_farming.plant_timer(pt.above, plantname)
if not minetest.setting_getbool("creative_mode") then
if not minetest.settings:get_bool("creative_mode", false) then
itemstack:take_item()
end
return itemstack
@ -71,6 +69,7 @@ minetest.register_node("df_farming:plump_helmet_spawn", {
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
is_ground_content = false,
floodable = true,
node_box = {
type = "fixed",
@ -103,6 +102,9 @@ minetest.register_node("df_farming:plump_helmet_1", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
sounds = df_farming.sounds.leaves,
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
walkable = false,
floodable = true,
node_box = {
@ -118,6 +120,7 @@ minetest.register_node("df_farming:plump_helmet_1", {
end,
on_use = minetest.item_eat(1),
_hunger_ng = {satiates = 1},
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, "df_farming:plump_helmet_1", elapsed)
@ -140,7 +143,10 @@ minetest.register_node("df_farming:plump_helmet_2", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sounds = df_farming.sounds.leaves,
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
walkable = false,
is_ground_content = false,
floodable = true,
node_box = {
type = "fixed",
@ -154,6 +160,7 @@ minetest.register_node("df_farming:plump_helmet_2", {
end,
on_use = minetest.item_eat(2),
_hunger_ng = {satiates = 2},
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, "df_farming:plump_helmet_2", elapsed)
@ -175,7 +182,10 @@ minetest.register_node("df_farming:plump_helmet_3", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sounds = df_farming.sounds.leaves,
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
walkable = false,
is_ground_content = false,
floodable = true,
node_box = {
type = "fixed",
@ -189,6 +199,7 @@ minetest.register_node("df_farming:plump_helmet_3", {
end,
on_use = minetest.item_eat(3),
_hunger_ng = {satiates = 3},
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, "df_farming:plump_helmet_3", elapsed)
@ -208,7 +219,10 @@ minetest.register_node("df_farming:plump_helmet_4", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sounds = df_farming.sounds.leaves,
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
walkable = false,
is_ground_content = false,
floodable = false, -- I figure full grown plump helmets are sturdy enough to survive inundation
node_box = {
type = "fixed",
@ -244,6 +258,7 @@ minetest.register_node("df_farming:plump_helmet_4", {
end,
on_use = minetest.item_eat(4),
_hunger_ng = {satiates = 4},
})
-- Need a separate picked type to prevent it from giving infinite spawn by just placing and re-harvesting
@ -260,7 +275,10 @@ minetest.register_node("df_farming:plump_helmet_4_picked", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sounds = df_farming.sounds.leaves,
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
walkable = false,
is_ground_content = false,
floodable = false,
node_box = {
type = "fixed",
@ -275,6 +293,7 @@ minetest.register_node("df_farming:plump_helmet_4_picked", {
end,
on_use = minetest.item_eat(4),
_hunger_ng = {satiates = 4},
})
local place_list = {

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_farming.S
local quarry_grow_time = df_farming.config.plant_growth_time * df_farming.config.quarry_bush_delay_multiplier / 5
@ -18,9 +16,16 @@ local register_quarry_bush = function(number)
paramtype = "light",
walkable = false,
buildable_to = true,
is_ground_content = false,
floodable = true,
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11},
sounds = default.node_sound_leaves_defaults(),
sounds = df_farming.sounds.leaves,
selection_box = {
type = "fixed",
fixed = {
{-8/16, -8/16, -8/16, 8/16, -8/16 + (16/5)*number/16, 8/16},
},
},
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, name, elapsed)

View File

@ -1,4 +1,4 @@
dfcaverns_plant_growth_time (Base plant growth timer interval) int 100
dfcaverns_plant_growth_time (Base plant growth timer interval) int 3600
dfcaverns_cave_wheat_delay_multiplier (cave_wheat growth delay multiplier) float 1
dfcaverns_dimple_cup_delay_multiplier (dimple_cup growth delay multiplier) float 3
dfcaverns_pig_tail_delay_multiplier (pig_tail growth delay multiplier) float 1

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
df_farming_gummy_chew 1,2 and 3 are from https://freesound.org/people/Breviceps/sounds/447916/ by Breviceps under the CC0 public domain license
df_farming_chomp_crunch are from https://freesound.org/people/bbrocer/sounds/382650/ by bbrocer under the CC0 public domain license
df_farming_crisp_chew 1 and 2 are from https://freesound.org/people/InspectorJ/sounds/412068/ by InspectorJ under the CC-BY-SA 3.0 license
df_farming_soft_chew 1, 2, 3 and 4 are from https://freesound.org/people/miekyj/sounds/326464/ by miekyj under the CC0 public domain license
df_farming_mushy_chew 1, 2 and 3 are from https://freesound.org/people/nickyg11p/sounds/390800/ by nickyg11p under the CC0 public domain license

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_farming.S
local sweet_pod_grow_time = df_farming.config.plant_growth_time * df_farming.config.sweet_pod_delay_multiplier / 6
@ -15,10 +13,17 @@ local register_sweet_pod = function(number)
inventory_image = "dfcaverns_sweet_pod_"..tostring(number)..".png",
paramtype = "light",
walkable = false,
is_ground_content = false,
buildable_to = true,
floodable = true,
groups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, light_sensitive_fungus = 11},
sounds = default.node_sound_leaves_defaults(),
sounds = df_farming.sounds.leaves,
selection_box = {
type = "fixed",
fixed = {
{-8/16, -8/16, -8/16, 8/16, -8/16 + (16/6)*number/16, 8/16},
},
},
on_timer = function(pos, elapsed)
df_farming.grow_underground_plant(pos, name, elapsed)
@ -109,14 +114,14 @@ if minetest.get_modpath("cottages") then
recipe_registered = true
end
if minetest.registered_items["farming:mortar_pestle"] ~= nil then
if minetest.registered_items[df_farming.node_names.mortar_pestle] ~= nil then
minetest.register_craft({
type = "shapeless",
output = "df_farming:sugar",
recipe = {
"df_farming:sweet_pods", "farming:mortar_pestle"
"df_farming:sweet_pods", df_farming.node_names.mortar_pestle
},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}},
replacements = {{"group:food_mortar_pestle", df_farming.node_names.mortar_pestle}},
})
recipe_registered = true
end
@ -179,7 +184,7 @@ if minetest.get_modpath("bucket") then
liquid_range = 2,
post_effect_color = {a = 204, r = 179, g = 131, b = 88},
groups = {liquid = 3, flammable = 2},
sounds = default.node_sound_water_defaults(),
sounds = df_farming.sounds.water,
})
minetest.register_node("df_farming:dwarven_syrup_flowing", {
@ -228,7 +233,7 @@ if minetest.get_modpath("bucket") then
liquid_range = 2,
post_effect_color = {a = 204, r = 179, g = 131, b = 88},
groups = {liquid = 3, flammable = 2, not_in_creative_inventory = 1},
sounds = default.node_sound_water_defaults(),
sounds = df_farming.sounds.water,
})
bucket.register_liquid(
@ -242,7 +247,7 @@ if minetest.get_modpath("bucket") then
if minetest.get_modpath("crafting") then
simplecrafting_lib.register("furnace", {
input = {
["bucket:bucket_empty"] = 1,
[df_farming.node_names.bucket] = 1,
["df_farming:sugar"] = 3,
["simplecrafting_lib:heat"] = 5,
},
@ -252,7 +257,7 @@ if minetest.get_modpath("bucket") then
minetest.register_craft({
type = "shapeless",
output = "df_farming:dwarven_syrup_bucket",
recipe = {"bucket:bucket_empty", "df_farming:sugar", "df_farming:sugar", "df_farming:sugar"},
recipe = {df_farming.node_names.bucket, "df_farming:sugar", "df_farming:sugar", "df_farming:sugar"},
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

View File

@ -4,12 +4,19 @@ dfcaverns_dwarven_syrup_source_animated - derived from default
dfcaverns_dwarven_syrup - derived from default
dfcaverns_dwarven_syrup_flowing_animated - derived from default
dfcaverns_fungi - copied from caverealms
Farming textures are released under CC Attribution 3.0 Unported (CC BY 3.0) and list the following authors:
Copyright (C) 2012-2016 PilzAdam
Copyright (C) 2014-2016 BlockMen
Copyright (C) 2015-2016 MasterGollum
Copyright (C) 2015-2016 Gambit
dfcaverns_cave_wheat - derived from farming wheat
dfcaverns_cave_straw - derived from farming straw
dfcaverns_flour - derived from farming
dfcaverns_bread - derived from farming
dfcaverns_pig_tail_thread - copied from farming
dfcaverns_sugar - derived from farming
dfcaverns_cave_wheat_seed, dfcaverns_pig_tail_seed - all derived from farming wheat seed
dfcaverns_cave_wheat_seed, dfcaverns_pig_tail_seed - derived from farming wheat seed

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_mapitems.S
minetest.register_node("df_mapitems:castle_coral", {
description = S("Castle Coral"),
@ -13,12 +11,13 @@ minetest.register_node("df_mapitems:castle_coral", {
_doc_items_longdesc = df_mapitems.doc.castle_coral_desc,
_doc_items_usagehelp = df_mapitems.doc.castle_coral_usage,
drawtype = "mesh",
is_ground_content = false,
light_source = 2,
mesh = "octagonal_coral.obj",
drop = "df_mapitems:castle_coral_skeleton",
paramtype = "light",
groups = {cracky=2,},
sounds = default.node_sound_stone_defaults(),
sounds = df_mapitems.sounds.stone,
})
minetest.register_node("df_mapitems:castle_coral_skeleton", {
@ -26,23 +25,21 @@ minetest.register_node("df_mapitems:castle_coral_skeleton", {
_doc_items_longdesc = df_mapitems.doc.castle_coral_desc,
_doc_items_usagehelp = df_mapitems.doc.castle_coral_usage,
tiles = {
"default_coral_skeleton.png",
"default_coral_skeleton.png",
"default_coral_skeleton.png",
"default_coral_skeleton.png",
df_mapitems.texture.coral_skeleton
},
drawtype = "mesh",
mesh = "octagonal_coral.obj",
paramtype = "light",
is_ground_content = false,
groups = {cracky = 3},
sounds = default.node_sound_stone_defaults(),
sounds = df_mapitems.sounds.stone,
})
local c_coral = minetest.get_content_id("df_mapitems:castle_coral")
local c_coral_skeleton = minetest.get_content_id("df_mapitems:castle_coral_skeleton")
local c_stone = minetest.get_content_id("default:stone")
local c_water = minetest.get_content_id("default:water_source")
local c_stone = df_mapitems.node_id.stone
local c_water = df_mapitems.node_id.water
df_mapitems.spawn_castle_coral = function(area, data, vi, iterations)
local run = math.random(2,4)

View File

@ -1,17 +1,24 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_mapitems.S
local water_source = df_mapitems.node_name.water
local coral_skeleton = df_mapitems.node_name.coral_skeleton
minetest.register_node("df_mapitems:cave_coral_3", {
description = S("Cave Coral"),
_doc_items_longdesc = df_mapitems.doc.cave_coral_desc,
_doc_items_usagehelp = df_mapitems.doc.cave_coral_usage,
tiles = {"dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral.png"},
drop = "default:coral_skeleton",
drop = coral_skeleton,
light_source = 3,
paramtype2 = "facedir",
is_ground_content = false,
groups = {cracky = 3, dfcaverns_cave_coral = 1},
sounds = default.node_sound_stone_defaults(),
sounds = df_mapitems.sounds.stone,
on_timer = function(pos)
if minetest.find_node_near(pos, 1, {water_source}) == nil then
minetest.set_node(pos, {name=coral_skeleton})
end
end,
})
minetest.register_node("df_mapitems:cave_coral_2", {
@ -19,11 +26,17 @@ minetest.register_node("df_mapitems:cave_coral_2", {
_doc_items_longdesc = df_mapitems.doc.cave_coral_desc,
_doc_items_usagehelp = df_mapitems.doc.cave_coral_usage,
tiles = {"dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral.png"},
drop = "default:coral_skeleton",
drop = coral_skeleton,
light_source = 2,
paramtype2 = "facedir",
is_ground_content = false,
groups = {cracky = 3, dfcaverns_cave_coral = 1},
sounds = default.node_sound_stone_defaults(),
sounds = df_mapitems.sounds.stone,
on_timer = function(pos)
if minetest.find_node_near(pos, 1, {water_source}) == nil then
minetest.set_node(pos, {name=coral_skeleton})
end
end,
})
minetest.register_node("df_mapitems:cave_coral_1", {
@ -31,18 +44,25 @@ minetest.register_node("df_mapitems:cave_coral_1", {
_doc_items_longdesc = df_mapitems.doc.cave_coral_desc,
_doc_items_usagehelp = df_mapitems.doc.cave_coral_usage,
tiles = {"dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral.png"},
drop = "default:coral_skeleton",
drop = coral_skeleton,
light_source = 1,
paramtype2 = "facedir",
is_ground_content = false,
groups = {cracky = 3, dfcaverns_cave_coral = 1},
sounds = default.node_sound_stone_defaults(),
sounds = df_mapitems.sounds.stone,
on_timer = function(pos)
if minetest.find_node_near(pos, 1, {water_source}) == nil then
minetest.set_node(pos, {name=coral_skeleton})
end
end,
})
local coral_names = {"df_mapitems:cave_coral_1", "df_mapitems:cave_coral_2", "df_mapitems:cave_coral_3"}
local water_node = df_mapitems.node_name.water
minetest.register_abm{
label = "df_mapitems:shifting_coral",
nodenames = {"group:dfcaverns_cave_coral"},
neighbors = {"default:water_source"},
neighbors = {water_node},
interval = 2,
chance = 10,
action = function(pos)

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_mapitems.S
minetest.register_node("df_mapitems:cave_pearls", {
description = S("Cave Pearls"),
@ -12,6 +10,7 @@ minetest.register_node("df_mapitems:cave_pearls", {
paramtype2 = "facedir",
groups = {cracky = 2},
walkable = false,
is_ground_content = false,
climbable = true,
light_source = 4,
node_box = {

View File

@ -7,11 +7,11 @@ local print_settingtypes = false
local function setting(stype, name, default, description)
local value
if stype == "bool" then
value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name)
value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name, default)
elseif stype == "string" then
value = minetest.setting_get(CONFIG_FILE_PREFIX..name)
value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
elseif stype == "int" or stype == "float" then
value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name))
value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
end
if value == nil then
value = default

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_mapitems.S
--glowing mese crystal blocks
minetest.register_node("df_mapitems:glow_mese", {
@ -8,12 +6,12 @@ minetest.register_node("df_mapitems:glow_mese", {
_doc_items_longdesc = df_mapitems.doc.glow_mese_desc,
_doc_items_usagehelp = df_mapitems.doc.glow_mese_usage,
tiles = {"dfcaverns_glow_mese.png"},
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_glass_defaults(),
sounds = df_mapitems.sounds.glass,
is_ground_content = false,
light_source = 13,
paramtype = "light",
use_texture_alpha = true,
use_texture_alpha = "blend",
drawtype = "glasslike",
sunlight_propagates = true,
})
@ -36,15 +34,15 @@ minetest.register_node("df_mapitems:mese_crystal", {
drawtype = "mesh",
mesh = "underch_crystal.obj",
light_source = 12,
is_ground_content = true,
sounds = default.node_sound_glass_defaults(),
use_texture_alpha = true,
is_ground_content = false,
sounds = df_mapitems.sounds.glass,
use_texture_alpha = "blend",
sunlight_propagates = true,
on_place = df_mapitems.place_against_surface,
})
minetest.register_craft({
output = 'default:mese_crystal 9',
output = df_mapitems.node_name.mese_crystal .. ' 9',
recipe = {
{'df_mapitems:mese_crystal'},
}

View File

@ -1,15 +1,13 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_mapitems.S
minetest.register_node("df_mapitems:glow_ruby_ore", {
description = S("Red Crystal Vein"),
_doc_items_longdesc = df_mapitems.doc.glow_ruby_ore_desc,
_doc_items_usagehelp = df_mapitems.doc.glow_ruby_ore_usage,
tiles = {"dfcaverns_glow_ruby_ore.png"},
is_ground_content = true,
is_ground_content = false,
groups = {cracky=2},
sounds = default.node_sound_glass_defaults(),
sounds = df_mapitems.sounds.glass,
})
minetest.register_node("df_mapitems:big_crystal", {
@ -22,13 +20,14 @@ minetest.register_node("df_mapitems:big_crystal", {
"dfcaverns_glow_ruby4x.png",
"dfcaverns_glow_ruby.png",
},
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
sunlight_propagates = true,
light_source = 12,
groups = {cracky=2, dfcaverns_big_crystal = 1},
sounds = default.node_sound_glass_defaults(),
sounds = df_mapitems.sounds.glass,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 3, 0.5},
@ -49,13 +48,14 @@ minetest.register_node("df_mapitems:med_crystal", {
"dfcaverns_glow_ruby.png",
"dfcaverns_glow_ruby_quarter.png",
},
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
sunlight_propagates = true,
light_source = 12,
groups = {cracky=2, dfcaverns_big_crystal = 1},
sounds = default.node_sound_glass_defaults(),
sounds = df_mapitems.sounds.glass,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 1.25, 0.25},
@ -77,14 +77,15 @@ minetest.register_node("df_mapitems:big_crystal_30", {
"dfcaverns_glow_ruby4x.png",
"dfcaverns_glow_ruby.png",
},
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
light_source = 12,
drop = "df_mapitems:big_crystal",
groups = {cracky=2, dfcaverns_big_crystal = 1},
sounds = default.node_sound_glass_defaults(),
sounds = df_mapitems.sounds.glass,
selection_box = {
type = "fixed",
fixed = {
@ -128,14 +129,15 @@ minetest.register_node("df_mapitems:med_crystal_30", {
"dfcaverns_glow_ruby.png",
"dfcaverns_glow_ruby_quarter.png",
},
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
light_source = 12,
drop = "df_mapitems:med_crystal",
groups = {cracky=2, dfcaverns_big_crystal = 1},
sounds = default.node_sound_glass_defaults(),
sounds = df_mapitems.sounds.glass,
selection_box = {
type = "fixed",
fixed = {
@ -164,14 +166,15 @@ minetest.register_node("df_mapitems:big_crystal_30_45", {
"dfcaverns_glow_ruby4x.png",
"dfcaverns_glow_ruby.png",
},
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
light_source = 12,
drop = "df_mapitems:big_crystal",
groups = {cracky=2, dfcaverns_big_crystal = 1},
sounds = default.node_sound_glass_defaults(),
sounds = df_mapitems.sounds.glass,
selection_box = {
type = "fixed",
fixed = {
@ -201,14 +204,15 @@ minetest.register_node("df_mapitems:med_crystal_30_45", {
"dfcaverns_glow_ruby4x.png",
"dfcaverns_glow_ruby.png",
},
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
light_source = 12,
drop = "df_mapitems:med_crystal",
groups = {cracky=2, dfcaverns_big_crystal = 1},
sounds = default.node_sound_glass_defaults(),
sounds = df_mapitems.sounds.glass,
selection_box = {
type = "fixed",
fixed = {
@ -258,7 +262,7 @@ minetest.register_craft({
recipe = {'df_mapitems:med_crystal_30_45'},
})
local c_stone = minetest.get_content_id("default:stone")
local c_stone = df_mapitems.node_id.stone
local c_air = minetest.get_content_id("air")
local c_big_crystal = minetest.get_content_id("df_mapitems:big_crystal")
local c_med_crystal = minetest.get_content_id("df_mapitems:med_crystal")

View File

@ -1,6 +1,4 @@
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local S = df_mapitems.S
minetest.register_node("df_mapitems:salt_crystal", {
description = S("Luminous Salt Crystal"),
@ -13,9 +11,10 @@ minetest.register_node("df_mapitems:salt_crystal", {
drawtype = "mesh",
mesh = "underch_crystal.obj",
light_source = 6,
sounds = default.node_sound_glass_defaults(),
use_texture_alpha = true,
sounds = df_mapitems.sounds.glass,
use_texture_alpha = "blend",
sunlight_propagates = true,
is_ground_content = false,
on_place = df_mapitems.place_against_surface,
})
@ -23,11 +22,11 @@ minetest.register_node("df_mapitems:salty_cobble", {
description = S("Salty Cobble"),
_doc_items_longdesc = df_mapitems.doc.salty_cobble_desc,
_doc_items_usagehelp = df_mapitems.doc.salty_cobble_desc,
tiles = {"default_cobble.png^dfcaverns_salty.png"},
tiles = {df_mapitems.texture.cobble .. "^dfcaverns_salty.png"},
groups = {cracky = 3, stone = 1, lava_heatable = 1},
_magma_conduits_heats_to = "default:cobble",
is_ground_content = true,
_magma_conduits_heats_to = df_mapitems.node_name.cobble,
is_ground_content = false,
light_source = 2,
drop = 'default:cobble',
sounds = default.node_sound_stone_defaults(),
drop = df_mapitems.node_name.cobble,
sounds = df_mapitems.sounds.stone,
})

View File

@ -0,0 +1,45 @@
df_mapitems.sounds = {}
df_mapitems.sounds.stone = default.node_sound_stone_defaults()
df_mapitems.sounds.floor_fungus = default.node_sound_stone_defaults({footstep = {name = "dfcaverns_squish", gain = 0.25},})
df_mapitems.sounds.sandscum = default.node_sound_sand_defaults({footstep = {name = "dfcaverns_squish", gain = 0.25},})
df_mapitems.sounds.glass = default.node_sound_glass_defaults()
df_mapitems.sounds.dirt = default.node_sound_dirt_defaults()
df_mapitems.sounds.dirt_mossy = default.node_sound_dirt_defaults({footstep = {name = "default_grass_footstep", gain = 0.25},})
df_mapitems.node_id = {}
df_mapitems.node_id.stone = minetest.get_content_id("default:stone")
df_mapitems.node_id.water = minetest.get_content_id("default:water_source")
df_mapitems.node_id.dirt = minetest.get_content_id("default:dirt")
df_mapitems.texture = {}
df_mapitems.texture.coral_skeleton = "default_coral_skeleton.png"
df_mapitems.texture.cobble = "default_cobble.png"
df_mapitems.texture.stone = "default_stone.png"
df_mapitems.texture.ice = "default_ice.png"
df_mapitems.texture.sand = "default_sand.png"
df_mapitems.texture.dirt = "default_dirt.png"
df_mapitems.node_name = {}
df_mapitems.node_name.coral_skeleton = "default:coral_skeleton"
df_mapitems.node_name.water = "default:water_source"
df_mapitems.node_name.mese_crystal = "default:mese_crystal"
df_mapitems.node_name.cobble = "default:cobble"
df_mapitems.node_name.sand = "default:sand"
df_mapitems.node_name.dirt = "default:dirt"
df_mapitems.node_name.stone = "default:stone"
df_mapitems.node_name.ice = "default:ice"
df_mapitems.node_name.farming_soil = "farming:soil"
df_mapitems.node_name.farming_soil_wet = "farming:soil_wet"
-- This stuff should only be used during initialization
minetest.after(0, function()
df_mapitems.node_name = nil
df_mapitems.sounds = nil
df_mapitems.texture = nil
df_mapitems.node_id = nil
end)

Some files were not shown because too many files have changed in this diff Show More