benutze/klettere Leiter

findItemById() iteriert jetzt richtig übers Dictionary
This commit is contained in:
Olli Graf
2022-05-12 19:19:28 +02:00
parent fe5ee8b197
commit f702995afd
5 changed files with 100 additions and 12 deletions

View File

@@ -100,13 +100,15 @@ class WorldParser():
gegenstand.sichtbar = visible.lower() not in ['false','False','0']
#logging.debug('Gegenstand ' + gegenstand.name + ' ist sichtbar: ' + str(gegenstand.sichtbar))
gegenstand.pickupmsg = msgid
print('Item ' + gegenstand.name + ' - Pickup: ' + gegenstand.pickupmsg)
logging.debug('Item ' + gegenstand.name + ' - Pickup: ' + gegenstand.pickupmsg)
raum.items[id] = gegenstand
logging.debug(f'Hinzufügen Gegenstand vom Typ: {str(type(gegenstand))}')
self.world.gegenstaende[id] = gegenstand
else:
logging.error(f'Kann Raum für Gegenstand {gegenstand.name} nicht finden')
print(f'Kein Raum für {gegenstand.name}')
if raum != '-1':
logging.error(f'Kann Raum für Gegenstand {gegenstand.name} nicht finden')
logging.error(f'Kein Raum für {gegenstand.name}')
# Personen
for item in root.findall('personen/person'):