From a12b29852e16854de5d248e5ba7f8a313cf8ff9b Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 20 Jan 2019 01:19:24 +0100 Subject: chat now has colours --- asciifarm/client/gameclient.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'asciifarm/client/gameclient.py') diff --git a/asciifarm/client/gameclient.py b/asciifarm/client/gameclient.py index 197f6e7..1995a67 100644 --- a/asciifarm/client/gameclient.py +++ b/asciifarm/client/gameclient.py @@ -121,13 +121,13 @@ class Client: self.display.update() - def log(self, text, typ=None): + def log(self, text, type=None): if not isinstance(text, str): text = str(text) - self.display.addMessage(text) + self.display.addMessage(text, type) if self.logFile: with(open(self.logFile, 'a')) as f: - f.write(text+'\n') + f.write("[{}] {}\n".format(type or "", text)) def command_loop(self): -- cgit