Henry spricht wieder.

Boxsack ist benutzbar.
This commit is contained in:
Olli Graf
2022-06-20 18:00:34 +02:00
parent e1bf16aa96
commit 740833541b
5 changed files with 94 additions and 14 deletions

View File

@@ -2,6 +2,7 @@
import logging
from ActionBasics import ActionBasics
import HilfeModul
class ActionModul(ActionBasics):
@@ -14,6 +15,8 @@ class ActionModul(ActionBasics):
def __init__(self, world):
super().__init__(world)
self.hilfemodul = HilfeModul.HilfeModul(world)
def warte(self):
print('Du wartest')
@@ -144,7 +147,9 @@ class ActionModul(ActionBasics):
self.world.printText('graböffnung')
self.world.aktuellerRaum.ausgaenge[self.world.SUED] = self.world.RAUM_GRAB
self.ausDemInventar(item)
else:
elif self.isItem(item,self.world.ITEM_BOXSACK):
self.schlage(parsedCommand)
else:
self.setFehler('Nichts passiert.')
@@ -346,9 +351,7 @@ class ActionModul(ActionBasics):
item = self.world.findItemInAktuellerRaum(parsedCommand.gegenstand)
if item != None:
#alter Code!
if item.id == 8:
self.world.stdscr.addstr('Du ziehst den Hebel und es passiert.... nichts!')
pass
else:
self.setFehler('Das sehe ich hier nicht.')
@@ -510,10 +513,7 @@ class ActionModul(ActionBasics):
self.setFehler(f'{parsedCommand.gegenstand} ist nicht im Raum.')
def hilfe(self,parsedCommand):
if parsedCommand.gegenstand == 'befehle':
self.world.printBefehle()
else:
self.world.printText('hilfe')
self.hilfemodul.hilfe(parsedCommand.gegenstand)
def geheNachItem(self,parsedCommand):
item = self.world.findItemInAktuellerRaum(parsedCommand.gegenstand)
@@ -556,6 +556,9 @@ class ActionModul(ActionBasics):
self.geheNach(richtung)
elif richtung == 'rauf':
self.rauf()
self.geheNach(richtung)
elif richtung == 'runter':
self.runter()
else:
self.geheNachItem(parsedCommand)