Skip to content

Ability to ban subsplats - #116

Open
flleeppyy wants to merge 14 commits into
Monkestation:masterfrom
flleeppyy:banning-splats-and-clans-and-shit
Open

Ability to ban subsplats#116
flleeppyy wants to merge 14 commits into
Monkestation:masterfrom
flleeppyy:banning-splats-and-clans-and-shit

Conversation

@flleeppyy

@flleeppyy flleeppyy commented Aug 8, 2026

Copy link
Copy Markdown
Member

About The Pull Request

For the admins. This PR was for a code bounty

image image image

In addition, adds a "View notes & bans" button to the bottom of the UI since it's not something most players would know they could do. This is the same as the "View Admin remarks" verb. Does not show secret notes. obviously.

image

Why It's Good For The Game

yeh

Changelog

🆑
admin: You can now ban players from subsplats
/:cl:

@flleeppyy flleeppyy changed the title Ability to subsplats Ability to ban subsplats Aug 8, 2026

@FalloutFalcon FalloutFalcon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an arugment to be made that with the fact we will get more fera and other splats, you could save yourself alot of work by genercising code to check for "subsplats" instead of individual types (clan, tribe, auspice) and just pool them all into one big list.
The ideal code for sub-splats already is reworking them to share more behavoir and procs anyway.
Will make it simplier to fit new splats/subsplats into this code and require less copypasta to add a new one.

Comment on lines +36 to +40
// CRIMSON EDIT ADD START - SUBSPLAT_BANS
if(is_banned_from(player.ckey, player_splat_id))
job_debug("[debug_prefix] Error: [get_job_unavailable_error_message(JOB_UNAVAILABLE_BANNED, player_splat_id)], Player: [player][add_job_to_log ? ", Job: [possible_job]" : ""]")
return JOB_UNAVAILABLE_BANNED_SPLAT
// CRIMSON EDIT ADD END

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I belive this runs ban checks for EVERY job it tries to assign? Likely should be moved up before job selection?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't matter where it's moved up, itll hit it eventually because this is all a bunch of checks to see if it should decline. but im assuming you want it earlier in the chain so its the first to show, even though in tg code, bans checks do not come first.

Comment thread code/modules/mob/dead/new_player/new_player.dm Outdated
Comment thread code/modules/admin/sql_ban_system.dm Outdated
Comment thread code/modules/admin/sql_ban_system.dm
// NO, THIS IS BAD DO NOT DO THIS, i cant think of another way though because `splat_id` is defined SEPERATELY on 3 subtypes, except for one
// so i have no other choice but to check if the splat_id exists.
// by checking for splat_id this does exclude checking for a splat ban
if(preference.vars["splat_id"] && is_banned_from(usr.ckey, preference_value))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does preference.vars["splat_id"] even exist here. you dont use it and it just means clans arent checked for being banned??

@@ -0,0 +1,25 @@
/datum/preference_middleware/feature_bans/get_ui_static_data(mob/user)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemingly no similar feature for splats (not subsplats)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cause species is a different kind of preference, not a feature. i hate the naming for all the preferences stuff cause like, everything is technically a feature and preference but they make it complicated to comprehend.

"vampire_clan" = GLOB.vampire_clan_list,
)
for(var/feature in features)
for(var/creature in features[feature])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 var names.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:3

Comment on lines +174 to +175
auspice = get_fera_auspice(player.client.prefs.read_preference(/datum/preference/choiced/subsplat/fera_auspice/garou))
tribe = get_fera_tribe(player.client.prefs.read_preference(/datum/preference/choiced/subsplat/fera_tribe/garou))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcoding to the garou choices will become an issue when other changing breeds get tribes you will want to ban.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how should i go about it then? I still can't fully wrap my head around this subsplat concept.

Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com>
job_debug("[debug_prefix] Error: [get_job_unavailable_error_message(JOB_UNAVAILABLE_FERA_AUSPICE, possible_job.title)], Player: [player][add_job_to_log ? ", Job: [possible_job]" : ""]")
return JOB_UNAVAILABLE_FERA_AUSPICE
// CRIMSON EDIT ADD START - SUBSPLAT_BANS
if(possible_job.allowed_auspice && (auspice.name in possible_job.allowed_auspice) && is_banned_from(player.ckey, auspice.name))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to change line to check if they're banned regardless.

Comment on lines +36 to +40
// CRIMSON EDIT ADD START - SUBSPLAT_BANS
if(is_banned_from(player.ckey, player_splat_id))
job_debug("[debug_prefix] Error: [get_job_unavailable_error_message(JOB_UNAVAILABLE_BANNED, player_splat_id)], Player: [player][add_job_to_log ? ", Job: [possible_job]" : ""]")
return JOB_UNAVAILABLE_BANNED_SPLAT
// CRIMSON EDIT ADD END

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't matter where it's moved up, itll hit it eventually because this is all a bunch of checks to see if it should decline. but im assuming you want it earlier in the chain so its the first to show, even though in tg code, bans checks do not come first.

Comment thread code/modules/mob/dead/new_player/new_player.dm Outdated
Comment thread code/modules/admin/sql_ban_system.dm Outdated
"vampire_clan" = GLOB.vampire_clan_list,
)
for(var/feature in features)
for(var/creature in features[feature])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:3

Comment on lines +174 to +175
auspice = get_fera_auspice(player.client.prefs.read_preference(/datum/preference/choiced/subsplat/fera_auspice/garou))
tribe = get_fera_tribe(player.client.prefs.read_preference(/datum/preference/choiced/subsplat/fera_tribe/garou))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how should i go about it then? I still can't fully wrap my head around this subsplat concept.

@chazzyjazzy

Copy link
Copy Markdown
Collaborator

Warning: field access requires static type: "name"

@github-actions

Copy link
Copy Markdown

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~7 days. Please address any outstanding review items and ensure your PR is finished - if both are true, and you have auto-staled anyway, you need to actively ask maintainers (by pinging them in the /tg/station Discord) to (re)review or merge your PR. If no maintainer responds to your request, you may wish to close this PR yourself while you seek maintainer comment, as you will later be able to reopen the PR yourself.

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.

3 participants