Die Bohnenranke wächst.
This commit is contained in:
@@ -166,15 +166,40 @@ class ActionModul:
|
||||
if item.id == self.world.ITEM_BOXSACK:
|
||||
self.setFehler('Der Boxsack sagt: Hmm, hmm?')
|
||||
|
||||
def leere(self, parsedCommand):
|
||||
skip
|
||||
def leere(self, parsedCommand):
|
||||
item = self.world.findItemImInventar(parsedCommand.gegenstand)
|
||||
|
||||
def fuelle(self, parsedCommand):
|
||||
skip
|
||||
|
||||
if item.id == self.world.ITEM_KRUG:
|
||||
if self.isAktuellerRaum(self.world.RAUM_BRACHLAND):
|
||||
if item.zustand == item.VOLL:
|
||||
ranke = self.world.findItemById(self.world.ITEM_BOHNENRANKE)
|
||||
|
||||
if ranke.zustand < ranke.GROSS:
|
||||
ranke.zustand = ranke.zustand +1
|
||||
self.setFehler('Die Bohnenranke wächst.')
|
||||
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.')
|
||||
else:
|
||||
self.setFehler('Der Krug ist leer')
|
||||
else:
|
||||
item.zustand = item.LEER
|
||||
|
||||
def fuelle(self, parsedCommand):
|
||||
item = self.world.findItemImInventar(parsedCommand.gegenstand)
|
||||
|
||||
if item.id == self.world.ITEM_KRUG:
|
||||
if self.isAktuellerRaum(self.world.RAUM_TEICH):
|
||||
item.zustand = item.VOLL
|
||||
self.setFehler('Der Krug ist jetzt voll')
|
||||
|
||||
def zeigeItemBeschreibung(self,item):
|
||||
self.world.printText(f'item-{item.id}')
|
||||
textid = f'item-{item.id}'
|
||||
if item.id == self.world.ITEM_BOHNENRANKE:
|
||||
textid = f'item-{item.id}-{item.zustand}'
|
||||
else:
|
||||
textid = f'item-{item.id}'
|
||||
self.world.printText(textid)
|
||||
|
||||
def untersuche(self,parsedCommand):
|
||||
logging.debug(f'untersuche() suche nach Gegenstand: {parsedCommand.gegenstand}')
|
||||
@@ -285,6 +310,7 @@ def fuelle(self, parsedCommand):
|
||||
krug = self.world.findItemImInventarById(self.world.ITEM_KRUG)
|
||||
|
||||
if krug != None:
|
||||
krug.zustand = krug.VOLL
|
||||
self.setFehler('Du schöpfst mit dem Krug und der Fisch ist drin.')
|
||||
else:
|
||||
self.setFehler('Der Fisch ist zu glitschig, um ihn mit der Hand zu fangen.')
|
||||
|
Reference in New Issue
Block a user