From 867da454c6049596d3728961b93c9a7e7162a1fd Mon Sep 17 00:00:00 2001 From: PhantornRU <41479614+PhantornRU@users.noreply.github.com> Date: Fri, 26 Jan 2024 03:41:35 +1000 Subject: [PATCH] Jobbaned Roles at poll_candidates (#23847) --- code/game/gamemodes/miniantags/revenant/revenant.dm | 2 +- code/game/objects/items/weapons/dice.dm | 2 +- code/modules/admin/topic.dm | 2 +- code/modules/admin/verbs/deathsquad.dm | 2 +- code/modules/admin/verbs/gimmick_team.dm | 2 +- code/modules/admin/verbs/one_click_antag.dm | 2 +- code/modules/events/spider_terror.dm | 2 +- code/modules/mob/mob_misc_procs.dm | 2 +- code/modules/response_team/ert.dm | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index a5f4d682796..51ce7317537 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -160,7 +160,7 @@ giveObjectivesandGoals() giveSpells() else - var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as a revenant?", poll_time = 15 SECONDS, source = /mob/living/simple_animal/revenant) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as a revenant?", ROLE_REVENANT, poll_time = 15 SECONDS, source = /mob/living/simple_animal/revenant) var/mob/dead/observer/theghost = null if(candidates.len) theghost = pick(candidates) diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index 998dd526021..4264a6708f4 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -293,7 +293,7 @@ servant_mind.transfer_to(H) - var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as the servant of [user.real_name]?", poll_time = 30 SECONDS, source = H) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as the servant of [user.real_name]?", ROLE_GHOST, poll_time = 30 SECONDS, source = H) if(length(candidates) && !QDELETED(H)) var/mob/dead/observer/C = pick(candidates) message_admins("[ADMIN_LOOKUPFLW(C)] was spawned as Dice Servant") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 83188ee7344..d4e15ff5b73 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1995,7 +1995,7 @@ var/petchoice = input("Select pet type", "Pets") as null|anything in pets if(isnull(petchoice)) return - var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Play as the special event pet [H]?", poll_time = 20 SECONDS, min_hours = 10, source = petchoice) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Play as the special event pet [H]?", ROLE_SENTIENT, poll_time = 20 SECONDS, min_hours = 10, source = petchoice) var/mob/dead/observer/theghost = null if(candidates.len) var/mob/living/simple_animal/pet/P = new petchoice(H.loc) diff --git a/code/modules/admin/verbs/deathsquad.dm b/code/modules/admin/verbs/deathsquad.dm index 92b35362b75..d5a635293f7 100644 --- a/code/modules/admin/verbs/deathsquad.dm +++ b/code/modules/admin/verbs/deathsquad.dm @@ -73,7 +73,7 @@ GLOBAL_VAR_INIT(deathsquad_sent, FALSE) commando_ghosts = pollCandidatesWithVeto(src, usr, commando_number, "Join the DeathSquad?",, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = source) else var/image/source = image('icons/obj/cardboard_cutout.dmi', "cutout_deathsquad") - commando_ghosts = SSghost_spawns.poll_candidates("Join the Deathsquad?",, GLOB.responseteam_age, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = source) + commando_ghosts = SSghost_spawns.poll_candidates("Join the Deathsquad?", ROLE_DEATHSQUAD, GLOB.responseteam_age, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = source) if(length(commando_ghosts) > commando_number) commando_ghosts.Cut(commando_number + 1) //cuts the ghost candidates down to the amount requested if(!length(commando_ghosts)) diff --git a/code/modules/admin/verbs/gimmick_team.dm b/code/modules/admin/verbs/gimmick_team.dm index a3d853bffd2..66750871313 100644 --- a/code/modules/admin/verbs/gimmick_team.dm +++ b/code/modules/admin/verbs/gimmick_team.dm @@ -53,7 +53,7 @@ players_to_spawn += candidate else to_chat(src, "Polling candidates...") - players_to_spawn = SSghost_spawns.poll_candidates("Do you want to play as \a [initial(O.name)]?") + players_to_spawn = SSghost_spawns.poll_candidates("Do you want to play as \a [initial(O.name)]?", ROLE_GHOST) if(!players_to_spawn.len) to_chat(src, "Nobody volunteered.") diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 89ba5e45f27..7c9ad54d969 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -137,7 +137,7 @@ if(confirm != "Yes") return 0 var/image/I = new('icons/mob/simple_human.dmi', "wizard") - var/list/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for the position of a Wizard Federation 'diplomat'?", "wizard", source = I) + var/list/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for the position of a Wizard Federation 'diplomat'?", ROLE_WIZARD, source = I) log_admin("[key_name(owner)] tried making a Wizard with One-Click-Antag") message_admins("[key_name_admin(owner)] tried making a Wizard with One-Click-Antag") diff --git a/code/modules/events/spider_terror.dm b/code/modules/events/spider_terror.dm index 51f71526d24..1f513b32ed1 100644 --- a/code/modules/events/spider_terror.dm +++ b/code/modules/events/spider_terror.dm @@ -47,7 +47,7 @@ // Strongest, only used during highpop. spider_type = /mob/living/simple_animal/hostile/poison/terror_spider/queen spawncount = 1 - var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a terror spider?", null, TRUE, source = spider_type) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a terror spider?", ROLE_TSPIDER, TRUE, source = spider_type) if(length(candidates) < spawncount) message_admins("Warning: not enough players volunteered to be terrors. Could only spawn [length(candidates)] out of [spawncount]!") var/list/vents = get_valid_vent_spawns(exclude_mobs_nearby = TRUE) diff --git a/code/modules/mob/mob_misc_procs.dm b/code/modules/mob/mob_misc_procs.dm index ffd0c1ca9c6..4fde7c26c32 100644 --- a/code/modules/mob/mob_misc_procs.dm +++ b/code/modules/mob/mob_misc_procs.dm @@ -166,7 +166,7 @@ var/question = "Do you want to play as [M.real_name ? M.real_name : M.name][M.job ? " ([M.job])" : ""]" if(alert("Do you want to show the antag status?","Show antag status","Yes","No") == "Yes") question += ", [M.mind?.special_role ? M.mind?.special_role : "No special role"]" - var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("[question]?", poll_time = 10 SECONDS, min_hours = minhours, source = M) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("[question]?", ROLE_GHOST, poll_time = 10 SECONDS, min_hours = minhours, source = M) var/mob/dead/observer/theghost = null if(length(candidates)) diff --git a/code/modules/response_team/ert.dm b/code/modules/response_team/ert.dm index 33b4895a1e3..636b57a115e 100644 --- a/code/modules/response_team/ert.dm +++ b/code/modules/response_team/ert.dm @@ -63,7 +63,7 @@ GLOBAL_LIST_EMPTY(ert_request_messages) GLOB.active_team.cyborg_security_permitted = cyborg_security GLOB.send_emergency_team = TRUE - var/list/ert_candidates = shuffle(SSghost_spawns.poll_candidates("Join the Emergency Response Team?",, GLOB.responseteam_age, 45 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_ERT])) + var/list/ert_candidates = shuffle(SSghost_spawns.poll_candidates("Join the Emergency Response Team?", ROLE_ERT, GLOB.responseteam_age, 45 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_ERT])) if(!length(ert_candidates)) GLOB.active_team.cannot_send_team() GLOB.send_emergency_team = FALSE