From da297170c3c1bbd01458b13a6b0a6212181650e0 Mon Sep 17 00:00:00 2001 From: troido Date: Sat, 19 Jan 2019 01:27:47 +0100 Subject: messages now have a type which can be used for colourcoding --- asciifarm/client/gameclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asciifarm/client/gameclient.py b/asciifarm/client/gameclient.py index 8c94e68..197f6e7 100644 --- a/asciifarm/client/gameclient.py +++ b/asciifarm/client/gameclient.py @@ -111,7 +111,7 @@ class Client: if msgType == "ground": self.display.setGround(msg[1]) if msgType == "message": - self.log(msg[1]) + self.log(*msg[1:]) if msgType == "options": if msg[1] != None: description, options = msg[1] @@ -121,7 +121,7 @@ class Client: self.display.update() - def log(self, text): + def log(self, text, typ=None): if not isinstance(text, str): text = str(text) self.display.addMessage(text) -- cgit