Skip to content

Commit

Permalink
add: Reason text for sentience potion (#3325)
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidPotroh authored Aug 9, 2023
1 parent d82c97f commit 813a4d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions code/controllers/subsystem/ghost_spawns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -131,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 [role_cleanname || 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] [reason?"<i>\nReason: [reason]</i>":""]</span></big>")

// Start processing it so it updates visually the timer
START_PROCESSING(SSprocessing, A)
Expand Down
12 changes: 8 additions & 4 deletions code/modules/research/xenobiology/xenobiology.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,13 @@
to_chat(user, "<span class='warning'>[src] won't work on [SM].</span>")
return ..()

var/reason_text = input(user, "Enter reason for giving sentience", "Reason for sentience potion", "") as null|text

to_chat(user, "<span class='notice'>You offer [src.name] to [SM]...</span>")
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: [reason_text]\n":""]"
var/list/candidates = SSghost_spawns.poll_candidates(ghostmsg, ROLE_SENTIENT, FALSE, 10 SECONDS, source = M, reason = reason_text)

if(!src)
return
Expand Down Expand Up @@ -301,11 +303,13 @@
to_chat(user, "<span class='warning'>[LF] совершенно безразлично смотрит на [src.name] в ваших руках.</span>")
return ..()

var/reason_text = input(user, "Enter reason for giving sentience", "Reason for sentience potion", "") as null|text

to_chat(user, "<span class='notice'>Вы предлагаете [src] [LF]... Он[genderize_ru(LF.gender, "", "а", "о", "и")] осторожно осматрива[pluralize_ru(LF.gender,"ет","ют")] его</span>")
being_used = TRUE

var/ghostmsg = "Play as [LF.name], pet of [user.name]?"
var/list/candidates = SSghost_spawns.poll_candidates(ghostmsg, ROLE_SENTIENT, FALSE, 10 SECONDS, source = M)
var/ghostmsg = "Play as [LF.name], pet of [user.name]?[reason_text? "\nReason: [reason_text]\n":""]"
var/list/candidates = SSghost_spawns.poll_candidates(ghostmsg, ROLE_SENTIENT, FALSE, 10 SECONDS, source = M, reason = reason_text)

if(!src)
return
Expand Down

0 comments on commit 813a4d7

Please sign in to comment.