mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Merge pull request #14207 from dearmochi/fix-ghost-poll-chat-signup
Fixes unusable "sign up" chat button, some missing icons when polling for candidates and gimmick team
This commit is contained in:
@@ -443,8 +443,8 @@
|
||||
if(pressure <= LAVALAND_EQUIPMENT_EFFECT_PRESSURE)
|
||||
. = TRUE
|
||||
|
||||
/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)
|
||||
/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, role_cleanname)
|
||||
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, role_cleanname)
|
||||
var/list/selected_ghosts = list()
|
||||
if(!willing_ghosts.len)
|
||||
return selected_ghosts
|
||||
|
||||
@@ -570,10 +570,7 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
G.ManualFollow(target)
|
||||
|
||||
/obj/screen/alert/notify_action/Topic(href, href_list)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
if(href_list["signup"] && isobserver(usr) && poll?.sign_up(usr))
|
||||
if(href_list["signup"] && poll?.sign_up(usr))
|
||||
display_signed_up()
|
||||
|
||||
/obj/screen/alert/notify_action/proc/display_signed_up()
|
||||
|
||||
@@ -41,9 +41,10 @@ SUBSYSTEM_DEF(ghost_spawns)
|
||||
* * 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, atom prototype, icon or mutable appearance to display as an icon in the alert
|
||||
* * role_cleanname - The name override to display to clients
|
||||
*/
|
||||
/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")
|
||||
/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, role_cleanname)
|
||||
log_debug("Polling candidates [role ? "for [role_cleanname || get_roletext(role)]" : "\"[question]\""] for [poll_time / 10] seconds")
|
||||
|
||||
// Start firing
|
||||
polls_active = TRUE
|
||||
@@ -130,7 +131,7 @@ SUBSYSTEM_DEF(ghost_spawns)
|
||||
if(isatom(source))
|
||||
act_jump = "<a href='?src=[M.UID()];jump=\ref[source]'>\[Teleport]</a>"
|
||||
var/act_signup = "<a href='?src=[A.UID()];signup=1'>\[Sign Up]</a>"
|
||||
to_chat(M, "<big><span class='boldnotice'>Now looking for candidates [role ? "to play as \an [get_roletext(role)]" : "\"[question]\""]. [act_jump] [act_signup]</span></big>")
|
||||
to_chat(M, "<big><span class='boldnotice'>Now looking for candidates [role ? "to play as \an [role_cleanname || get_roletext(role)]" : "\"[question]\""]. [act_jump] [act_signup]</span></big>")
|
||||
|
||||
// Start processing it so it updates visually the timer
|
||||
START_PROCESSING(SSprocessing, A)
|
||||
|
||||
@@ -3577,7 +3577,7 @@
|
||||
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/image/source = image('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)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?", ROLE_TRAITOR, TRUE, source = source, role_cleanname = "[killthem ? "murderous" : "protective"] [dresscode]")
|
||||
if(!candidates.len)
|
||||
to_chat(usr, "<span class='warning'>ERROR: Could not create eventmob. No valid candidates.</span>")
|
||||
return
|
||||
|
||||
@@ -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 [O.name]?")
|
||||
players_to_spawn = SSghost_spawns.poll_candidates("Do you want to play as \a [initial(O.name)]?")
|
||||
|
||||
if(!players_to_spawn.len)
|
||||
to_chat(src, "Nobody volunteered.")
|
||||
@@ -93,4 +93,3 @@
|
||||
feedback_add_details("admin_verb","SPAWNGIM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
|
||||
infiltrators += candidate
|
||||
else
|
||||
to_chat(src, "Polling candidates...")
|
||||
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)
|
||||
var/image/I = new('icons/obj/cardboard_cutout.dmi', "cutout_sit")
|
||||
infiltrators = SSghost_spawns.poll_candidates("Do you want to play as a Syndicate infiltrator?", ROLE_TRAITOR, TRUE, source = I, role_cleanname = "Syndicate infiltrator")
|
||||
|
||||
if(!infiltrators.len)
|
||||
to_chat(src, "Nobody volunteered.")
|
||||
|
||||
@@ -137,8 +137,8 @@
|
||||
var/confirm = alert("Are you sure?", "Confirm creation", "Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return 0
|
||||
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)
|
||||
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 Foundation 'diplomat'?", "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")
|
||||
|
||||
@@ -45,7 +45,8 @@ 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, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE)
|
||||
var/image/I = new('icons/obj/cardboard_cutout.dmi', "cutout_commando")
|
||||
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, source = I)
|
||||
if(!commando_ghosts.len)
|
||||
to_chat(usr, "<span class='userdanger'>Nobody volunteered to join the SST.</span>")
|
||||
return
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
checking = TRUE
|
||||
|
||||
to_chat(user, "<span class='notice'>You activate [src] and wait for confirmation.</span>")
|
||||
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)
|
||||
var/image/I = 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 = I)
|
||||
if(LAZYLEN(nuke_candidates))
|
||||
checking = FALSE
|
||||
if(QDELETED(src) || !check_usability(user))
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
Reference in New Issue
Block a user