mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-08-25 05:57:21 +01:00
* Fixes maint pred spawning (#16699) Fixed maint preds spawning without placing the user inside of them. * Adds a new ghost vis blocking area flag (#16696) * Adds a new ghost vis blocking area flag * . * . * . * . * ., * . * . * . * . * . * . * . * . * . * . * some more * add admin verbs to add and remove areas * . * Fixed coffee cup storage (#16701) Fixed coffee cups not being able to be placed back in their boxes. Closes #16700 * fix multizmovement (#16702) * interlock protean hideing and resting (#16704) * Fix vents not linking to air alarms (#16706) * adds scrollbar to ore smelting (#16709) * fixes a few plane issues (#16712) * fixes a few plane issues * dme * - * Makes unabsorb chem NOT infinitely hallucinate you! (#16714) * surgery fixes (#16716) * fix rigs going permanently offline and some radio stuff (#16721) * fix rigs going permanently offline * . * also fix those * . --------- Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: tacoguy7765093 <karokaromaro@gmail.com>
57 lines
1.5 KiB
Plaintext
57 lines
1.5 KiB
Plaintext
/client/verb/vote()
|
|
set category = "OOC.Game"
|
|
set name = "Vote"
|
|
|
|
if(SSvote.active_vote)
|
|
SSvote.active_vote.tgui_interact(usr)
|
|
else
|
|
to_chat(usr, span_warning("There is no active vote"))
|
|
|
|
/client/proc/start_vote()
|
|
set category = "Admin"
|
|
set name = "Start Vote"
|
|
set desc = "Start a vote on the server"
|
|
|
|
if(!is_admin())
|
|
return
|
|
|
|
if(SSvote.active_vote)
|
|
to_chat(usr, span_warning("A vote is already in progress"))
|
|
return
|
|
|
|
var/vote_types = subtypesof(/datum/vote)
|
|
vote_types |= "\[CUSTOM]"
|
|
|
|
var/list/votemap = list()
|
|
for(var/vtype in vote_types)
|
|
votemap["[vtype]"] = vtype
|
|
|
|
var/choice = tgui_input_list(usr, "Select a vote type", "Vote", vote_types)
|
|
|
|
if(choice == null)
|
|
return
|
|
|
|
if(choice != "\[CUSTOM]")
|
|
var/datum/votetype = votemap["[choice]"]
|
|
SSvote.start_vote(new votetype(usr.ckey))
|
|
return
|
|
|
|
var/question = tgui_input_text(usr, "What is the vote for?", "Create Vote", encode = FALSE)
|
|
if(isnull(question))
|
|
return
|
|
|
|
var/list/choices = list()
|
|
for(var/i in 1 to 10)
|
|
var/option = tgui_input_text(usr, "Please enter an option or hit cancel to finish", "Create Vote", encode = FALSE)
|
|
if(isnull(option) || !usr.client)
|
|
break
|
|
choices |= option
|
|
|
|
var/c2 = tgui_alert(usr, "Show counts while vote is happening?", "Counts", list("Yes", "No"))
|
|
var/c3 = input(usr, "Select a result calculation type", "Vote", VOTE_RESULT_TYPE_MAJORITY) as anything in list(VOTE_RESULT_TYPE_MAJORITY)
|
|
|
|
var/datum/vote/V = new /datum/vote(usr.ckey, question, choices, TRUE)
|
|
V.show_counts = (c2 == "Yes")
|
|
V.vote_result_type = c3
|
|
SSvote.start_vote(V)
|