Page 1 of 1

Superloading: Am I doin' this rite?

Posted: Mon Nov 03, 2014 6:53 am
by ibanix
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

Re: Superloading: Am I doin' this rite?

Posted: Mon Nov 03, 2014 10:42 am
by HousePet
Just don't self.log?

Re: Superloading: Am I doin' this rite?

Posted: Mon Nov 03, 2014 11:00 am
by ibanix
How?

Re: Superloading: Am I doin' this rite?

Posted: Mon Nov 03, 2014 11:26 pm
by HousePet
Overwrite the entire function in the superload file, and don't include the log command.