Skip to content

Commit

Permalink
Merge branch 'dev-classic' into master-classic
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Aug 22, 2019
2 parents 4b9b116 + 13b7671 commit 297b27b
Show file tree
Hide file tree
Showing 45 changed files with 73 additions and 3,710 deletions.
403 changes: 1 addition & 402 deletions CHANGELOG.md

Large diffs are not rendered by default.

23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,4 @@

Replacement for the default alert system. Better toasts, cheers!

![image](https://i.imgur.com/PvzX6VF.gif)

## Download

- [Curse](https://www.curseforge.com/wow/addons/ls-toasts)
- [WoWInterface](http://www.wowinterface.com/downloads/info24123.html)

## Options

Use **`/LSTOASTS`** or **`/LST`** to open in-game config.

## Feedback and Feature Requests

If you found a bug or want to share an idea on how to improve my addon, either use the issue tracker on [GitHub](https://github.com/ls-/ls_Toasts/issues), or post a comment on [WoWInterfrace](http://www.wowinterface.com/downloads/info24123.html#comments) or [Curse](https://www.curseforge.com/wow/addons/ls-toasts#comments).

## Localisation

Feel free to add and/or review translations on [Curse](https://www.curseforge.com/wow/addons/ls-toasts/localization), alternatively, you may create a PR on [project's GitHub page](https://github.com/ls-/ls_Toasts/pulls).

## License

Please see [LICENSE](https://github.com/ls-/ls_Toasts/blob/master/LICENSE.txt) file.
Classic WIP.
Binary file removed assets/legacy/toast-bg-alliance.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-archaeology.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-azerite.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-collection.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-dungeon.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-horde.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-legion.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-recipe.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-store.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-transmog.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-upgrade.TGA
Binary file not shown.
Binary file removed assets/legacy/toast-bg-worldquest.TGA
Binary file not shown.
Binary file added assets/ui-common-loot-toast.OGG
Binary file not shown.
Binary file added assets/ui-legendary-loot-toast.OGG
Binary file not shown.
14 changes: 7 additions & 7 deletions core/toast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ local C_Timer = _G.C_Timer
local Lerp = _G.Lerp

--[[ luacheck: globals
BattlePetTooltip CreateFrame GameTooltip GameTooltip_ShowCompareItem GarrisonFollowerTooltip
GarrisonShipyardFollowerTooltip GetCVarBool IsModifiedClick PlaySound ShoppingTooltip1
ShoppingTooltip2 UIParent
CreateFrame GameTooltip GameTooltip_ShowCompareItem GetCVarBool IsModifiedClick PlaySound PlaySoundFile
ShoppingTooltip1 ShoppingTooltip2 UIParent
]]

-- Mine
Expand Down Expand Up @@ -244,7 +243,11 @@ end

local function toast_OnShow(self)
if self._data.sound_file then
PlaySound(self._data.sound_file)
if type(self._data.sound_file) == "number" then
PlaySound(self._data.sound_file)
elseif type(self._data.sound_file) == "string" then
PlaySoundFile(self._data.sound_file)
end
end

self.AnimIn:Play()
Expand Down Expand Up @@ -281,10 +284,7 @@ local function toast_OnEnter(self)
end

local function toast_OnLeave(self)
BattlePetTooltip:Hide()
GameTooltip:Hide()
GarrisonFollowerTooltip:Hide()
GarrisonShipyardFollowerTooltip:Hide()
ShoppingTooltip1:Hide()
ShoppingTooltip2:Hide()

Expand Down
79 changes: 1 addition & 78 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local tonumber = _G.tonumber

--[[ luacheck: globals
AlertFrame CreateFrame GetAddOnMetadata InCombatLockdown InterfaceOptions_AddCategory
InterfaceOptionsFrame_Show InterfaceOptionsFramePanelContainer SlashCmdList
InterfaceOptionsFrame_Show InterfaceOptionsFramePanelContainer LibStub SlashCmdList
ITEM_QUALITY_COLORS ITEM_QUALITY1_DESC ITEM_QUALITY2_DESC ITEM_QUALITY3_DESC ITEM_QUALITY4_DESC
ITEM_QUALITY5_DESC LS_TOASTS_CFG LS_TOASTS_CFG_GLOBAL SLASH_LSTOASTS1 SLASH_LSTOASTS2
Expand All @@ -36,28 +36,9 @@ local STRATA_INDICES ={
}

local BLACKLISTED_EVENTS = {
["ACHIEVEMENT_EARNED"] = true,
["AZERITE_EMPOWERED_ITEM_LOOTED"] = true,
["CRITERIA_EARNED"] = true,
["GARRISON_BUILDING_ACTIVATABLE"] = true,
["GARRISON_FOLLOWER_ADDED"] = true,
["GARRISON_MISSION_FINISHED"] = true,
["GARRISON_RANDOM_MISSION_ADDED"] = true,
["GARRISON_TALENT_COMPLETE"] = true,
["LFG_COMPLETION_REWARD"] = true,
["LOOT_ITEM_ROLL_WON"] = true,
["NEW_MOUNT_ADDED"] = true,
["NEW_PET_ADDED"] = true,
["NEW_RECIPE_LEARNED"] = true,
["NEW_TOY_ADDED"] = true,
["QUEST_LOOT_RECEIVED"] = true,
["QUEST_TURNED_IN"] = true,
["SCENARIO_COMPLETED"] = true,
["SHOW_LOOT_TOAST"] = true,
["SHOW_LOOT_TOAST_LEGENDARY_LOOTED"] = true,
["SHOW_LOOT_TOAST_UPGRADE"] = true,
["SHOW_PVP_FACTION_LOOT_TOAST"] = true,
["SHOW_RATED_PVP_REWARD_TOAST"] = true,
["STORE_PRODUCT_DELIVERED"] = true,
}

Expand Down Expand Up @@ -85,46 +66,6 @@ E:RegisterEvent("ADDON_LOADED", function(arg1)
C.db:RegisterCallback("OnProfileShutdown", shutdownCallback)
C.db:RegisterCallback("OnDatabaseShutdown", shutdownCallback)

-- cleanup
LS_TOASTS_CFG = nil
LS_TOASTS_CFG_GLOBAL = nil

-- ->80100.03
if not C.db.profile.version or C.db.profile.version < 8010003 then
if C.db.profile.fadeout_delay then
C.db.profile.anchors[1].fadeout_delay = C.db.profile.fadeout_delay
C.db.profile.fadeout_delay = nil
end

if C.db.profile.growth_direction then
C.db.profile.anchors[1].growth_direction = C.db.profile.growth_direction
C.db.profile.growth_direction = nil
end

if C.db.profile.max_active_toasts then
C.db.profile.anchors[1].max_active_toasts = C.db.profile.max_active_toasts
C.db.profile.max_active_toasts = nil
end

if C.db.profile.scale then
C.db.profile.anchors[1].scale = C.db.profile.scale
C.db.profile.scale = nil
end

if C.db.profile.point then
C.db.profile.anchors[1].point.p = C.db.profile.point.p
C.db.profile.anchors[1].point.rP = C.db.profile.point.rP
C.db.profile.anchors[1].point.x = C.db.profile.point.x
C.db.profile.anchors[1].point.y = C.db.profile.point.y
C.db.profile.point = nil
end
end

-- ->80100.05
if not C.db.profile.version or C.db.profile.version < 8010005 then
C.db.profile.point = nil
end

C.options = {
type = "group",
name = L["LS_TOASTS"],
Expand Down Expand Up @@ -323,24 +264,6 @@ E:RegisterEvent("ADDON_LOADED", function(arg1)
P:UpdateOptions()
P:EnableAllSystems()

local panel = CreateFrame("Frame", "LSTConfigPanel", InterfaceOptionsFramePanelContainer)
panel.name = L["LS_TOASTS"]
panel:Hide()

local button = CreateFrame("Button", nil, panel, "UIPanelButtonTemplate")
button:SetText(L["OPEN_CONFIG"])
button:SetWidth(button:GetTextWidth() + 18)
button:SetPoint("TOPLEFT", 16, -16)
button:SetScript("OnClick", function()
if not InCombatLockdown() then
InterfaceOptionsFrame_Show()

LibStub("AceConfigDialog-3.0"):Open(addonName)
end
end)

InterfaceOptions_AddCategory(panel, true)

E:RegisterEvent("PLAYER_REGEN_DISABLED", function()
LibStub("AceConfigDialog-3.0"):Close(addonName)
end)
Expand Down
1 change: 1 addition & 0 deletions locales/_locales.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
<Script file="ruRU.lua"/>
<Script file="zhCN.lua"/>
<Script file="zhTW.lua"/>
<Script file="_post.lua"/>
</Ui>
11 changes: 11 additions & 0 deletions locales/_post.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- Contributors: Gotxiko@GitHub

local _, addonTable = ...
local L = addonTable.L

-- Lua
local _G = getfenv(0)

-- Mine
-- These rely on custom strings
L["YOU_LOST_RED"] = "|cffdc4436" .. L["YOU_LOST"] .. "|r"
20 changes: 0 additions & 20 deletions locales/deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ L["ANCHOR_FRAME_#"] = "Ankerrahmen #%d"
L["ANCHOR_FRAMES"] = "Ankerrahmen"
L["ANCHOR_RESET_DESC"] = "|cffffffffShift-Klick|r um die Position zurückzusetzen."
L["BORDER"] = "Rahmen"
L["COLLECTIONS_TAINT_WARNING"] = "Diese Option kann Probleme verursachen, wenn das Sammlungsfenster während des Kampfes geöffnet wird."
L["COLORS"] = "Farben"
L["COORDS"] = "Koordinaten"
L["COPPER_THRESHOLD"] = "Kupferschwelle"
Expand All @@ -28,10 +27,8 @@ L["GROWTH_DIR_DOWN"] = "Nach unten"
L["GROWTH_DIR_LEFT"] = "Nach links"
L["GROWTH_DIR_RIGHT"] = "Nach rechts"
L["GROWTH_DIR_UP"] = "Nach oben"
L["HANDLE_LEFT_CLICK"] = "Linksklick behandeln"
L["ICON_BORDER"] = "Symbolrahmen"
L["NAME"] = "Name"
L["OPEN_CONFIG"] = "Konfiguration öffnen"
L["RARITY_THRESHOLD"] = "Schwellenwert der Seltenheit"
L["SCALE"] = "Skalierung"
L["SHOW_ILVL"] = "GS anzeigen"
Expand All @@ -48,25 +45,8 @@ L["TOAST_TYPES"] = "Benachrichtigungstypen"
L["TOGGLE_ANCHORS"] = "Ankerpunkte umschalten"
L["TRACK_LOSS"] = "Verlust Verfolgung"
L["TRACK_LOSS_DESC"] = "Diese Option ignoriert die Kupferschwelle."
L["TRANSMOG_ADDED"] = "Vorlage hinzugefügt"
L["TRANSMOG_REMOVED"] = "Vorlage entfernt"
L["TYPE_ACHIEVEMENT"] = "Erfolg"
L["TYPE_ARCHAEOLOGY"] = "Archäologie"
L["TYPE_CLASS_HALL"] = "Klassenhalle"
L["TYPE_COLLECTION"] = "Sammlung"
L["TYPE_COLLECTION_DESC"] = "Benachrichtigungen für erhaltene Reittiere, Haustiere und Spielzeuge."
L["TYPE_DUNGEON"] = "Dungeon"
L["TYPE_GARRISON"] = "Garnison"
L["TYPE_LOOT_COMMON"] = "Beute (Gewöhnlich)"
L["TYPE_LOOT_COMMON_DESC"] = "Benachrichtigungen, die von Chatereignissen ausgelöst werden wie grüne, blaue Gegenstände, manche epischen Gegenstände, alles was nicht von der Benachrichtigung für besondere Beute abgedeckt wird."
L["TYPE_LOOT_CURRENCY"] = "Beute (Abzeichen)"
L["TYPE_LOOT_GOLD"] = "Beute (Gold)"
L["TYPE_LOOT_SPECIAL"] = "Beute (Spezial)"
L["TYPE_LOOT_SPECIAL_DESC"] = "Benachrichtigungen, die von besonderen Beuteereignissen wie gewonnene Würfe, legendäre Gegenstände, persönliche Beute etc. ausgelöst werden."
L["TYPE_RECIPE"] = "Rezept"
L["TYPE_TRANSMOG"] = "Transmogrifikation"
L["TYPE_WAR_EFFORT"] = "Kriegsanstrengungen"
L["TYPE_WORLD_QUEST"] = "Weltquest"
L["X_OFFSET"] = "X-Versatz"
L["Y_OFFSET"] = "Y-Versatz"
L["YOU_LOST"] = "Ihr verliert"
Expand Down
45 changes: 0 additions & 45 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,23 @@ local _G = getfenv(0)
local L = {}
addonTable.L = L

L["ACHIEVEMENT_PROGRESSED"] = _G.ACHIEVEMENT_PROGRESSED
L["ACHIEVEMENT_UNLOCKED"] = _G.ACHIEVEMENT_UNLOCKED
L["ADD"] = _G.ADD
L["BLIZZARD_STORE_PURCHASE_DELIVERED"] = _G.BLIZZARD_STORE_PURCHASE_COMPLETE
L["CANCEL"] = _G.CANCEL
L["DELETE"] = _G.DELETE
L["DIGSITE_COMPLETED"] = _G.ARCHAEOLOGY_DIGSITE_COMPLETE_TOAST_FRAME_TITLE
L["DUNGEON_COMPLETED"] = _G.DUNGEON_COMPLETED
L["ENABLE"] = _G.ENABLE
L["GARRISON_MISSION_ADDED"] = _G.GARRISON_MISSION_ADDED_TOAST1
L["GARRISON_MISSION_COMPLETED"] = _G.GARRISON_MISSION_COMPLETE
L["GARRISON_NEW_BUILDING"] = _G.GARRISON_UPDATE
L["GARRISON_NEW_TALENT"] = _G.GARRISON_TALENT_ORDER_ADVANCEMENT
L["GENERAL"] = _G.GENERAL_LABEL
L["GUILD_ACHIEVEMENT_UNLOCKED"] = _G.GUILD_ACHIEVEMENT_UNLOCKED
L["HONOR_POINTS"] = _G.HONOR_POINTS
L["ITEM_AZERITE_EMPOWERED"] = _G.AZERITE_EMPOWERED_ITEM_LOOT_LABEL
L["ITEM_LEGENDARY"] = _G.LEGENDARY_ITEM_LOOT_LABEL
L["ITEM_UPGRADED"] = _G.ITEM_UPGRADED_LABEL
L["ITEM_UPGRADED_FORMAT"] = _G.LOOTUPGRADEFRAME_TITLE:format("%s%s|r")
L["LOOT_THRESHOLD"] = _G.LOOT_THRESHOLD
L["LS_TOASTS"] = "ls: |cff1a9fc0Toasts|r"
L["NEW_PROFILE"] = _G.NEW_COMPACT_UNIT_FRAME_PROFILE
L["OKAY"] = _G.OKAY
L["RECIPE_LEARNED"] = _G.NEW_RECIPE_LEARNED_TITLE
L["RECIPE_UPGRADED"] = _G.UPGRADED_RECIPE_LEARNED_TITLE
L["RELOADUI"] = _G.RELOADUI
L["RESET"] = _G.RESET
L["SCENARIO_COMPLETED"] = _G.SCENARIO_COMPLETED
L["SCENARIO_INVASION_COMPLETED"] = _G.SCENARIO_INVASION_COMPLETE
L["SETTINGS_GENERAL_LABEL"] = _G.GENERAL_LABEL
L["SFX"] = _G.ENABLE_SOUNDFX
L["WORLD_QUEST_COMPLETED"] = _G.WORLD_QUEST_COMPLETE
L["XP_FORMAT"] = _G.BONUS_OBJECTIVE_EXPERIENCE_FORMAT
L["YOU_EARNED"] = _G.YOU_EARNED_LABEL
L["YOU_WON"] = _G.YOU_WON_LABEL

-- Require translation
L["ANCHOR_FRAME_#"] = "Anchor Frame #%d"
L["ANCHOR_FRAMES"] = "Anchor Frames"
L["ANCHOR_RESET_DESC"] = "|cffffffffShift-Click|r to reset the position."
L["BORDER"] = "Border"
L["COLLECTIONS_TAINT_WARNING"] = "Enabling this option may cause errors when opening \"Collections\" panel in combat."
L["COLORS"] = "Colours"
L["COORDS"] = "Coordinates"
L["COPPER_THRESHOLD"] = "Copper Threshold"
Expand All @@ -67,10 +41,8 @@ L["GROWTH_DIR_DOWN"] = "Down"
L["GROWTH_DIR_LEFT"] = "Left"
L["GROWTH_DIR_RIGHT"] = "Right"
L["GROWTH_DIR_UP"] = "Up"
L["HANDLE_LEFT_CLICK"] = "Handle Left Click"
L["ICON_BORDER"] = "Icon Border"
L["NAME"] = "Name"
L["OPEN_CONFIG"] = "Open Config"
L["RARITY_THRESHOLD"] = "Rarity Threshold"
L["SCALE"] = "Scale"
L["SHOW_ILVL"] = "Show iLvl"
Expand All @@ -87,25 +59,8 @@ L["TOAST_TYPES"] = "Toast Types"
L["TOGGLE_ANCHORS"] = "Toggle Anchors"
L["TRACK_LOSS"] = "Track Loss"
L["TRACK_LOSS_DESC"] = "This option ignores set copper threshold."
L["TRANSMOG_ADDED"] = "Appearance Added"
L["TRANSMOG_REMOVED"] = "Appearance Removed"
L["TYPE_ACHIEVEMENT"] = "Achievement"
L["TYPE_ARCHAEOLOGY"] = "Archaeology"
L["TYPE_CLASS_HALL"] = "Class Hall"
L["TYPE_COLLECTION"] = "Collection"
L["TYPE_COLLECTION_DESC"] = "Toasts for newly collected mounts, pets and toys."
L["TYPE_DUNGEON"] = "Dungeon"
L["TYPE_GARRISON"] = "Garrison"
L["TYPE_LOOT_COMMON"] = "Loot (Common)"
L["TYPE_LOOT_COMMON_DESC"] = "Toasts triggered by chat events, e.g. greens, blues, some epics, everything that isn't handled by special loot toasts."
L["TYPE_LOOT_CURRENCY"] = "Loot (Currency)"
L["TYPE_LOOT_GOLD"] = "Loot (Gold)"
L["TYPE_LOOT_SPECIAL"] = "Loot (Special)"
L["TYPE_LOOT_SPECIAL_DESC"] = "Toasts triggered by special loot events, e.g. won rolls, legendary drops, personal loot, etc."
L["TYPE_RECIPE"] = "Recipe"
L["TYPE_TRANSMOG"] = "Transmogrification"
L["TYPE_WAR_EFFORT"] = "War Effort"
L["TYPE_WORLD_QUEST"] = "World Quest"
L["X_OFFSET"] = "xOffset"
L["Y_OFFSET"] = "yOffset"
L["YOU_LOST"] = "You Lost"
Expand Down
20 changes: 0 additions & 20 deletions locales/esES.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ L["ANCHOR_FRAME_#"] = "Marco de anclaje #%d"
L["ANCHOR_FRAMES"] = "Marcos de anclaje"
L["ANCHOR_RESET_DESC"] = "|cffffffffShift-Click|r para reiniciar la posición."
L["BORDER"] = "Borde"
L["COLLECTIONS_TAINT_WARNING"] = "Activar esta opción puede causar problemas al abrir la ventana de \"Colecciones\" en combate."
L["COLORS"] = "Colores"
L["COORDS"] = "Coordenadas"
L["COPPER_THRESHOLD"] = "Límite de Cobre"
Expand All @@ -28,10 +27,8 @@ L["GROWTH_DIR_DOWN"] = "Abajo"
L["GROWTH_DIR_LEFT"] = "Izquierda"
L["GROWTH_DIR_RIGHT"] = "Derecha"
L["GROWTH_DIR_UP"] = "Arriba"
L["HANDLE_LEFT_CLICK"] = "Utilizar clic izquierdo"
L["ICON_BORDER"] = "Borde de icono"
L["NAME"] = "Nombre"
L["OPEN_CONFIG"] = "Abrir Config"
L["RARITY_THRESHOLD"] = "Límite de rareza"
L["SCALE"] = "Escala"
L["SHOW_ILVL"] = "Mostrar nivel de objeto"
Expand All @@ -48,25 +45,8 @@ L["TOAST_TYPES"] = "Tipos de Toasts"
L["TOGGLE_ANCHORS"] = "Alternar anclajes"
L["TRACK_LOSS"] = "Mostrar pérdidas"
L["TRACK_LOSS_DESC"] = "Esta opción ignora el margen de cobre establecido."
L["TRANSMOG_ADDED"] = "Appariencia añadida"
L["TRANSMOG_REMOVED"] = "Apariencia eliminada"
L["TYPE_ACHIEVEMENT"] = "Logro"
L["TYPE_ARCHAEOLOGY"] = "Arquelogía"
L["TYPE_CLASS_HALL"] = "Sede de clase"
L["TYPE_COLLECTION"] = "Colección"
L["TYPE_COLLECTION_DESC"] = "Toasts para nuevas monturas, mascotas y juguetes."
L["TYPE_DUNGEON"] = "Mazmorra"
L["TYPE_GARRISON"] = "Ciudadela"
L["TYPE_LOOT_COMMON"] = "Botín (Común)"
L["TYPE_LOOT_COMMON_DESC"] = "Toasts activados por eventos de chat, ej. verdes, azules, algunos épicos, cualquier cosa que no sea recogida por toasts de botines especiales."
L["TYPE_LOOT_CURRENCY"] = "Botín (Moneda)"
L["TYPE_LOOT_GOLD"] = "Botín (Oro)"
L["TYPE_LOOT_SPECIAL"] = "Botín (Especial)"
L["TYPE_LOOT_SPECIAL_DESC"] = "Toasts activados por eventos de botín especial, ej. tiradas ganadas, caídas de legendarios, botín personal, etc."
L["TYPE_RECIPE"] = "Receta"
L["TYPE_TRANSMOG"] = "Transmogrificación"
L["TYPE_WAR_EFFORT"] = "Esfuerzo de guerra"
L["TYPE_WORLD_QUEST"] = "Misión de mundo"
L["X_OFFSET"] = "xOffset"
L["Y_OFFSET"] = "yOffset"
L["YOU_LOST"] = "Has perdido"
Expand Down
Loading

0 comments on commit 297b27b

Please sign in to comment.