mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 03:23:45 +01:00
Fix falling image of torchlike if paramtype2="none" (#10612)
This commit is contained in:
parent
ad58ece180
commit
ee1853e9bc
@ -84,6 +84,9 @@ core.register_entity(":__builtin:falling_node", {
|
|||||||
local textures
|
local textures
|
||||||
if def.tiles and def.tiles[1] then
|
if def.tiles and def.tiles[1] then
|
||||||
local tile = def.tiles[1]
|
local tile = def.tiles[1]
|
||||||
|
if def.drawtype == "torchlike" and def.paramtype2 ~= "wallmounted" then
|
||||||
|
tile = def.tiles[2] or def.tiles[1]
|
||||||
|
end
|
||||||
if type(tile) == "table" then
|
if type(tile) == "table" then
|
||||||
tile = tile.name
|
tile = tile.name
|
||||||
end
|
end
|
||||||
@ -144,7 +147,11 @@ core.register_entity(":__builtin:falling_node", {
|
|||||||
|
|
||||||
-- Rotate entity
|
-- Rotate entity
|
||||||
if def.drawtype == "torchlike" then
|
if def.drawtype == "torchlike" then
|
||||||
self.object:set_yaw(math.pi*0.25)
|
if def.paramtype2 == "wallmounted" then
|
||||||
|
self.object:set_yaw(math.pi*0.25)
|
||||||
|
else
|
||||||
|
self.object:set_yaw(-math.pi*0.25)
|
||||||
|
end
|
||||||
elseif (node.param2 ~= 0 and (def.wield_image == ""
|
elseif (node.param2 ~= 0 and (def.wield_image == ""
|
||||||
or def.wield_image == nil))
|
or def.wield_image == nil))
|
||||||
or def.drawtype == "signlike"
|
or def.drawtype == "signlike"
|
||||||
|
@ -145,6 +145,23 @@ minetest.register_node("testnodes:fencelike", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("testnodes:torchlike", {
|
minetest.register_node("testnodes:torchlike", {
|
||||||
|
description = S("Torchlike Drawtype Test Node"),
|
||||||
|
drawtype = "torchlike",
|
||||||
|
paramtype = "light",
|
||||||
|
tiles = {
|
||||||
|
"testnodes_torchlike_floor.png",
|
||||||
|
"testnodes_torchlike_ceiling.png",
|
||||||
|
"testnodes_torchlike_wall.png",
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
walkable = false,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
groups = { dig_immediate = 3 },
|
||||||
|
inventory_image = fallback_image("testnodes_torchlike_floor.png"),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("testnodes:torchlike_wallmounted", {
|
||||||
description = S("Wallmounted Torchlike Drawtype Test Node"),
|
description = S("Wallmounted Torchlike Drawtype Test Node"),
|
||||||
drawtype = "torchlike",
|
drawtype = "torchlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -162,6 +179,8 @@ minetest.register_node("testnodes:torchlike", {
|
|||||||
inventory_image = fallback_image("testnodes_torchlike_floor.png"),
|
inventory_image = fallback_image("testnodes_torchlike_floor.png"),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("testnodes:signlike", {
|
minetest.register_node("testnodes:signlike", {
|
||||||
description = S("Wallmounted Signlike Drawtype Test Node"),
|
description = S("Wallmounted Signlike Drawtype Test Node"),
|
||||||
drawtype = "signlike",
|
drawtype = "signlike",
|
||||||
@ -526,7 +545,7 @@ scale("allfaces_optional_waving",
|
|||||||
scale("plantlike",
|
scale("plantlike",
|
||||||
S("Double-sized Plantlike Drawtype Test Node"),
|
S("Double-sized Plantlike Drawtype Test Node"),
|
||||||
S("Half-sized Plantlike Drawtype Test Node"))
|
S("Half-sized Plantlike Drawtype Test Node"))
|
||||||
scale("torchlike",
|
scale("torchlike_wallmounted",
|
||||||
S("Double-sized Wallmounted Torchlike Drawtype Test Node"),
|
S("Double-sized Wallmounted Torchlike Drawtype Test Node"),
|
||||||
S("Half-sized Wallmounted Torchlike Drawtype Test Node"))
|
S("Half-sized Wallmounted Torchlike Drawtype Test Node"))
|
||||||
scale("signlike",
|
scale("signlike",
|
||||||
|
Loading…
Reference in New Issue
Block a user