mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
Impliments a new voting system for weekends and wednesday: Hybrid FPTP weighted random from preferences (#26879)
* temporary wip * the rest of the fucking owl * Replaces Nodupes with FPTP, and wensday * ok you are still a little stupid * c-c-c-changes * Create 60-61.sql * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> * woe up to date apon thee * make that up to date * contras changes! * thanks contra! * Update code/__DEFINES/misc_defines.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> * last thing --------- Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
co-authored by
Luc
DGamerL
parent
ea2db54a3c
commit
da630e1b63
@@ -924,7 +924,20 @@
|
||||
if(ishuman(usr)) //mid-round preference changes, for aesthetics
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.remake_hud()
|
||||
if("map_pick")
|
||||
var/list/potential_maps = list()
|
||||
for(var/x in subtypesof(/datum/map))
|
||||
var/datum/map/M = x
|
||||
if(!initial(M.voteable))
|
||||
continue
|
||||
potential_maps += M
|
||||
|
||||
var/list/output = tgui_input_ranked_list(usr, "Pick a map, in order of most wanted to least. This will go on until there are no more maps left.", "Maps", potential_maps)
|
||||
if(!length(output))
|
||||
return
|
||||
map_vote_pref_json = list() //Clear it out
|
||||
for(var/index in 1 to length(output)) //This is an associated list to make blackbox tracking easier
|
||||
map_vote_pref_json[output[index]] = index
|
||||
if("tgui")
|
||||
toggles2 ^= PREFTOGGLE_2_FANCYUI
|
||||
|
||||
|
||||
Reference in New Issue
Block a user