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

[EXPERIMENTAL] [UPSTREAM] Antag Preferences and Bans Rewrite #2488

Merged
merged 24 commits into from
Dec 15, 2023

Conversation

Bobbanz1
Copy link
Contributor

About The Pull Request

FIRST OF ALL
This seriously needs an Experimental testing because I don't know what might have broken or not

Secondly:
This PR ports the following PR from Upstream at the request of ta3370 in the NSV13 Discord server:

What that PR does is it allows for antagonist preferences to be tied to the player character itself rather than the client, what this means is that you can have one character set to be able to roll traitor and have another character have it set to disabled without having to manually change it every single round you swap between the two characters.

That PR does some other stuff but I think that was the primary reason why Ta wanted it ported.

Also this branch is forked off from this PR so it contains everything that was changed in that one as well, this is to prevent merge conflicts in the future and having to re-arrange the damn preference file again!

Why It's Good For The Game

Antag Preferences tied to characters, rather than client!

Testing Photographs and Procedure

Screenshots&Videos
2023-07-26.20-23-22.mp4

Changelog

🆑itsmeow, EvilDragonfiend
add: All non-ghost role antagonist preferences are now per-character. Global toggle buttons toggle the preference on all characters at once.
refactor: Rewrote antag preference internals to allow for better control of antag preferences and more distinct usages.
refactor: Cleaned up antag bans, with more distinct settings and new general categories.
tweak: All antag prefs will start on by default rather than off. The same applies to newly added ones.
fix: Fixed various antag bans being bypassable.
fix: Fixed various ghost polls using the wrong preference or ban types.
del: Removed BYOND account age checks from antag roles in favor of living hours.
del: Removed "Midround Antagonist" preference in favor of unique preferences per midround.
add: Added distinct role preferences for Antagonists (Roundstart/Latejoin) and Midrounds (Ghost/Living).
add: Almost all ghost antagonist polls have a "Never for this round" option now.
del: Removed the ghost notification preferences menu (poll ignore menu).
tweak: The lavaland beach bartender can now speak Stoner.
del: Removed some unused mob spawners from the code.
add: Added 4hr playtime checks to roundstart/latejoin antag roles. Wizard and nukeops are 8hr.
fix: Fixed a typo in the skeleton spawner description.
fix: Fixed unnecessary DB queries due to is_banned_from not properly ckey-ifying the ckey parameter and causing cache misses.
/:cl:

@Bokkiewokkie Bokkiewokkie added Experimental Test Candidate This PR is likely to be featured in an experimental test before being (test)merged on the server. Update PRs that pull updates from upstream labels Jul 28, 2023
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Bokkiewokkie
Bokkiewokkie previously approved these changes Oct 6, 2023
Copy link
Contributor

@Bokkiewokkie Bokkiewokkie left a comment

Choose a reason for hiding this comment

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

We ball

@someone543
Copy link
Contributor

Capture

Ghost controlled ships seem to be missing here

@Bobbanz1
Copy link
Contributor Author

Bobbanz1 commented Nov 7, 2023

Capture

Ghost controlled ships seem to be missing here

Huh…hmmm, I’ll take a look later today

@EvilDragonfiend
Copy link
Member

Capture
Ghost controlled ships seem to be missing here

Huh…hmmm, I’ll take a look later today

I don't know NSV roles, but if it's ghost free-spawn role like askwalker or lavaland roles, it's correct. If not, try to track /datum/role_preference/midround_ghost

Might have broken ghost ships as the stop observe button causes a runtime error for them.
@Bobbanz1
Copy link
Contributor Author

Bobbanz1 commented Nov 9, 2023

Capture

Ghost controlled ships seem to be missing here

Right, I've fixed this issue now.

@Bobbanz1 Bobbanz1 requested a review from Bokkiewokkie November 9, 2023 07:30
@Bobbanz1
Copy link
Contributor Author

Bobbanz1 commented Nov 9, 2023

Might have created a new problem although I'm not so sure, was the Stop Observe button there before for ghost ships or is that now recent, since pressing it just causes a runtime error and breaks stuff.

@Bokkiewokkie
Copy link
Contributor

Bokkiewokkie commented Nov 10, 2023

Might have created a new problem although I'm not so sure, was the Stop Observe button there before for ghost ships or is that now recent, since pressing it just causes a runtime error and breaks stuff.

They shouldn't need one and I don't remember there being one... how did it get there though 🤔

I'm also not seeing boarders in the midround list yet

@Bobbanz1
Copy link
Contributor Author

Might have created a new problem although I'm not so sure, was the Stop Observe button there before for ghost ships or is that now recent, since pressing it just causes a runtime error and breaks stuff.

They shouldn't need one and I don't remember there being one... how did it get there though 🤔

I'm also not seeing boarders in the midround list yet

Was boarders even in the game preferences originally?

@Bobbanz1
Copy link
Contributor Author

Boarders weren't an original setting to be toggled on or off like the rest of these were, I could include them if you want though?

@Bokkiewokkie
Copy link
Contributor

Boarders weren't an original setting to be toggled on or off like the rest of these were, I could include them if you want though?

Messed up but yeah I would like them in there

covertcorvid
covertcorvid previously approved these changes Nov 19, 2023
@Bokkiewokkie Bokkiewokkie merged commit 2a7d3c7 into BeeStation:master Dec 15, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Active Test Merge Administration Config Update Experimental Test Candidate This PR is likely to be featured in an experimental test before being (test)merged on the server. SQL TGUI-Changes Update PRs that pull updates from upstream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants