From 6fb8fc6ecd4b72f2a775d8e2e4fa78778fe018ff Mon Sep 17 00:00:00 2001 From: Olli Graf Date: Fri, 10 Jun 2022 00:48:03 +0200 Subject: [PATCH] =?UTF-8?q?Schtel=20und=20Krug=20l=C3=B6sen=20sich=20auf.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ActionModul.py | 11 ++++++++--- tomb.py | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ActionModul.py b/ActionModul.py index 661ed61..a5ca510 100644 --- a/ActionModul.py +++ b/ActionModul.py @@ -107,6 +107,7 @@ class ActionModul(ActionBasics): logging.debug('Schachtel öffnen') item.zustand = item.OFFEN self.macheItemSichtbar(karte) + self.vanishItem(item) @@ -213,6 +214,7 @@ class ActionModul(ActionBasics): if item.zustand == item.VOLL: ranke = self.world.findItemById(self.world.ITEM_BOHNENRANKE) fisch = self.world.findItemImInventarById(self.world.ITEM_FISCH) + krug = self.world.findItemImInventarById(self.world.ITEM_KRUG) logging.debug(f'Fisch ist {fisch}') @@ -231,7 +233,8 @@ class ActionModul(ActionBasics): self.setFehler(meldung) if ranke.zustand == ranke.GROSS: self.world.aktuellerRaum.ausgaenge[self.world.RAUF] = self.world.RAUM_BOHNENRANKE - self.setFehler('Die Bohnenranke reicht jetzt bis in die Wolken hinein.') + self.setFehler('Die Bohnenranke reicht jetzt bis in die Wolken hinein.Der Krug löst sich auf') + self.vanishItem(krug) else: self.setFehler('Der Krug ist leer') else: @@ -528,16 +531,18 @@ class ActionModul(ActionBasics): self.macheItemSichtbar(schachtel) def toggleFackel(self,item): - weste = self.world.findItemById(self.world.ITEM_FACKEL) + weste = self.world.findItemById(self.world.ITEM_SCHWIMMWESTE) if item.zustand == item.GELOESCHT: item.zustand = item.ENTZUENDED weste.sichtbar = True self.setFehler('Die Fackel brennt jetzt.') + else: item.zustand = item.GELOESCHT - weste.sichtbar = False + if self.world.findItemImInventarById(self.world.ITEM_SCHWIMMWESTE) != None: + weste.sichtbar = False self.setFehler('Du löscht die Fackel.') diff --git a/tomb.py b/tomb.py index de7a95b..249bc4c 100755 --- a/tomb.py +++ b/tomb.py @@ -180,7 +180,7 @@ def debug_Items(): item = world.aktuellerRaum.items[itemid] logging.debug(f'count= {count}') # logging.debug(f'Itemtyp: {type(item)}') - logging.debug(f'Item-IdId:{item.id} - Item-Name:{item.name}') + logging.debug(f'Item-IdId:{item.id} - Item-Name:{item.name} - sichtbar= {item.sichtbar}') count = count +1 def debug_Inventar():