🔥 monster and spell files no longer part
This commit is contained in:
@@ -158,6 +158,29 @@ def makeFiles():
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
# Creates monsters.json if it doesn't exist
|
||||
try:
|
||||
f = open("resources/monsters.json","r")
|
||||
except:
|
||||
logThis("monsters.json didn't exist. Making it now.")
|
||||
with open("resources/lookupExamples.json") as f:
|
||||
data = json.load(f)["monster"]
|
||||
with open("resources/monsters.json","w") as f:
|
||||
json.dump(data,f,indent = 4)
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
# Creates spells.json if it doesn't exist
|
||||
try:
|
||||
f = open("resources/spells.json","r")
|
||||
except:
|
||||
logThis("spells.json didn't exist. Making it now.")
|
||||
with open("resources/lookupExamples.json") as f:
|
||||
data = json.load(f)["spell"]
|
||||
with open("resources/spells.json","w") as f:
|
||||
json.dump(data,f,indent = 4)
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
# Creates destinyPoints.txt if it doesn't exist
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user