From c35a0fcc25ae217163d9a89283162573afab8f6b Mon Sep 17 00:00:00 2001 From: NullBite Date: Sun, 27 Mar 2022 18:48:39 -0400 Subject: [PATCH] Fix armor not showing on tail due to optimization Now the armor handler checks amror_enabled has been toggled as well as the armor state itself --- script.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script.lua b/script.lua index cd40487..5e8d375 100644 --- a/script.lua +++ b/script.lua @@ -819,7 +819,7 @@ function armor() local boots = string.sub(boots_item.getType(), 11, -7) if local_state.armor_enabled then - if old_state.leggings ~= leggings then + if old_state.leggings ~= leggings or old_state.armor_enabled ~= local_state.armor_enabled then -- leggings armor_glint.leggings=leggings_item.hasGlint() local leggings_color=colorArmor(leggings_item) or armor_color[leggings] @@ -844,7 +844,7 @@ function armor() pmRefresh() end - if old_state.boots ~= boots then + if old_state.boots ~= boots or old_state.armor_enabled ~= local_state.armor_enabled then -- boots armor_glint.boots=boots_item.hasGlint() local boots_color=colorArmor(boots_item) or armor_color[boots] @@ -892,6 +892,7 @@ function armor() old_state.boots=boots old_state.leggings=leggings + old_state.armor_enabled=local_state.armor_enabled end function colorArmor(item)