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():