Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ceiling and wall lights can't be rotated in all directions #55

Open
akozlovskiy119 opened this issue Jun 9, 2021 · 1 comment
Open
Labels

Comments

@akozlovskiy119
Copy link
Contributor

akozlovskiy119 commented Jun 9, 2021

For example, ceiling light can't be placed horizontally along X axis, same with wall light and Z axis. Since these light nodes have an asymmetric shape, it would be nice if they could be rotated in all directions. Perhaps this problem applies to some other nodes as well.

@BuckarooBanzay
Copy link
Collaborator

these nodes have currently wallmounted as param2type:

scifi_nodes/nodeboxes.lua

Lines 450 to 499 in f1c0d74

minetest.register_node("scifi_nodes:lightbar", {
description = "ceiling light",
tiles = {
"scifi_nodes_white2.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
light_source = minetest.LIGHT_MAX,
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.5, 0.125, -0.375, 0.5}, -- NodeBox1
}
},
selection_box = {
type = "wallmounted",
wallmounted = {
{-0.125, -0.5, -0.5, 0.125, -0.375, 0.5}, -- NodeBox1
}
},
groups = {cracky=1, dig_generic = 3},
sounds = scifi_nodes.node_sound_glass_defaults()
})
minetest.register_node("scifi_nodes:light_dynamic", {
description = "Wall light",
tiles = {
"scifi_nodes_lightoverlay.png",
},
inventory_image = "scifi_nodes_lightoverlay.png",
wield_image = "scifi_nodes_lightoverlay.png",
drawtype = "signlike",
paramtype = "light",
selection_box = {
type = "wallmounted",
fixed = {-0.5, -0.5, -0.5, -0.45, 0.5, 0.5}
},
node_box = {
type = "fixed",
fixed = {
fixed = {-0.5, -0.5, -0.5, -0.45, 0.5, 0.5}
}
},
paramtype2 = "wallmounted",
light_source = minetest.LIGHT_MAX,
groups = {cracky=1, oddly_breakable_by_hand=1},
sounds = scifi_nodes.node_sound_glass_defaults()
})

not sure if we could "just" change it to facedir without sime kind of lbm 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants