mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
Added a config for map voting types.
This commit is contained in:
@@ -267,6 +267,9 @@
|
||||
|
||||
/datum/config_entry/flag/tgstyle_maprotation
|
||||
|
||||
/datum/config_entry/string/map_vote_type
|
||||
config_entry_value = "SCORE"
|
||||
|
||||
/datum/config_entry/number/maprotatechancedelta
|
||||
config_entry_value = 0.75
|
||||
min_val = 0
|
||||
|
||||
@@ -477,7 +477,15 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(CONFIG_GET(flag/tgstyle_maprotation))
|
||||
INVOKE_ASYNC(SSmapping, /datum/controller/subsystem/mapping/.proc/maprotate)
|
||||
else
|
||||
switch(CONFIG_GET(string/map_vote_type))
|
||||
if("PLURALITY")
|
||||
SSvote.initiate_vote("map","server",TRUE)
|
||||
else if("APPROVAL")
|
||||
SSvote.initiate_vote("map","server",TRUE,votesystem = APPROVAL_VOTING)
|
||||
else if("IRV")
|
||||
SSvote.initiate_vote("map","server",TRUE,votesystem = INSTANT_RUNOFF_VOTING)
|
||||
else if("SCORE")
|
||||
SSvote.initiate_vote("map","server",TRUE,votesystem = MAJORITY_JUDGEMENT_VOTING)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/HasRoundStarted()
|
||||
return current_state >= GAME_STATE_PLAYING
|
||||
|
||||
@@ -384,6 +384,15 @@ MAPROTATION
|
||||
## When it's set to zero, the map will be randomly picked each round
|
||||
ALLOW_MAP_VOTING 1
|
||||
|
||||
## Map voting type
|
||||
## Determines what kind of vote the map vote is
|
||||
## Options are:
|
||||
## PLURALITY (default, only vote for one option)
|
||||
## APPROVAL (can vote for as many as you want), I
|
||||
## IRV (vote by ranked choice, winner determined by instant runoff algorithm)
|
||||
## SCORE (give individual rankings of each choice, winner determined by majority judgement algorithm)
|
||||
MAP_VOTE_TYPE SCORE
|
||||
|
||||
## Map rotate chance delta
|
||||
## This is the chance of map rotation factored to the round length.
|
||||
## A value of 1 would mean the map rotation chance is the round length in minutes (hour long round == 60% rotation chance)
|
||||
|
||||
Reference in New Issue
Block a user