flexibler Ausgang aus dem Beiboot.
This commit is contained in:
@@ -5,6 +5,7 @@ class ActionBasics:
|
||||
|
||||
def __init__(self,world):
|
||||
self.world = world
|
||||
self.alleBootRaeume = [world.RAUM_BOOT, world.RAUM_BOOT2, world.RAUM_BOOT3]
|
||||
|
||||
def debug(self, method, text):
|
||||
logging.debug(f'ActionBasics: {text}')
|
||||
@@ -24,18 +25,37 @@ class ActionBasics:
|
||||
def clearFehler(self):
|
||||
self.world.fehler = ''
|
||||
|
||||
def wechsleRaum(self,raum):
|
||||
logging.debug(f'wechsle in RaumId: {raum.id}')
|
||||
if raum.id == self.world.RAUM_BOOT2:
|
||||
logging.debug('wechsle nach Raum Boot2')
|
||||
def wechsleBoot(self,raum):
|
||||
kabine = self.world.findItemById(self.world.ITEM_KABINE)
|
||||
raumkabine = self.world.findRaumById(self.world.RAUM_KABINE)
|
||||
boot2 = self.world.findRaumById(self.world.RAUM_BOOT2)
|
||||
beiboot = self.world.findItemById(self.world.ITEM_BEIBOOT)
|
||||
|
||||
raumkabine.ausgaenge[self.world.RAUF] = boot2.id
|
||||
self.moveItemVonRaumNachRaum(kabine,boot2)
|
||||
if raum.id in self.alleBootRaeume:
|
||||
raumkabine.ausgaenge[self.world.RAUF] = raum.id
|
||||
self.moveItemVonRaumNachRaum(kabine,raum)
|
||||
self.moveItemVonRaumNachRaum(beiboot,raum)
|
||||
|
||||
def wechsleRaum(self,raum):
|
||||
logging.debug(f'wechsle in RaumId: {raum.id}')
|
||||
if raum.id in self.alleBootRaeume:
|
||||
logging.debug('wechsle nach anderen Bootraum')
|
||||
self.wechsleBoot(raum)
|
||||
elif raum.id == self.world.RAUM_BEIBOOT:
|
||||
beiboot = self.world.findRaumById(self.world.RAUM_BEIBOOT)
|
||||
logging.debug(f'Pfad: {self.world.weg}')
|
||||
bootraum = self.world.findRaumById(self.world.weg[-1])
|
||||
logging.debug(f'wechsle ins Beiboot bootraum.id= {bootraum.id}')
|
||||
if(bootraum.id in self.alleBootRaeume):
|
||||
beiboot.ausgaenge[self.world.RAUF] = bootraum.id
|
||||
else:
|
||||
beiboot.ausgaenge[self.world.RAUF] = '-1'
|
||||
logging.debug(f'Ausgang RAUF im Beiboot ist {beiboot.ausgaenge[self.world.RAUF]}')
|
||||
beiboot.ausgaenge[self.world.OST] = -1
|
||||
if raum.id == self.world.RAUM_BOOT2:
|
||||
beiboot.ausgaenge[self.world.OST] = self.world.RAUM_INSEL
|
||||
|
||||
self.world.weg.append(raum.name)
|
||||
|
||||
self.world.weg.append(raum.id)
|
||||
self.world.aktuellerRaum = raum
|
||||
raum.entdeckt = True
|
||||
|
||||
|
Reference in New Issue
Block a user