X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/git-favicon.png?a=blobdiff_plain;f=plomrogue%2Fthings.py;h=4d319b9d21e0781b98d615d5d29f39e28392d2fd;hb=6f5e2612e8d2b2515612e3dee6dc5ab115f0c1a3;hp=a51b2b2b48083037b146cca377005ecf9994cb8b;hpb=8b9e2703ed579b52dd514656599b8530c9b275cb;p=plomrogue2 diff --git a/plomrogue/things.py b/plomrogue/things.py index a51b2b2..4d319b9 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -74,6 +74,26 @@ class Thing_SpawnPoint(Thing): +class Thing_DoorSpawner(ThingSpawner): + child_type = 'Door' + + + +class Thing_Door(Thing): + symbol_hint = 'D' + blocking = False + portable = True + + def open(self): + self.blocking = False + self.portable = True + + def close(self): + self.blocking = True + self.portable = False + + + class ThingAnimate(Thing): blocking = True @@ -122,8 +142,8 @@ class ThingAnimate(Thing): if self._fov: return self._fov fov_map_class = self.game.map_geometry.fov_map_class - self._fov = fov_map_class(self.game.maps, self.position, 12, - self.game.get_map) + self._fov = fov_map_class(self.game.things, self.game.maps, self.position, + 12, self.game.get_map) return self._fov def fov_test(self, big_yx, little_yx):