diff --git a/api.lua b/api.lua index e23f741..7b34cdf 100644 --- a/api.lua +++ b/api.lua @@ -798,16 +798,18 @@ function signs_lib.register_sign(name, rdef) local hdef = table.copy(def) hdef.paramtype2 = "facedir" - hdef.selection_box = rdef.selection_box or signs_lib.make_selection_boxes(35, 32, false, 0, 3, -18.5, true) - hdef.node_box = rdef.node_box or rdef.selection_box or hdef.selection_box + local hcbox = signs_lib.make_selection_boxes(35, 32, false, 0, 3, -18.5, true) + + hdef.selection_box = rdef.hanging_selection_box or hcbox + hdef.node_box = rdef.hanging_node_box or rdef.hanging_selection_box or hcbox hdef.groups.not_in_creative_inventory = 1 hdef.tiles[3] = "signs_lib_hangers.png" - hdef.mesh = string.gsub(hdef.mesh, ".obj$", "_hanging.obj") + hdef.mesh = string.gsub(string.gsub(hdef.mesh, "_facedir.obj", ".obj"), ".obj$", "_hanging.obj") hdef.on_rotate = nil if hdef.entity_info then - hdef.entity_info.mesh = string.gsub(hdef.entity_info.mesh, ".obj$", "_hanging.obj") + hdef.entity_info.mesh = string.gsub(string.gsub(hdef.entity_info.mesh, "_facedir.obj", ".obj"), ".obj$", "_hanging.obj") hdef.entity_info.yaw = signs_lib.standard_yaw end diff --git a/standard_signs.lua b/standard_signs.lua index 5ecc9f4..dca41b4 100644 --- a/standard_signs.lua +++ b/standard_signs.lua @@ -21,7 +21,8 @@ signs_lib.register_sign("default:sign_wall_steel", { groups = signs_lib.standard_steel_groups, sounds = signs_lib.standard_steel_sign_sounds, locked = true, - entity_info = "standard" + entity_info = "standard", + allow_hanging = true, }) minetest.register_alias("signs:sign_hanging", "default:sign_wall_wood_hanging") diff --git a/textures/signs_lib_hangers.png b/textures/signs_lib_hangers.png index 04d74a9..3099c54 100644 Binary files a/textures/signs_lib_hangers.png and b/textures/signs_lib_hangers.png differ