From 8f5ffeb384fd3b1ad7cc500f47f0afa7ee1e5c75 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Fri, 10 Mar 2017 18:05:16 +0000 Subject: [PATCH] Shields: Remove registration delay, closes #88 --- shields/init.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/shields/init.lua b/shields/init.lua index 2234fa4..ccc86a5 100644 --- a/shields/init.lua +++ b/shields/init.lua @@ -1,5 +1,9 @@ local use_moreores = minetest.get_modpath("moreores") +if minetest.global_exists("armor") and armor.elements then + table.insert(armor.elements, "shield") +end + -- Regisiter Shields minetest.register_tool("shields:shield_admin", { @@ -119,8 +123,3 @@ for k, v in pairs(ARMOR_MATERIALS) do }, }) end - -minetest.after(0, function() - table.insert(armor.elements, "shield") -end) -