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

Auto Voting System #1213

Merged
merged 9 commits into from
Nov 14, 2024
Merged

Auto Voting System #1213

merged 9 commits into from
Nov 14, 2024

Conversation

sleepyyapril
Copy link
Contributor

@sleepyyapril sleepyyapril commented Nov 12, 2024

Description

Contains a single system, under the server-sided AutoVote folder, that handles automatic voting of maps and presets, both of which are configurable via a CVar.

By automatic voting system, I mean that it creates a vote for map and preset the moment players return to lobby. If the server just started and there are no players, it will run the vote when a player joins to lobby.

As of now, the best use case for this is for your players to play the modes they want, at all times.

Relevant CVars:
vote.autovote_enabled - Is the autovote system enabled at all? (Default is false)
vote.map_autovote_enabled - If it is applicable, is automatic map voting enabled? (Default is true)
vote.preset_autovote_enabled - If it is applicable, is automatic preset voting enabled? (Default is true)


TODO

  • Base system
  • CVars
  • Set default CVar value to false, as it is not something you might want by default.

Changelog

🆑

  • add: Added the automatic voting system.

@sleepyyapril sleepyyapril marked this pull request as draft November 12, 2024 02:09
@github-actions github-actions bot added Changes: C# Changes any cs files Changes: YML Changes any yml files labels Nov 12, 2024
@sleepyyapril sleepyyapril marked this pull request as ready for review November 12, 2024 02:16
@Aidenkrz Aidenkrz added Priority: 4-Low Should be resolved at some point Size: 4-Small For small issues/PRs Status: Needs Review Someone please review this Type: Feature Creation of or significant changes to a feature labels Nov 12, 2024
@FoxxoTrystan FoxxoTrystan requested review from a team, VMSolidus, Aidenkrz, FoxxoTrystan, Remuchi, DEATHB4DEFEAT, Peptide90 and OldDanceJacket and removed request for a team November 12, 2024 12:34
Copy link
Member

@FoxxoTrystan FoxxoTrystan left a comment

Choose a reason for hiding this comment

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

I have a suggestion, as a CVar, make a vote for calling the crew exchange shuttle.

Near the end of the 2 hours mark.
If you dont wana do in this PR il still approve it as its looks nice and il add it personnaly later.

Content.Server/AutoVote/AutoVoteSystem.cs Outdated Show resolved Hide resolved
@sleepyyapril
Copy link
Contributor Author

I have a suggestion, as a CVar, make a vote for calling the crew exchange shuttle.

Near the end of the 2 hours mark. If you dont wana do in this PR il still approve it as its looks nice and il add it personnaly later.

Likely going to do this in a separate PR, with a start at and interval cvar.

@DEATHB4DEFEAT
Copy link
Member

I have a suggestion, as a CVar, make a vote for calling the crew exchange shuttle.
Near the end of the 2 hours mark. If you dont wana do in this PR il still approve it as its looks nice and il add it personnaly later.

Likely going to do this in a separate PR, with a start at and interval cvar.

Use some of the existing autocall stuff.

Content.Server/AutoVote/AutoVoteSystem.cs Outdated Show resolved Hide resolved
Content.Shared/CCVar/CCVars.cs Outdated Show resolved Hide resolved
sleepyyapril and others added 3 commits November 12, 2024 22:46
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
Signed-off-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com>
Co-authored-by: FoxxoTrystan <45297731+FoxxoTrystan@users.noreply.github.com>
Signed-off-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
Signed-off-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com>
@sleepyyapril
Copy link
Contributor Author

I have a suggestion, as a CVar, make a vote for calling the crew exchange shuttle.
Near the end of the 2 hours mark. If you dont wana do in this PR il still approve it as its looks nice and il add it personnaly later.

Likely going to do this in a separate PR, with a start at and interval cvar.

Use some of the existing autocall stuff.

The idea I had was to call a vote whenever the automatic shuttle call was sent.

Copy link
Member

@VMSolidus VMSolidus left a comment

Choose a reason for hiding this comment

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

I googled "c# methods for getting rid of curly braces"
And now I have a funny new tool.

Content.Server/AutoVote/AutoVoteSystem.cs Outdated Show resolved Hide resolved
This is a joke

Co-authored-by: VMSolidus <evilexecutive@gmail.com>
Signed-off-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com>
@VMSolidus VMSolidus merged commit 6b2ec00 into Simple-Station:master Nov 14, 2024
11 checks passed
sleepyyapril pushed a commit to sleepyyapril/Einstein-Engines that referenced this pull request Nov 14, 2024
@sleepyyapril sleepyyapril deleted the autovotes branch November 14, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: YML Changes any yml files Priority: 4-Low Should be resolved at some point Size: 4-Small For small issues/PRs Status: Needs Review Someone please review this Type: Feature Creation of or significant changes to a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants