diff options
| author | troido <troido@protonmail.com> | 2019-01-20 01:19:24 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2019-01-20 01:19:24 +0100 |
| commit | a12b29852e16854de5d248e5ba7f8a313cf8ff9b (patch) | |
| tree | fccd8b0f6b2f2624a356b7290d00c4d25beb3286 /asciifarm/client/gameclient.py | |
| parent | da297170c3c1bbd01458b13a6b0a6212181650e0 (diff) | |
chat now has colours
Diffstat (limited to 'asciifarm/client/gameclient.py')
| -rw-r--r-- | asciifarm/client/gameclient.py | 6 |
1 files changed, 3 insertions, 3 deletions
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): |
