diff --git a/code/controllers/subsystem/map_vote.dm b/code/controllers/subsystem/map_vote.dm index 0e0aea03905..6b0495613ea 100644 --- a/code/controllers/subsystem/map_vote.dm +++ b/code/controllers/subsystem/map_vote.dm @@ -114,7 +114,7 @@ SUBSYSTEM_DEF(map_vote) filter_threshold = length(GLOB.clients) if(filter_threshold == player_cache) - return + return null player_cache = filter_threshold var/list/valid_maps = list() diff --git a/code/datums/votes/map_vote.dm b/code/datums/votes/map_vote.dm index 2dba69d42a9..08f792d291d 100644 --- a/code/datums/votes/map_vote.dm +++ b/code/datums/votes/map_vote.dm @@ -9,7 +9,9 @@ default_choices = SSmap_vote.get_valid_map_vote_choices() /datum/vote/map_vote/create_vote() - default_choices = SSmap_vote.get_valid_map_vote_choices() + var/list/new_choices = SSmap_vote.get_valid_map_vote_choices() + if (new_choices) + default_choices = new_choices . = ..() if(!.) return FALSE @@ -41,7 +43,9 @@ if(SSmap_vote.next_map_config) return "The next map has already been selected." - default_choices = SSmap_vote.get_valid_map_vote_choices() + var/list/new_choices = SSmap_vote.get_valid_map_vote_choices() + if (new_choices) + default_choices = new_choices var/num_choices = length(default_choices) if(num_choices <= 1) return "There [num_choices == 1 ? "is only one map" : "are no maps"] to choose from."