lessen output of spells.py
parent
4d9b604bf2
commit
ea0f374d08
|
@ -8,7 +8,7 @@ def main():
|
||||||
with open('spells.json') as f:
|
with open('spells.json') as f:
|
||||||
# raw_data = f.read()
|
# raw_data = f.read()
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
print("Imported {} spells.".format(len(data)))
|
print("Importing {} spells.".format(len(data)))
|
||||||
# alphabetize spells into a list
|
# alphabetize spells into a list
|
||||||
sorted_names = []
|
sorted_names = []
|
||||||
for i in data:
|
for i in data:
|
||||||
|
@ -128,6 +128,8 @@ def main():
|
||||||
do_spell_targets(i,id,conn,ttypes)
|
do_spell_targets(i,id,conn,ttypes)
|
||||||
do_spell_actions(i,id,conn,acttypes)
|
do_spell_actions(i,id,conn,acttypes)
|
||||||
|
|
||||||
|
print("Finished {} spells.".format(len(sorted_dicts)))
|
||||||
|
|
||||||
def do_spell_actions(i,id,conn,acttypes):
|
def do_spell_actions(i,id,conn,acttypes):
|
||||||
if 'action' not in i:
|
if 'action' not in i:
|
||||||
return
|
return
|
||||||
|
@ -289,7 +291,7 @@ def do_range_numbers(i, id, conn):
|
||||||
|
|
||||||
|
|
||||||
def do_basic_sql(i, id, conn):
|
def do_basic_sql(i, id, conn):
|
||||||
print("Doing spell id #{}: {}".format(id, i['name']))
|
#print("Doing spell id #{}: {}".format(id, i['name']))
|
||||||
stmt = """INSERT INTO spells (
|
stmt = """INSERT INTO spells (
|
||||||
spells_id,
|
spells_id,
|
||||||
sources_id,
|
sources_id,
|
||||||
|
|
Loading…
Reference in New Issue