Skip to content

Commit

Permalink
Ran object data scripts, updated decospecialart
Browse files Browse the repository at this point in the history
- decospecialart.py now uses Section to read default data
  • Loading branch information
Son-Guhun committed Jan 21, 2020
1 parent 93b68e3 commit 9a5ca48
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 156 deletions.
9 changes: 6 additions & 3 deletions builderlib/decospecialart.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
"""This script iterates over all decorations in a .ini database and set their Specialart field
to the format expected by the SpecialEffect system.
"""
from myconfigparser import MyConfigParser, load_unit_data, get_decorations
from myconfigparser import MyConfigParser, load_unit_data, get_decorations, Section


def configure_decorations(unit_data, decoration_list):
for decoration in decoration_list:
data = unit_data[decoration]
data = Section(unit_data[decoration])
try:
data['Specialart'] = '"{}"'.format(',' + data['file'][1:-1])
file = data['file'][1:-1]
if file[-4] != '.':
file = file + '.mdx'
data['Specialart'] = '"{}"'.format(',' + file)
except:
print("Could not find model data for {}.".format(decoration))
data['elevPts'] = '0'
Expand Down
Loading

0 comments on commit 9a5ca48

Please sign in to comment.