mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Convert remaining pollCandidates, remove original proc
This commit is contained in:
+2
-60
@@ -425,66 +425,8 @@
|
||||
if(pressure <= LAVALAND_EQUIPMENT_EFFECT_PRESSURE)
|
||||
. = TRUE
|
||||
|
||||
proc/pollCandidates(Question, be_special_type, antag_age_check = FALSE, poll_time = 300, ignore_respawnability = FALSE, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE)
|
||||
var/roletext = be_special_type ? get_roletext(be_special_type) : null
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/time_passed = world.time
|
||||
if(!Question)
|
||||
Question = "Would you like to be a special role?"
|
||||
|
||||
for(var/mob/dead/observer/G in (ignore_respawnability ? GLOB.player_list : GLOB.respawnable_list))
|
||||
if(!G.key || !G.client)
|
||||
continue
|
||||
if(be_special_type)
|
||||
if(!(be_special_type in G.client.prefs.be_special))
|
||||
continue
|
||||
if(antag_age_check)
|
||||
if(!player_old_enough_antag(G.client, be_special_type))
|
||||
continue
|
||||
if(roletext)
|
||||
if(jobban_isbanned(G, roletext) || jobban_isbanned(G, "Syndicate"))
|
||||
continue
|
||||
if(config.use_exp_restrictions && min_hours)
|
||||
if(G.client.get_exp_type_num(EXP_TYPE_LIVING) < min_hours * 60)
|
||||
continue
|
||||
if(check_antaghud && cannotPossess(G))
|
||||
continue
|
||||
spawn(0)
|
||||
G << 'sound/misc/notice2.ogg'//Alerting them to their consideration
|
||||
if(flashwindow)
|
||||
window_flash(G.client)
|
||||
var/ans = alert(G,Question,"Please answer in [poll_time/10] seconds!","No","Yes","Not This Round")
|
||||
if(!G?.client)
|
||||
return
|
||||
switch(ans)
|
||||
if("Yes")
|
||||
to_chat(G, "<span class='notice'>Choice registered: Yes.</span>")
|
||||
if((world.time-time_passed)>poll_time)//If more than 30 game seconds passed.
|
||||
to_chat(G, "<span class='danger'>Sorry, you were too late for the consideration!</span>")
|
||||
G << 'sound/machines/buzz-sigh.ogg'
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
to_chat(G, "<span class='danger'>Choice registered: No.</span>")
|
||||
return
|
||||
if("Not This Round")
|
||||
to_chat(G, "<span class='danger'>Choice registered: No.</span>")
|
||||
to_chat(G, "<span class='notice'>You will no longer receive notifications for the role '[roletext]' for the rest of the round.</span>")
|
||||
G.client.prefs.be_special -= be_special_type
|
||||
return
|
||||
else
|
||||
return
|
||||
sleep(poll_time)
|
||||
|
||||
//Check all our candidates, to make sure they didn't log off during the 30 second wait period.
|
||||
for(var/mob/dead/observer/G in candidates)
|
||||
if(!G.key || !G.client)
|
||||
candidates.Remove(G)
|
||||
|
||||
return candidates
|
||||
|
||||
/proc/pollCandidatesWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE)
|
||||
var/list/willing_ghosts = pollCandidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours, flashwindow, check_antaghud)
|
||||
/proc/pollCandidatesWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = FALSE, poll_time = 300, ignore_respawnability = FALSE, min_hours = FALSE, flashwindow = TRUE, check_antaghud = TRUE, source)
|
||||
var/list/willing_ghosts = SSghost_spawns.poll_candidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours, flashwindow, check_antaghud, source)
|
||||
var/list/selected_ghosts = list()
|
||||
if(!willing_ghosts.len)
|
||||
return selected_ghosts
|
||||
|
||||
@@ -40,7 +40,7 @@ SUBSYSTEM_DEF(ghost_spawns)
|
||||
* * min_hours - The amount of hours needed for a potential candidate to be eligible
|
||||
* * flash_window - Whether the poll should flash a potential candidate's game window
|
||||
* * check_antaghud - Whether to filter out potential candidates who enabled AntagHUD
|
||||
* * source - The atom or atom prototype to display as an icon in the alert
|
||||
* * source - The atom, atom prototype, icon or mutable appearance to display as an icon in the alert
|
||||
*/
|
||||
/datum/controller/subsystem/ghost_spawns/proc/poll_candidates(question = "Would you like to play a special role?", role, antag_age_check = FALSE, poll_time = 30 SECONDS, ignore_respawnability = FALSE, min_hours = 0, flash_window = TRUE, check_antaghud = TRUE, source)
|
||||
log_debug("Polling candidates [role ? "for [get_roletext(role)]" : "\"[question]\""] for [poll_time / 10] seconds")
|
||||
|
||||
@@ -104,10 +104,18 @@
|
||||
var/mob/C = null
|
||||
var/list/candidates = list()
|
||||
if(!new_overmind)
|
||||
// Create icon
|
||||
var/mutable_appearance/MA = new
|
||||
var/mutable_appearance/MA1 = new(icon, "blob")
|
||||
MA1.color = overmind ? overmind.blob_reagent_datum.color : color
|
||||
MA.overlays += MA1
|
||||
var/mutable_appearance/MA2 = new(icon, "blob_core_overlay")
|
||||
MA.overlays += MA2
|
||||
// sendit
|
||||
if(is_offspring)
|
||||
candidates = pollCandidates("Do you want to play as a blob offspring?", ROLE_BLOB, 1)
|
||||
candidates = SSghost_spawns.poll_candidates("Do you want to play as a blob offspring?", ROLE_BLOB, TRUE, source = MA)
|
||||
else
|
||||
candidates = pollCandidates("Do you want to play as a blob?", ROLE_BLOB, 1)
|
||||
candidates = SSghost_spawns.poll_candidates("Do you want to play as a blob?", ROLE_BLOB, TRUE, source = MA)
|
||||
|
||||
if(length(candidates))
|
||||
C = pick(candidates)
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
blobber.AIStatus = AI_OFF
|
||||
blobber.LoseTarget()
|
||||
spawn()
|
||||
var/list/candidates = pollCandidates("Do you want to play as a blobbernaut?", ROLE_BLOB, 1, 100)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a blobbernaut?", ROLE_BLOB, TRUE, 10 SECONDS, source = blobber)
|
||||
if(candidates.len)
|
||||
var/mob/C = pick(candidates)
|
||||
if(C)
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
src.verbs -= /mob/living/proc/guardian_reset
|
||||
for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.mob_list)
|
||||
if(G.summoner == src)
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [G.real_name]?", ROLE_GUARDIAN, 0, 100)
|
||||
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as [G.real_name]?", ROLE_GUARDIAN, FALSE, 10 SECONDS, source = G)
|
||||
var/mob/dead/observer/new_stand = null
|
||||
if(candidates.len)
|
||||
new_stand = pick(candidates)
|
||||
@@ -312,7 +312,7 @@
|
||||
used = FALSE
|
||||
return
|
||||
to_chat(user, "[use_message]")
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_GUARDIAN, 0, 100)
|
||||
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_GUARDIAN, FALSE, 10 SECONDS, source = /mob/living/simple_animal/hostile/guardian)
|
||||
var/mob/dead/observer/theghost = null
|
||||
|
||||
if(candidates.len)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/datum/event/spawn_morph/proc/get_morph()
|
||||
spawn()
|
||||
var/list/candidates = pollCandidates("Do you want to play as a morph?", ROLE_MORPH, 1)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a morph?", ROLE_MORPH, TRUE, source = /mob/living/simple_animal/hostile/morph)
|
||||
if(!candidates.len)
|
||||
key_of_morph = null
|
||||
return kill()
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
giveObjectivesandGoals()
|
||||
giveSpells()
|
||||
else
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a revenant?", poll_time = 15 SECONDS)
|
||||
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/mob/dead/observer/theghost = null
|
||||
if(candidates.len)
|
||||
theghost = pick(candidates)
|
||||
@@ -396,7 +396,7 @@
|
||||
spawn()
|
||||
if(!key_of_revenant)
|
||||
message_admins("The new revenant's old client either could not be found or is in a new, living mob - grabbing a random candidate instead...")
|
||||
var/list/candidates = pollCandidates("Do you want to play as a revenant?", ROLE_REVENANT, 1)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a revenant?", ROLE_REVENANT, TRUE, source = /mob/living/simple_animal/revenant)
|
||||
if(!candidates.len)
|
||||
qdel(R)
|
||||
message_admins("No candidates were found for the new revenant. Oh well!")
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
return
|
||||
|
||||
spawn()
|
||||
var/list/candidates = pollCandidates("Do you want to play as a revenant?", ROLE_REVENANT, 1)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a revenant?", ROLE_REVENANT, TRUE, source = /mob/living/simple_animal/revenant)
|
||||
if(!candidates.len)
|
||||
key_of_revenant = null
|
||||
return kill()
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
/mob/living/simple_animal/slaughter/cult/New()
|
||||
..()
|
||||
spawn(5)
|
||||
var/list/demon_candidates = pollCandidates("Do you want to play as a slaughter demon?", ROLE_DEMON, 1, 100)
|
||||
var/list/demon_candidates = SSghost_spawns.poll_candidates("Do you want to play as a slaughter demon?", ROLE_DEMON, TRUE, 10 SECONDS, source = /mob/living/simple_animal/slaughter/cult)
|
||||
if(!demon_candidates.len)
|
||||
visible_message("<span class='warning'>[src] disappears in a flash of red light!</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
to_chat(H, "You already used this contract!")
|
||||
return
|
||||
used = 1
|
||||
var/list/candidates = pollCandidates("Do you want to play as the wizard apprentice of [H.real_name]?", ROLE_WIZARD, 1)
|
||||
var/mutable_appearance/source = new('icons/obj/cardboard_cutout.dmi', "cutout_wizard")
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as the wizard apprentice of [H.real_name]?", ROLE_WIZARD, TRUE, source = source)
|
||||
if(candidates.len)
|
||||
var/mob/C = pick(candidates)
|
||||
new /obj/effect/particle_effect/smoke(H.loc)
|
||||
@@ -307,7 +308,8 @@ GLOBAL_LIST_EMPTY(multiverse)
|
||||
if(M.assigned == assigned)
|
||||
M.cooldown = cooldown
|
||||
|
||||
var/list/candidates = pollCandidates("Do you want to play as the wizard apprentice of [user.real_name]?", ROLE_WIZARD, 1, 100)
|
||||
var/mutable_appearance/source = new('icons/obj/cardboard_cutout.dmi', "cutout_wizard")
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as the wizard apprentice of [user.real_name]?", ROLE_WIZARD, TRUE, 10 SECONDS, source = source)
|
||||
if(candidates.len)
|
||||
var/mob/C = pick(candidates)
|
||||
spawn_copy(C.client, get_turf(user.loc), user)
|
||||
|
||||
@@ -118,7 +118,8 @@
|
||||
return FALSE
|
||||
making_mage = TRUE
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a raging Space Wizard?", ROLE_WIZARD, TRUE, poll_time = 20 SECONDS)
|
||||
var/mutable_appearance/source = new('icons/obj/cardboard_cutout.dmi', "cutout_wizard")
|
||||
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as a raging Space Wizard?", ROLE_WIZARD, TRUE, poll_time = 20 SECONDS, source = source)
|
||||
var/mob/dead/observer/harry = null
|
||||
message_admins("SWF is still pissed, sending another wizard - [max_mages - mages_made] left.")
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
break
|
||||
|
||||
if(!chosen_ghost) //Failing that, we grab a ghost
|
||||
var/list/consenting_candidates = pollCandidates("Would you like to play as a Shade?", ROLE_CULTIST, FALSE, poll_time = 100)
|
||||
var/list/consenting_candidates = SSghost_spawns.poll_candidates("Would you like to play as a Shade?", ROLE_CULTIST, FALSE, poll_time = 10 SECONDS, source = /mob/living/simple_animal/shade)
|
||||
if(consenting_candidates.len)
|
||||
chosen_ghost = pick(consenting_candidates)
|
||||
if(!T)
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
if(player_spiders && !selecting_player)
|
||||
selecting_player = 1
|
||||
spawn()
|
||||
var/list/candidates = pollCandidates("Do you want to play as a spider?", ROLE_GSPIDER, 1)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a spider?", ROLE_GSPIDER, TRUE, source = S)
|
||||
|
||||
if(candidates.len)
|
||||
var/mob/C = pick(candidates)
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
|
||||
possessed = TRUE
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, 0, 100)
|
||||
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, FALSE, 10 SECONDS, source = src)
|
||||
var/mob/dead/observer/theghost = null
|
||||
|
||||
if(candidates.len)
|
||||
|
||||
@@ -1833,7 +1833,7 @@
|
||||
var/petchoice = input("Select pet type", "Pets") as null|anything in pets
|
||||
if(isnull(petchoice))
|
||||
return
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Play as the special event pet [H]?", poll_time = 200, min_hours = 10)
|
||||
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/mob/dead/observer/theghost = null
|
||||
if(candidates.len)
|
||||
var/mob/living/simple_animal/pet/P = new petchoice(H.loc)
|
||||
@@ -3437,7 +3437,8 @@
|
||||
return
|
||||
var/datum/outfit/O = hunter_outfits[dresscode]
|
||||
message_admins("[key_name_admin(mob)] is sending a ([dresscode]) to [killthem ? "assassinate" : "protect"] [key_name_admin(H)]...")
|
||||
var/list/candidates = pollCandidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?", ROLE_TRAITOR, 1)
|
||||
var/mutable_appearance/source = new('icons/obj/cardboard_cutout.dmi', "cutout_traitor")
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?", ROLE_TRAITOR, TRUE, source = source)
|
||||
if(!candidates.len)
|
||||
to_chat(usr, "ERROR: Could not create eventmob. No valid candidates.")
|
||||
return
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
players_to_spawn += candidate
|
||||
else
|
||||
to_chat(src, "Polling candidates...")
|
||||
players_to_spawn = pollCandidates("Do you want to play as an event character?")
|
||||
players_to_spawn = SSghost_spawns.poll_candidates("Do you want to play as an event character?")
|
||||
|
||||
if(!players_to_spawn.len)
|
||||
to_chat(src, "Nobody volunteered.")
|
||||
|
||||
@@ -55,7 +55,8 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
|
||||
infiltrators += candidate
|
||||
else
|
||||
to_chat(src, "Polling candidates...")
|
||||
infiltrators = pollCandidates("Do you want to play as a SYNDICATE INFILTRATOR?", ROLE_TRAITOR, 1)
|
||||
var/mutable_appearance/ma = new('icons/mob/simple_human.dmi', "syndicate")
|
||||
infiltrators = SSghost_spawns.poll_candidates("Do you want to play as a SYNDICATE INFILTRATOR?", ROLE_TRAITOR, TRUE, source = ma)
|
||||
|
||||
if(!infiltrators.len)
|
||||
to_chat(src, "Nobody volunteered.")
|
||||
|
||||
@@ -137,7 +137,8 @@ client/proc/one_click_antag()
|
||||
var/confirm = alert("Are you sure?", "Confirm creation", "Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return 0
|
||||
var/list/candidates = pollCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard")
|
||||
var/mutable_appearance/ma = 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 Foundation 'diplomat'?", "wizard", source = ma)
|
||||
|
||||
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")
|
||||
|
||||
@@ -37,7 +37,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
|
||||
break
|
||||
|
||||
// Find ghosts willing to be DS
|
||||
var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, COMMANDOS_POSSIBLE, "Join the DeathSquad?",, 21, 600, 1, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE)
|
||||
var/mutable_appearance/source = new('icons/obj/cardboard_cutout.dmi', "cutout_deathsquad")
|
||||
var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, COMMANDOS_POSSIBLE, "Join the DeathSquad?",, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = source)
|
||||
if(!commando_ghosts.len)
|
||||
to_chat(usr, "<span class='userdanger'>Nobody volunteered to join the DeathSquad.</span>")
|
||||
return
|
||||
|
||||
@@ -45,7 +45,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
|
||||
break
|
||||
|
||||
// Find ghosts willing to be SST
|
||||
var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, SYNDICATE_COMMANDOS_POSSIBLE, "Join the Syndicate Strike Team?",, 21, 600, 1, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE)
|
||||
var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, SYNDICATE_COMMANDOS_POSSIBLE, "Join the Syndicate Strike Team?",, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE)
|
||||
if(!commando_ghosts.len)
|
||||
to_chat(usr, "<span class='userdanger'>Nobody volunteered to join the SST.</span>")
|
||||
return
|
||||
|
||||
@@ -73,7 +73,7 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
/datum/antagonist/proc/replace_banned_player()
|
||||
set waitfor = FALSE
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a [name]?", job_rank, TRUE, 50)
|
||||
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as a [name]?", job_rank, TRUE, 5 SECONDS)
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
to_chat(owner, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!")
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
checking = TRUE
|
||||
|
||||
to_chat(user, "<span class='notice'>You activate [src] and wait for confirmation.</span>")
|
||||
var/list/nuke_candidates = pollCandidates("Do you want to play as a [rolename]?", ROLE_OPERATIVE, TRUE, 150)
|
||||
var/mutable_appearance/ma = new('icons/mob/simple_human.dmi', "syndicate_space_sword")
|
||||
var/list/nuke_candidates = SSghost_spawns.poll_candidates("Do you want to play as a [rolename]?", ROLE_OPERATIVE, TRUE, 15 SECONDS, source = ma)
|
||||
if(LAZYLEN(nuke_candidates))
|
||||
checking = FALSE
|
||||
if(QDELETED(src) || !check_usability(user))
|
||||
@@ -180,7 +181,7 @@
|
||||
var/type = "slaughter"
|
||||
if(demon_type == /mob/living/simple_animal/slaughter/laughter)
|
||||
type = "laughter"
|
||||
var/list/candidates = pollCandidates("Do you want to play as a [type] demon summoned by [user.real_name]?", ROLE_DEMON, 1, 100)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a [type] demon summoned by [user.real_name]?", ROLE_DEMON, TRUE, 10 SECONDS, source = demon_type)
|
||||
|
||||
if(candidates.len > 0)
|
||||
var/mob/C = pick(candidates)
|
||||
@@ -252,7 +253,7 @@
|
||||
used = TRUE
|
||||
to_chat(user, "<span class='notice'>You break the seal on the bottle, calling upon the dire sludge to awaken...</span>")
|
||||
|
||||
var/list/candidates = pollCandidates("Do you want to play as a magical morph awakened by [user.real_name]?", ROLE_MORPH, 1, 100)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a magical morph awakened by [user.real_name]?", ROLE_MORPH, 1, 10 SECONDS, source = morph_type)
|
||||
|
||||
if(candidates.len > 0)
|
||||
var/mob/C = pick(candidates)
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
servant_mind.objectives += O
|
||||
servant_mind.transfer_to(H)
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the servant of [user.real_name]?", ROLE_WIZARD, poll_time = 300)
|
||||
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as the servant of [user.real_name]?", ROLE_WIZARD, poll_time = 30 SECONDS, source = H)
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
message_admins("[ADMIN_LOOKUPFLW(C)] was spawned as Dice Servant")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
makeAbductorTeam()
|
||||
|
||||
/datum/event/abductor/proc/makeAbductorTeam()
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you wish to be considered for an Abductor Team?", ROLE_ABDUCTOR, 1)
|
||||
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for an Abductor Team?", ROLE_ABDUCTOR, TRUE)
|
||||
|
||||
if(candidates.len >= 2)
|
||||
//Oh god why we can't have static functions
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
vents += temp_vent
|
||||
|
||||
spawn()
|
||||
var/list/candidates = pollCandidates("Do you want to play as an alien?", ROLE_ALIEN, 1)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as an alien?", ROLE_ALIEN, TRUE, source = /mob/living/carbon/alien/larva)
|
||||
|
||||
while(spawncount > 0 && vents.len && candidates.len)
|
||||
var/obj/vent = pick_n_take(vents)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
processing = FALSE //so it won't fire again in next tick
|
||||
|
||||
var/ghostmsg = "Do you want to awaken as a sentient being?"
|
||||
var/list/candidates = pollCandidates(ghostmsg, ROLE_SENTIENT, 1)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates(ghostmsg, ROLE_SENTIENT, TRUE)
|
||||
var/list/potential = list()
|
||||
var/sentience_type = SENTIENCE_ORGANIC
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/datum/event/spawn_slaughter/proc/get_slaughter(var/end_if_fail = 0)
|
||||
spawn()
|
||||
var/list/candidates = pollCandidates("Do you want to play as a slaughter demon?", ROLE_DEMON, 1)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a slaughter demon?", ROLE_DEMON, TRUE, source = /mob/living/simple_animal/slaughter)
|
||||
if(!candidates.len)
|
||||
key_of_slaughter = null
|
||||
return kill()
|
||||
|
||||
@@ -34,7 +34,7 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
|
||||
trader_objectives = forge_trader_objectives()
|
||||
|
||||
spawn()
|
||||
var/list/candidates = pollCandidates("Do you want to play as a trader?", ROLE_TRADER, 1)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a trader?", ROLE_TRADER, TRUE)
|
||||
var/index = 1
|
||||
while(spawn_count > 0 && candidates.len > 0)
|
||||
if(index > spawnlocs.len)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
return
|
||||
polling = 1
|
||||
spawn()
|
||||
var/list/candidates = pollCandidates("Do you want to play as an alien?", ROLE_ALIEN, 0)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as an alien?", ROLE_ALIEN, FALSE, source = /mob/living/carbon/alien/larva)
|
||||
var/mob/C = null
|
||||
|
||||
// To stop clientless larva, we will check that our host has a client
|
||||
|
||||
@@ -113,7 +113,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 = pollCandidates("[question]?", poll_time = 100, min_hours = minhours)
|
||||
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("[question]?", poll_time = 10 SECONDS, min_hours = minhours, source = M)
|
||||
var/mob/dead/observer/theghost = null
|
||||
|
||||
if(LAZYLEN(candidates))
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
being_used = 1
|
||||
|
||||
var/ghostmsg = "Play as [SM.name], pet of [user.name]?"
|
||||
var/list/candidates = pollCandidates(ghostmsg, ROLE_SENTIENT, 0, 100)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates(ghostmsg, ROLE_SENTIENT, FALSE, 10 SECONDS, source = M)
|
||||
|
||||
if(!src)
|
||||
return
|
||||
|
||||
@@ -63,7 +63,7 @@ GLOBAL_VAR_INIT(ert_request_answered, FALSE)
|
||||
GLOB.active_team.setSlots(commander_slots, security_slots, medical_slots, engineering_slots, janitor_slots, paranormal_slots, cyborg_slots)
|
||||
|
||||
GLOB.send_emergency_team = TRUE
|
||||
var/list/ert_candidates = shuffle(pollCandidates("Join the Emergency Response Team?",, GLOB.responseteam_age, 600, 1, GLOB.role_playtime_requirements[ROLE_ERT]))
|
||||
var/list/ert_candidates = shuffle(SSghost_spawns.poll_candidates("Join the Emergency Response Team?",, GLOB.responseteam_age, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_ERT]))
|
||||
if(!ert_candidates.len)
|
||||
GLOB.active_team.cannot_send_team()
|
||||
GLOB.send_emergency_team = FALSE
|
||||
|
||||
Reference in New Issue
Block a user