From 3dc432b484f36d8407b4302e360ed0e42fe29b10 Mon Sep 17 00:00:00 2001 From: Alar of Daggerspine Date: Sat, 20 Jun 2015 17:19:18 +0200 Subject: [PATCH] Added optdeps to libdebug to use enhanced print Signed-off-by: Alar of Daggerspine --- .../GarrisonCommander-Broker.toc | 2 +- GarrisonCommander-Broker/ldb.lua | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/GarrisonCommander-Broker/GarrisonCommander-Broker.toc b/GarrisonCommander-Broker/GarrisonCommander-Broker.toc index 6412ce1..e4ef0f2 100644 --- a/GarrisonCommander-Broker/GarrisonCommander-Broker.toc +++ b/GarrisonCommander-Broker/GarrisonCommander-Broker.toc @@ -9,7 +9,7 @@ ## X-Revision: @project-abbreviated-hash@ ## eMail: alar@aspide.it ## URL: http://wow.aspide.it -## OptionalDeps: Titan, Bazooka, ChocolateBar , FuBar , LibDataBroker-1.1 +## OptionalDeps: Titan, Bazooka, ChocolateBar , FuBar , LibDataBroker-1.1, LibDebug ## DefaultState: Enabled ## SavedVariables: dbGACB ## X-ID: GACB diff --git a/GarrisonCommander-Broker/ldb.lua b/GarrisonCommander-Broker/ldb.lua index 615e873..94c266c 100644 --- a/GarrisonCommander-Broker/ldb.lua +++ b/GarrisonCommander-Broker/ldb.lua @@ -6,10 +6,14 @@ if (not LibStub:GetLibrary("LibDataBroker-1.1",true)) then return end local pp=print -if (LibDebug) then LibDebug() end --@debug@ LoadAddOn("Blizzard_DebugTools") +if LibDebug then LibDebug() end --@end-debug@ +--[===[@non-debug@ +setfenv(1,setmetatable({print=function(...) end},{__index=_G})) +--@end-non-debug@]===] +print("Garrison-Broker") local L=LibStub("AceLocale-3.0"):GetLocale(me,true) --local addon=LibStub("AceAddon-3.0"):NewAddon(me,"AceTimer-3.0","AceEvent-3.0","AceConsole-3.0") --#addon local addon=LibStub("LibInit"):NewAddon(me,"AceTimer-3.0","AceEvent-3.0","AceConsole-3.0","AceHook-3.0") --#addon @@ -160,7 +164,7 @@ function addon:CheckDateReset() end self:ScheduleTimer("CheckDateReset",60) --@debug@ - if (today~=oldToday) then + if (false and today~=oldToday) then self:Popup(format("o:%s y:%s t:%s r:%s [w:%s m:%s d:%s y:%s] ",oldToday,yesterday,today,reset,CalendarGetDate())) dataobj:Update() farmobj:Update() -- 1.7.9.5