From 6be2fab51088b5d228286b98f4a440aeb588b2aa Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sat, 6 Sep 2025 13:03:39 +0200 Subject: [PATCH] adjusted anvil hud to changes and fixed bug --- nodes_anvil.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nodes_anvil.lua b/nodes_anvil.lua index 0b7149c..a2b6061 100644 --- a/nodes_anvil.lua +++ b/nodes_anvil.lua @@ -217,7 +217,10 @@ minetest.register_node("cottages:anvil", { end local hud1 = puncher:hud_add({ - hud_elem_type = "image", + name = "cottages_anvil_broken_tool_img", + direction = 0, + z_index = 90, + type = "image", scale = {x = 15, y = 15}, text = hud_image, position = {x = 0.5, y = 0.5}, @@ -227,7 +230,9 @@ minetest.register_node("cottages:anvil", { local hud3 = nil; if( input:get_wear()>0 ) then hud2 = puncher:hud_add({ - hud_elem_type = "statbar", + name = "cottages_anvil_wear_red", + z_index = 111, + type = "statbar", text = "default_cloud.png^[colorize:#ff0000:256", number = 40, direction = 0, -- left to right @@ -237,7 +242,9 @@ minetest.register_node("cottages:anvil", { size = {x=32, y=32}, }) hud3 = puncher:hud_add({ - hud_elem_type = "statbar", + name = "cottages_anvil_wear_green", + z_index = 112, + type = "statbar", text = "default_cloud.png^[colorize:#00ff00:256", number = damage_state, direction = 0, -- left to right