Skip to content

Commit

Permalink
💄
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Oct 31, 2023
1 parent 20b667d commit 20fd888
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 17 deletions.
53 changes: 43 additions & 10 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ exclude_files = {}

globals = {
-- FrameXML objects we mutate
'StaticPopupDialogs', -- FrameXML/StaticPopup.lua
'LootFrame', -- FrameXML/LootFrame.xml
'BuffFrame', -- FrameXML/BuffFrame.xml
'ChatTypeInfo', -- FrameXML/ChatFrame.lua
'DurabilityFrame', -- FrameXML/DurabilityFrame.xml
'ClickBindingFrame', -- AddOns/Blizzard_ClickBindingUI/Blizzard_ClickBindingUI.xml
'DurabilityFrame', -- FrameXML/DurabilityFrame.xml
'LootFrame', -- FrameXML/LootFrame.xml
'StaticPopupDialogs', -- FrameXML/StaticPopup.lua
'SuperTrackedFrame', -- AddOns/Blizzard_QuestNavigation/SuperTrackedFrame.xml

-- savedvariables we mutate
'OPie_SavedData',
Expand All @@ -47,10 +49,14 @@ read_globals = {
'GenericTraitFrameMixin', -- AddOns/Blizzard_GenericTraitUI/Blizzard_GenericTraitFrame.lua
'HelpTip', -- SharedXML/HelpTip.lua
'HybridMinimap', -- AddOns/Blizzard_HybridMinimap/Blizzard_HybridMinimap.xml
'ItemLocation', -- FrameXML/ObjectAPI/ItemLocation.lua
'MacroFrame', -- AddOns/Blizzard_MacroUI/Blizzard_MacroUI.xml
'MerchantFrame', -- FrameXML/MerchantFrame.xml
'Minimap', -- FrameXML/Minimap.xml
'MinimapMixin', -- FrameXML/Minimap.lua
'PaperDollSidebarTab3', -- FrameXML/PaperDollFrame.xml
'PetCastingBarFrame', -- FrameXML/PetFrame.xml
'PlayerCastingBarFrame', -- FrameXML/CastingBarFrame.xml
'ProfessionsFrame', -- AddOns/Blizzard_Professions/Blizzard_ProfessionsFrame.xml
'QueueStatusButton', -- FrameXML/QueueStatusFrame.xml
'ReadyCheckListenerFrame', -- FrameXML/ReadyCheck.xml
Expand All @@ -63,9 +69,10 @@ read_globals = {
'SlashCmdList', -- FrameXML/ChatFrame.lua
'SpellBookFrame', -- FrameXML/SpellBookFrame.xml
'SpellBookFrameTabButton1', -- FrameXML/SpellBookFrame.xml
'SpellbookMicroButton', -- FrameXML/MainMenuBarMicroButtons.xml
'UIErrorsFrame', -- FrameXML/UIErrorsFrame.xml
'UIParent', -- FrameXML/UIParent.xml
'UiMapPoint', -- FrameXML/ObjectAPI/UiMapPoint.lua
'UIParent', -- FrameXML/UIParent.xml
'WeeklyRewardsFrame', -- AddOns/Blizzard_WeeklyRewards/Blizzard_WeeklyRewards.xml
'WorldFrame', -- FrameXML/WorldFrame.xml
'WorldMapFrame', -- AddOns/Blizzard_WorldMap/Blizzard_WorldMap.xml
Expand All @@ -81,17 +88,13 @@ read_globals = {
'ChatFrame_ReceiveAllPrivateMessages', -- FrameXML/ChatFrame.lua
'ChatFrame_RemoveAllChannels', -- FrameXML/ChatFrame.lua
'ChatFrame_RemoveAllMessageGroups', -- FrameXML/ChatFrame.lua
'CopyTable', -- SharedXML/TableUtil.lua
'CreateColor', -- SharedXML/Color.lua
'CreateRectangle', -- SharedXML/Rectangle.lua
'CreateVector2D', -- SharedXML/Vector2D.lua
'ChatFrame_TimeBreakDown', -- FrameXML/ChatFrame.lua
'FCF_Close', -- FrameXML/FloatingChatFrame.lua
'FCF_OpenNewWindow', -- FrameXML/FloatingChatFrame.lua
'FCF_ResetChatWindows', -- FrameXML/FloatingChatFrame.lua
'FCF_SelectDockFrame', -- FrameXML/FloatingChatFrame.lua
'FCF_SetWindowAlpha', -- FrameXML/FloatingChatFrame.lua
'FCF_SetWindowColor', -- FrameXML/FloatingChatFrame.lua
'FormatLargeNumber', -- SharedXML/FormattingUtil.lua
'GameTooltip_Hide', -- FrameXML/GameTooltip.lua
'GetUnitName', -- FrameXML/UnitFrame.lua
'HideUIPanel', -- FrameXML/UIParent.lua
Expand All @@ -109,40 +112,56 @@ read_globals = {
'ToggleClickBindingFrame', -- FrameXML/UIParent.lua
'UnregisterStateDriver', -- FrameXML/SecureStateDriver.lua
'WeeklyRewards_ShowUI', -- FrameXML/UIParent.lua
'WrapTextInColorCode', -- SharedXML/Color.lua
'nop', -- FrameXML/UIParent.lua

-- FrameXML mutable globals
'SELECTED_CHAT_FRAME',

-- SharedXML functions
'CopyTable', -- SharedXML/TableUtil.lua
'CreateColor', -- SharedXML/Color.lua
'CreateRectangle', -- SharedXML/Rectangle.lua
'CreateVector2D', -- SharedXML/Vector2D.lua
'FormatLargeNumber', -- SharedXML/FormattingUtil.lua
'Mixin', -- SharedXML/Mixin.lua
'SecondsToTime', -- SharedXML/TimeUtil.lua
'WrapTextInColorCode', -- SharedXML/Color.lua

-- namespaces
'C_AddOns',
'C_BattleNet',
'C_ChallengeMode',
'C_ClassColor',
'C_ClassTrial',
'C_Container',
'C_Covenants',
'C_CraftingOrders',
'C_CVar',
'C_DateAndTime',
'C_EditMode',
'C_EquipmentSet',
'C_FriendList',
'C_Garrison',
'C_GossipInfo',
'C_Item',
'C_Map',
'C_Minimap',
'C_MountJournal',
'C_Navigation',
'C_PartyInfo',
'C_PlayerInfo',
'C_QuestLog',
'C_Timer',
'C_ToyBox',
'C_UI',
'C_VignetteInfo',
'Constants',
'Enum',
'TooltipDataProcessor',

-- API
'AcceptGroup',
'AutoEquipCursorItem',
'BNGetNumFriends',
'CanEjectPassengerFromSeat',
'CanGuildBankRepair',
Expand Down Expand Up @@ -171,10 +190,15 @@ read_globals = {
'GetGuildRosterInfo',
'GetInventoryAlertStatus',
'GetInventoryItemDurability',
'GetInventoryItemID',
'GetInventoryItemID',
'GetItemCooldown',
'GetItemCount',
'GetItemInfo',
'GetLatestThreeSenders',
'GetMacroInfo',
'GetMacroSpell',
'GetMaxLevelForPlayerExpansion',
'GetMoney',
'GetNumGroupMembers',
'GetNumGuildMembers',
Expand All @@ -186,12 +210,14 @@ read_globals = {
'GetScreenHeight',
'GetSpellCooldown',
'GetSpellInfo',
'GetSpellLink',
'GetSpellTexture',
'GetTime',
'GetTotemCannotDismiss',
'GetTotemInfo',
'GetWeaponEnchantInfo',
'HasBonusActionBar',
'HasFullControl',
'HasNewMail',
'InCombatLockdown',
'IsAddOnLoaded',
Expand All @@ -203,14 +229,17 @@ read_globals = {
'IsShiftKeyDown',
'IsSpellKnown',
'PickupBagFromSlot',
'PickupInventoryItem',
'PlaySound',
'PlaySoundFile',
'PutItemInBag',
'RepairAllItems',
'RequestTimePlayed',
'SendChatMessage',
'SetBindingClick',
'SetChatColorNameByClass',
'SetOverrideBinding',
'SetOverrideBindingClick',
'TaxiRequestEarlyLanding',
'UnitAura',
'UnitBattlePetLevel',
Expand All @@ -232,6 +261,7 @@ read_globals = {
'UnitIsPlayer',
'UnitIsTapDenied',
'UnitIsUnit',
'UnitLevel',
'UnitName',
'UnitOnTaxi',
'UnitPlayerControlled',
Expand All @@ -245,4 +275,7 @@ read_globals = {
'LibStub',
'OPie',
'TomTomPaste',

-- ???
'AddonTooltip',
}
2 changes: 1 addition & 1 deletion modules/automation/teleportgear.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local addonName, addon = ...
local _, addon = ...

local inventorySlots = {}
local function cacheInventorySlot(inventorySlot)
Expand Down
2 changes: 1 addition & 1 deletion modules/binding/misdirect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ local function updateTarget()
end

local unit = getGroupRoleUnit()
if role == 'TANK' and not unit and UnitExists('pet') then
if SPELL_ROLE == 'TANK' and not unit and UnitExists('pet') then
unit = 'pet'
end

Expand Down
2 changes: 2 additions & 0 deletions modules/map/pin.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, addon = ...

local TIMER_MINUTES_DISPLAY = _G.TIMER_MINUTES_DISPLAY -- globalstring

local math_abs = math.abs
local math_floor = math.floor

Expand Down
2 changes: 1 addition & 1 deletion modules/minimap/mail.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ local function cooldownWrapper(start, duration)
return start > 0 and start - GetTime() + duration
end

local function updateTooltip(_, ...)
local function updateTooltip()
GameTooltip:SetOwner(mail, 'ANCHOR_BOTTOMLEFT')

if HasNewMail() then
Expand Down
5 changes: 3 additions & 2 deletions modules/misc/played.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
local _, addon = ...

local NUM_CHAT_WINDOWS = _G.NUM_CHAT_WINDOWS or 10 -- FrameXML/ChatFrame.lua
local TIME_DAYHOURMINUTESECOND = _G.TIME_DAYHOURMINUTESECOND -- globalstring

local registered = {}
function addon:PLAYER_LOGIN()
requested = true

-- unregister events
for index = 1, NUM_CHAT_WINDOWS do
if _G['ChatFrame' .. index]:IsEventRegistered('TIME_PLAYED_MSG') then
Expand Down
1 change: 0 additions & 1 deletion modules/settings/cvars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ local CVARS = {
autoLootDefault = 1,
combinedBags = 0,
empowerTapControls = 1,
SoftTargetInteract = 0,
softTargettingInteractKeySound = 0,
ClipCursor = 0,
mouseInvertPitch = 0,
Expand Down
4 changes: 3 additions & 1 deletion modules/tooltip/data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ local ENCOUNTER_JOURNAL_ITEM = _G.ENCOUNTER_JOURNAL_ITEM -- globalstring
local STAT_CATEGORY_SPELL = _G.STAT_CATEGORY_SPELL -- globalstring
local CURRENCY = _G.CURRENCY -- globalstring
local MOUNT = _G.MOUNT -- globalstring
local MACRO = _G.MACRO -- globalstring
local ID = _G.ID -- globalstring
local UNKNOWN = _G.UNKNOWN -- globalstring
local NAME = _G.NAME -- globalstring

local PREFIXES = {
item = ENCOUNTER_JOURNAL_ITEM,
Expand Down Expand Up @@ -59,7 +61,7 @@ function tooltip:PetAction(data)
end
end

function tooltip:Macro(data)
function tooltip:Macro()
local button = self:GetOwner()
if button and button.action then
local _, macroID = GetActionInfo(button.action)
Expand Down
2 changes: 2 additions & 0 deletions modules/widgets/nekkid.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local addonName, addon = ...

local CONTAINER_BAG_OFFSET = _G.CONTAINER_BAG_OFFSET or 30 -- FrameXML/Constants.lua

-- adjust position of existing tabs
PaperDollSidebarTab3:SetPoint('BOTTOMRIGHT', -60, 0)
PaperDollSidebarTabs.DecorLeft:SetPoint('BOTTOMLEFT', -25, 0)

Check warning on line 7 in modules/widgets/nekkid.lua

View workflow job for this annotation

GitHub Actions / lint

accessing undefined variable 'PaperDollSidebarTabs'
Expand Down

0 comments on commit 20fd888

Please sign in to comment.