Rocking The Boat, er, Map Vote (#69561)

* Rocking The Boat, er, Map Vote

Hey there,

A while ago, I spooke (typo intentional) to some other people. One frustration I heard was the fact that people would sometimes sneak through map votes during the very start of a shift, during a high-paced portion, or just as a meme. People in OOC would then flood the vote, putting in any given station. However, if a vote happens 10 minutes in- and the round goes for 70 minutes and not many of the original players are around, then it's not particularly fair to those who have to play next shift on a map they bemoan.

So, we can rock the vote! If a player isn't particularly chuffed with the hand they are given, they can poll the players to see if they want to change the map as well. If rocking the vote goes through, huzzah, you get the ability to vote for the map again. If it doesn't go through: tough luck. You can rock the vote one time per shift by default, and server operators can change the amount of times you can call to rock the map vote at their discretion. Calling to rock the vote either successfully or non-successfully counts as a "call", and when that limit is exceeded: no more calls.

Does this mean that we will only rotate between two maps because pissants will keep rocking the vote until they get what they like? Maybe? I still see people bemoan getting Tram or shit the bed over IceBox, but I think enough people get sick of bread-on-butter to take the server where it need to go. If operators don't really like seeing only two maps play, they can always adjust the config to ensure it doesn't happen.

* makes the grammar grammar

it would be "Rock the Vote vote" otherwise
This commit is contained in:
san7890
2022-09-06 11:06:01 +12:00
committed by GitHub
parent 4a024e5703
commit 3b2cf65d59
8 changed files with 112 additions and 3 deletions
+3 -1
View File
@@ -13,6 +13,8 @@
var/vote_sound = 'sound/misc/bloop.ogg'
/// A list of default choices we have for this vote.
var/list/default_choices
/// Does the name of this vote contain the word "vote"?
var/contains_vote_in_name = FALSE
// Internal values used when tracking ongoing votes.
// Don't mess with these, change the above values / override procs for subtypes.
@@ -103,7 +105,7 @@
started_time = world.time
time_remaining = round(duration / 10)
return "[capitalize(name)] vote started by [initiator || "Central Command"]."
return "[contains_vote_in_name ? "[capitalize(name)]" : "[capitalize(name)] vote"] started by [initiator || "Central Command"]."
/**
* Gets the result of the vote.
+5
View File
@@ -48,6 +48,9 @@
if(forced)
return TRUE
if(SSmapping.map_vote_rocked)
return TRUE
if(!CONFIG_GET(flag/allow_vote_map))
if(by_who)
to_chat(by_who, span_warning("Map voting is disabled."))
@@ -85,3 +88,5 @@
SSmapping.changemap(winning_map)
SSmapping.map_voted = TRUE
if(SSmapping.map_vote_rocked)
SSmapping.map_vote_rocked = FALSE
+80
View File
@@ -0,0 +1,80 @@
#define CHOICE_TO_ROCK "Yes, re-do the map vote."
#define CHOICE_NOT_TO_ROCK "No, keep the currently selected map."
/// If a map vote is called before the emergency shuttle leaves the station, the players can call another vote to re-run the vote on the shuttle leaving.
/datum/vote/rock_the_vote
name = "Rock the Vote"
override_question = "Rock the Vote?"
contains_vote_in_name = TRUE //lol
default_choices = list(
CHOICE_TO_ROCK,
CHOICE_NOT_TO_ROCK,
)
/// The number of times we have rocked the vote thus far.
var/rocking_votes = 0
/datum/vote/rock_the_vote/toggle_votable(mob/toggler)
if(!toggler)
CRASH("[type] wasn't passed a \"toggler\" mob to toggle_votable.")
if(!check_rights_for(toggler.client, R_ADMIN))
return FALSE
CONFIG_SET(flag/allow_rock_the_vote, !CONFIG_GET(flag/allow_rock_the_vote))
return TRUE
/datum/vote/rock_the_vote/is_config_enabled()
return CONFIG_GET(flag/allow_rock_the_vote)
/datum/vote/rock_the_vote/can_be_initiated(mob/by_who, forced)
. = ..()
if(!.)
return FALSE
if(!forced && !CONFIG_GET(flag/allow_rock_the_vote))
if(by_who)
to_chat(by_who, span_warning("Rocking the vote is disabled by this server's configuration settings."))
return FALSE
if(SSticker.current_state == GAME_STATE_FINISHED)
if(by_who)
to_chat(by_who, span_warning("The game is finished, no map votes can be initiated."))
return FALSE
if(rocking_votes >= CONFIG_GET(number/max_rocking_votes))
if(by_who)
to_chat(by_who, span_warning("You have rocked the vote the maximum number of times."))
return FALSE
if(SSmapping.map_vote_rocked)
if(by_who)
to_chat(by_who, span_warning("The vote has already been rocked! Initiate a map vote!"))
return FALSE
if(!SSmapping.map_voted)
if(by_who)
to_chat(by_who, span_warning("Rocking the vote is disabled because no map has been voted on yet!"))
return FALSE
if(SSmapping.map_force_chosen)
if(by_who)
to_chat(by_who, span_warning("Rocking the vote is disabled because an admin has forcibly set the map!"))
return FALSE
return TRUE
/datum/vote/rock_the_vote/finalize_vote(winning_option)
rocking_votes++
if(winning_option == CHOICE_NOT_TO_ROCK)
return
if(winning_option == CHOICE_TO_ROCK)
to_chat(world, span_boldannounce("The vote has been rocked! Players are now able to re-run the map vote once more."))
message_admins("The players have successfully rocked the vote.")
SSmapping.map_vote_rocked = TRUE
return
CRASH("[type] wasn't passed a valid winning choice. (Got: [winning_option || "null"])")
#undef CHOICE_TO_ROCK
#undef CHOICE_NOT_TO_ROCK