Merge pull request #2 from oversword/bls-370

Check if huds exist before removing them
This commit is contained in:
Oversword 2022-01-14 04:39:25 +00:00 committed by GitHub
commit cb88628e19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -230,8 +230,12 @@ minetest.register_node("cottages:anvil", {
minetest.after(2, function()
if( puncher ) then
puncher:hud_remove(hud1);
puncher:hud_remove(hud2);
puncher:hud_remove(hud3);
if hud2 then
puncher:hud_remove(hud2);
end
if hud3 then
puncher:hud_remove(hud3);
end
end
end)
@ -300,4 +304,3 @@ minetest.register_craft({
{'cottages:anvil'},
{cottages.craftitem_stick} }
})