rearranging and renaming

This commit is contained in:
FaceDeer 2017-03-16 02:17:55 -06:00
parent 48f89c33c8
commit 08d85dd655
32 changed files with 35 additions and 40 deletions

View File

@ -2,7 +2,7 @@ local CONFIG_FILE_PREFIX = "dfcaverns_"
dfcaverns.config = {}
local print_settingtypes = false
local print_settingtypes = true
local function setting(stype, name, default, description)
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_min_depth", -100, "blood_thorn minimum 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")

View File

@ -14,31 +14,33 @@ dofile(modpath.."/ground_cover.lua")
dofile(modpath.."/plants.lua")
-- Trees
dofile(modpath.."/blood_thorn.lua")
dofile(modpath.."/fungiwood.lua")
dofile(modpath.."/tunnel_tube.lua")
dofile(modpath.."/spore_tree.lua")
dofile(modpath.."/black_cap.lua")
dofile(modpath.."/nether_cap.lua")
dofile(modpath.."/goblin_cap.lua")
dofile(modpath.."/tower_cap.lua")
dofile(modpath.."/trees/blood_thorn.lua")
dofile(modpath.."/trees/fungiwood.lua")
dofile(modpath.."/trees/tunnel_tube.lua")
dofile(modpath.."/trees/spore_tree.lua")
dofile(modpath.."/trees/black_cap.lua")
dofile(modpath.."/trees/nether_cap.lua")
dofile(modpath.."/trees/goblin_cap.lua")
dofile(modpath.."/trees/tower_cap.lua")
minetest.register_abm({
label = "dfcaverns:kill_light_sensitive_fungus",
nodenames = {"group:light_sensitive_fungus"},
catch_up = true,
interval = 30,
chance = 5,
action = function(pos, node)
local node_def = minetest.registered_nodes[node.name]
local dead_node = node_def._dfcaverns_dead_node or "dfcaverns:dead_fungus"
-- 11 is the value adjacent to a torch
if minetest.get_node_light(pos) > node_def.groups.light_sensitive_fungus then
minetest.set_node(pos, {name=dead_node, param2 = node.param2})
if dfcaverns.config.light_kills_fungus then
minetest.register_abm({
label = "dfcaverns:kill_light_sensitive_fungus",
nodenames = {"group:light_sensitive_fungus"},
catch_up = true,
interval = 30,
chance = 5,
action = function(pos, node)
local node_def = minetest.registered_nodes[node.name]
local dead_node = node_def._dfcaverns_dead_node or "dfcaverns:dead_fungus"
-- 11 is the value adjacent to a torch
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})
end
end
end
})
})
end
minetest.register_ore({
ore_type = "vein",

View File

@ -29,4 +29,5 @@ dfcaverns_tower_cap_max_depth (tower_cap maximum sapling growth depth) int -3100
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_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

View File

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 422 B

View File

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 481 B

View File

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 703 B

View File

Before

Width:  |  Height:  |  Size: 840 B

After

Width:  |  Height:  |  Size: 840 B

View File

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 357 B

View File

Before

Width:  |  Height:  |  Size: 980 B

After

Width:  |  Height:  |  Size: 980 B

View File

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 997 B

View File

Before

Width:  |  Height:  |  Size: 1002 B

After

Width:  |  Height:  |  Size: 1002 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 349 B

After

Width:  |  Height:  |  Size: 349 B

View File

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

View File

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 630 B

View File

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 752 B

View File

Before

Width:  |  Height:  |  Size: 837 B

After

Width:  |  Height:  |  Size: 837 B

View File

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 857 B

View File

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 888 B

View File

Before

Width:  |  Height:  |  Size: 893 B

After

Width:  |  Height:  |  Size: 893 B

View File

@ -109,7 +109,7 @@ minetest.register_node("dfcaverns:spore_tree_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(dfcaverns.config.spore_tree_min_growth_delay,dfcaverns.config.spore_tree_max_growth_delay))
minetest.get_node_timer(pos):start(math.random(dfcaverns.config.spore_tree_min_growth_delay, dfcaverns.config.spore_tree_max_growth_delay))
end,
on_timer = function(pos)

View File

@ -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", {
description = S("Tunnel Tube Spawn"),
drawtype = "plantlike",
@ -105,6 +91,10 @@ local tunnel_tube_directions = {
{x=-1,y=0,z=0},
{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}