Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate monster and npc names #72

Merged
merged 5 commits into from
Jul 31, 2023
Merged

Conversation

xshobux
Copy link
Contributor

@xshobux xshobux commented Jul 26, 2023

No description provided.

app/clarity.py Outdated
@@ -140,7 +142,12 @@ def scan_for_npc_names():
name_addr = address + 48 # jump to name
name = read_string(name_addr)

if data == "NPC":
if data == "NPC" or data == "MONSTER":
translated_names = ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to assign an empty string here as your conditional below is already assigning this variable. It won't end up unassigned with this logic.

app/clarity.py Outdated
if data == "NPC":
if data == "NPC" or data == "MONSTER":
translated_names = ''
if data == "NPC":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can assign these in the if/else above on lines 133 and 135 to dry this out.

app/clarity.py Outdated
@@ -140,7 +144,7 @@ def scan_for_npc_names():
name_addr = address + 48 # jump to name
name = read_string(name_addr)

if data == "NPC":
if data == "NPC" or data == "MONSTER":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra whitespace after MONSTER:.

Copy link
Contributor

@jmctune jmctune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

app/clarity.py Outdated
f"{misc_files}/smldt_msg_pkg_NPC_DB.win32.json",
f"{misc_files}/custom_npc_names.json"
])
translated_monster_names = f"{misc_files}/subPackage02Client.win32.json"
Copy link
Contributor

@jmctune jmctune Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just came to me, but I realized that this isn't actually doing anything other than assigning the path to a string. We need to actually read the contents and assign it to something that we can look up.

For now, the easiest way would be to just call merge_jsons() on this string (like above) to produce a separate dict.

@jmctune
Copy link
Contributor

jmctune commented Jul 31, 2023

npc and monster names are still translating correctly with these changes.

@jmctune jmctune merged commit be6542b into dev Jul 31, 2023
@jmctune jmctune deleted the origin/separate-npcs-monsters branch July 31, 2023 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants