diff --git a/code/controllers/configuration/sections/vote_configuration.dm b/code/controllers/configuration/sections/vote_configuration.dm index d383748a6409d..1f83c8c7ce54a 100644 --- a/code/controllers/configuration/sections/vote_configuration.dm +++ b/code/controllers/configuration/sections/vote_configuration.dm @@ -12,12 +12,15 @@ var/disable_default_vote = TRUE /// Enable map voting? var/enable_map_voting = FALSE + /// If TRUE, you will not be able to vote for the current map + var/non_repeating_maps = TRUE /datum/configuration_section/vote_configuration/load_data(list/data) // Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line CONFIG_LOAD_BOOL(prevent_dead_voting, data["prevent_dead_voting"]) CONFIG_LOAD_BOOL(disable_default_vote, data["disable_default_vote"]) CONFIG_LOAD_BOOL(enable_map_voting, data["enable_map_voting"]) + CONFIG_LOAD_BOOL(non_repeating_maps, data["non_repeating_maps"]) CONFIG_LOAD_NUM(vote_time, data["vote_time"]) CONFIG_LOAD_NUM(autotransfer_initial_time, data["autotransfer_initial_time"]) diff --git a/code/modules/vote/vote_presets.dm b/code/modules/vote/vote_presets.dm index d6a26f3e1fc33..6dc3f7322ecca 100644 --- a/code/modules/vote/vote_presets.dm +++ b/code/modules/vote/vote_presets.dm @@ -21,8 +21,11 @@ /datum/vote/map/generate_choices() for(var/x in subtypesof(/datum/map)) var/datum/map/M = x - if(initial(M.voteable)) - choices.Add("[initial(M.fluff_name)] ([initial(M.technical_name)])") + if(!initial(M.voteable)) + continue + if(GLOB.configuration.vote.non_repeating_maps && istype(SSmapping.map_datum, M)) + continue + choices.Add("[initial(M.fluff_name)] ([initial(M.technical_name)])") /datum/vote/map/announce() ..() diff --git a/config/example/config.toml b/config/example/config.toml index 3ee08a85cf4ac..07329bd879e57 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -814,7 +814,8 @@ prevent_dead_voting = false disable_default_vote = true # Enable voting for a map on end round enable_map_voting = false - +# Set to true to prevent the same map from being voted on twice in a row +non_repeating_maps = true ################################################################