home · contact · privacy
Only send chatface message to listener.
[plomrogue2] / plomrogue / things.py
index 09cf7f0b8bac496e17c2e980494afd369ce09dcb..7168f7816fd97faa4b9426ab185a7bb4472aac4a 100644 (file)
@@ -7,6 +7,7 @@ import random
 
 class ThingBase:
     type_ = '?'
+    carrying = False
 
     def __init__(self, game, id_=0, position=(YX(0, 0), YX(0, 0))):
         self.game = game
@@ -24,7 +25,6 @@ class Thing(ThingBase):
     protection = '.'
     commandable = False
     carried = False
-    carrying = False
 
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
@@ -94,6 +94,8 @@ class Thing(ThingBase):
                                                                lowered_nick,
                                                                lowered_msg)),
                               c_id)
+            if listener.fov_test(self.position[0], self.position[1]):
+                self.game.io.send('CHATFACE %s' % self.id_, c_id)