mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-07-16 07:20:27 +02:00
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
This commit is contained in:
@ -17,11 +17,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(),
|
||||
|
||||
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 +103,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,6 +119,7 @@ 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),
|
||||
groups = {flammable = 2, food = 5},
|
||||
})
|
||||
@ -146,3 +157,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 = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
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("trail") and trail and trail.register_trample_node 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 = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
trail.register_trample_node("df_farming:cave_wheat_5", {
|
||||
trampled_node_name = "df_farming:wheat_trampled",
|
||||
randomize_trampled_param2 = true,
|
||||
})
|
||||
trail.register_trample_node("df_farming:cave_wheat_6", {
|
||||
trampled_node_name = "df_farming:wheat_trampled",
|
||||
randomize_trampled_param2 = true,
|
||||
})
|
||||
trail.register_trample_node("df_farming:cave_wheat_7", {
|
||||
trampled_node_name = "df_farming:wheat_trampled",
|
||||
randomize_trampled_param2 = true,
|
||||
})
|
||||
trail.register_trample_node("df_farming:cave_wheat_8", {
|
||||
trampled_node_name = "df_farming:wheat_trampled",
|
||||
randomize_trampled_param2 = true,
|
||||
})
|
||||
end
|
@ -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")
|
||||
|
@ -11,6 +11,7 @@ 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},
|
||||
})
|
||||
@ -19,6 +20,7 @@ local register_cooking_recipes = function(def)
|
||||
_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},
|
||||
})
|
||||
@ -27,6 +29,7 @@ local register_cooking_recipes = function(def)
|
||||
_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},
|
||||
})
|
||||
@ -63,65 +66,71 @@ 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
|
||||
|
@ -1,9 +0,0 @@
|
||||
default
|
||||
farming?
|
||||
cottages?
|
||||
bucket?
|
||||
dynamic_liquid?
|
||||
wool?
|
||||
intllib?
|
||||
doc?
|
||||
crafting?
|
@ -1 +0,0 @@
|
||||
Adds farmable underground plants that die in sunlight. Also includes various cooking reactions.
|
@ -16,9 +16,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(),
|
||||
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)
|
||||
|
@ -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, intllib, doc, crafting, trail
|
||||
|
@ -17,10 +17,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(),
|
||||
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)
|
||||
@ -115,3 +122,40 @@ minetest.register_craft({
|
||||
burntime = 1,
|
||||
})
|
||||
|
||||
if minetest.get_modpath("trail") and trail and trail.register_trample_node 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 = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
trail.register_trample_node("df_farming:pig_tail_5", {
|
||||
trampled_node_name = "df_farming:pig_tail_trampled",
|
||||
randomize_trampled_param2 = true,
|
||||
})
|
||||
trail.register_trample_node("df_farming:pig_tail_6", {
|
||||
trampled_node_name = "df_farming:pig_tail_trampled",
|
||||
randomize_trampled_param2 = true,
|
||||
})
|
||||
trail.register_trample_node("df_farming:pig_tail_7", {
|
||||
trampled_node_name = "df_farming:pig_tail_trampled",
|
||||
randomize_trampled_param2 = true,
|
||||
})
|
||||
trail.register_trample_node("df_farming:pig_tail_8", {
|
||||
trampled_node_name = "df_farming:pig_tail_trampled",
|
||||
randomize_trampled_param2 = true,
|
||||
})
|
||||
end
|
@ -15,6 +15,7 @@ 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},
|
||||
@ -47,6 +48,7 @@ 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,
|
||||
@ -134,7 +136,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 +157,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 +183,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 +201,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 +235,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
|
||||
|
@ -50,7 +50,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 +71,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 +104,9 @@ minetest.register_node("df_farming:plump_helmet_1", {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
|
||||
walkable = false,
|
||||
floodable = true,
|
||||
node_box = {
|
||||
@ -140,7 +144,10 @@ minetest.register_node("df_farming:plump_helmet_2", {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
floodable = true,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -175,7 +182,10 @@ minetest.register_node("df_farming:plump_helmet_3", {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
floodable = true,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -208,7 +218,10 @@ minetest.register_node("df_farming:plump_helmet_4", {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
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",
|
||||
@ -260,7 +273,10 @@ minetest.register_node("df_farming:plump_helmet_4_picked", {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
sound = {eat = {name = "df_farming_gummy_chew", gain = 1.0}},
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
floodable = false,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
|
@ -18,9 +18,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(),
|
||||
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)
|
||||
|
@ -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
|
||||
|
BIN
df_farming/sounds/df_farming_chomp_crunch.1.ogg
Normal file
BIN
df_farming/sounds/df_farming_chomp_crunch.1.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_chomp_crunch.2.ogg
Normal file
BIN
df_farming/sounds/df_farming_chomp_crunch.2.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_chomp_crunch.3.ogg
Normal file
BIN
df_farming/sounds/df_farming_chomp_crunch.3.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_chomp_crunch.4.ogg
Normal file
BIN
df_farming/sounds/df_farming_chomp_crunch.4.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_crisp_chew.1.ogg
Normal file
BIN
df_farming/sounds/df_farming_crisp_chew.1.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_crisp_chew.2.ogg
Normal file
BIN
df_farming/sounds/df_farming_crisp_chew.2.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_gummy_chew.1.ogg
Normal file
BIN
df_farming/sounds/df_farming_gummy_chew.1.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_gummy_chew.2.ogg
Normal file
BIN
df_farming/sounds/df_farming_gummy_chew.2.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_gummy_chew.3.ogg
Normal file
BIN
df_farming/sounds/df_farming_gummy_chew.3.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_mushy_chew.1.ogg
Normal file
BIN
df_farming/sounds/df_farming_mushy_chew.1.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_mushy_chew.2.ogg
Normal file
BIN
df_farming/sounds/df_farming_mushy_chew.2.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_mushy_chew.3.ogg
Normal file
BIN
df_farming/sounds/df_farming_mushy_chew.3.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_soft_chew.1.ogg
Normal file
BIN
df_farming/sounds/df_farming_soft_chew.1.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_soft_chew.2.ogg
Normal file
BIN
df_farming/sounds/df_farming_soft_chew.2.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_soft_chew.3.ogg
Normal file
BIN
df_farming/sounds/df_farming_soft_chew.3.ogg
Normal file
Binary file not shown.
BIN
df_farming/sounds/df_farming_soft_chew.4.ogg
Normal file
BIN
df_farming/sounds/df_farming_soft_chew.4.ogg
Normal file
Binary file not shown.
5
df_farming/sounds/license.txt
Normal file
5
df_farming/sounds/license.txt
Normal 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
|
@ -15,10 +15,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(),
|
||||
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)
|
||||
|
BIN
df_farming/textures/dfcaverns_cave_straw.png
Normal file
BIN
df_farming/textures/dfcaverns_cave_straw.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 838 B |
BIN
df_farming/textures/dfcaverns_cave_wheat_flattened.png
Normal file
BIN
df_farming/textures/dfcaverns_cave_wheat_flattened.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 196 B |
BIN
df_farming/textures/dfcaverns_pig_tail_flattened.png
Normal file
BIN
df_farming/textures/dfcaverns_pig_tail_flattened.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 694 B |
@ -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
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user