bunch of documentation

This commit is contained in:
FaceDeer
2019-08-04 21:09:58 -06:00
parent 271a9441f4
commit 40f076ee1c
9 changed files with 81 additions and 14 deletions

View File

@ -40,4 +40,32 @@ else
end
df_trees.doc.torchspine_desc = S("Torchspines are strange organic formations that are alive only in a technical sense. They \"feed\" on volatile flammable vapors vented up through their structure, growing from combustion residue deposited at their tips.")
df_trees.doc.torchspine_usage = S("A torchspine alternates between active and quiescent phases and emits dim light when active. They can be harvested for torches, and their embers sprout into new torchspines when placed on flammable surfaces.")
df_trees.doc.torchspine_usage = S("A torchspine alternates between active and quiescent phases and emits dim light when active. They can be harvested for torches, and their embers sprout into new torchspines when placed on flammable surfaces.")
df_trees.doc.spindlestem_desc = S("Spindlestems are too big to easily pluck by hand but too small to be called a proper tree. Nevertheless, they are a common and useful resource for underground travelers - particularly their glowing caps.")
df_trees.doc.spindlestem_usage = S("The stem of a Spindlestem is surprisingly sturdy, and despite their thinness they can grow quite tall. They can be used as a wood substitute in many crafting recipes.")
df_trees.doc.spindlestem_cap_white_desc = S("The cap of a Spindlestem, uncontaminated by any symbiotic luminescent microorganisms.")
df_trees.doc.spindlestem_cap_white_usage = S("These things are useless except as weak fuel for a fire.")
df_trees.doc.spindlestem_cap_red_desc = S("The cap of a Spindlestem, glowing a weak red due to symbiotic microorganisms.")
df_trees.doc.spindlestem_cap_red_usage = S("Red Spindlestems are a sign of nearby iron deposits - or perhaps Goblin Caps. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is weak.")
df_trees.doc.spindlestem_cap_green_desc = S("The cap of a Spindlestem, glowing a soft green due to symbiotic microorganisms.")
df_trees.doc.spindlestem_cap_green_usage = S("Green Spindlestems are a sign of nearby copper deposits. Their glowing symbiotes can be extracted as a long-lived light source, though the glow is not strong.")
df_trees.doc.spindlestem_cap_cyan_desc = S("The cap of a Spindlestem, glowing a strong cyan due to symbiotic microorganisms.")
df_trees.doc.spindlestem_cap_cyan_usage = S("Cyan Spindlestems are a sign of both copper and iron deposits nearby. Their glowing symbiotes can be extracted as a long-lived light source.")
df_trees.doc.spindlestem_cap_golden_desc = S("The cap of a Spindlestem, glowing a brilliant yellow due to symbiotic microorganisms.")
df_trees.doc.spindlestem_cap_golden_usage = S("Golden Spindlestems are a sign of rare and magical mineral deposits nearby. Their glowing symbiotes can be extracted as a strong and long-lived light source.")
df_trees.doc.spindlestem_extract_red_desc = S("Living extract from the cap of a red Spindlestem.")
df_trees.doc.spindlestem_extract_red_usage = df_trees.doc.spindlestem_cap_red_usage
df_trees.doc.spindlestem_extract_green_desc = S("Living extract from the cap of a green Spindlestem.")
df_trees.doc.spindlestem_extract_green_usage = df_trees.doc.spindlestem_cap_green_usage
df_trees.doc.spindlestem_extract_cyan_desc = S("Living extract from the cap of a cyan Spindlestem.")
df_trees.doc.spindlestem_extract_cyan_usage = df_trees.doc.spindlestem_cap_cyan_usage
df_trees.doc.spindlestem_extract_golden_desc = S("Living extract from the cap of a yellow Spindlestem.")
df_trees.doc.spindlestem_extract_golden_usage = df_trees.doc.spindlestem_cap_golden_usage

View File

@ -62,6 +62,8 @@ local disp = 0.0625 -- adjusting position a bit
minetest.register_node("df_trees:spindlestem_stem", {
description = S("Spindlestem"),
_doc_items_longdesc = df_trees.doc.spindlestem_desc,
_doc_items_usagehelp = df_trees.doc.spindlestem_usage,
is_ground_content = true,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, spindlestem = 1},
sounds = default.node_sound_wood_defaults(),
@ -92,8 +94,10 @@ local register_spindlestem_type = function(item_suffix, colour_name, colour_code
local cap_item = "df_trees:spindlestem_cap_"..item_suffix
minetest.register_node(cap_item, {
description = S("@1 Spindlestem Cap", color_name),
description = S("@1 Spindlestem Cap", colour_name),
is_ground_content = true,
_doc_items_longdesc = df_trees.doc["spindlestem_cap_"..item_suffix.."_desc"],
_doc_items_usagehelp = df_trees.doc["spindlestem_cap_"..item_suffix.."_usage"],
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, spindlestem = 1},
sounds = default.node_sound_wood_defaults(),
tiles = {
@ -181,6 +185,8 @@ local register_spindlestem_type = function(item_suffix, colour_name, colour_code
minetest.register_node("df_trees:glowing_bottle_"..item_suffix, {
description = S("@1 Spindlestem Extract", colour_name),
drawtype = "plantlike",
_doc_items_longdesc = df_trees.doc["spindlestem_extract_"..item_suffix.."_desc"],
_doc_items_usagehelp = df_trees.doc["spindlestem_extract_"..item_suffix.."_usage"],
tiles = {tex},
inventory_image = tex,
wield_image = tex,
@ -226,8 +232,8 @@ end
minetest.register_node("df_trees:spindlestem_seedling", {
description = S("Spindlestem Spawn"),
_doc_items_longdesc = nil,
_doc_items_usagehelp = nil,
_doc_items_longdesc = df_trees.doc.spindlestem_desc,
_doc_items_usagehelp = df_trees.doc.spindlestem_usage,
tiles = {
"dfcaverns_tower_cap.png",
},
@ -307,7 +313,7 @@ local c_cyan = minetest.get_content_id("df_trees:spindlestem_cap_cyan")
local c_golden = minetest.get_content_id("df_trees:spindlestem_cap_golden")
get_spindlestem_cap_type = function(pos)
if pos.y > -100 then
if pos.y > -100 or minetest.find_node_near(pos, 15, "group:tower_cap") then
return c_white
end
if minetest.find_node_near(pos, 15, "group:goblin_cap") then

View File

@ -9,7 +9,7 @@ minetest.register_node("df_trees:tower_cap_stem", {
_doc_items_usagehelp = df_trees.doc.tower_cap_usage,
tiles = {"dfcaverns_tower_cap.png"},
is_ground_content = true,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, tower_cap = 1},
sounds = default.node_sound_wood_defaults(),
})
@ -20,7 +20,7 @@ minetest.register_node("df_trees:tower_cap", {
_doc_items_usagehelp = df_trees.doc.tower_cap_usage,
tiles = {"dfcaverns_tower_cap.png"},
is_ground_content = true,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, tower_cap = 1},
sounds = default.node_sound_wood_defaults(),
})
@ -31,7 +31,7 @@ minetest.register_node("df_trees:tower_cap_gills", {
_doc_items_usagehelp = df_trees.doc.tower_cap_usage,
tiles = {"dfcaverns_tower_cap_gills.png"},
is_ground_content = true,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1, tower_cap = 1},
sounds = default.node_sound_leaves_defaults(),
drawtype = "plantlike",
paramtype = "light",
@ -50,7 +50,7 @@ minetest.register_node("df_trees:tower_cap_gills", {
after_place_node = default.after_place_leaves,
})
if default.register_leafdecay then -- default.register_leafdecay is very new, remove this check some time after 0.4.16 is released
if default.register_leafdecay then -- default.register_leafdecay is new, remove this check some time after 0.4.16 is released
default.register_leafdecay({
trunks = {"df_trees:tower_cap"}, -- don't need stem nodes here
leaves = {"df_trees:tower_cap_gills"},