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

Fix NPCs stealing player default name #77268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ShnitzelX2
Copy link
Contributor

@ShnitzelX2 ShnitzelX2 commented Oct 23, 2024

Summary

Bugfixes "NPCs stealing player default name"

Purpose of change

Indeed a bug caused by #76935

Closes #77235

Character::pick_name() is used in Character::randomize(), so NPCs use it now. It can set name to the option-defined default name (DEF_CHAR_NAME), which is not intended for NPCs.

Describe the solution

Add is_avatar() check, one-liner.

Describe alternatives you've considered

Testing

With default name as "Default Name!": Starting game with "Play Now!":
  • '@' menu
    image
  • some NPCs generated
    image

Starting game with "Random Character":
image
image
image

And the same with empty default name:
  • play now
    image

  • random character
    image
    image

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default name is new npc name and will always be that name
1 participant