Superloading: Am I doin' this rite?
Posted: Mon Nov 03, 2014 6:53 am
I've looked for an addon for what I'm trying to do, without much success: Disable the calendar messages. Sorry darkgod, but they drive me batty.
In effort to find how to turn them of, I found myself in Game.lua at function _M:onTurn, with this line:
if not self.day_of_year or self.day_of_year ~= self.calendar:getDayOfYear(self.turn) then
self.log(self.calendar:getTimeDate(self.turn))
self.day_of_year = self.calendar:getDayOfYear(self.turn)
end
It's been a while since I did any coding (and never in lua), but the self.log() section seems to be the issue. I assume I have to either have it not call, or set self.calendar to null, or something similar.
Using the example teaa file I see that I can write a superload for onTurn, but I'm stuck at what exactly I should do to disable the log function or pass it null data.
Any ideas?
Thanks in advance,
ibanix
In effort to find how to turn them of, I found myself in Game.lua at function _M:onTurn, with this line:
if not self.day_of_year or self.day_of_year ~= self.calendar:getDayOfYear(self.turn) then
self.log(self.calendar:getTimeDate(self.turn))
self.day_of_year = self.calendar:getDayOfYear(self.turn)
end
It's been a while since I did any coding (and never in lua), but the self.log() section seems to be the issue. I assume I have to either have it not call, or set self.calendar to null, or something similar.
Using the example teaa file I see that I can write a superload for onTurn, but I'm stuck at what exactly I should do to disable the log function or pass it null data.
Any ideas?
Thanks in advance,
ibanix