Comment out unused armor block

This commit is contained in:
NullBite 2023-06-23 01:49:04 -04:00
parent 36adf3a7f0
commit c4d582ce0f
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -491,92 +491,92 @@ do
end end
-- TODO fix code after optimization in prewrite -- TODO fix code after optimization in prewrite
function armor() -- function armor()
if true then return nil end -- if true then return nil end
-- ^ hacky way to disable a function without uncommenting the entire thing to not break git vcs -- -- ^ hacky way to disable a function without uncommenting the entire thing to not break git vcs
--
-- Get equipped armor, extract name from item ID -- -- Get equipped armor, extract name from item ID
local leggings_item = player.getEquipmentItem(4) -- local leggings_item = player.getEquipmentItem(4)
local boots_item = player.getEquipmentItem(3) -- local boots_item = player.getEquipmentItem(3)
local leggings = string.sub(leggings_item.getType(), 11, -10) -- local leggings = string.sub(leggings_item.getType(), 11, -10)
local boots = string.sub(boots_item.getType(), 11, -7) -- local boots = string.sub(boots_item.getType(), 11, -7)
--
if local_state.armor_enabled then -- if local_state.armor_enabled then
if old_state.leggings ~= leggings or old_state.armor_enabled ~= local_state.armor_enabled then -- if old_state.leggings ~= leggings or old_state.armor_enabled ~= local_state.armor_enabled then
-- leggings -- -- leggings
armor_glint.leggings=leggings_item.hasGlint() -- armor_glint.leggings=leggings_item.hasGlint()
local leggings_color=colorArmor(leggings_item) or armor_color[leggings] -- local leggings_color=colorArmor(leggings_item) or armor_color[leggings]
local uv=tailuvm:getUV(leggings) -- local uv=tailuvm:getUV(leggings)
if uv ~= nil then -- if uv ~= nil then
armor_state.leggings=true -- armor_state.leggings=true
for k, v in pairs(TAIL_LEGGINGS) do -- for k, v in pairs(TAIL_LEGGINGS) do
v.setUV(uv) -- v.setUV(uv)
end -- end
if leggings=="leather" then -- if leggings=="leather" then
for k, v in pairs(TAIL_LEGGINGS_COLOR) do -- for k, v in pairs(TAIL_LEGGINGS_COLOR) do
v.setColor(leggings_color) -- v.setColor(leggings_color)
end -- end
else -- else
for k, v in pairs(TAIL_LEGGINGS) do -- for k, v in pairs(TAIL_LEGGINGS) do
v.setColor({1, 1, 1}) -- v.setColor({1, 1, 1})
end -- end
end -- end
else -- else
armor_state.leggings=false -- armor_state.leggings=false
end -- end
pmRefresh() -- pmRefresh()
end -- end
--
if old_state.boots ~= boots or old_state.armor_enabled ~= local_state.armor_enabled then -- if old_state.boots ~= boots or old_state.armor_enabled ~= local_state.armor_enabled then
-- boots -- -- boots
armor_glint.boots=boots_item.hasGlint() -- armor_glint.boots=boots_item.hasGlint()
local boots_color=colorArmor(boots_item) or armor_color[boots] -- local boots_color=colorArmor(boots_item) or armor_color[boots]
local uv_boots=tailuvm:getUV(boots) -- local uv_boots=tailuvm:getUV(boots)
if uv_boots ~= nil then -- if uv_boots ~= nil then
armor_state.boots=true -- armor_state.boots=true
for k, v in pairs(TAIL_BOOTS) do -- for k, v in pairs(TAIL_BOOTS) do
v.setUV(uv_boots) -- v.setUV(uv_boots)
end -- end
if boots=="leather" then -- if boots=="leather" then
model.Body.MTail1.MTail2.MTail3.Boot.setColor(boots_color) -- model.Body.MTail1.MTail2.MTail3.Boot.setColor(boots_color)
armor_state.leather_boots=true -- armor_state.leather_boots=true
else -- else
model.Body.MTail1.MTail2.MTail3.Boot.setColor({1, 1, 1}) -- model.Body.MTail1.MTail2.MTail3.Boot.setColor({1, 1, 1})
armor_state.leather_boots=false -- armor_state.leather_boots=false
end -- end
else -- else
armor_state.boots=false -- armor_state.boots=false
end -- end
pmRefresh() -- pmRefresh()
end -- end
else -- else
armor_glint.leggings=false -- armor_glint.leggings=false
armor_glint.boots=false -- armor_glint.boots=false
end -- end
--
if armor_glint.leggings then -- if armor_glint.leggings then
for _, v in pairs(TAIL_LEGGINGS) do -- for _, v in pairs(TAIL_LEGGINGS) do
v.setShader("Glint") -- v.setShader("Glint")
end -- end
else -- else
for _, v in pairs(TAIL_LEGGINGS) do -- for _, v in pairs(TAIL_LEGGINGS) do
v.setShader("None") -- v.setShader("None")
end -- end
end -- end
if armor_glint.boots then -- if armor_glint.boots then
for _, v in pairs(TAIL_BOOTS) do -- for _, v in pairs(TAIL_BOOTS) do
v.setShader("Glint") -- v.setShader("Glint")
end -- end
else -- else
for _, v in pairs(TAIL_BOOTS) do -- for _, v in pairs(TAIL_BOOTS) do
v.setShader("None") -- v.setShader("None")
end -- end
end -- end
--
old_state.boots=boots -- old_state.boots=boots
old_state.leggings=leggings -- old_state.leggings=leggings
old_state.armor_enabled=local_state.armor_enabled -- old_state.armor_enabled=local_state.armor_enabled
end -- end
function colorArmor(item) function colorArmor(item)
local tag = item.tag local tag = item.tag