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

[TM ONLY] Early mirror of bitrunning manifest changing fix (87879) #228

Closed

Conversation

00-Steven
Copy link

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 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:
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:

@00-Steven 00-Steven changed the title horse Early mirror of bitrunning manifest changing fix (87879) Nov 13, 2024
@00-Steven 00-Steven changed the title Early mirror of bitrunning manifest changing fix (87879) [TM ONLY] Early mirror of bitrunning manifest changing fix (87879) Nov 14, 2024
@00-Steven 00-Steven closed this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant