home · contact · privacy
Start pee-o-meter right on drinking, grow value exponentially over time.
[plomrogue2] / plomrogue / game.py
index ba7c285c83a1c49d32ae0ca96aafaf869f2ca59c..202a0fcba9bcf39e76e33e0b21e44d4b4c9723b4 100755 (executable)
@@ -215,7 +215,7 @@ class Game(GameBase):
             t.uncarry()
         self.things.remove(t)
         self.record_change(t.position, 'other')
-        if t.blocking:
+        if t.blocks_light:
             self.record_change(t.position, 'fov')
 
     def add_thing(self, type_, position, id_=0):
@@ -228,7 +228,7 @@ class Game(GameBase):
         else:
             self.things += [t]
         self.record_change(t.position, 'other')
-        if t.blocking:
+        if t.blocks_light:
             self.record_change(t.position, 'fov')
         return t
 
@@ -252,9 +252,9 @@ class Game(GameBase):
                 player.prepare_multiprocessible_fov_stencil()
                 player_fovs += [player._fov]
                 player_ids_send_fov += [player.id_]
-            if not (player._seen_things
-                    and player._seen_annotation_positions
-                    and player._seen_portal_positions):
+            if None in (player._seen_things,
+                        player._seen_annotation_positions,
+                        player._seen_portal_positions):
                 player_ids_send_other += [player.id_]
         new_fovs = []
         single_core_until = 16  # since multiprocess has its own overhead
@@ -473,6 +473,10 @@ class Game(GameBase):
                                                      int(terrain.blocks_light),
                                                      int(terrain.blocks_sound),
                                                      int(terrain.blocks_movement)))
+                if len(terrain.tags) > 0:
+                    for tag in terrain.tags:
+                        write(f, 'TERRAIN_TAG %s %s' % (quote(terrain.character),
+                                                        quote(tag)))
             for big_yx in [yx for yx in self.maps if self.maps[yx].modified]:
                 for y, line in self.maps[big_yx].lines():
                     write(f, 'MAP_LINE %s %5s %s' % (big_yx, y, quote(line)))
@@ -510,7 +514,7 @@ class Game(GameBase):
                     write(f, 'GOD_THING_NAME %s %s' % (t.id_, quote(t.name)))
                 if hasattr(t, 'installable') and (not t.portable):
                     write(f, 'THING_INSTALLED %s' % t.id_)
-                if t.type_ == 'Door' and t.blocking:
+                if t.type_ == 'Door' and t.blocks_movement:
                     write(f, 'THING_DOOR_CLOSED %s' % t.id_)
                 elif t.type_ == 'Hat':
                     write(f, 'THING_HAT_DESIGN %s %s' % (t.id_,