Added light burning nodes

For the likes of leaves. I might change this later...
master
Eric Rustrum 2021-10-06 08:41:32 -07:00
parent a26fb99c60
commit 4a0b6301e9
2 changed files with 33 additions and 5 deletions

View File

@ -49,7 +49,7 @@ minetest.register_node("ks_flora:juniper_living_leaves", {
tiles = {"flora.juniper_leaves.png"},
paramtype = "light",
drawtype = "allfaces_optional",
groups = {sliceable = 1, juniper_leaves = 1, flammable = 1},
groups = {sliceable = 1, juniper_leaves = 1, light_flammable = 1},
drop = {
max_items = 1,
items = {
@ -65,7 +65,7 @@ minetest.register_node("ks_flora:juniper_living_leaves_with_berries", {
tiles = {"flora.juniper_leaves.png^flora.juniper_berries_overlay.png"},
paramtype = "light",
drawtype = "allfaces_optional",
groups = {grabbable = 1, juniper_leaves = 1, flammable = 1},
groups = {grabbable = 1, juniper_leaves = 1, light_flammable = 1},
drop = "ks_flora:juniper_berries",
is_ground_content = true,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
@ -90,7 +90,7 @@ minetest.register_node("ks_flora:douglasfir_living_leaves", {
tiles = {"flora.douglasfir_leaves.png"},
paramtype = "light",
drawtype = "allfaces_optional",
groups = {sliceable = 1, douglasfir_leaves = 1, flammable = 1},
groups = {sliceable = 1, douglasfir_leaves = 1, light_flammable = 1},
drop = {
max_items = 1,
items = {
@ -117,7 +117,7 @@ minetest.register_node("ks_flora:holly_living_leaves", {
tiles = {"flora.holly_leaves.png"},
paramtype = "light",
drawtype = "allfaces_optional",
groups = {sliceable = 1, holly_leaves = 1, flammable = 1},
groups = {sliceable = 1, holly_leaves = 1, light_flammable = 1},
drop = {
max_items = 1,
items = {
@ -133,7 +133,7 @@ minetest.register_node("ks_flora:holly_living_leaves_with_holly_berries", {
tiles = {"flora.holly_leaves.png^flora.holly_berries_overlay.png"},
paramtype = "light",
drawtype = "allfaces_optional",
groups = {grabbable = 1, holly_leaves = 1, flammable = 1},
groups = {grabbable = 1, holly_leaves = 1, light_flammable = 1},
drop = "ks_flora:holly_berries",
is_ground_content = true,
after_dig_node = function(pos, oldnode, oldmetadata, digger)

View File

@ -8,6 +8,16 @@ minetest.register_abm({
end
})
minetest.register_abm({
neighbors = {"group:igniter"},
nodenames = {"group:light_flammable"},
interval = 1,
chance = 2,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.set_node(pos, {name = "ks_pyro:light_burning"})
end
})
minetest.register_abm({
nodenames = {"ks_pyro:flame"},
interval = 1,
@ -55,4 +65,22 @@ minetest.register_node("ks_pyro:burning", {
}
},
groups = {igniter = 1, burning = 1, diggable = 1},
})
minetest.register_node("ks_pyro:light_burning", {
description = "Light Burning Node",
light_source = 8,
tiles = {
{
name = "pyro.light_burning_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.1,
},
}
},
groups = {igniter = 1, light_burning = 1, diggable = 1},
})