Skip to content

Improve code duplication in patron checks#4543

Closed
noelle-lavenza wants to merge 1 commit intoMonkestation:mainfrom
noelle-lavenza:vander-fix/patron-dupe
Closed

Improve code duplication in patron checks#4543
noelle-lavenza wants to merge 1 commit intoMonkestation:mainfrom
noelle-lavenza:vander-fix/patron-dupe

Conversation

@noelle-lavenza
Copy link

creates a player_humans_by_patron that gets all humans with clients (e.g. in the player list) with a given patron. this was repeated a lot in event code so i figured i'd make a helper for it. by default it excludes dead mobs.
this lets us replace some loops entirely and in others we use it to filter before applying additional checks (like nobility, species, etc).
also makes follower count checks use GLOB.patron_follower_counts. technically that only updates every two seconds but it should by synchronised with the event stuff so that'll be fiiiiine probably maybe
untested

@noelle-lavenza noelle-lavenza marked this pull request as draft December 26, 2025 02:19
@CheffieGithub
Copy link
Collaborator

open if finish

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.

2 participants