mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 18:55:09 +00:00
Add glow to falling light source nodes
This commit is contained in:
parent
7f70acc8a4
commit
f4888a42a9
1 changed files with 9 additions and 4 deletions
|
@ -81,11 +81,8 @@ minetest.register_entity(":__builtin:falling_node", {
|
||||||
set_node = function(self, node, meta)
|
set_node = function(self, node, meta)
|
||||||
self.node = node
|
self.node = node
|
||||||
self.meta = meta or {}
|
self.meta = meta or {}
|
||||||
self.object:set_properties({
|
|
||||||
is_visible = true,
|
|
||||||
textures = {node.name},
|
|
||||||
})
|
|
||||||
local def = core.registered_nodes[node.name]
|
local def = core.registered_nodes[node.name]
|
||||||
|
local glow
|
||||||
-- Set correct entity yaw
|
-- Set correct entity yaw
|
||||||
if def and node.param2 ~= 0 then
|
if def and node.param2 ~= 0 then
|
||||||
if (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") then
|
if (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") then
|
||||||
|
@ -93,7 +90,15 @@ minetest.register_entity(":__builtin:falling_node", {
|
||||||
elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted") then
|
elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted") then
|
||||||
self.object:set_yaw(core.dir_to_yaw(core.wallmounted_to_dir(node.param2)))
|
self.object:set_yaw(core.dir_to_yaw(core.wallmounted_to_dir(node.param2)))
|
||||||
end
|
end
|
||||||
|
if def.light_source then
|
||||||
|
glow = def.light_source
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
self.object:set_properties({
|
||||||
|
is_visible = true,
|
||||||
|
textures = {node.name},
|
||||||
|
glow = glow,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
get_staticdata = function(self)
|
get_staticdata = function(self)
|
||||||
|
|
Loading…
Reference in a new issue