comparison LibFarmbuyer.lua @ 73:32eb24fb2ebf

- This code is not quite ready for prime time. Do not run it yet. - Loot events have associated unique IDs, enabling some new actions over the network. These IDs are preserved as part of realm history. As a result, the stored history format has completely changed (and requires less memory as a bonus). - "Prescan for faster handling" option, default off. - "Mark as <x>" now broadcast to other trackers. Older versions can't receive the message, of course. Future: Broadcast reassigning loot. - New options controlling whether (and where) to print a message when another player broadcasts those kinds of changes to existing loot. - Names colored by class when that data is available; CUSTOM_CLASS_COLORS supported. - Metric boatloads of minor tweaks and optimizations throughout.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Tue, 29 May 2012 22:50:09 +0000
parents 8442272a8418
children 01cfbfa96dd6
comparison
equal deleted inserted replaced
72:bb19899c65a7 73:32eb24fb2ebf
7 - author_debug 7 - author_debug
8 Evaluates to true if I'm hacking on something. 8 Evaluates to true if I'm hacking on something.
9 9
10 - tableprint(t[,f]) 10 - tableprint(t[,f])
11 A single print() call to the contents of T, including nils; strings are 11 A single print() call to the contents of T, including nils; strings are
12 cleaned up with respect to embedded '|'/control chars. If a function F is 12 cleaned up with respect to embedded '|'/control chars. A single space
13 passed, calls that instead of print(). Returns the accumulated string and 13 is used during concatenation of T. If a function F is passed, calls that
14 either T or the returned values of F, depending on which was used. 14 instead of print(). Returns the accumulated string and either T or the
15 returned values of F, depending on which was used.
15 16
16 - safeprint(...) 17 - safeprint(...)
17 Same as tableprint() on the argument list. Returns the results of tableprint. 18 Same as tableprint() on the argument list. Returns the results of tableprint.
18 Generates some garbage. 19 Generates some garbage.
19 20
52 53
53 - new(...), del(t), copy(t), clear() 54 - new(...), del(t), copy(t), clear()
54 Ditto for table recycling. 55 Ditto for table recycling.
55 ]] 56 ]]
56 57
57 local MAJOR, MINOR = "LibFarmbuyer", 17 58 local MAJOR, MINOR = "LibFarmbuyer", 18
58 assert(LibStub,MAJOR.." requires LibStub") 59 assert(LibStub,MAJOR.." requires LibStub")
59 local lib = LibStub:NewLibrary(MAJOR, MINOR) 60 local lib = LibStub:NewLibrary(MAJOR, MINOR)
60 if not lib then return end 61 if not lib then return end
61 62
62 _G[MAJOR] = lib 63 _G[MAJOR] = lib
243 })[UnitName("player")] then 244 })[UnitName("player")] then
244 lib.author_debug = true 245 lib.author_debug = true
245 _G.safeprint = lib.safeprint 246 _G.safeprint = lib.safeprint
246 _G.safeiprint = lib.safeiprint 247 _G.safeiprint = lib.safeiprint
247 function lib.tabledump(t) 248 function lib.tabledump(t)
248 _G.UIParentLoadAddOn("Blizzard_DebugTools") 249 -- Should instead load this and then call the subcommands directly.
250 --_G.UIParentLoadAddOn("Blizzard_DebugTools")
249 _G.LibF_DEBUG = t 251 _G.LibF_DEBUG = t
250 _G.SlashCmdList.DUMP("LibF_DEBUG") 252 _G.SlashCmdList.DUMP("LibF_DEBUG")
251 end 253 end
252 else 254 else
253 lib.tabledump = lib.nullfunc 255 lib.tabledump = lib.nullfunc