2018-11-04 22:03:22 -05:00
|
|
|
-- LUALOCALS < ---------------------------------------------------------
|
2019-03-07 22:21:04 -05:00
|
|
|
local minetest, nodecore
|
|
|
|
= minetest, nodecore
|
2018-11-04 22:03:22 -05:00
|
|
|
-- LUALOCALS > ---------------------------------------------------------
|
|
|
|
|
|
|
|
local modname = minetest.get_current_modname()
|
|
|
|
|
|
|
|
minetest.register_node(modname .. ":fire", {
|
|
|
|
description = "Fire",
|
|
|
|
drawtype = "firelike",
|
|
|
|
visual_scale = 1.5,
|
|
|
|
tiles = {modname .. "_fire.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
light_source = 12,
|
2019-01-06 13:04:07 -05:00
|
|
|
groups = {
|
2019-01-27 22:34:53 -05:00
|
|
|
igniter = 1,
|
|
|
|
flame = 1
|
2019-01-06 13:04:07 -05:00
|
|
|
},
|
2018-11-04 22:03:22 -05:00
|
|
|
damage_per_second = 2,
|
2019-01-29 22:42:35 -05:00
|
|
|
sunlight_propagates = true,
|
2019-03-07 21:50:29 -05:00
|
|
|
floodable = true,
|
2018-11-04 22:03:22 -05:00
|
|
|
walkable = false,
|
|
|
|
pointable = false,
|
|
|
|
diggable = false,
|
2019-01-06 13:04:07 -05:00
|
|
|
buildable_to = true,
|
2019-03-07 21:50:29 -05:00
|
|
|
drop = ""
|
2018-11-04 22:03:22 -05:00
|
|
|
})
|
|
|
|
|
2019-01-17 00:01:00 -05:00
|
|
|
local function ember(n, t)
|
|
|
|
minetest.register_node(modname .. ":ember" .. n, {
|
|
|
|
description = "Burning Embers",
|
|
|
|
tiles = {t},
|
|
|
|
paramtype = "light",
|
|
|
|
light_source = 6,
|
|
|
|
groups = {
|
|
|
|
igniter = 1,
|
|
|
|
ember = n,
|
|
|
|
falling_node = 1
|
|
|
|
},
|
|
|
|
drop = "",
|
|
|
|
diggable = false,
|
2019-03-24 22:32:36 -04:00
|
|
|
damage_per_second = 2,
|
2019-03-07 22:21:04 -05:00
|
|
|
on_punch = nodecore.node_punch_hurt,
|
2019-03-17 10:55:41 -04:00
|
|
|
crush_damage = 1,
|
|
|
|
sounds = nodecore.sounds("nc_terrain_crunchy")
|
2019-01-17 00:01:00 -05:00
|
|
|
})
|
|
|
|
end
|
|
|
|
ember(1, modname .. "_ash.png^(" .. modname .. "_ember1.png^[opacity:128)")
|
|
|
|
ember(2, modname .. "_ash.png^" .. modname .. "_ember1.png")
|
|
|
|
ember(3, modname .. "_ash.png^" .. modname .. "_ember1.png^(" .. modname .. "_ember2.png^[opacity:128)")
|
|
|
|
ember(4, modname .. "_ash.png^" .. modname .. "_ember2.png")
|
|
|
|
ember(5, modname .. "_ash.png^" .. modname .. "_ember2.png^(" .. modname .. "_ember3.png^[opacity:128)")
|
|
|
|
ember(6, modname .. "_ember3.png")
|
|
|
|
minetest.register_alias(modname .. ":fuel", modname .. ":ember2")
|
2018-11-04 22:03:22 -05:00
|
|
|
|
|
|
|
minetest.register_node(modname .. ":ash", {
|
|
|
|
description = "Ash",
|
|
|
|
tiles = {modname .. "_ash.png"},
|
2019-01-17 00:01:00 -05:00
|
|
|
groups = {
|
|
|
|
falling_node = 1,
|
|
|
|
falling_repose = 1,
|
2019-01-24 22:12:19 -05:00
|
|
|
crumbly = 1
|
2019-01-29 20:41:29 -05:00
|
|
|
},
|
2019-03-14 01:16:44 -04:00
|
|
|
crush_damage = 0.25,
|
|
|
|
sounds = nodecore.sounds("nc_terrain_swishy")
|
2018-11-04 22:03:22 -05:00
|
|
|
})
|