Alle Räume sind definiert.

This commit is contained in:
Olli Graf
2022-06-06 11:50:52 +02:00
parent 8870050345
commit 9fce43d330
4 changed files with 104 additions and 18 deletions

View File

@@ -26,6 +26,8 @@ class WorldParser():
id = item.attrib['id']
name = item.attrib['name']
beschreibung = ''
if id in self.world.raumliste:
raise ValueError(f'doppelte RaumId {id}')
# Beschreibung
for text in item.iter():
if text != None and text.text != None:
@@ -55,8 +57,6 @@ class WorldParser():
self.world.raumliste[id] = raum
startr = root.find('startraum')
print(startr)
print(startr.attrib['id'])
startraum = self.world.sucheRaum(startr.attrib['id'])
self.world.aktuellerRaum = startraum
print('Startraum gefunden.')