Renamed item_ids file to correct extension, minor formatting changes.

This commit is contained in:
Chris Davoren 2023-07-15 18:18:32 +10:00
parent b867c87d65
commit 6e0ceaf239
2 changed files with 8 additions and 6 deletions

View File

@ -27,11 +27,11 @@ char_skills = {
8: "Shielding", 8: "Shielding",
9: "Operations", 9: "Operations",
10: "Weapons", 10: "Weapons",
11: "Unknown-1", 11: "Unknown-11",
12: "Logistics", # All characters seem to have this but it doesn't show up in the UI 12: "Logistics", # All characters seem to have this but it doesn't show up in the UI
13: "Unknown-2-enigma", # All characters seem to have this skill but what is it for? 13: "Unknown-13", # All characters seem to have this skill but what is it for?
14: "Navigation", 14: "Navigation",
15: "Unknown-3", 15: "Unknown-15",
16: "Research", 16: "Research",
22: "Piloting", # Appears to be the new piloting code? 22: "Piloting", # Appears to be the new piloting code?
} }
@ -170,7 +170,7 @@ class Character:
console.print() console.print()
console.print("Skills:") console.print("Skills:")
for i, skill in enumerate(self.skills): for i, skill in enumerate(self.skills):
row_string = "{:20} [bright_cyan]{:2}[/]".format(char_skills[skill['id']], skill['level']) row_string = "{:12} [bright_cyan]{:2}[/]".format(char_skills[skill['id']], skill['level'])
if i % 2 == 0: if i % 2 == 0:
console.print(" [on #222222]{}[/]".format(row_string)) console.print(" [on #222222]{}[/]".format(row_string))
else: else:
@ -402,7 +402,9 @@ class GameData:
continue continue
for character in ship.characters: for character in ship.characters:
console.print()
character.print_summary() character.print_summary()
console.print()
console.print('-----') console.print('-----')
console.print() console.print()
@ -490,7 +492,7 @@ def inventory(soup, add_code, add_quantity):
# Load tag names first: # Load tag names first:
id_dict = {} id_dict = {}
filename = "item_ids.txt" filename = "item_ids.tsv"
for line in open(filename): for line in open(filename):
result = line.split() result = line.split()
code = int(result[0]) code = int(result[0])
@ -630,7 +632,7 @@ def main():
soup = BeautifulSoup(full_text, "xml") soup = BeautifulSoup(full_text, "xml")
item_code_database = ItemCodeDatabase('item_ids.txt') item_code_database = ItemCodeDatabase('item_ids.tsv')
print("Item code database successfully loaded.") print("Item code database successfully loaded.")
print() print()