mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
[NO GBP] Fixes mapvotes spontaneously failing (#89514)
## About The Pull Request I messed up caching ## Changelog 🆑 fix: Fixed mapvotes spontaneously failing /🆑
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user