mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-03 13:32:17 +00:00
## About The Pull Request
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 calls `replace_records_name(avatar.real_name,
alias)`, which proceeds to override the first record named
`avatar.real_name` with `alias`.
It also potentially screws with people's objectives for anyone with that
name.
As the documentation for this proc says:
7b9d4d0f94/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.
/🆑