From: Christian Heller Date: Fri, 11 Dec 2020 07:07:10 +0000 (+0100) Subject: Improve chat message meta data display. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Byoutube_prefix%7D%7D%7B%7Bvideo_data.id_%7D%7D?a=commitdiff_plain;h=74d69e502d300e3a9566304426bcd9960369545b;p=plomrogue2 Improve chat message meta data display. --- 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)