Räume Esszimmer, Dachboden und Flur definiert.

This commit is contained in:
Olli Graf
2022-01-19 06:26:03 +01:00
parent 8f84706546
commit 682596a53b
3 changed files with 38 additions and 122 deletions

View File

@@ -83,16 +83,20 @@ class WorldParser():
imobil = item.attrib['imobil']
visible = item.attrib['visible']
raum = self.world.sucheRaum(raumid)
gegenstand.raum = raum.id
gegenstand.imobil = imobil.lower() in ['true','True','1']
logging.debug('itemid= ' + id + ',visible= ' + visible)
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)
if raum is not None:
gegenstand.raum = raum.id
gegenstand.imobil = imobil.lower() in ['true','True','1']
logging.debug('itemid= ' + id + ',visible= ' + visible)
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)
raum.items[id] = gegenstand
self.world.gegenstaende[id] = gegenstand
raum.items[id] = 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}')
# Personen
for item in root.findall('personen/person'):