Merge pull request #13593 from Putnam3145/add-all-vote-types-to-maps

Stringified the vote #defines for easier config stuff
This commit is contained in:
silicons
2020-10-28 07:41:35 -07:00
committed by GitHub
4 changed files with 11 additions and 22 deletions

View File

@@ -290,7 +290,7 @@
/datum/config_entry/flag/tgstyle_maprotation
/datum/config_entry/string/map_vote_type
config_entry_value = "SCORE"
config_entry_value = APPROVAL_VOTING
/datum/config_entry/number/maprotatechancedelta
config_entry_value = 0.75

View File

@@ -482,18 +482,7 @@ SUBSYSTEM_DEF(ticker)
INVOKE_ASYNC(SSmapping, /datum/controller/subsystem/mapping/.proc/maprotate)
else
var/vote_type = CONFIG_GET(string/map_vote_type)
switch(vote_type)
if("PLURALITY")
SSvote.initiate_vote("map","server", display = SHOW_RESULTS)
if("APPROVAL")
SSvote.initiate_vote("map","server", display = SHOW_RESULTS, votesystem = APPROVAL_VOTING)
if("IRV")
SSvote.initiate_vote("map","server", display = SHOW_RESULTS, votesystem = INSTANT_RUNOFF_VOTING)
if("SCORE")
SSvote.initiate_vote("map","server", display = SHOW_RESULTS, votesystem = MAJORITY_JUDGEMENT_VOTING)
else
SSvote.initiate_vote("map","server", display = SHOW_RESULTS)
// fallback
SSvote.initiate_vote("map","server", display = SHOW_RESULTS, votesystem = vote_type)
/datum/controller/subsystem/ticker/proc/HasRoundStarted()
return current_state >= GAME_STATE_PLAYING