Unify name suffix and profession
Summary
Interface "Unify name suffix and profession"
Purpose of change
Closes #72138
Currently for NPCs, we append "name_suffix" directly onto Character::name immediately upon reading it, which isn't great; that means the name of the refugee merchant is "Smokes, merchant". Only NPCs with "name_suffix" work like this, as opposed to randomly generated NPCs.
Describe the solution
- Separate name functions into three different functions:
get_name()remains the same, getting only a character's name or nicknamedisp_name()returns a character's name with a suffix appended. That suffix is: npc_class if exists, or a (custom) profession.disp_profession()returns the a character's suffix.
-
Adds a "temp_suffix" field to
npc_classthat fillsCharacter::custom_profession. Upon recruiting an NPC, custom_profession is cleared. I didn't feel a need to add a new effect that does this, sincefollowis a built-in effect already. -
Capitalize the refugee suffixes, move "beggar" to "temp_suffix" (do the same for mi-go prisoners), give the refugee beggars custom "name_suffix" accurate to their backgrounds.
Describe alternatives you've considered
Either suffixes should display for all NPCs, or for none of them. I opted for all because I think it makes NPCs more interesting and easier to identify, but it would be trivial to disable suffixes in any context.
Testing
Passed all tests locally.
Additional context
Profession display still works
Suffixes still look normal
Upon recruit, beggar suffix changes
Doing an activity