Skip to content

Commit

Permalink
Showing 12 changed files with 15 additions and 32,588 deletions.
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ def generate_ecm_engines(parts):
# for purposes I don't full understand, we replace all '.' and '_' characters with '-'
# and '?' with ' '. That's what the downstream code expects for whatever reason.
ecm_configs += module_part_config_template.substitute(name=part['name'].replace('_','-').replace('.','-').replace('?',' '), ecm=part['entry_cost_mods'])
text_file = open("output/ECM-Engines.cfg", "w", newline='\n')
text_file = open("../../../GameData/RP-0/Tree/ECM-Engines.cfg", "w", newline='\n')
text_file.write(tree_ecm_engines_header)
text_file.write(ecm_configs)
text_file.write(tree_ecm_engines_footer)
2 changes: 1 addition & 1 deletion Source/Tech Tree/Parts Browser/ecm_parts_cfg_generator.py
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ def generate_ecm_parts(parts):
# for purposes I don't full understand, we replace all '.' and '_' characters with '-'
# and '?' with ' ' in the part names. That's what the downstream code expects for whatever reason.
ecm_configs += module_part_config_template.substitute(name=part['name'].replace('_','-').replace('.','-').replace('?',' '), ecm=part['entry_cost_mods'])
text_file = open("output/ECM-Parts.cfg", "w", newline='\n')
text_file = open("../../../GameData/RP-0/Tree/ECM-Parts.cfg", "w", newline='\n')
text_file.write(tree_ecm_parts_header)
text_file.write(ecm_configs)
text_file.write(tree_ecm_parts_footer)
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ def generate_identical_parts(parts):
sorted_parts.sort()
identical_part_configs += identical_part_template.substitute(name=name, identical_parts=",".join(sorted_parts))

text_file = open("output/identicalParts.cfg", "w", newline='\n')
text_file = open("../../../GameData/RP-0/Tree/identicalParts.cfg", "w", newline='\n')
text_file.write(identical_parts_header)
text_file.write(identical_part_configs)
text_file.close()
375 changes: 0 additions & 375 deletions Source/Tech Tree/Parts Browser/output/ECM-Engines.cfg

This file was deleted.

801 changes: 0 additions & 801 deletions Source/Tech Tree/Parts Browser/output/ECM-Parts.cfg

This file was deleted.

4,741 changes: 0 additions & 4,741 deletions Source/Tech Tree/Parts Browser/output/TREE-Engines.cfg

This file was deleted.

26,200 changes: 0 additions & 26,200 deletions Source/Tech Tree/Parts Browser/output/TREE-Parts.cfg

This file was deleted.

462 changes: 0 additions & 462 deletions Source/Tech Tree/Parts Browser/output/identicalParts.cfg

This file was deleted.

12 changes: 9 additions & 3 deletions Source/Tech Tree/Parts Browser/tech_mapping.py
Original file line number Diff line number Diff line change
@@ -63,13 +63,19 @@ def get_value(self,row,column_name):
def validate_current(self, parts):
for part in parts:
name = part['name'] if 'name' in part else ''
mod = part['mod'] if 'mod' in part else ''
tech_required = part['technology'] if 'technology' in part else ''
category = part['category'] if 'category' in part else ''
year = part['year'] if 'year' in part else ''
if category in self.tech_map:
expected_tech = self.tech_map[category][year]
if tech_required != expected_tech:
print(f"Tech mismatch for {name} - {category} - {year} expected: {expected_tech} actual: {tech_required}")
if year in self.tech_map[category]:
expected_tech = self.tech_map[category][year]
if tech_required != expected_tech:
print(f"Tech mismatch for {name} in mod {mod}: {category} - {year} expected: {expected_tech} actual: {tech_required}")
else:
print(f"Year {year} not found for category {category} for part {name} in mod {mod}")
elif category != "":
print(f"Category {category} not found for part {name} in mod {mod}")



Original file line number Diff line number Diff line change
@@ -616,7 +616,7 @@
if (confirm("Are you sure you want to generate the configs? (any queued changes at the bottom will not currently be included)")) {
$.get("api/generate_all_configs", function( data ) {
if (data == "true") {
alert( "Configs successfully generated in /output folder." );
alert( "Configs successfully generated." );
} else {
alert("Config generation failed.");
}
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ def generate_engine_tree(parts):
engine_configs += generate_engine_config(part)
if 'upgrade' in part and part['upgrade'] is True:
part_upgrades += generate_part_upgrade_config(part)
text_file = open("output/TREE-Engines.cfg", "w", newline='\n')
text_file = open("../../../GameData/RP-0/Tree/TREE-Engines.cfg", "w", newline='\n')
text_file.write(tree_engine_header)
text_file.write(engine_configs)
text_file.write(tree_engine_mid)
2 changes: 1 addition & 1 deletion Source/Tech Tree/Parts Browser/tree_parts_cfg_generator.py
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ def generate_parts_tree(parts):
if part['name'] is not None and len(part['name']) > 0:
if part['mod'] != 'Engine_Config' and not part['orphan']:
part_configs += generate_part_config(part)
text_file = open("output/TREE-Parts.cfg", "w", newline='\n')
text_file = open("../../../GameData/RP-0/Tree/TREE-Parts.cfg", "w", newline='\n')
text_file.write(tree_parts_header)
text_file.write(part_configs)
text_file.close()

0 comments on commit 3325637

Please sign in to comment.