From fb2a51da53be5bddf262f6269142d77ee29f163e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B8=D1=80=D0=BE=D1=82=D0=BA=D0=B0?= <114731039+ErdGinalD@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:16:30 +0300 Subject: [PATCH] Reason text for sentience potion (#23139) * Reason text for sentience potion * Update code/controllers/subsystem/SSghost_spawns.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/modules/research/xenobiology/xenobiology.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/controllers/subsystem/SSghost_spawns.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --------- Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --- code/controllers/subsystem/SSghost_spawns.dm | 4 ++-- code/modules/research/xenobiology/xenobiology.dm | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/controllers/subsystem/SSghost_spawns.dm b/code/controllers/subsystem/SSghost_spawns.dm index 05cd2567f44..25415b6ab61 100644 --- a/code/controllers/subsystem/SSghost_spawns.dm +++ b/code/controllers/subsystem/SSghost_spawns.dm @@ -43,7 +43,7 @@ SUBSYSTEM_DEF(ghost_spawns) * * 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, role_cleanname) +/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, reason) log_debug("Polling candidates [role ? "for [role_cleanname || get_roletext(role)]" : "\"[question]\""] for [poll_time / 10] seconds") // Start firing @@ -132,7 +132,7 @@ SUBSYSTEM_DEF(ghost_spawns) if(isatom(source)) act_jump = "\[Teleport]" var/act_signup = "\[Sign Up]" - to_chat(M, "Now looking for candidates [role ? "to play as \an [role_cleanname || get_roletext(role)]" : "\"[question]\""]. [act_jump] [act_signup]") + to_chat(M, "Now looking for candidates [role ? "to play as \an [role_cleanname || get_roletext(role)]" : "\"[question]\""]. [act_jump] [act_signup] [reason ? "\nReason: [sanitize(reason)]" : ""]") // Start processing it so it updates visually the timer START_PROCESSING(SSprocessing, A) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index b2d11efbd68..5fc2fb6b8b8 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -228,11 +228,12 @@ explosion(T, -1, -1, 2, 3) qdel(src) return + var/reason_text = input(user, "Enter reason for giving sentience", "Reason for sentience potion", "") as null|text to_chat(user, "You offer [src] sentience potion to [SM]...") being_used = TRUE - var/ghostmsg = "Play as [SM.name], pet of [user.name]?" - var/list/candidates = SSghost_spawns.poll_candidates(ghostmsg, ROLE_SENTIENT, FALSE, 10 SECONDS, source = M) + var/ghostmsg = "Play as [SM.name], pet of [user.name]?[reason_text ? "\nReason: [sanitize(reason_text)]\n" : ""]" + var/list/candidates = SSghost_spawns.poll_candidates(ghostmsg, ROLE_SENTIENT, FALSE, 10 SECONDS, source = M, reason = reason_text) if(QDELETED(src) || QDELETED(SM)) return