summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2019-01-19 01:27:47 +0100
committertroido <troido@protonmail.com>2019-01-19 01:27:47 +0100
commitda297170c3c1bbd01458b13a6b0a6212181650e0 (patch)
tree5dc20cf3724030b30eeb5bc87a4d2ca6b882beb3
parent3a05711e0fe825aab70da5c540314965cee6f4af (diff)
messages now have a type which can be used for colourcoding
-rw-r--r--asciifarm/client/gameclient.py4
1 files 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)