Baumhaus ist zugänglich.
This commit is contained in:
@@ -7,10 +7,10 @@ class ActionBasics:
|
||||
self.world = world
|
||||
|
||||
def debug(self, method, text):
|
||||
logging.debug(f'ActionBasics#{method}: {text}')
|
||||
logging.debug(f'ActionBasics: {text}')
|
||||
|
||||
def insInventar(self, item):
|
||||
self.debug('insInventar()',f'neu ins Inventar: {item.name}')
|
||||
logging.debug(f'neu ins Inventar: {item.name}')
|
||||
self.world.inventar[item.id] = item
|
||||
|
||||
def setFehler(self,text):
|
||||
@@ -20,18 +20,23 @@ class ActionBasics:
|
||||
self.world.fehler = ''
|
||||
|
||||
def moveItemVonRaumNachInventar(self,item):
|
||||
self.debug('moveItemVonRaumNachInventar()',f'entferne aus aktuellen Raum {item.name}')
|
||||
logging.debug(f'entferne aus aktuellen Raum {item.name}')
|
||||
del self.world.aktuellerRaum.items[item.id]
|
||||
self.debug('moveItemVonRaumNachInventar()',f'ins Inventar {item.name}')
|
||||
logging.debug(f'ins Inventar {item.name}')
|
||||
self.insInventar(item)
|
||||
|
||||
def isItemAndAktRaum(self,item, itemid, raumid):
|
||||
return self.isItem(item, itemid) and self.isAktuellerRaum(raumid)
|
||||
isItem = self.isItem(item,itemid)
|
||||
isRaum = self.isAktuellerRaum(raumid)
|
||||
|
||||
logging.debug(f'isItem={isItem}, isRaum={isRaum}')
|
||||
return isItem and isRaum
|
||||
|
||||
def isItem(self, item, itemid):
|
||||
return item.id == itemid
|
||||
|
||||
def macheWegFrei(self, richtung, raumid):
|
||||
logging.debug(f'Richtung {richtung} führt jetzt zu RaumId {raumid}')
|
||||
self.world.aktuellerRaum.ausgaenge[richtung] = raumid
|
||||
|
||||
def findItemInAktuellerRaumById(self, itemid):
|
||||
@@ -39,7 +44,7 @@ class ActionBasics:
|
||||
raum = self.world.aktuellerRaum
|
||||
|
||||
item = self.world.aktuellerRaum.items[itemid]
|
||||
self.debug('findRaumItemById()',f'{itemid} -{item.id}')
|
||||
logging.debug(f'{itemid} -{item.id}')
|
||||
if item.id == itemid:
|
||||
return item
|
||||
|
||||
|
Reference in New Issue
Block a user