From 6f61bf2c635c36ba2a36e85c115cabf884647efb Mon Sep 17 00:00:00 2001 From: QartemisT Date: Fri, 22 Dec 2023 08:31:11 +0000 Subject: [PATCH] Fix some buggy logic and bracket mess. --- ACP.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ACP.lua b/ACP.lua index e4c6fe5..274d02a 100644 --- a/ACP.lua +++ b/ACP.lua @@ -270,14 +270,15 @@ function ACP:IsAddonCompatibleWithCurrentIntefaceVersion(addon) return true -- Get to the choppa! end - local max_supported = (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX .. (isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or ""))) or - (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX_ORG) .. (isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or "")) + local slug = isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or "" + local max_supported = (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX .. slug)) or + (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX_ORG .. slug)) if not max_supported then max_supported = GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX) or GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX_ORG) end - local min_supported = (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN .. (isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or ""))) or - (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN_ORG) .. (isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or "")) + local min_supported = (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN .. slug)) or + (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN_ORG .. slug)) if not min_supported then min_supported = GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN) or GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN_ORG) end