-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix non-ghosts and admins counting toward most followed #28120
Fix non-ghosts and admins counting toward most followed #28120
Conversation
No more admin ghost gang, damn. Also it only just hit me yeah anom cores share code with ghost follow huh? |
Yep, both use FollowerSystem. |
If you didn’t already, please do that with the ghost plushie and revenant plushies because they have the same issue |
They should be covered, but let me test and confirm that. EDIT: Confirmed. Ghost and revenant plushies don't count either. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd probably be better to just EntityQueryEnumerator<FollowerComponent, GhostComponent, ActorComponent> and then check isAdmin. Then keep a tally dictionary or something.
So, checking IsAdmin isn't great, since it excludes all admins who are ghosts, even if they're just regular ghosts and not aghosts. Unless that's desired, I'm sticking with basing it on CanGhostInteract. I did switch it over to better leverage EntityQueryEnumerator for filtering though. |
If an admin is a regular ghost and playing the game as a player then they will (on Wizden at least) run |
Should be the last two changes. Tested it and everything works. |
Co-authored-by: ShadowCommander <shadowjjt@gmail.com>
Co-authored-by: ShadowCommander <shadowjjt@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mobile edit magic
…s#28120) * Fixed non-ghosts and admins counting toward most followed * Redone to better leverage EntityQueryEnumerator * Remember to test your code before you commit it, kids * Review revisions * Update Content.Shared/Follower/FollowerSystem.cs Co-authored-by: ShadowCommander <shadowjjt@gmail.com> * Update Content.Shared/Follower/FollowerSystem.cs Co-authored-by: ShadowCommander <shadowjjt@gmail.com> * Update Content.Shared/Follower/FollowerSystem.cs * Clean up --------- Co-authored-by: ShadowCommander <shadowjjt@gmail.com> Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
About the PR
Anomaly cores and admin ghosts no longer count as followers for the purposes of the "Warp to most followed" button.
Why / Balance
Counting cores is silly. Counting admins is bad.
Fixes #28106
Fixes #27957
Technical details
Instead of using Followers.Count, the code now loops through the followers and checks for GhostComponent. To prevent counting admins, only ghosts with CanGhostInteract true are included.
Slightly less efficient since we now iterate through the followers on each followed object, but this isn't exactly a hot code path.
Media
Warping to the character with one ghost follower, ignoring the other character with more anomaly core followers:
Screen.Recording.2024-05-18.at.5.22.26.PM.mp4
The same thing, but now the one ghost is an aghost, so there is no "most followed" and no warp happens:
Screen.Recording.2024-05-18.at.5.23.17.PM.mp4
Breaking changes
Changelog
🆑