Save unfinished work
This commit is contained in:
parent
b2eb27730a
commit
98e49e462b
|
@ -94,12 +94,12 @@ def __create_button(world: World, name: str):
|
|||
|
||||
def new_score(world: World, e: Entity):
|
||||
e.remove(Clickable)
|
||||
if os.path.exists("username.txt"):
|
||||
with open("username.txt", "r") as f:
|
||||
if os.path.exists("../username.txt"):
|
||||
with open("../username.txt", "r") as f:
|
||||
name = f.read()
|
||||
else:
|
||||
name = world.query(Writing).pop()
|
||||
with open("username.txt", "w") as f:
|
||||
with open("../username.txt", "w") as f:
|
||||
f.write(name[Text])
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue