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

Add map cooldown and min/max player configuration, saving of map cooldown state #288

Merged
merged 12 commits into from
Nov 20, 2024

Conversation

m-arcuri
Copy link
Contributor

@m-arcuri m-arcuri commented Sep 1, 2024

Adds a new values to maplist.cfg:

"cooldown"

  • Use this to configure the cooldown length of each map individually

"minPlayers"

  • Set the minimum players required to be online to nominate the map

"maxPlayers"

  • Set the maximum player limit for nominating the map

Map cooldowns are counted at the end of next map vote instead of at the end of the current one, matching the old CS:GO map manager behaviour.

Using !nominate without any arguments and without having nominated a map will instead list all maps and their cooldowns in console. If a map cannot be nominated due to Min/Max player limits, it will display this information.

Writes cooldown keyvalues to "addons/cs2fixes/configs/cooldowns.cfg" whenever map cooldowns are decremented. This file will be read when the map list is loaded to restore the remaining cooldown lengths from the previous session. If not found, all maps will start as available to nominate.

@m-arcuri m-arcuri changed the title Add map cooldown configuration and saving/loading of map cooldown state Add map cooldown and min/max player configuration, saving of map cooldown state Oct 26, 2024
Copy link
Contributor

@Vauff Vauff left a comment

Choose a reason for hiding this comment

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

Also need to remove existing nominations if player count goes out of bounds, and notify those nomination owners.

cfg/cs2fixes/cs2fixes.cfg Show resolved Hide resolved
configs/maplist.cfg.example Outdated Show resolved Hide resolved
src/map_votes.cpp Outdated Show resolved Hide resolved
src/map_votes.cpp Outdated Show resolved Hide resolved
@Vauff Vauff changed the base branch from main to mapsystem-updates November 20, 2024 16:51
@Vauff Vauff merged commit e994f77 into Source2ZE:mapsystem-updates Nov 20, 2024
3 checks passed
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