All pastes #63710 Raw Edit

Something

public text v1 · immutable
#63710 ·published 2006-06-10 14:33 UTC
rendered paste body
idStuff = {}

-- Basic things
function idStuff:Enable()
    self.vars = {}
    self:setVar('Debugmode',true)
end

function idStuff:Disable()
    self.vars = nil
end

function idStuff:setVar(var, val)
    return self.vars[var] = val
end

function idStuff:getVar(var)
    return self.vars[var]
end

function idStuff:debug(str)
    if self:getVar('Debugmode') then
        DEFAULT_CHAT_FRAME:AddMessage('Debug:'..str)
    end
end