X-Git-Url: https://git.ctpug.org.za/?p=koperkapel.git;a=blobdiff_plain;f=koperkapel%2Fgamelib%2Fkeypad.py;h=b328f3965e54b3af1ed0b4997ae5bd739c246f3a;hp=4667fcde95924490158653a8cc3355a61e19a6c7;hb=086b92efc52a09908e7186b906f6ca6dfb1607e6;hpb=ac587543218e5179289e18a147e7118f10348dfe diff --git a/koperkapel/gamelib/keypad.py b/koperkapel/gamelib/keypad.py index 4667fcd..b328f39 100644 --- a/koperkapel/gamelib/keypad.py +++ b/koperkapel/gamelib/keypad.py @@ -14,7 +14,10 @@ class Keypad(SurfActor): surf = images.load(os.path.join('fixtures', 'keypad')) super().__init__(surf, anchor=(0, 0)) - def activate(self): + def activate(self, roaches): # FIXME: Check stats for door in self._doors: - door.open() + if door.is_closed(): + door.open() + else: + door.close()