[TM ONLY] Early mirror of bitrunning manifest changing fix (87879) #228
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.
About The Pull Request
Early mirror of upstream PR I made.
Copied description:
So currently there's this incredibly incredibly niche records bug with bitrunning.
Where if a generated bitrunner avatar has the exact same name as anyone currently on the records, when it applies the hacker alias it then proceeds to update the records to match.
This seems to be because it uses
avatar.fully_replace_character_name(avatar.real_name, alias)
, which as an old name is given then callsreplace_records_name(avatar.real_name, alias)
, which proceeds to override the first record namedavatar.real_name
withalias
.It also potentially screws with people's objectives for anyone with that name.
As the documentation for this proc says:
https://github.com/tgstation/tgstation/blob/7b9d4d0f94d4447c04097066168d099ac19be686/code/modules/mob/mob.dm#L1123-L1125
we instead just call it without supplying an
oldname
, such that it doesn't try to update the records nor objectives.This fixes our issues.
However, this theoretically would've also updated our net avatar's ID! But in practice, it never actually did so, as it would have required the ID to already have been set to the
oldname
previously.To make it actually update the ID, we instead just manually update the avatar's ID after setting the alias.
Why It's Good For The Game
Fixes jank.
It's nicer to have the IDs use the actual names rather than being generic.
Changelog
🆑
fix: A bitrunner avatar spawning with the exact same name as a name currently on the records no longer updates that record to match when the hacker alias gets applied.
qol: Net avatar ID cards use the net avatar's name instead of being generic.
/:cl: