From 96a796cce7453688730cbda423b10e2aeaf98aa5 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 12 Nov 2016 19:42:29 +0100 Subject: [PATCH] Update legacy code check --- armor.lua | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/armor.lua b/armor.lua index 834fe56..a3a51b0 100644 --- a/armor.lua +++ b/armor.lua @@ -1,9 +1,6 @@ -minetest.after(0, function() - if not armor.def then - minetest.after(2,minetest.chat_send_all,"#Better HUD: Please update your version of 3darmor") - HUD_SHOW_ARMOR = false - end -end) +if (not armor) or (not armor.def) then + minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!") +end function hbarmor.get_armor(player) if not player or not armor.def then @@ -32,6 +29,4 @@ function hbarmor.set_armor(player_name, ges_state, items) end hbarmor.armor[player_name] = math.min(lvl* (items * (100 / max_items)), 100) - - end