Superloading: Am I doin' this rite?

Moderator: Moderator

Post Reply
Message
Author
ibanix
Wyrmic
Posts: 244
Joined: Thu May 23, 2013 12:25 am

Superloading: Am I doin' this rite?

#1 Post 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
Please help with the ToME wiki!

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Superloading: Am I doin' this rite?

#2 Post by HousePet »

Just don't self.log?
My feedback meter decays into coding. Give me feedback and I make mods.

ibanix
Wyrmic
Posts: 244
Joined: Thu May 23, 2013 12:25 am

Re: Superloading: Am I doin' this rite?

#3 Post by ibanix »

How?
Please help with the ToME wiki!

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Superloading: Am I doin' this rite?

#4 Post by HousePet »

Overwrite the entire function in the superload file, and don't include the log command.
My feedback meter decays into coding. Give me feedback and I make mods.

Post Reply