From 74d69e502d300e3a9566304426bcd9960369545b Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Fri, 11 Dec 2020 08:07:10 +0100 Subject: [PATCH] Improve chat message meta data display. --- plomrogue/things.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plomrogue/things.py b/plomrogue/things.py index 7168f78..a13f771 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -89,13 +89,16 @@ class Thing(ThingBase): url_limits) lowered_nick = lower_msg_by_volume(name, volume, largest_audible_distance) - self.game.io.send('CHAT ' + - quote('(volume: %.2f) %s: %s' % (volume, - lowered_nick, - lowered_msg)), - c_id) + symbol = '' if listener.fov_test(self.position[0], self.position[1]): self.game.io.send('CHATFACE %s' % self.id_, c_id) + if self.type_ == 'Player' and hasattr(self, 'thing_char'): + symbol = '/@' + self.thing_char + self.game.io.send('CHAT ' + + quote('vol:%.f%s %s%s: %s' % (volume * 100, '%', + lowered_nick, symbol, + lowered_msg)), + c_id) -- 2.30.2