rearranging and renaming
@ -2,7 +2,7 @@ local CONFIG_FILE_PREFIX = "dfcaverns_"
|
|||||||
|
|
||||||
dfcaverns.config = {}
|
dfcaverns.config = {}
|
||||||
|
|
||||||
local print_settingtypes = false
|
local print_settingtypes = true
|
||||||
|
|
||||||
local function setting(stype, name, default, description)
|
local function setting(stype, name, default, description)
|
||||||
local value
|
local value
|
||||||
@ -44,3 +44,5 @@ setting("int", "blood_thorn_growth_interval", 12, "blood_thorn growth ABM interv
|
|||||||
setting("int", "blood_thorn_growth_chance", 83, "blood_thorn growth ABM chance")
|
setting("int", "blood_thorn_growth_chance", 83, "blood_thorn growth ABM chance")
|
||||||
setting("int", "blood_thorn_min_depth", -100, "blood_thorn minimum sapling growth depth")
|
setting("int", "blood_thorn_min_depth", -100, "blood_thorn minimum sapling growth depth")
|
||||||
setting("int", "blood_thorn_max_depth", -31000, "blood_thorn maximum sapling growth depth")
|
setting("int", "blood_thorn_max_depth", -31000, "blood_thorn maximum sapling growth depth")
|
||||||
|
|
||||||
|
setting("bool", "light_kills_fungus", true, "Light kills fungus")
|
22
init.lua
@ -14,16 +14,16 @@ dofile(modpath.."/ground_cover.lua")
|
|||||||
dofile(modpath.."/plants.lua")
|
dofile(modpath.."/plants.lua")
|
||||||
|
|
||||||
-- Trees
|
-- Trees
|
||||||
dofile(modpath.."/blood_thorn.lua")
|
dofile(modpath.."/trees/blood_thorn.lua")
|
||||||
dofile(modpath.."/fungiwood.lua")
|
dofile(modpath.."/trees/fungiwood.lua")
|
||||||
dofile(modpath.."/tunnel_tube.lua")
|
dofile(modpath.."/trees/tunnel_tube.lua")
|
||||||
dofile(modpath.."/spore_tree.lua")
|
dofile(modpath.."/trees/spore_tree.lua")
|
||||||
dofile(modpath.."/black_cap.lua")
|
dofile(modpath.."/trees/black_cap.lua")
|
||||||
dofile(modpath.."/nether_cap.lua")
|
dofile(modpath.."/trees/nether_cap.lua")
|
||||||
dofile(modpath.."/goblin_cap.lua")
|
dofile(modpath.."/trees/goblin_cap.lua")
|
||||||
dofile(modpath.."/tower_cap.lua")
|
dofile(modpath.."/trees/tower_cap.lua")
|
||||||
|
|
||||||
|
|
||||||
|
if dfcaverns.config.light_kills_fungus then
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "dfcaverns:kill_light_sensitive_fungus",
|
label = "dfcaverns:kill_light_sensitive_fungus",
|
||||||
nodenames = {"group:light_sensitive_fungus"},
|
nodenames = {"group:light_sensitive_fungus"},
|
||||||
@ -34,11 +34,13 @@ minetest.register_abm({
|
|||||||
local node_def = minetest.registered_nodes[node.name]
|
local node_def = minetest.registered_nodes[node.name]
|
||||||
local dead_node = node_def._dfcaverns_dead_node or "dfcaverns:dead_fungus"
|
local dead_node = node_def._dfcaverns_dead_node or "dfcaverns:dead_fungus"
|
||||||
-- 11 is the value adjacent to a torch
|
-- 11 is the value adjacent to a torch
|
||||||
if minetest.get_node_light(pos) > node_def.groups.light_sensitive_fungus then
|
local light_level = minetest.get_node_light(pos)
|
||||||
|
if light_level and light_level > node_def.groups.light_sensitive_fungus then
|
||||||
minetest.set_node(pos, {name=dead_node, param2 = node.param2})
|
minetest.set_node(pos, {name=dead_node, param2 = node.param2})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_ore({
|
minetest.register_ore({
|
||||||
ore_type = "vein",
|
ore_type = "vein",
|
||||||
|
@ -30,3 +30,4 @@ dfcaverns_blood_thorn_growth_interval (blood_thorn growth ABM interval) int 12
|
|||||||
dfcaverns_blood_thorn_growth_chance (blood_thorn growth ABM chance) int 83
|
dfcaverns_blood_thorn_growth_chance (blood_thorn growth ABM chance) int 83
|
||||||
dfcaverns_blood_thorn_min_depth (blood_thorn minimum sapling growth depth) int -100
|
dfcaverns_blood_thorn_min_depth (blood_thorn minimum sapling growth depth) int -100
|
||||||
dfcaverns_blood_thorn_max_depth (blood_thorn maximum sapling growth depth) int -31000
|
dfcaverns_blood_thorn_max_depth (blood_thorn maximum sapling growth depth) int -31000
|
||||||
|
dfcaverns_light_kills_fungus (Light kills fungus) bool true
|
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 481 B After Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 703 B After Width: | Height: | Size: 703 B |
Before Width: | Height: | Size: 840 B After Width: | Height: | Size: 840 B |
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 980 B |
Before Width: | Height: | Size: 997 B After Width: | Height: | Size: 997 B |
Before Width: | Height: | Size: 1002 B After Width: | Height: | Size: 1002 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 837 B After Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 857 B After Width: | Height: | Size: 857 B |
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 888 B |
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 893 B |
@ -58,20 +58,6 @@ minetest.register_node("dfcaverns:tunnel_tube_fruiting_body", {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
--dfcaverns.tunnel_tube_def = {
|
|
||||||
-- axiom="FFcccccc&FFFFFdddR",
|
|
||||||
-- rules_c="/",
|
|
||||||
-- rules_d="F",
|
|
||||||
-- trunk="dfcaverns:tunnel_tube",
|
|
||||||
-- angle=20,
|
|
||||||
-- iterations=2,
|
|
||||||
-- random_level=0,
|
|
||||||
-- trunk_type="single",
|
|
||||||
-- thin_branches=true,
|
|
||||||
-- fruit="dfcaverns:tunnel_tube_fruiting_body",
|
|
||||||
-- fruit_chance=0
|
|
||||||
--}
|
|
||||||
|
|
||||||
minetest.register_node("dfcaverns:tunnel_tube_sapling", {
|
minetest.register_node("dfcaverns:tunnel_tube_sapling", {
|
||||||
description = S("Tunnel Tube Spawn"),
|
description = S("Tunnel Tube Spawn"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
@ -105,6 +91,10 @@ local tunnel_tube_directions = {
|
|||||||
{x=-1,y=0,z=0},
|
{x=-1,y=0,z=0},
|
||||||
{x=0,y=0,z=1},
|
{x=0,y=0,z=1},
|
||||||
{x=0,y=0,z=-1},
|
{x=0,y=0,z=-1},
|
||||||
|
-- {x=1,y=0,z=1}, -- diagonals work, but they don't look as nice as orthogonals
|
||||||
|
-- {x=-1,y=0,z=1},
|
||||||
|
-- {x=1,y=0,z=-1},
|
||||||
|
-- {x=-1,y=0,z=-1},
|
||||||
}
|
}
|
||||||
|
|
||||||
local tunnel_tube_curvature = {0,0,0,0,1,1,1,2,2,3,4}
|
local tunnel_tube_curvature = {0,0,0,0,1,1,1,2,2,3,4}
|