🗃️ Resource cleanup
This commit is contained in:
@ -7,13 +7,13 @@ def destinyNew(num : int):
|
||||
roll, diceResults = swroll.roll(0,0,0,0,0,0,num)
|
||||
roll = "".join(sorted(roll))
|
||||
|
||||
with open("resources/destinyPoints.txt","wt") as f:
|
||||
with open("resources/starWars/destinyPoints.txt","wt") as f:
|
||||
f.write(roll)
|
||||
|
||||
return "Rolled for Destiny Points and got:\n"+swroll.diceResultToEmoji(diceResults)+"\n"+swroll.resultToEmoji(roll)
|
||||
|
||||
def destinyUse(user : str):
|
||||
with open("resources/destinyPoints.txt","rt") as f:
|
||||
with open("resources/starWars/destinyPoints.txt","rt") as f:
|
||||
points = f.read()
|
||||
|
||||
if user == "Nikolaj":
|
||||
@ -21,7 +21,7 @@ def destinyUse(user : str):
|
||||
if 'B' in points:
|
||||
points = points.replace("B","L",1)
|
||||
points = "".join(sorted(points))
|
||||
with open("resources/destinyPoints.txt","wt") as f:
|
||||
with open("resources/starWars/destinyPoints.txt","wt") as f:
|
||||
f.write(points)
|
||||
logThis("Did it")
|
||||
return "Used a dark side destiny point. Destiny pool is now:\n"+swroll.resultToEmoji(points)
|
||||
@ -33,7 +33,7 @@ def destinyUse(user : str):
|
||||
if 'L' in points:
|
||||
points = points.replace("L","B",1)
|
||||
points = "".join(sorted(points))
|
||||
with open("resources/destinyPoints.txt","wt") as f:
|
||||
with open("resources/starWars/destinyPoints.txt","wt") as f:
|
||||
f.write(points)
|
||||
logThis("Did it")
|
||||
return "Used a light side destiny point. Destiny pool is now:\n"+swroll.resultToEmoji(points)
|
||||
@ -51,7 +51,7 @@ def parseDestiny(user : str, cmd : str):
|
||||
|
||||
if cmd == "":
|
||||
logThis("Retrieving destiny pool info")
|
||||
with open("resources/destinyPoints.txt","rt") as f:
|
||||
with open("resources/starWars/destinyPoints.txt","rt") as f:
|
||||
return swroll.resultToEmoji(f.read())
|
||||
else:
|
||||
commands = cmd.upper().split(" ")
|
||||
|
Reference in New Issue
Block a user