mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
[READY] TGUI Input Collection (#23891)
* List Input refresh * Modal Alerts * Text Input * Number Input * Split Button * Renaming * Alert converts * Text Input Conversion (Part 1) And TextArea Autofocus + maxLength * Text Input Conversion (Part 2) * AAAAAAAAAAAAAAAAAAAA * I'm FUCKED * @GDNgit review changes * "'" fixes * Revert TGUI Alert from admin delete * NumberInput Window size * CRASH if empty list * Update code/modules/tgui/tgui_input/list_input.dm * TGUI Rebuild * TGUI Rebuild * Update code/modules/paperwork/faxmachine.dm * _char * compile * Rebuild --------- Co-authored-by: Aylong <69762909+Aylong220@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
@@ -229,7 +229,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(warningmsg)
|
||||
var/response
|
||||
var/alertmsg = "Are you -sure- you want to ghost?\n([warningmsg]. If you ghost now, you probably won't be able to rejoin the round! You can't change your mind, so choose wisely!)"
|
||||
response = alert(src, alertmsg,"Are you sure you want to ghost?","Stay in body","Ghost")
|
||||
response = tgui_alert(src, alertmsg, "Ghost", list("Stay in body", "Ghost"))
|
||||
if(response != "Ghost")
|
||||
return
|
||||
|
||||
@@ -398,7 +398,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(src, "<span class='warning'>Your body is still alive!</span>")
|
||||
return
|
||||
|
||||
var/choice = alert(src, "If you enable this, your body will be unrevivable for the remainder of the round.", "Are you sure?", "Yes", "No")
|
||||
var/choice = tgui_alert(src, "If you enable this, your body will be unrevivable for the remainder of the round.", "Do Not Revive!", list("Yes", "No"))
|
||||
if(choice == "Yes")
|
||||
to_chat(src, "<span class='boldnotice'>Do Not Revive state enabled.</span>")
|
||||
create_log(MISC_LOG, "DNR Enabled")
|
||||
|
||||
@@ -764,7 +764,7 @@
|
||||
if(href_list["secrecordadd"])
|
||||
if(usr.incapacitated() || !hasHUD(usr, EXAMINE_HUD_SECURITY_WRITE))
|
||||
return
|
||||
var/raw_input = input("Add Comment:", "Security records", null, null) as message
|
||||
var/raw_input = tgui_input_text(usr, "Add Comment:", "Security records", multiline = TRUE, encode = FALSE)
|
||||
var/sanitized = copytext(trim(sanitize(raw_input)), 1, MAX_MESSAGE_LEN)
|
||||
if(!sanitized || usr.stat || usr.restrained() || !hasHUD(usr, EXAMINE_HUD_SECURITY_WRITE))
|
||||
return
|
||||
@@ -865,7 +865,7 @@
|
||||
if(href_list["medrecordadd"])
|
||||
if(usr.incapacitated() || !hasHUD(usr, EXAMINE_HUD_MEDICAL_WRITE))
|
||||
return
|
||||
var/raw_input = input("Add Comment:", "Medical records", null, null) as message
|
||||
var/raw_input = tgui_input_text(usr, "Add Comment:", "Medical records", multiline = TRUE, encode = FALSE)
|
||||
var/sanitized = copytext(trim(sanitize(raw_input)), 1, MAX_MESSAGE_LEN)
|
||||
if(!sanitized || usr.stat || usr.restrained() || !hasHUD(usr, EXAMINE_HUD_MEDICAL_WRITE))
|
||||
return
|
||||
@@ -1505,7 +1505,7 @@
|
||||
|
||||
var/max_length = bloody_hands * 30 //tweeter style
|
||||
|
||||
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
|
||||
var/message = tgui_input_text(src, "Write a message. It cannot be longer than [max_length] characters.", "Blood writing", max_length = max_length)
|
||||
if(origin != loc)
|
||||
to_chat(src, "<span class='notice'>Stay still while writing!</span>")
|
||||
return
|
||||
@@ -2145,7 +2145,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
if(stat)
|
||||
return
|
||||
|
||||
pose = sanitize(copytext(input(usr, "This is [src]. [p_they(TRUE)]...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
|
||||
pose = tgui_input_text(usr, "This is [src]. [p_they(TRUE)]...", "Pose")
|
||||
|
||||
/mob/living/carbon/human/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
to_chat(src, "<span class='warning'>You are unable to succumb to death! This life continues!</span>")
|
||||
return
|
||||
|
||||
var/last_words = input(src, "Do you have any last words?", "Goodnight, Sweet Prince") as text|null
|
||||
var/last_words = tgui_input_text(src, "Do you have any last words?", "Goodnight, Sweet Prince", encode = FALSE)
|
||||
|
||||
if(stat == DEAD)
|
||||
// cancel em out if they died while they had the message box up
|
||||
|
||||
@@ -416,9 +416,9 @@
|
||||
to_chat(user, "<span class='boldwarning'>You cannot send IC messages (muted).</span>")
|
||||
return FALSE
|
||||
else if(!params)
|
||||
custom_emote = copytext(sanitize(input("Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN)
|
||||
custom_emote = tgui_input_text(user, "Choose an emote to display.", "Custom Emote")
|
||||
if(custom_emote && !check_invalid(user, custom_emote))
|
||||
var/type = input("Is this a visible or hearable emote?") as null|anything in list("Visible", "Hearable")
|
||||
var/type = tgui_alert(user, "Is this a visible or hearable emote?", "Custom Emote", list("Visible", "Hearable"))
|
||||
switch(type)
|
||||
if("Visible")
|
||||
custom_emote_type = EMOTE_VISIBLE
|
||||
|
||||
@@ -571,7 +571,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
to_chat(src, "<span class='warning'>Please allow one minute to pass between announcements.</span>")
|
||||
return
|
||||
|
||||
var/input = input(usr, "Please write a message to announce to the station crew.", "A.I. Announcement") as message|null
|
||||
var/input = tgui_input_text(usr, "Please write a message to announce to the station crew.", "A.I. Announcement", multiline = TRUE, encode = FALSE)
|
||||
if(!input)
|
||||
return
|
||||
|
||||
@@ -588,7 +588,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
if(check_unable(AI_CHECK_WIRELESS))
|
||||
return
|
||||
|
||||
var/input = input("Please enter the reason for calling the shuttle.", "Shuttle Call Reason.") as null|message
|
||||
var/input = tgui_input_text(src, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason", multiline = TRUE, encode = FALSE)
|
||||
if(!input || stat)
|
||||
return
|
||||
|
||||
@@ -606,7 +606,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
if(check_unable(AI_CHECK_WIRELESS))
|
||||
return
|
||||
|
||||
var/confirm = alert("Are you sure you want to recall the shuttle?", "Confirm Shuttle Recall", "Yes", "No")
|
||||
var/confirm = tgui_alert(src, "Are you sure you want to recall the shuttle?", "Confirm Shuttle Recall", list("Yes", "No"))
|
||||
|
||||
if(check_unable(AI_CHECK_WIRELESS))
|
||||
return
|
||||
@@ -1007,7 +1007,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
custom_hologram = TRUE
|
||||
|
||||
var/input
|
||||
switch(alert("Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,"Crew Member","Unique","Animal"))
|
||||
switch(tgui_alert(usr, "Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?", "Change Hologram", list("Crew Member", "Unique", "Animal")))
|
||||
if("Crew Member")
|
||||
var/personnel_list[] = list()
|
||||
|
||||
@@ -1234,13 +1234,12 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
set desc = "Change the message that's transmitted when a new crew member arrives on station."
|
||||
set category = "AI Commands"
|
||||
|
||||
var/newmsg = clean_input("What would you like the arrival message to be? List of options: $name, $rank, $species, $gender, $age", "Change Arrival Message", arrivalmsg)
|
||||
if(!newmsg)
|
||||
var/newmsg = tgui_input_text(usr, "What would you like the arrival message to be? List of options: $name, $rank, $species, $gender, $age", "Change Arrival Message", arrivalmsg, encode = FALSE)
|
||||
if(!newmsg || newmsg == arrivalmsg)
|
||||
return
|
||||
newmsg = html_decode(newmsg) // This feels a bit redundant, but sanitisation is (probably) important.
|
||||
if(newmsg != arrivalmsg)
|
||||
arrivalmsg = newmsg
|
||||
to_chat(usr, "The arrival message has been successfully changed.")
|
||||
|
||||
arrivalmsg = newmsg
|
||||
to_chat(usr, "The arrival message has been successfully changed.")
|
||||
|
||||
// Handled camera lighting, when toggled.
|
||||
// It will get the nearest camera from the eyeobj, lighting it.
|
||||
@@ -1444,7 +1443,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
A = D
|
||||
|
||||
if(istype(A))
|
||||
switch(alert(src, "Do you want to open \the [A] for [target]?", "Doorknob_v2a.exe", "Yes", "No"))
|
||||
switch(tgui_alert(src, "Do you want to open \the [A] for [target]?", "Doorknob_v2a.exe", list("Yes", "No")))
|
||||
if("Yes")
|
||||
if(!A.density)
|
||||
to_chat(src, "<span class='notice'>[A] was already opened.</span>")
|
||||
|
||||
@@ -109,7 +109,7 @@ GLOBAL_VAR_INIT(announcing_vox, 0) // Stores the time of the last announcement
|
||||
to_chat(src, "<span class='warning'>Please wait [round((GLOB.announcing_vox - world.time) / 10)] seconds.</span>")
|
||||
return
|
||||
|
||||
var/message = clean_input("WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", last_announcement, src)
|
||||
var/message = tgui_input_text(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", last_announcement)
|
||||
|
||||
last_announcement = message
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ GLOBAL_LIST_EMPTY(empty_playable_ai_cores)
|
||||
set desc = "Wipe your core. This is functionally equivalent to cryo or robotic storage, freeing up your job slot."
|
||||
|
||||
// Guard against misclicks, this isn't the sort of thing we want happening accidentally
|
||||
if(alert("WARNING: This will immediately wipe your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?",
|
||||
"Wipe Core", "No", "No", "Yes") != "Yes")
|
||||
if(tgui_alert(usr, "WARNING: This will immediately wipe your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", "Wipe Core", list("No", "Yes")) != "Yes")
|
||||
return
|
||||
cryo_AI()
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
var/mob/living/carbon/human/H = over_object //changed to human to avoid stupid issues like xenos holding pAIs.
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
if(usr == src)
|
||||
switch(alert(H, "[src] wants you to pick [p_them()] up. Do it?",,"Yes","No"))
|
||||
switch(tgui_alert(H, "[src] wants you to pick [p_them()] up. Do it?", "Pick up", list("Yes", "No")))
|
||||
if("Yes")
|
||||
if(Adjacent(H))
|
||||
get_scooped(H)
|
||||
|
||||
@@ -69,23 +69,32 @@ GLOBAL_DATUM_INIT(paiController, /datum/paiController, new) // Global handler fo
|
||||
|
||||
switch(option)
|
||||
if("name")
|
||||
t = input("Enter a name for your pAI", "pAI Name", candidate.pai_name) as text
|
||||
if(t)
|
||||
candidate.pai_name = sanitize(copytext(t,1,MAX_NAME_LEN))
|
||||
t = tgui_input_text(usr, "Enter a name for your pAI", "pAI Name", candidate.pai_name, MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
candidate.pai_name = t
|
||||
|
||||
if("desc")
|
||||
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
|
||||
if(t)
|
||||
candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
t = tgui_input_text(usr, "Enter a description for your pAI", "pAI Description", candidate.description, multiline = TRUE)
|
||||
if(!t)
|
||||
return
|
||||
candidate.description = t
|
||||
|
||||
if("role")
|
||||
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
|
||||
if(t)
|
||||
candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
t = tgui_input_text(usr, "Enter a role for your pAI", "pAI Role", candidate.role)
|
||||
if(!t)
|
||||
return
|
||||
candidate.role = t
|
||||
|
||||
if("ooc")
|
||||
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.ooc_comments) as message
|
||||
if(t)
|
||||
candidate.ooc_comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
t = tgui_input_text(usr, "Enter any OOC comments", "pAI OOC Comments", candidate.ooc_comments, multiline = TRUE)
|
||||
if(!t)
|
||||
return
|
||||
candidate.ooc_comments = t
|
||||
|
||||
if("save")
|
||||
candidate.save_to_db(usr)
|
||||
|
||||
if("reload")
|
||||
candidate.reload_save(usr)
|
||||
//In case people have saved unsanitized stuff.
|
||||
@@ -368,12 +377,12 @@ GLOBAL_DATUM_INIT(paiController, /datum/paiController, new) // Global handler fo
|
||||
if(!C) return
|
||||
asked.Add(C.key)
|
||||
asked[C.key] = world.time
|
||||
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
|
||||
var/response = tgui_alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", list("Yes", "No", "Never for this round"))
|
||||
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
|
||||
if(response == "Yes")
|
||||
recruitWindow(C.mob)
|
||||
else if(response == "Never for this round")
|
||||
var/warning = alert(C, "Are you sure? This action will be undoable and you will need to wait until next round.", "You sure?", "Yes", "No")
|
||||
var/warning = tgui_alert(C, "Are you sure? This action will be undoable and you will need to wait until next round.", "You sure?", list("Yes", "No"))
|
||||
if(warning == "Yes")
|
||||
asked[C.key] = INFINITY
|
||||
else
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
return
|
||||
|
||||
// Check the carrier
|
||||
var/answer = alert(M, "[pai_holder] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[pai_holder] Check DNA", "Yes", "No")
|
||||
var/answer = tgui_alert(M, "[pai_holder] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[pai_holder] Check DNA", list("Yes", "No"))
|
||||
if(answer == "Yes")
|
||||
M.visible_message("<span class='notice'>[M] presses [M.p_their()] thumb against [pai_holder].</span>", "<span class='notice'>You press your thumb against [pai_holder].</span>")
|
||||
var/datum/dna/dna = M.dna
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
to_chat(usr, "<span class='warning'>You must wait 10 minutes to respawn as a drone!</span>")
|
||||
return
|
||||
|
||||
if(alert("Are you sure you want to respawn as a drone?", "Are you sure?", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Are you sure you want to respawn as a drone?", "Are you sure?", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/drone_fabricator/DF in GLOB.machines)
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
return
|
||||
|
||||
else
|
||||
var/confirm = alert("Using your ID on a Maintenance Drone will shut it down, are you sure you want to do this?", "Disable Drone", "Yes", "No")
|
||||
var/confirm = tgui_alert(user, "Using your ID on a Maintenance Drone will shut it down, are you sure you want to do this?", "Disable Drone", list("Yes", "No"))
|
||||
if(confirm == ("Yes") && (user in range(3, src)))
|
||||
user.visible_message("<span class='warning'>[user] swipes [user.p_their()] ID card through [src], attempting to shut it down.</span>",
|
||||
"<span class='warning'>You swipe your ID card through [src], attempting to shut it down.</span>")
|
||||
@@ -311,7 +311,7 @@
|
||||
spawn(0)
|
||||
if(!C || !M || jobban_isbanned(M, "nonhumandept") || jobban_isbanned(M, "Drone"))
|
||||
return
|
||||
var/response = alert(C, "Someone is attempting to reboot a maintenance drone. Would you like to play as one?", "Maintenance drone reboot", "Yes", "No")
|
||||
var/response = tgui_alert(C, "Someone is attempting to reboot a maintenance drone. Would you like to play as one?", "Maintenance drone reboot", list("Yes", "No"))
|
||||
if(!C || ckey)
|
||||
return
|
||||
if(response == "Yes")
|
||||
|
||||
@@ -7,15 +7,13 @@
|
||||
var/mode = 1
|
||||
|
||||
/obj/item/pen/multi/robopen/attack_self(mob/user as mob)
|
||||
|
||||
var/choice = tgui_input_list(user, "Would you like to change colour or mode?", name, list("Colour","Mode"))
|
||||
if(!choice) return
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
switch(choice)
|
||||
|
||||
if("Colour")
|
||||
select_colour(user)
|
||||
|
||||
if("Mode")
|
||||
if(mode == 1)
|
||||
mode = 2
|
||||
@@ -23,7 +21,6 @@
|
||||
mode = 1
|
||||
to_chat(user, "Changed printing mode to '[mode == 2 ? "Rename Paper" : "Write Paper"]'")
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
|
||||
return
|
||||
|
||||
// Copied over from paper's rename verb
|
||||
@@ -32,14 +29,12 @@
|
||||
/obj/item/pen/multi/robopen/proc/RenamePaper(mob/user, obj/paper)
|
||||
if(!user || !paper)
|
||||
return
|
||||
var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling") as text
|
||||
if(!user || !paper)
|
||||
|
||||
var/n_name = tgui_input_text(user, "What would you like to label the paper?", "Paper Labelling", max_length = MAX_NAME_LEN)
|
||||
if(!Adjacent(user) || !n_name)
|
||||
return
|
||||
|
||||
n_name = copytext(n_name, 1, 32)
|
||||
if(get_dist(user, paper) > 1 || user.stat)
|
||||
return
|
||||
paper.name = "paper[(n_name ? "- '[n_name]'" : null)]"
|
||||
paper.name = "paper - [n_name]"
|
||||
add_fingerprint(user)
|
||||
|
||||
//TODO: Add prewritten forms to dispense when you work out a good way to store the strings.
|
||||
|
||||
@@ -1054,7 +1054,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
set desc = "Toggles the lock on your cover."
|
||||
|
||||
if(can_lock_cover)
|
||||
if(alert("Are you sure?", locked ? "Unlock Cover" : "Lock Cover", "Yes", "No") == "Yes")
|
||||
if(tgui_alert(usr, "Are you sure?", locked ? "Unlock Cover" : "Lock Cover", list("Yes", "No")) == "Yes")
|
||||
locked = !locked
|
||||
update_icons()
|
||||
to_chat(usr, "<span class='notice'>You [locked ? "lock" : "unlock"] your cover.</span>")
|
||||
@@ -1062,7 +1062,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
if(!locked)
|
||||
to_chat(usr, "<span class='warning'>You cannot lock your cover yourself. Find a roboticist.</span>")
|
||||
return
|
||||
if(alert("You cannnot lock your own cover again. Are you sure?\n You will need a roboticist to re-lock you.", "Unlock Own Cover", "Yes", "No") == "Yes")
|
||||
if(tgui_alert(usr, "You cannnot lock your own cover again. Are you sure?\nYou will need a roboticist to re-lock you.", "Unlock Own Cover", list("Yes", "No")) == "Yes")
|
||||
locked = !locked
|
||||
update_icons()
|
||||
to_chat(usr, "<span class='notice'>You unlock your cover.</span>")
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC"
|
||||
|
||||
pose = sanitize(copytext(input(usr, "This is [src]. It...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
|
||||
pose = tgui_input_text(usr, "This is [src]. It...", "Pose", pose)
|
||||
|
||||
/mob/living/silicon/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
if(new_dest)
|
||||
set_destination(new_dest)
|
||||
if("setid")
|
||||
var/new_id = stripped_input(usr, "Enter ID:", name, suffix, MAX_NAME_LEN)
|
||||
var/new_id = tgui_input_text(usr, "Enter ID:", name, suffix, MAX_NAME_LEN)
|
||||
if(new_id)
|
||||
set_suffix(new_id)
|
||||
if("sethome")
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
to_chat(src, "<span class='big bold'>You are a cak!</span><b> You're a harmless cat/cake hybrid that everyone loves. People can take bites out of you if they're hungry, but you regenerate health \
|
||||
so quickly that it generally doesn't matter. You're remarkably resilient to any damage besides this and it's hard for you to really die at all. You should go around and bring happiness and \
|
||||
free cake to the station!</b>")
|
||||
var/new_name = stripped_input(src, "Enter your name, or press \"Cancel\" to stick with Keeki.", "Name Change")
|
||||
var/new_name = tgui_input_text(src, "Enter your name, or press \"Cancel\" to stick with Keeki.", "Name Change", name)
|
||||
if(new_name)
|
||||
to_chat(src, "<span class='notice'>Your name is now <b>\"[new_name]\"</b>!</span>")
|
||||
name = new_name
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if(istype(target, /obj/structure/elite_tumor))
|
||||
var/obj/structure/elite_tumor/T = target
|
||||
if(T.mychild == src && T.activity == TUMOR_PASSIVE)
|
||||
var/response = alert(src, "Re-enter the tumor?","Despawn yourself?", "Yes", "No")
|
||||
var/response = tgui_alert(src, "Re-enter the tumor?", "Despawn yourself?", list("Yes", "No"))
|
||||
if(response == "No" || QDELETED(src) || !Adjacent(T))
|
||||
return
|
||||
T.clear_activator(src)
|
||||
@@ -478,7 +478,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
|
||||
. = ..()
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/gps/internal/tumor
|
||||
icon_state = null
|
||||
gpstag = "Cancerous Signal"
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/queen/proc/NestPrompt()
|
||||
var/confirm = alert(src, "Are you sure you want to nest? You will be able to lay eggs, and smash walls, but not ventcrawl.","Nest?","Yes","No")
|
||||
var/confirm = tgui_alert(src, "Are you sure you want to nest? You will be able to lay eggs, and smash walls, but not ventcrawl.", "Nest?", list("Yes","No"))
|
||||
if(confirm == "Yes")
|
||||
NestMode()
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
to_chat(user, "<span class='warning'>You are jobbanned from role of syndicate and/or terror spider.</span>")
|
||||
return
|
||||
if(error_on_humanize == "")
|
||||
var/spider_ask = alert(humanize_prompt, "Join as Terror Spider?", "Yes", "No")
|
||||
var/spider_ask = tgui_alert(user, humanize_prompt, "Join as Terror Spider?", list("Yes", "No"))
|
||||
if(spider_ask == "No" || !src || QDELETED(src))
|
||||
return
|
||||
else
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/possessed_object/ghost() // Ghosting will return the object to normal, and will not disqualify the ghoster from various mid-round antag positions.
|
||||
var/response = alert(src, "End your possession of this object? (It will not stop you from respawning later)","Are you sure you want to ghost?","Ghost","Stay in body")
|
||||
var/response = tgui_alert(src, "End your possession of this object? (It will not stop you from respawning later)", "Are you sure you want to ghost?", list("Ghost", "Stay in body"))
|
||||
if(response != "Ghost")
|
||||
return
|
||||
lay_down()
|
||||
|
||||
@@ -764,7 +764,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
to_chat(usr, "<span class='notice'>You have to be conscious to change your flavor text</span>")
|
||||
return
|
||||
|
||||
var/msg = input(usr,"Set the flavor text in your 'examine' verb. The flavor text should be a physical descriptor of your character at a glance.","Flavor Text",html_decode(flavor_text)) as message|null
|
||||
var/msg = tgui_input_text(usr, "Set the flavor text in your 'examine' verb. The flavor text should be a physical descriptor of your character at a glance. SFW Drawn Art of your character is acceptable.", "Flavor Text", flavor_text, multiline = TRUE, encode = FALSE)
|
||||
|
||||
if(msg != null)
|
||||
if(stat)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
if(!message && !client)
|
||||
CRASH("An empty custom emote was called from a client-less mob.")
|
||||
else if(!message)
|
||||
input = sanitize(copytext(input(src,"Choose an emote to display.") as text|null, 1, MAX_MESSAGE_LEN))
|
||||
input = tgui_input_text(src, "Choose an emote to display.", "Custom Emote")
|
||||
else
|
||||
input = message
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
if(IsSleeping())
|
||||
to_chat(src, "<span class='notice'>You are already sleeping.</span>")
|
||||
return
|
||||
if(alert(src, "You sure you want to sleep for a while?", "Sleep", "Yes", "No") == "Yes")
|
||||
if(tgui_alert(src, "You sure you want to sleep for a while?", "Sleep", list("Yes", "No")) == "Yes")
|
||||
SetSleeping(40 SECONDS, voluntary = TRUE) //Short nap
|
||||
|
||||
/mob/living/verb/rest()
|
||||
@@ -660,11 +660,11 @@
|
||||
|
||||
for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name.
|
||||
if(force)
|
||||
newname = clean_input("Pick a new name.", "Name Change", oldname, src)
|
||||
newname = tgui_input_text(src, "Pick a new name.", "Name Change", oldname)
|
||||
else
|
||||
newname = clean_input("You are a [role]. Would you like to change your name to something else? (You have 3 minutes to select a new name.)", "Name Change", oldname, src)
|
||||
newname = tgui_input_text(src, "You are a [role]. Would you like to change your name to something else? (You have 3 minutes to select a new name.)", "Name Change", oldname, timeout = 3 MINUTES)
|
||||
if(((world.time - time_passed) > 1800) && !force)
|
||||
alert(src, "Unfortunately, more than 3 minutes have passed for selecting your name. If you are a robot, use the Namepick verb; otherwise, adminhelp.", "Name Change")
|
||||
tgui_alert(src, "Unfortunately, more than 3 minutes have passed for selecting your name. If you are a robot, use the Namepick verb; otherwise, adminhelp.", "Name Change")
|
||||
return //took too long
|
||||
newname = reject_bad_name(newname,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
|
||||
|
||||
|
||||
@@ -178,9 +178,9 @@
|
||||
to_chat(usr, "<span class='warning'>You must wait for the server to finish starting before you can join!</span>")
|
||||
return FALSE
|
||||
|
||||
if(alert(src,"Are you sure you wish to observe? You cannot normally join the round after doing this!","Player Setup","Yes","No") == "Yes")
|
||||
if(alert(usr, "Are you sure you wish to observe? You cannot normally join the round after doing this!", "Observe", "Yes", "No") == "Yes")
|
||||
if(!client)
|
||||
return 1
|
||||
return TRUE
|
||||
var/mob/dead/observer/observer = new(src)
|
||||
src << browse(null, "window=playersetup")
|
||||
spawning = TRUE
|
||||
|
||||
Reference in New Issue
Block a user