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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

End Of Creating Map Votes with One/Zero Options. #70340

Merged
merged 6 commits into from Oct 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions code/datums/votes/map_vote.dm
Expand Up @@ -66,10 +66,11 @@
message = initial(message)
return TRUE

/// Before we create a vote, remove all maps from our choices that are outside of our population range. Note that this can result in zero remaining choices for our vote, which is not ideal. Let's warn users about that if it comes up.
/// Argument create_vote is typically FALSE, pass as TRUE if calling from the create_vote proc.
/// Before we create a vote, remove all maps from our choices that are outside of our population range. Note that this can result in zero remaining choices for our vote, which is not ideal (but ultimately okay).
/// Argument create_vote is typically FALSE, pass as TRUE if calling from the create_vote proc. When FALSE, we collect the default choices in a similar manner to how the create_vote() proc does it.
san7890 marked this conversation as resolved.
Show resolved Hide resolved
/// When TRUE, there's no need to collect the default choices and key it that way since create_vote() already does that in it's own proc handling, so let's avoid doing double work.
/datum/vote/map_vote/proc/check_population(create_vote = FALSE)
if(!create_vote) // We simulate the parent of create_vote here if this is called outside of the create_vote proc.
if(!create_vote)
for(var/key in default_choices)
choices[key] = 0

Expand Down