Skip to content

Commit

Permalink
Unwanted mass rename of tinsert to table.insert
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Oct 11, 2023
1 parent 115ccf7 commit 0cca378
Show file tree
Hide file tree
Showing 32 changed files with 180 additions and 180 deletions.
32 changes: 16 additions & 16 deletions core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -635,14 +635,14 @@

Details:Destroy(Details.ToKFunctions)

tinsert(Details.ToKFunctions, Details.NoToK)
tinsert(Details.ToKFunctions, Details.ToK)
tinsert(Details.ToKFunctions, Details.ToK2)
tinsert(Details.ToKFunctions, Details.ToK0)
tinsert(Details.ToKFunctions, Details.ToKMin)
tinsert(Details.ToKFunctions, Details.ToK2Min)
tinsert(Details.ToKFunctions, Details.ToK0Min)
tinsert(Details.ToKFunctions, Details.comma_value)
table.insert(Details.ToKFunctions, Details.NoToK)
table.insert(Details.ToKFunctions, Details.ToK)
table.insert(Details.ToKFunctions, Details.ToK2)
table.insert(Details.ToKFunctions, Details.ToK0)
table.insert(Details.ToKFunctions, Details.ToKMin)
table.insert(Details.ToKFunctions, Details.ToK2Min)
table.insert(Details.ToKFunctions, Details.ToK0Min)
table.insert(Details.ToKFunctions, Details.comma_value)

end

Expand Down Expand Up @@ -768,14 +768,14 @@

Details:Destroy(Details.ToKFunctions)

tinsert(Details.ToKFunctions, Details.NoToK)
tinsert(Details.ToKFunctions, Details.ToK)
tinsert(Details.ToKFunctions, Details.ToK2)
tinsert(Details.ToKFunctions, Details.ToK0)
tinsert(Details.ToKFunctions, Details.ToKMin)
tinsert(Details.ToKFunctions, Details.ToK2Min)
tinsert(Details.ToKFunctions, Details.ToK0Min)
tinsert(Details.ToKFunctions, Details.comma_value)
table.insert(Details.ToKFunctions, Details.NoToK)
table.insert(Details.ToKFunctions, Details.ToK)
table.insert(Details.ToKFunctions, Details.ToK2)
table.insert(Details.ToKFunctions, Details.ToK0)
table.insert(Details.ToKFunctions, Details.ToKMin)
table.insert(Details.ToKFunctions, Details.ToK2Min)
table.insert(Details.ToKFunctions, Details.ToK0Min)
table.insert(Details.ToKFunctions, Details.comma_value)

--
end
Expand Down
4 changes: 2 additions & 2 deletions core/windows.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@
if (not _G.DetailsUpdateDialog) then
local updatewindow_frame = CreateFrame("frame", "DetailsUpdateDialog", UIParent, "ButtonFrameTemplate")
updatewindow_frame:SetFrameStrata("LOW")
tinsert(UISpecialFrames, "DetailsUpdateDialog")
table.insert(UISpecialFrames, "DetailsUpdateDialog")
updatewindow_frame:SetPoint("center", UIParent, "center")
updatewindow_frame:SetSize(512, 200)
--updatewindow_frame.portrait:SetTexture([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-GNOME]])
Expand Down Expand Up @@ -1623,7 +1623,7 @@ function Details.ShowCopyValueFrame(textToShow)
frame:SetSize(160, 20)
frame:SetPoint("center", UIParent, "center", 0, 0)
DetailsFramework:ApplyStandardBackdrop(frame)
tinsert(UISpecialFrames, "DetailsCopyValueFrame")
table.insert(UISpecialFrames, "DetailsCopyValueFrame")

frame.editBox = CreateFrame("editbox", nil, frame)
frame.editBox:SetPoint("topleft", frame, "topleft")
Expand Down
6 changes: 3 additions & 3 deletions frames/window_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function Details:CreateAPI2Frame()
end

for apiIndex, apiDesc in ipairs(api) do
tinsert(apiFunctionNames, apiDesc.name)
table.insert(apiFunctionNames, apiDesc.name)
end

local api2ScrollMenu = DetailsFramework:CreateScrollBox (Api2Frame, "$parentApi2MenuScroll", apiMenuScrollRefresh, apiFunctionNames, scrollWidth, scrollHeight, lineAmount, lineHeight)
Expand Down Expand Up @@ -286,7 +286,7 @@ function Details:CreateAPI2Frame()
f.required:SetPoint("left", f, "left", space2, 0)
f.default:SetPoint("left", f, "left", space3, 0)

tinsert(parametersLines, f)
table.insert(parametersLines, f)
end

--return value box
Expand Down Expand Up @@ -339,7 +339,7 @@ function Details:CreateAPI2Frame()

f.desc:SetPoint("topleft", f.name, "bottomleft", 0, -5)

tinsert(returnLines, f)
table.insert(returnLines, f)
end

function Api2Frame.Refresh()
Expand Down
2 changes: 1 addition & 1 deletion frames/window_bookmark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function Details:OpenBookmarkConfig()
local label = DF:CreateLabel(set, "")
label:SetPoint("left", icon, "right", 2, 0)

tinsert(panel.blocks, {icon = icon, label = label, bg = set.bg, button = set})
table.insert(panel.blocks, {icon = icon, label = label, bg = set.bg, button = set})
end

local normal_coords = {0, 1, 0, 1}
Expand Down
4 changes: 2 additions & 2 deletions frames/window_cdtracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function Details222.CooldownTracking.GetOrCreateNewCooldownLine(cooldownFrame, l
return cooldownLine
else
cooldownLine = DF:CreateTimeBar(cooldownFrame, [[Interface\AddOns\Details\images\bar_serenity]], Details.ocd_tracker.width-2, Details.ocd_tracker.height-2, 100, nil, cooldownFrame:GetName() .. "CDFrame" .. lineId)
tinsert(cooldownFrame.bars, cooldownLine)
table.insert(cooldownFrame.bars, cooldownLine)
cooldownLine:EnableMouse(false)
return cooldownLine
end
Expand Down Expand Up @@ -295,7 +295,7 @@ end
Details222.CooldownTracking.SetupCooldownLine(cooldownLine)

--add the cooldown into the organized by class table
tinsert(cooldownsOrganized[classId], cooldownLine)
table.insert(cooldownsOrganized[classId], cooldownLine)

--iterate to the next cooldown line
cooldownFrame.nextLineId = cooldownFrame.nextLineId + 1
Expand Down
4 changes: 2 additions & 2 deletions frames/window_classcolor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function Details:OpenClassColorsConfig()
--all colors
local allColors = {}
for colorName, colorTable in pairs(DF:GetDefaultColorList()) do
tinsert(allColors, {colorTable, colorName, hex(colorTable[1]*255) .. hex(colorTable[2]*255) .. hex(colorTable[3]*255)})
table.insert(allColors, {colorTable, colorName, hex(colorTable[1]*255) .. hex(colorTable[2]*255) .. hex(colorTable[3]*255)})
end
table.sort(allColors, sort_color)

Expand All @@ -130,7 +130,7 @@ function Details:OpenClassColorsConfig()
local colortable = colorTable[1]
local colorname = colorTable[2]
local value = colorname .. "@" .. barType
tinsert(result, {label = colorname, value = value, color = colortable, onclick = colorSelected})
table.insert(result, {label = colorname, value = value, color = colortable, onclick = colorSelected})
end

return result
Expand Down
2 changes: 1 addition & 1 deletion frames/window_copy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ do

local panel = CreateFrame("frame", "DetailsCopy", UIParent, "ButtonFrameTemplate")
panel:SetSize(512, 148)
tinsert(UISpecialFrames, "DetailsCopy")
table.insert(UISpecialFrames, "DetailsCopy")
panel:SetFrameStrata("TOOLTIP")
panel:SetPoint("center", UIParent, "center")
panel.locked = false
Expand Down
6 changes: 3 additions & 3 deletions frames/window_currentdps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,8 @@ function Details:CreateCurrentDpsFrame(parent, name)
local yellowDamageDone = thisTickYellowDamage - f.LastYellowDamage

--add the damage to buffer
tinsert(f.PlayerTeamBuffer, 1, playerTeamDamageDone)
tinsert(f.YellowTeamBuffer, 1, yellowDamageDone)
table.insert(f.PlayerTeamBuffer, 1, playerTeamDamageDone)
table.insert(f.YellowTeamBuffer, 1, yellowDamageDone)

--save the current damage amount
f.LastPlayerTeamDamage = thisTickPlayerTeamDamage
Expand Down Expand Up @@ -824,7 +824,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
local groupDamageDoneOnThisTick = thisTickGroupDamage - f.LastTickGroupDamage

--add the damage to buffer
tinsert(f.GroupBuffer, 1, groupDamageDoneOnThisTick)
table.insert(f.GroupBuffer, 1, groupDamageDoneOnThisTick)

--save the current damage amount
f.LastTickGroupDamage = thisTickGroupDamage
Expand Down
10 changes: 5 additions & 5 deletions frames/window_eventtracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -811,12 +811,12 @@ function Details:CreateEventTrackerFrame(parentObject, name)

--defensive cooldown
if (token == "SPELL_CAST_SUCCESS" and (spellInfo and defensiveCDType[spellInfo.type]) and is_player (caster_flags)) then
tinsert(CurrentShowing, 1, {SPELLTYPE_COOLDOWN, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
table.insert(CurrentShowing, 1, {SPELLTYPE_COOLDOWN, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
added = true

--offensive cooldown
elseif (token == "SPELL_CAST_SUCCESS" and (spellInfo and spellInfo.type == 1 and spellInfo.cooldown and spellInfo.cooldown >= 90) and is_player (caster_flags)) then
tinsert(CurrentShowing, 1, {SPELLTYPE_OFFENSIVE, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
table.insert(CurrentShowing, 1, {SPELLTYPE_OFFENSIVE, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
added = true

--crowd control
Expand All @@ -826,14 +826,14 @@ function Details:CreateEventTrackerFrame(parentObject, name)
--the target is a player
if (Details.event_tracker.show_crowdcontrol_pvp) then
if (Details.zone_type == "arena" or Details.zone_type == "pvp" or Details.zone_type == "none") then
tinsert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
table.insert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
added = true
end
end

if (Details.event_tracker.show_crowdcontrol_pvm) then
if (Details.zone_type == "party" or Details.zone_type == "raid") then
tinsert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
table.insert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
added = true
end
end
Expand All @@ -842,7 +842,7 @@ function Details:CreateEventTrackerFrame(parentObject, name)
--spell interrupt
elseif (token == "SPELL_INTERRUPT") then
if (caster_flags and is_player (caster_flags)) then
tinsert(CurrentShowing, 1, {SPELLTYPE_INTERRUPT, spellid, caster_name, target_name, time, extraSpellID, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
table.insert(CurrentShowing, 1, {SPELLTYPE_INTERRUPT, spellid, caster_name, target_name, time, extraSpellID, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
added = true
end
end
Expand Down
10 changes: 5 additions & 5 deletions frames/window_forge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function Details:OpenForge()

function f:InstallModule (module)
if (module and type(module) == "table") then
tinsert(all_modules, module)
table.insert(all_modules, module)
end
end

Expand Down Expand Up @@ -479,7 +479,7 @@ function Details:OpenForge()
end

if (can_add) then
tinsert(t, {spellID, Details.classid_to_classstring [className] or className})
table.insert(t, {spellID, Details.classid_to_classstring [className] or className})
end

end
Expand Down Expand Up @@ -625,7 +625,7 @@ function Details:OpenForge()
end

if (can_add) then
tinsert(t, {spellID, encounterID, enemyName, bossDetails and bossDetails.boss or "--x--x--"})
table.insert(t, {spellID, encounterID, enemyName, bossDetails and bossDetails.boss or "--x--x--"})
end
end
end
Expand Down Expand Up @@ -734,7 +734,7 @@ function Details:OpenForge()
end
end
if (canAdd) then
tinsert(t, {npcId, npcName})
table.insert(t, {npcId, npcName})
end
end

Expand Down Expand Up @@ -1136,7 +1136,7 @@ function Details:OpenForge()
end

lastButton = b
tinsert(buttons, b)
table.insert(buttons, b)
end

select_module (nil, nil, 1)
Expand Down
18 changes: 9 additions & 9 deletions frames/window_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ local update_line = function(self, target_frame)
ball:SetSize(16, 16)
ball:SetAlpha(0.3)
ball:SetTexCoord(410/512, 426/512, 2/512, 18/512)
tinsert(guide_balls, ball)
table.insert(guide_balls, ball)
end

ball:ClearAllPoints()
Expand Down Expand Up @@ -1165,7 +1165,7 @@ end
local check_snap_side = function(instanceid, snap, id, container)
local instance = Details:GetInstance(instanceid)
if (instance and instance.snap [snap] and instance.snap [snap] == id) then
tinsert(container, instance)
table.insert(container, instance)
return true
end
end
Expand Down Expand Up @@ -1260,7 +1260,7 @@ function Details:InstanciasVerticais(instance)
end
bottom_clamp = bottom_clamp + 20
bottom_clamp = bottom_clamp + this_instance.baseframe:GetHeight()
tinsert(on_top, this_instance)
table.insert(on_top, this_instance)
end

return on_top, bottom_clamp, top_clamp
Expand Down Expand Up @@ -2286,7 +2286,7 @@ function icon_frame_events:EnterCombat()
for anim, _ in pairs(Details.icon_animations.load.in_use) do
anim.anim:Stop()
anim:Hide()
tinsert(Details.icon_animations.load.available, anim)
table.insert(Details.icon_animations.load.available, anim)

anim.icon_frame.icon_animation = nil
anim.icon_frame = nil
Expand Down Expand Up @@ -2318,7 +2318,7 @@ function icon_frame_events:CancelAnim(anim)
end

Details.icon_animations.load.in_use[frame] = nil
tinsert(Details.icon_animations.load.available, frame)
table.insert(Details.icon_animations.load.available, frame)
frame.anim:Stop()
frame:Hide()

Expand All @@ -2335,7 +2335,7 @@ local icon_frame_inspect_callback = function(guid, unitid, iconFrame)

local inUse = Details.icon_animations.load.in_use[iconFrame.icon_animation]
if (inUse) then
tinsert(Details.icon_animations.load.available, iconFrame.icon_animation)
table.insert(Details.icon_animations.load.available, iconFrame.icon_animation)
Details.icon_animations.load.in_use[iconFrame.icon_animation] = nil
end

Expand Down Expand Up @@ -2363,7 +2363,7 @@ local icon_frame_create_animation = function()
t:SetAlpha(0.7)
t:SetAllPoints()

tinsert(Details.icon_animations.load.available, f)
table.insert(Details.icon_animations.load.available, f)
end

local icon_frame_on_click_down = function(self)
Expand Down Expand Up @@ -8385,7 +8385,7 @@ function Details:GetInstanceGroup (instance_id)
if (this_instance and this_instance:IsEnabled()) then
for side, id in pairs(this_instance.snap) do
if (id == last_id) then
tinsert(current_group, this_instance)
table.insert(current_group, this_instance)
got = true
last_id = i
end
Expand All @@ -8403,7 +8403,7 @@ function Details:GetInstanceGroup (instance_id)
if (this_instance and this_instance:IsEnabled()) then
for side, id in pairs(this_instance.snap) do
if (id == last_id) then
tinsert(current_group, this_instance)
table.insert(current_group, this_instance)
got = true
last_id = i
end
Expand Down
2 changes: 1 addition & 1 deletion frames/window_news.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function Details:CreateOrOpenNewsWindow()

if (not frame) then
frame = DetailsFramework:CreateSimplePanel(UIParent, 480, 560, "Details! Damage Meter " .. Details.version, "DetailsNewsWindow", panel_options, db)
tinsert(UISpecialFrames, "DetailsNewsWindow")
table.insert(UISpecialFrames, "DetailsNewsWindow")
frame:SetPoint("left", UIParent, "left", 10, 0)
frame:SetFrameStrata("FULLSCREEN")
frame:SetMovable(true)
Expand Down
2 changes: 1 addition & 1 deletion frames/window_plater.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Details.OpenPlaterIntegrationWindow()
local build_anchor_side_table = function(member)
local t = {}
for i = 1, 13 do
tinsert(t, {
table.insert(t, {
label = anchor_names[i],
value = i,
onclick = function(_, _, value)
Expand Down
14 changes: 7 additions & 7 deletions frames/window_report.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ local _
Details.copypasteframe = CreateFrame("frame", "DetailsCopyPasteFrame2", UIParent, "BackdropTemplate")
Details.copypasteframe:SetFrameStrata("TOOLTIP")
Details.copypasteframe:SetPoint("CENTER", UIParent, "CENTER", 0, 50)
tinsert(UISpecialFrames, "DetailsCopyPasteFrame2")
table.insert(UISpecialFrames, "DetailsCopyPasteFrame2")
Details.copypasteframe:SetSize(400, 400)
Details.copypasteframe:Hide()

Expand Down Expand Up @@ -686,10 +686,10 @@ local createDropdown = function(thisFrame)
bg1:SetHorizTile(true)
bg1:SetAllPoints()

tinsert(window.all_widgets, bg1)
tinsert(window.widgets, bg1)
tinsert(window.all_widgets, titlebar)
tinsert(window.widgets, titlebar)
table.insert(window.all_widgets, bg1)
table.insert(window.widgets, bg1)
table.insert(window.all_widgets, titlebar)
table.insert(window.widgets, titlebar)
end

window.title:ClearAllPoints()
Expand Down Expand Up @@ -747,7 +747,7 @@ local createDropdown = function(thisFrame)
function gump:CriaJanelaReport()
--window
local window = CreateFrame("Frame", "DetailsReportWindow", UIParent, "BackdropTemplate")
tinsert(UISpecialFrames, "DetailsReportWindow")
table.insert(UISpecialFrames, "DetailsReportWindow")
window:SetPoint("CENTER", UIParent, "CENTER")
window:SetFrameStrata("DIALOG")
window.skins = {}
Expand Down Expand Up @@ -833,7 +833,7 @@ local createDropdown = function(thisFrame)
button.icon = icon
button.text = text
button:SetScript("OnClick", recentlyButtonOnClick)
tinsert(window.recently_report_buttons, button)
table.insert(window.recently_report_buttons, button)
end

historyBlockBackground:Hide()
Expand Down
Loading

0 comments on commit 0cca378

Please sign in to comment.