Log victory in lab
This commit is contained in:
parent
c15823199d
commit
d83291a0b3
|
@ -11,6 +11,7 @@ from datetime import timedelta
|
||||||
from fancy_printing import print_fancy
|
from fancy_printing import print_fancy
|
||||||
|
|
||||||
CHEST_TIMER_FILE = "adventure/seafloor/coral_reef/.timer"
|
CHEST_TIMER_FILE = "adventure/seafloor/coral_reef/.timer"
|
||||||
|
LOG_FILE = ".log"
|
||||||
BEGINNING = [
|
BEGINNING = [
|
||||||
"Your adventure has only just begun. You are not yet ready to return to the ship. More secrets await you in the ocean's depths. Use `ls` to look around, and use `cd adventure` to start the adventure..."
|
"Your adventure has only just begun. You are not yet ready to return to the ship. More secrets await you in the ocean's depths. Use `ls` to look around, and use `cd adventure` to start the adventure..."
|
||||||
]
|
]
|
||||||
|
@ -35,6 +36,8 @@ def reset():
|
||||||
|
|
||||||
def win():
|
def win():
|
||||||
print_fancy(VICTORY)
|
print_fancy(VICTORY)
|
||||||
|
win_time = datetime.now().isoformat()
|
||||||
|
Path(LOG_FILE).write_text(f"finished the lab at {win_time}\n")
|
||||||
|
|
||||||
def chest_was_opened():
|
def chest_was_opened():
|
||||||
return Path(CHEST_TIMER_FILE).exists()
|
return Path(CHEST_TIMER_FILE).exists()
|
||||||
|
|
Loading…
Reference in New Issue