Skip to content

Commit

Permalink
Multi-toc for Classic
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Sep 29, 2022
1 parent 8e242c2 commit aec20db
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 14 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/build-classic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,3 @@ jobs:

- name: Package Classic
uses: BigWigsMods/packager@master
with:
args: -g classic

- name: Package BCC
uses: BigWigsMods/packager@master
with:
args: -g bcc
2 changes: 2 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ globals = {
"DISABLE",
"ENABLE",
"LARGE_NUMBER_SEPERATOR",
"WOW_PROJECT_WRATH",
"WOW_PROJECT_BURNING_CRUSADE_CLASSIC",
"WOW_PROJECT_CLASSIC",
"WOW_PROJECT_MAINLINE",
"WOW_PROJECT_ID",
}
2 changes: 2 additions & 0 deletions Code/AnimationStyles.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("AnimationStyles")

local animationStyles = {}
Expand Down
2 changes: 2 additions & 0 deletions Code/CombatEvents.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("CombatEvents", "AceEvent-3.0", "AceTimer-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

Expand Down
2 changes: 2 additions & 0 deletions Code/Display.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("Display")
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

Expand Down
3 changes: 3 additions & 0 deletions Code/Parrot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")
local AceConfig = LibStub("AceConfig-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")

Parrot.wow_classic_era = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
Parrot.wow_classic = WOW_PROJECT_ID == WOW_PROJECT_WRATH

-- Debug
local debug = function() end
--@debug@
Expand Down
3 changes: 3 additions & 0 deletions Code/ScrollAreas.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("ScrollAreas", "AceTimer-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")


local Parrot_AnimationStyles = Parrot:GetModule("AnimationStyles")

local db = nil
Expand Down
2 changes: 2 additions & 0 deletions Code/Suppressions.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("Suppressions")
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

Expand Down
2 changes: 2 additions & 0 deletions Code/TriggerConditions.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("TriggerConditions", "AceEvent-3.0")

local Parrot_Triggers
Expand Down
2 changes: 2 additions & 0 deletions Code/Triggers.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("Triggers", "AceEvent-3.0", "AceTimer-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

Expand Down
2 changes: 2 additions & 0 deletions Data/AnimationStyles.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

local math_max, math_min = math.max, math.min
Expand Down
2 changes: 2 additions & 0 deletions Data/Auras.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

local newList, newDict = Parrot.newList, Parrot.newDict
Expand Down
2 changes: 2 additions & 0 deletions Data/CombatEvents.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local mod = Parrot:NewModule("CombatEventsData")
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

Expand Down
2 changes: 2 additions & 0 deletions Data/CombatStatus.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

Parrot:RegisterCombatEvent{
Expand Down
2 changes: 2 additions & 0 deletions Data/Cooldowns.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("Cooldowns", "AceEvent-3.0", "AceTimer-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

Expand Down
2 changes: 2 additions & 0 deletions Data/Loot.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

local newDict = Parrot.newDict
Expand Down
10 changes: 6 additions & 4 deletions Data/PointGains.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("PointGains")
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

local newDict, newList = Parrot.newDict, Parrot.newList
local Deformat = Parrot.Deformat

local wow_classic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local wow_bcc = WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC
local wow_classic_era = Parrot.wow_classic_era
local wow_classic = Parrot.wow_classic

local currentXP = 0

Expand Down Expand Up @@ -49,15 +51,15 @@ end
local function parseHonorGain(chatmsg)
local amount = tonumber(chatmsg:match("%d+"))
if amount then
if wow_bcc then
if wow_classic then
local info = C_CurrencyInfo.GetCurrencyInfo(1901)
return newDict(
"currency", info.name,
"amount", amount,
"total", info.totalEarned,
"icon", info.iconFileID
)
elseif wow_classic then
elseif wow_classic_era then
local total = GetPVPSessionStats()
local _, rank = GetPVPRankInfo(UnitPVPRank("player"))
local icon = nil
Expand Down
2 changes: 2 additions & 0 deletions Data/TriggerConditions.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local _, ns = ...
local Parrot = ns.addon
if not Parrot then return end

local module = Parrot:NewModule("TriggerConditionsData", "AceEvent-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")

Expand Down
4 changes: 1 addition & 3 deletions Parrot.toc → Parrot_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
## Interface: 20501
## Interface-BCC: 20501
## Interface-Classic: 11307
## Interface: 11403
## Title: Parrot 2
## Notes: Floating Combat Text of awesomeness. Caw. It'll eat your crackers.
## Notes-esES: Floating Combat Text of awesomeness. Caw. It'll eat your crackers.
Expand Down
45 changes: 45 additions & 0 deletions Parrot_Wrath.toc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## Interface: 30400
## Title: Parrot 2
## Notes: Floating Combat Text of awesomeness. Caw. It'll eat your crackers.
## Notes-esES: Floating Combat Text of awesomeness. Caw. It'll eat your crackers.
## Notes-esMX: Floating Combat Text of awesomeness. Caw. It'll eat your crackers.
## Notes-deDE: Scrollender Kampftext der Ungeheuerlichkeit. Kraaaah!
## Notes-frFR: Texte de combat flottant. Croac. Coco veut un gâteau.
## Notes-itIT: Floating Combat Text of awesomeness. Caw. It'll eat your crackers.
## Notes-koKR: Floating Combat Text of awesomeness. Caw. It'll eat your crackers.
## Notes-ptBR: Floating Combat Text of awesomeness. Caw. It'll eat your crackers.
## Notes-ruRU: Мощный плавающий текст боя.
## Notes-zhCN: 绝妙的浮动战斗文本。来人,喂公子吃饼。真香。
## Notes-zhTW: 絕妙的戰鬥記錄指示器。
## Author: Neb
## Version: @project-version@

## X-Credits: ckknight, profalbert
## X-Category: Combat
## X-License: LGPLv2.1
## X-Curse-Project-ID: 101768
## X-WoWI-ID: 24143

## SavedVariables: ParrotDB
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibDDI-1.0, LibSink-2.0

embeds.xml
locales.xml

Code\Parrot.lua
Code\AnimationStyles.lua
Code\CombatEvents.lua
Code\Display.lua
Code\ScrollAreas.lua
Code\Suppressions.lua
Code\TriggerConditions.lua
Code\Triggers.lua

Data\AnimationStyles.lua
Data\CombatEvents.lua
Data\TriggerConditions.lua
Data\Auras.lua
Data\Cooldowns.lua
Data\Loot.lua
Data\PointGains.lua
Data\CombatStatus.lua

0 comments on commit aec20db

Please sign in to comment.