mirror of
https://github.com/parnic/breakables.git
synced 2025-06-17 01:41:51 -05:00
Compare commits
59 Commits
Author | SHA1 | Date | |
---|---|---|---|
d2154a350a | |||
a41810c663 | |||
da5e9500f8 | |||
53704888fa | |||
db1819c49f | |||
fb83c4db4a | |||
33e52dc2f6 | |||
74e54e9537 | |||
abea50f496 | |||
2a8bbfcda6 | |||
b970542bfe | |||
8edeeed9e1 | |||
7c19e414e7 | |||
4e65efadff | |||
fea232d8ae | |||
993b99e7be | |||
0442d560d5 | |||
e5968d9441 | |||
814e0ca54f | |||
610f1559fe | |||
140502e508 | |||
302478f872 | |||
a1263947f0 | |||
1e45bfe622 | |||
26d83c425b | |||
8e6867ed44 | |||
a9f1b24563 | |||
a20c5fe54f | |||
e22f4ef334 | |||
c20dabea47 | |||
fa59e6137d | |||
c3ee55d04c | |||
f22c064472 | |||
5628e8d289 | |||
cf128a6a87 | |||
dbd7d69459 | |||
ef4fc31fa6 | |||
b6556dc98d | |||
64a7e73ec0 | |||
30e6b021dd | |||
a701b935b0 | |||
4158971161 | |||
1741f54321 | |||
f93465037d | |||
f9971a7818 | |||
59fd3c320d | |||
4bc72649f2 | |||
4ad9afa103 | |||
958521c6d3 | |||
1401893e2d | |||
f55cd76606 | |||
6a89a7ca11 | |||
a5f5958c5e | |||
2945e6326d | |||
8d590170fe | |||
ce9d162bd3 | |||
cdc3d1c193 | |||
56ee47407d | |||
1c0754650b |
43
.pkgmeta
43
.pkgmeta
@ -1,13 +1,36 @@
|
||||
package-as: Breakables
|
||||
|
||||
externals:
|
||||
libs/LibStub: svn://svn.wowace.com/wow/ace3/mainline/trunk/LibStub
|
||||
libs/CallbackHandler-1.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/CallbackHandler-1.0
|
||||
libs/AceAddon-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0
|
||||
libs/AceGUI-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceGUI-3.0
|
||||
libs/AceConfig-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConfig-3.0
|
||||
libs/AceConsole-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0
|
||||
libs/AceDB-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0
|
||||
libs/AceDBOptions-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDBOptions-3.0
|
||||
libs/AceEvent-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0
|
||||
libs/LibBabble-Inventory-3.0: svn://svn.wowace.com/wow/libbabble-inventory-3-0/mainline/trunk
|
||||
libs/LibStub:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/LibStub
|
||||
tag: latest
|
||||
libs/CallbackHandler-1.0:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/CallbackHandler-1.0
|
||||
tag: latest
|
||||
libs/AceAddon-3.0:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0
|
||||
tag: latest
|
||||
libs/AceGUI-3.0:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceGUI-3.0
|
||||
tag: latest
|
||||
libs/AceConfig-3.0:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConfig-3.0
|
||||
tag: latest
|
||||
libs/AceConsole-3.0:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0
|
||||
tag: latest
|
||||
libs/AceDB-3.0:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0
|
||||
tag: latest
|
||||
libs/AceDBOptions-3.0:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDBOptions-3.0
|
||||
tag: latest
|
||||
libs/AceEvent-3.0:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0
|
||||
tag: latest
|
||||
libs/AceLocale-3.0:
|
||||
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
|
||||
tag: latest
|
||||
libs/LibBabble-Inventory-3.0:
|
||||
url: svn://svn.wowace.com/wow/libbabble-inventory-3-0/mainline/trunk
|
||||
tag: latest
|
||||
|
1038
Breakables.lua
1038
Breakables.lua
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,18 @@
|
||||
## Interface: 30300
|
||||
## Interface: 60000
|
||||
## Author: Parnic
|
||||
## Name: Breakables
|
||||
## Title: Breakables |cff7fff7f -Ace3-|r
|
||||
## Title: Breakables |cff7fff7f-Ace3-|r
|
||||
## Notes: Tracks herbs/ore/items that can be broken into component pieces
|
||||
## Version: @project-version@ (Revision: @project-revision@)
|
||||
## SavedVariables: BreakablesDB
|
||||
## OptionalDeps: Ace3, LibBabble-Inventory-3.0
|
||||
## OptionalDeps: Ace3, LibBabble-Inventory-3.0, Masque
|
||||
## X-Compatible-With: 40300
|
||||
|
||||
#@no-lib-strip@
|
||||
embeds.xml
|
||||
#@end-no-lib-strip@
|
||||
# LDB is hard-embedded so don't skip it if packaging no-lib
|
||||
LibDataBroker-1.1.lua
|
||||
loc\loc.xml
|
||||
|
||||
Breakables.lua
|
90
LibDataBroker-1.1.lua
Normal file
90
LibDataBroker-1.1.lua
Normal file
@ -0,0 +1,90 @@
|
||||
|
||||
assert(LibStub, "LibDataBroker-1.1 requires LibStub")
|
||||
assert(LibStub:GetLibrary("CallbackHandler-1.0", true), "LibDataBroker-1.1 requires CallbackHandler-1.0")
|
||||
|
||||
local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 4)
|
||||
if not lib then return end
|
||||
oldminor = oldminor or 0
|
||||
|
||||
|
||||
lib.callbacks = lib.callbacks or LibStub:GetLibrary("CallbackHandler-1.0"):New(lib)
|
||||
lib.attributestorage, lib.namestorage, lib.proxystorage = lib.attributestorage or {}, lib.namestorage or {}, lib.proxystorage or {}
|
||||
local attributestorage, namestorage, callbacks = lib.attributestorage, lib.namestorage, lib.callbacks
|
||||
|
||||
if oldminor < 2 then
|
||||
lib.domt = {
|
||||
__metatable = "access denied",
|
||||
__index = function(self, key) return attributestorage[self] and attributestorage[self][key] end,
|
||||
}
|
||||
end
|
||||
|
||||
if oldminor < 3 then
|
||||
lib.domt.__newindex = function(self, key, value)
|
||||
if not attributestorage[self] then attributestorage[self] = {} end
|
||||
if attributestorage[self][key] == value then return end
|
||||
attributestorage[self][key] = value
|
||||
local name = namestorage[self]
|
||||
if not name then return end
|
||||
callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value, self)
|
||||
callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value, self)
|
||||
callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value, self)
|
||||
callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value, self)
|
||||
end
|
||||
end
|
||||
|
||||
if oldminor < 2 then
|
||||
function lib:NewDataObject(name, dataobj)
|
||||
if self.proxystorage[name] then return end
|
||||
|
||||
if dataobj then
|
||||
assert(type(dataobj) == "table", "Invalid dataobj, must be nil or a table")
|
||||
self.attributestorage[dataobj] = {}
|
||||
for i,v in pairs(dataobj) do
|
||||
self.attributestorage[dataobj][i] = v
|
||||
dataobj[i] = nil
|
||||
end
|
||||
end
|
||||
dataobj = setmetatable(dataobj or {}, self.domt)
|
||||
self.proxystorage[name], self.namestorage[dataobj] = dataobj, name
|
||||
self.callbacks:Fire("LibDataBroker_DataObjectCreated", name, dataobj)
|
||||
return dataobj
|
||||
end
|
||||
end
|
||||
|
||||
if oldminor < 1 then
|
||||
function lib:DataObjectIterator()
|
||||
return pairs(self.proxystorage)
|
||||
end
|
||||
|
||||
function lib:GetDataObjectByName(dataobjectname)
|
||||
return self.proxystorage[dataobjectname]
|
||||
end
|
||||
|
||||
function lib:GetNameByDataObject(dataobject)
|
||||
return self.namestorage[dataobject]
|
||||
end
|
||||
end
|
||||
|
||||
if oldminor < 4 then
|
||||
local next = pairs(attributestorage)
|
||||
function lib:pairs(dataobject_or_name)
|
||||
local t = type(dataobject_or_name)
|
||||
assert(t == "string" or t == "table", "Usage: ldb:pairs('dataobjectname') or ldb:pairs(dataobject)")
|
||||
|
||||
local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
|
||||
assert(attributestorage[dataobj], "Data object not found")
|
||||
|
||||
return next, attributestorage[dataobj], nil
|
||||
end
|
||||
|
||||
local ipairs_iter = ipairs(attributestorage)
|
||||
function lib:ipairs(dataobject_or_name)
|
||||
local t = type(dataobject_or_name)
|
||||
assert(t == "string" or t == "table", "Usage: ldb:ipairs('dataobjectname') or ldb:ipairs(dataobject)")
|
||||
|
||||
local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
|
||||
assert(attributestorage[dataobj], "Data object not found")
|
||||
|
||||
return ipairs_iter, attributestorage[dataobj], 0
|
||||
end
|
||||
end
|
@ -6,6 +6,8 @@
|
||||
<Include file="libs\AceConfig-3.0\AceConfig-3.0.xml"/>
|
||||
<Include file="libs\AceConsole-3.0\AceConsole-3.0.xml"/>
|
||||
<Include file="libs\AceDB-3.0\AceDB-3.0.xml"/>
|
||||
<Include file="libs\AceDBOptions-3.0\AceDBOptions-3.0.xml"/>
|
||||
<Include file="libs\AceEvent-3.0\AceEvent-3.0.xml"/>
|
||||
<Include file="libs\AceLocale-3.0\AceLocale-3.0.xml"/>
|
||||
<Include file="libs\LibBabble-Inventory-3.0\lib.xml"/>
|
||||
</Ui>
|
4
loc/deDE.lua
Normal file
4
loc/deDE.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("Breakables", "deDE")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="deDE", format="lua_additive_table", handle-subnamespaces="concat", handle-unlocalized="english")@
|
15
loc/enUS.lua
Normal file
15
loc/enUS.lua
Normal file
@ -0,0 +1,15 @@
|
||||
local debug = false
|
||||
--@debug@
|
||||
debug = true
|
||||
--@end-debug@
|
||||
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("Breakables", "enUS", true, debug)
|
||||
|
||||
--@localization(locale="enUS", format="lua_additive_table", same-key-is-true=true, handle-subnamespaces="concat")@
|
||||
--@debug@
|
||||
L["Welcome"] = [[Thanks for using |cff33ff99Breakables|r! Use |cffffff78/brk|r to open this menu or |cffffff78/breakables|r to access the same options on the command line.
|
||||
|
||||
Hold shift and drag the profession button to move the breakables bar around. You can also click directly on any breakable item button to break it without having to click the profession button first.
|
||||
|
||||
If you have any feature requests or problems, please email |cff33ff99breakables@parnic.com|r or visit the |cffffff78curse.com|r or |cffffff78wowinterface.com|r page and leave a comment.]]
|
||||
--@end-debug@
|
4
loc/esES.lua
Normal file
4
loc/esES.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("Breakables", "esES")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="esES", format="lua_additive_table", handle-subnamespaces="concat", handle-unlocalized="english")@
|
4
loc/esMX.lua
Normal file
4
loc/esMX.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("Breakables", "esMX")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="esMX", format="lua_additive_table", handle-subnamespaces="concat", handle-unlocalized="english")@
|
4
loc/frFR.lua
Normal file
4
loc/frFR.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("Breakables", "frFR")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="frFR", format="lua_additive_table", handle-subnamespaces="concat", handle-unlocalized="english")@
|
4
loc/koKR.lua
Normal file
4
loc/koKR.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("Breakables", "koKR")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="koKR", format="lua_additive_table", handle-subnamespaces="concat", handle-unlocalized="english")@
|
13
loc/loc.xml
Normal file
13
loc/loc.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
|
||||
|
||||
<Script file="enUS.lua"/>
|
||||
<Script file="deDE.lua"/>
|
||||
<Script file="esES.lua"/>
|
||||
<Script file="esMX.lua"/>
|
||||
<Script file="frFR.lua"/>
|
||||
<Script file="koKR.lua"/>
|
||||
<Script file="ruRU.lua"/>
|
||||
<Script file="zhCN.lua"/>
|
||||
<Script file="zhTW.lua"/>
|
||||
|
||||
</Ui>
|
4
loc/ruRU.lua
Normal file
4
loc/ruRU.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("Breakables", "ruRU")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="ruRU", format="lua_additive_table", handle-subnamespaces="concat", handle-unlocalized="english")@
|
4
loc/zhCN.lua
Normal file
4
loc/zhCN.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("Breakables", "zhCN")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="zhCN", format="lua_additive_table", handle-subnamespaces="concat", handle-unlocalized="english")@
|
4
loc/zhTW.lua
Normal file
4
loc/zhTW.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("Breakables", "zhTW")
|
||||
if not L then return end
|
||||
|
||||
--@localization(locale="zhTW", format="lua_additive_table", handle-subnamespaces="concat", handle-unlocalized="english")@
|
Reference in New Issue
Block a user