1
0
mirror of https://github.com/mt-mods/basic_signs.git synced 2025-06-28 14:36:05 +02:00

2 Commits

Author SHA1 Message Date
c4f0b331c0 adjust for signs_lib's change of allow_onpole
(explicitly set them to `true`, as signs_lib now defaults to disabled)
2019-09-21 15:58:35 -04:00
2f6943495a allow placing signs on horizontal poles 2019-09-21 15:52:59 -04:00

View File

@ -35,11 +35,13 @@ function basic_signs.determine_sign_type(pos, placer, itemstack, pointed_thing)
not placer:get_player_control().sneak then not placer:get_player_control().sneak then
return minetest.registered_nodes[pt_name].on_rightclick(pos, node, placer, itemstack, pointed_thing) return minetest.registered_nodes[pt_name].on_rightclick(pos, node, placer, itemstack, pointed_thing)
elseif signs_lib.check_for_pole(pos, pointed_thing) then elseif signs_lib.check_for_pole(pos, pointed_thing) then
minetest.swap_node(pos, {name = "default:sign_wall_wood_onpole", param2 = node.param2}) minetest.swap_node(pos, {name = "default:sign_wall_wood_onpole", param2 = node.param2})
elseif signs_lib.check_for_horizontal_pole(pos, pointed_thing) then
minetest.swap_node(pos, {name = "default:sign_wall_wood_onpole_horiz", param2 = node.param2})
elseif signs_lib.check_for_ceiling(pointed_thing) then elseif signs_lib.check_for_ceiling(pointed_thing) then
minetest.swap_node(pos, {name = "default:sign_wall_wood_hanging", param2 = newparam2}) minetest.swap_node(pos, {name = "default:sign_wall_wood_hanging", param2 = newparam2})
elseif basic_signs.check_for_floor(pointed_thing) then elseif basic_signs.check_for_floor(pointed_thing) then
minetest.swap_node(pos, {name = "basic_signs:yard_sign", param2 = newparam2}) minetest.swap_node(pos, {name = "basic_signs:yard_sign", param2 = newparam2})
end end
signs_lib.update_sign(pos) signs_lib.update_sign(pos)
@ -71,7 +73,9 @@ signs_lib.register_sign("basic_signs:sign_wall_locked", {
locked = true, locked = true,
entity_info = "standard", entity_info = "standard",
allow_hanging = true, allow_hanging = true,
allow_widefont = true allow_widefont = true,
allow_onpole = true,
allow_onpole_horizontal = true
}) })
signs_lib.register_sign("basic_signs:sign_wall_glass", { signs_lib.register_sign("basic_signs:sign_wall_glass", {
@ -88,6 +92,8 @@ signs_lib.register_sign("basic_signs:sign_wall_glass", {
groups = {cracky = 3, oddly_breakable_by_hand = 3}, groups = {cracky = 3, oddly_breakable_by_hand = 3},
allow_hanging = true, allow_hanging = true,
allow_widefont = true, allow_widefont = true,
allow_onpole = true,
allow_onpole_horizontal = true,
use_texture_alpha = true, use_texture_alpha = true,
}) })
@ -105,6 +111,8 @@ signs_lib.register_sign("basic_signs:sign_wall_obsidian_glass", {
groups = {cracky = 3}, groups = {cracky = 3},
allow_hanging = true, allow_hanging = true,
allow_widefont = true, allow_widefont = true,
allow_onpole = true,
allow_onpole_horizontal = true,
use_texture_alpha = true, use_texture_alpha = true,
}) })
@ -145,7 +153,9 @@ for i, color in ipairs(sign_colors) do
yaw = signs_lib.standard_yaw yaw = signs_lib.standard_yaw
}, },
allow_hanging = true, allow_hanging = true,
allow_widefont = true allow_widefont = true,
allow_onpole = true,
allow_onpole_horizontal = true
}) })
table.insert(signs_lib.lbm_restore_nodes, "signs:sign_wall_"..color[1]) table.insert(signs_lib.lbm_restore_nodes, "signs:sign_wall_"..color[1])
@ -169,7 +179,6 @@ signs_lib.register_sign("basic_signs:yard_sign", {
}, },
groups = wgroups, groups = wgroups,
drop = "default:sign_wall_wood", drop = "default:sign_wall_wood",
allow_onpole = false,
allow_widefont = true allow_widefont = true
}) })