Skip to content

Commit

Permalink
Parts Browser: in the module tags, fixed how UnpressurizedCockpit and…
Browse files Browse the repository at this point in the history
… NonReentryRated were added to part tree.

ModuleTagUnpressurizedCockpit -> ModuleUnpressurizedCockpit
ModuleTagNonReentryRated -> ModuleNonReentryRated
mattwrobel committed Dec 29, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 54858c7 commit ea68daa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/Tech Tree/Parts Browser/tree_parts_cfg_generator.py
Original file line number Diff line number Diff line change
@@ -24,6 +24,9 @@
module_tag_template = Template("""
MODULE
{ name = ModuleTag${module_tag} }""")
module_template = Template("""
MODULE
{ name = Module${module_tag} }""")

def generate_parts_tree(parts):
part_configs = ""
@@ -39,7 +42,10 @@ def generate_parts_tree(parts):
def generate_part_config(part):
module_tags = ''
for module_tag in part['module_tags']:
module_tags += module_tag_template.substitute(module_tag=module_tag)
if module_tag in ['NonReentryRated','UnpressurizedCockpit']:
module_tags += module_template.substitute(module_tag=module_tag)
else:
module_tags += module_tag_template.substitute(module_tag=module_tag)
if len(module_tags) > 0:
module_tags = "\n" + module_tags + "\n"
return module_part_config_template.substitute(name=part['name'], mod=part['mod'], technology=part['technology'], cost=part['cost'], entry_cost=part['entry_cost'], rp0_conf=str(part['rp0_conf']).lower(), module_tags=module_tags)

0 comments on commit ea68daa

Please sign in to comment.