mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-04-01 10:30:41 +02:00
make torchspines smokey and manually lightable
This commit is contained in:
parent
240d35cfa6
commit
89639e289a
@ -70,6 +70,11 @@ minetest.register_node("df_trees:torchspine_1", {
|
|||||||
fixed = stal_box_1,
|
fixed = stal_box_1,
|
||||||
},
|
},
|
||||||
on_place = stal_on_place,
|
on_place = stal_on_place,
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
if puncher:get_wielded_item():get_name() == "default:torch" then
|
||||||
|
minetest.swap_node(pos, {name = "df_trees:torchspine_1_lit", param2 = node.param2})
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("df_trees:torchspine_1_lit", {
|
minetest.register_node("df_trees:torchspine_1_lit", {
|
||||||
@ -77,7 +82,7 @@ minetest.register_node("df_trees:torchspine_1_lit", {
|
|||||||
_doc_items_longdesc = df_trees.doc.torchspine_desc,
|
_doc_items_longdesc = df_trees.doc.torchspine_desc,
|
||||||
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
|
_doc_items_usagehelp = df_trees.doc.torchspine_usage,
|
||||||
tiles = {"default_gold_block.png", "dfcaverns_torchspine_1.5.png", "dfcaverns_torchspine_1_lit.png"},
|
tiles = {"default_gold_block.png", "dfcaverns_torchspine_1.5.png", "dfcaverns_torchspine_1_lit.png"},
|
||||||
groups = {oddly_breakable_by_hand = 1, subterrane_stal_align = 1, flow_through = 1, torch = 1, fall_damage_add_percent = 150},
|
groups = {oddly_breakable_by_hand = 1, subterrane_stal_align = 1, flow_through = 1, torch = 1, fall_damage_add_percent = 150, smokey = 1},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -282,11 +287,11 @@ minetest.register_abm{
|
|||||||
minetest.register_abm{
|
minetest.register_abm{
|
||||||
label = "torchspine lighting",
|
label = "torchspine lighting",
|
||||||
nodenames = {"df_trees:torchspine_1"},
|
nodenames = {"df_trees:torchspine_1"},
|
||||||
interval = 57,
|
interval = 30,
|
||||||
chance = 10,
|
chance = 10,
|
||||||
catch_up = true,
|
catch_up = true,
|
||||||
action = function(pos)
|
action = function(pos)
|
||||||
local above_def = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})]
|
local above_def = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name]
|
||||||
if above_def and above_def.buildable_to then
|
if above_def and above_def.buildable_to then
|
||||||
minetest.swap_node(pos, {name="df_trees:torchspine_1_lit", param2=minetest.get_node(pos).param2})
|
minetest.swap_node(pos, {name="df_trees:torchspine_1_lit", param2=minetest.get_node(pos).param2})
|
||||||
end
|
end
|
||||||
@ -296,7 +301,7 @@ local torchspine_list = {"df_trees:torchspine_1","df_trees:torchspine_2","df_tre
|
|||||||
minetest.register_abm{
|
minetest.register_abm{
|
||||||
label = "torchspine growing",
|
label = "torchspine growing",
|
||||||
nodenames = {"df_trees:torchspine_1_lit"},
|
nodenames = {"df_trees:torchspine_1_lit"},
|
||||||
interval = 30,
|
interval = 37,
|
||||||
chance = 10,
|
chance = 10,
|
||||||
catch_up = true,
|
catch_up = true,
|
||||||
action = function(pos)
|
action = function(pos)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user