Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Features "Change name in game"
Purpose of change
Add an option to change the player at any time in game.
This is different from the debug menu command in that it only changes the display name, while the debug command changes the save file name.
Describe the solution
Add a new variable
play_name
which is the display name.Change
Character::get_name()
to return that variable instead, or the regular name ifplay_name
is empty.Change all direct references of
name
toget_name()
. Note that save files, activitives and zones are still directly callingname
.play_name
is the name you introduce yourself to NPCs and new people you meet.name
is your save file name and Pre-Cataclysm name, the one registered in the police database and linked to your credit card in a bank.Describe alternatives you've considered
Split
name
intoname
for save file andpre_cata_name
for pre-cataclysm name.Testing
Additional context
Places where
name
was used that were not changed:I tested it by changing the
name
variable to another name and making a list of where it complained about a missing variable.