letzte Hilfeseiten.
This commit is contained in:
@@ -156,6 +156,9 @@ class ActionModul(ActionBasics):
|
|||||||
else:
|
else:
|
||||||
self.setFehler('Nichts passiert.')
|
self.setFehler('Nichts passiert.')
|
||||||
|
|
||||||
|
def about(self):
|
||||||
|
self.world.printAbout()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def baueBruecke(self):
|
def baueBruecke(self):
|
||||||
@@ -506,6 +509,8 @@ class ActionModul(ActionBasics):
|
|||||||
self.wechsleRaum(imwasser)
|
self.wechsleRaum(imwasser)
|
||||||
else:
|
else:
|
||||||
self.setFehler('Das Wasser ist viel zu tief, du würdest ertrinken.')
|
self.setFehler('Das Wasser ist viel zu tief, du würdest ertrinken.')
|
||||||
|
else:
|
||||||
|
self.setFehler('Hieh-Hüpf')
|
||||||
|
|
||||||
|
|
||||||
def sprich(self,parsedCommand):
|
def sprich(self,parsedCommand):
|
||||||
@@ -665,10 +670,6 @@ class ActionModul(ActionBasics):
|
|||||||
def runter(self):
|
def runter(self):
|
||||||
self.geheNach(self.world.RUNTER)
|
self.geheNach(self.world.RUNTER)
|
||||||
|
|
||||||
def about(self):
|
|
||||||
print("Tomb Version " + self.world.VERSION)
|
|
||||||
self.world.waitForCR
|
|
||||||
|
|
||||||
def raumaction(self):
|
def raumaction(self):
|
||||||
raumid = self.world.aktuellerRaum.id
|
raumid = self.world.aktuellerRaum.id
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
import FileReader
|
import FileReader
|
||||||
|
from os.path import exists
|
||||||
|
|
||||||
class HilfeModul():
|
class HilfeModul():
|
||||||
|
|
||||||
@@ -12,8 +13,9 @@ class HilfeModul():
|
|||||||
|
|
||||||
self.world = world
|
self.world = world
|
||||||
|
|
||||||
def readTxt(self, datei):
|
self.check()
|
||||||
|
|
||||||
|
def readTxt(self, datei):
|
||||||
logging.debug(f'öffne Hilfedatei {datei}')
|
logging.debug(f'öffne Hilfedatei {datei}')
|
||||||
reader = FileReader.FileReader(datei)
|
reader = FileReader.FileReader(datei)
|
||||||
|
|
||||||
@@ -23,6 +25,18 @@ class HilfeModul():
|
|||||||
|
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
|
||||||
|
for id in self.world.befehle:
|
||||||
|
befehl = self.world.befehle[id]
|
||||||
|
|
||||||
|
helptxt = self.baueHilfedatei(befehl.key)
|
||||||
|
|
||||||
|
logging.debug(f'suche Hilfedatei {helptxt}')
|
||||||
|
if not exists(helptxt):
|
||||||
|
logging.warn(f'Hilfedatei {helptxt} existiert nicht')
|
||||||
|
|
||||||
|
|
||||||
def hilfe(self, command):
|
def hilfe(self, command):
|
||||||
generalHelp = True
|
generalHelp = True
|
||||||
if not self.isBlank(command):
|
if not self.isBlank(command):
|
||||||
@@ -42,6 +56,8 @@ class HilfeModul():
|
|||||||
else:
|
else:
|
||||||
self.world.printText('hilfe')
|
self.world.printText('hilfe')
|
||||||
|
|
||||||
|
def baueHilfedatei(self, key):
|
||||||
|
return f'ascii/hilfe/cmd-{key}.txt'
|
||||||
def findHilfetext(self, command):
|
def findHilfetext(self, command):
|
||||||
|
|
||||||
logging.debug(f'suche Hilfetext zu {command}')
|
logging.debug(f'suche Hilfetext zu {command}')
|
||||||
@@ -52,10 +68,10 @@ class HilfeModul():
|
|||||||
|
|
||||||
logging.debug(f'cmdid= {cmdid}')
|
logging.debug(f'cmdid= {cmdid}')
|
||||||
|
|
||||||
# logging.debug(f'vergleiche {befehl.name.lower()} mit {command.lower()}')
|
logging.debug(f'vergleiche {befehl.name.lower()} mit {command.lower()}')
|
||||||
|
|
||||||
if befehl.name.lower() == command.lower():
|
if befehl.name.lower() == command.lower():
|
||||||
logging.debug(f'gefundener Befehl: {befehl.name}')
|
logging.debug(f'gefundener Befehl: {befehl.name}')
|
||||||
return f'ascii/hilfe/cmd-{befehl.key}.txt'
|
return self.baueHilfedatei(befehl.key)
|
||||||
|
|
||||||
return None
|
return None
|
11
World.py
11
World.py
@@ -15,6 +15,13 @@ class World:
|
|||||||
def clearScreen(self):
|
def clearScreen(self):
|
||||||
self.stdscr.clear()
|
self.stdscr.clear()
|
||||||
|
|
||||||
|
def printAbout(self):
|
||||||
|
s = self.stdscr
|
||||||
|
|
||||||
|
self.clearScreen()
|
||||||
|
s.addstr(1,0,'Das Grab des Azteken', curses.color_pair(2))
|
||||||
|
s.addstr(2,0,f'Version {self.VERSION}')
|
||||||
|
self.waitForCR()
|
||||||
def printText(self,textid):
|
def printText(self,textid):
|
||||||
self.clearScreen()
|
self.clearScreen()
|
||||||
self.stdscr.addstr(1,0,self.texte[textid].name)
|
self.stdscr.addstr(1,0,self.texte[textid].name)
|
||||||
@@ -400,7 +407,9 @@ class World:
|
|||||||
self.WEST = '3'
|
self.WEST = '3'
|
||||||
self.RAUF = '4'
|
self.RAUF = '4'
|
||||||
self.RUNTER = '5'
|
self.RUNTER = '5'
|
||||||
self.VERSION = '0.5'
|
|
||||||
|
self.VERSION = '0.91'
|
||||||
|
|
||||||
self.ITEM_TISCH = '1'
|
self.ITEM_TISCH = '1'
|
||||||
self.ITEM_LEITER = '2'
|
self.ITEM_LEITER = '2'
|
||||||
self.ITEM_TRUHE = '3'
|
self.ITEM_TRUHE = '3'
|
||||||
|
9
ascii/hilfe/cmd-16.txt
Normal file
9
ascii/hilfe/cmd-16.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: drücke
|
||||||
|
Parameter: Gegenstand
|
||||||
|
siehe auch:
|
||||||
|
|
||||||
|
|
||||||
|
Drückt auf einen Gegenstand imInventar oder aktuellen Raum.
|
||||||
|
|
10
ascii/hilfe/cmd-24.txt
Normal file
10
ascii/hilfe/cmd-24.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: schlage, boxe
|
||||||
|
Parameter: Genstand
|
||||||
|
siehe auch:
|
||||||
|
|
||||||
|
|
||||||
|
Schlägt auf einen Gegenstand im aktuellen Raum.
|
||||||
|
Achte darauf, wen oder was du schlägst!
|
||||||
|
|
10
ascii/hilfe/cmd-25.txt
Normal file
10
ascii/hilfe/cmd-25.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: sprich
|
||||||
|
Parameter: Person
|
||||||
|
siehe auch:
|
||||||
|
|
||||||
|
|
||||||
|
Spricht eine Person im aktuellen Raum an. Dadurch könntest du an spielentscheidende
|
||||||
|
Informationen kommen.
|
||||||
|
|
9
ascii/hilfe/cmd-26.txt
Normal file
9
ascii/hilfe/cmd-26.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: leere
|
||||||
|
Parameter: Gegenstand
|
||||||
|
siehe auch:
|
||||||
|
|
||||||
|
|
||||||
|
Leert einen Gegenstand im Inventar bzw. schüttet seinen Inhalt aus.
|
||||||
|
|
9
ascii/hilfe/cmd-27.txt
Normal file
9
ascii/hilfe/cmd-27.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: fülle, fuelle
|
||||||
|
Parameter: Gegenstand
|
||||||
|
siehe auch:
|
||||||
|
|
||||||
|
|
||||||
|
Füllt einen Gegenstand im Inventar. Das einzufüllende Material muss im aktuellen Raum vorhanden sein.
|
||||||
|
|
9
ascii/hilfe/cmd-28.txt
Normal file
9
ascii/hilfe/cmd-28.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: wirf
|
||||||
|
Parameter: Gegenstand
|
||||||
|
siehe auch:
|
||||||
|
|
||||||
|
|
||||||
|
Wirft einen Gegenstand im Inventar.
|
||||||
|
|
9
ascii/hilfe/cmd-29.txt
Normal file
9
ascii/hilfe/cmd-29.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: gib
|
||||||
|
Parameter: Gegenstand
|
||||||
|
siehe auch:
|
||||||
|
|
||||||
|
|
||||||
|
Gibt einen Gegenstand aus dem Inventar an eine Person im aktuellen Raum.
|
||||||
|
|
9
ascii/hilfe/cmd-30.txt
Normal file
9
ascii/hilfe/cmd-30.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: entzünde
|
||||||
|
Parameter: Gegenstand
|
||||||
|
siehe auch:
|
||||||
|
|
||||||
|
|
||||||
|
Entzündet einenbrennbaren Gegestand aus dem Inventar. Feuer bedeutet Licht.
|
||||||
|
|
9
ascii/hilfe/cmd-31.txt
Normal file
9
ascii/hilfe/cmd-31.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: lösche
|
||||||
|
Parameter: Gegenstand
|
||||||
|
siehe auch: entzünde
|
||||||
|
|
||||||
|
|
||||||
|
Löscht einen brennden Gegenstand im Inventar.
|
||||||
|
|
9
ascii/hilfe/cmd-32.txt
Normal file
9
ascii/hilfe/cmd-32.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Hilfeseite
|
||||||
|
|
||||||
|
Befehl: spring
|
||||||
|
Parameter: -keiner-
|
||||||
|
siehe auch:
|
||||||
|
|
||||||
|
|
||||||
|
Springt in die Höhe oder über etwas rüber oder in etwas hinein.
|
||||||
|
|
@@ -392,6 +392,7 @@ Du stehst in der Küche. In der Ecke steht ein Kühlschrank.
|
|||||||
<item name='Plakette' id='45' display='' raum='42' imobil='true' adjektiv='0' msgid='2' visible='true' />
|
<item name='Plakette' id='45' display='' raum='42' imobil='true' adjektiv='0' msgid='2' visible='true' />
|
||||||
<item name='Kühlschrank' id='46' display='' raum='43' imobil='true' adjektiv='0' msgid='2' visible='true' />
|
<item name='Kühlschrank' id='46' display='' raum='43' imobil='true' adjektiv='0' msgid='2' visible='true' />
|
||||||
<item name='Uhr' id='47' display='' raum='43' imobil='true' adjektiv='0' msgid='2' visible='true' />
|
<item name='Uhr' id='47' display='' raum='43' imobil='true' adjektiv='0' msgid='2' visible='true' />
|
||||||
|
<item name='Schriftzug' id='48' display='' raum='39' imobil='true' adjektiv='0' msgid='2' visible='false' />
|
||||||
|
|
||||||
</items>
|
</items>
|
||||||
<personen>
|
<personen>
|
||||||
@@ -569,6 +570,12 @@ Du stehst in der Küche. In der Ecke steht ein Kühlschrank.
|
|||||||
<text id='raum-31-1'>
|
<text id='raum-31-1'>
|
||||||
Im Licht der Fackel erkennst du, dass das Loch sorgfältig gegraben und mit Schiffsplanken abgestützt wurde.
|
Im Licht der Fackel erkennst du, dass das Loch sorgfältig gegraben und mit Schiffsplanken abgestützt wurde.
|
||||||
</text>
|
</text>
|
||||||
|
<text id='raum-43'>
|
||||||
|
Eine praktisch eingerichtete Küche. An der Wand hängt eine Uhr, ein Kühlschrank steht gegenüber der Tür.
|
||||||
|
</text>
|
||||||
|
<text id='npc-5'>
|
||||||
|
Muuuh.
|
||||||
|
</text>
|
||||||
<text id='npc-6'>
|
<text id='npc-6'>
|
||||||
Der Zwerg klappert vor Kälte mit den Zähnen und kann nicht sprechen.
|
Der Zwerg klappert vor Kälte mit den Zähnen und kann nicht sprechen.
|
||||||
</text>
|
</text>
|
||||||
|
Reference in New Issue
Block a user