mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +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:
@@ -98,7 +98,7 @@
|
||||
if(flush) // Don't doublewipe.
|
||||
to_chat(user, "<span class='warning'>You are already wiping this AI!</span>")
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
|
||||
var/confirm = tgui_alert(user, "Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", list("Yes", "No"))
|
||||
if(confirm == "Yes" && (ui_status(user, GLOB.inventory_state) == UI_INTERACTIVE)) // And make doubly sure they want to wipe (three total clicks)
|
||||
msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].", ATKLOG_FEW)
|
||||
add_attack_logs(user, AI, "Wiped with [src].")
|
||||
|
||||
@@ -56,10 +56,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] needs to recharge!</span>")
|
||||
return
|
||||
|
||||
var/message = input(user, "Shout a message:", "Megaphone") as text|null
|
||||
if(!message)
|
||||
return
|
||||
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
|
||||
var/message = tgui_input_text(user, "Shout a message:", "Megaphone")
|
||||
if(!message)
|
||||
return
|
||||
message = capitalize(message)
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
looking_for_personality = 1
|
||||
GLOB.paiController.findPAI(src, usr)
|
||||
if(href_list["wipe"])
|
||||
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
|
||||
var/confirm = tgui_alert(usr, "Are you certain you wish to delete the current personality? This action cannot be undone.", "Personality Wipe", list("No", "Yes"))
|
||||
if(confirm == "Yes")
|
||||
for(var/mob/M in src)
|
||||
to_chat(M, "<font color = #ff0000><h2>You feel yourself slipping away from reality.</h2></font>")
|
||||
@@ -281,7 +281,7 @@
|
||||
if(2)
|
||||
radio.ToggleReception()
|
||||
if(href_list["setlaws"])
|
||||
var/newlaws = sanitize(copytext(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message,1,MAX_MESSAGE_LEN))
|
||||
var/newlaws = tgui_input_text(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws)
|
||||
if(newlaws)
|
||||
pai.pai_laws = newlaws
|
||||
to_chat(pai, "Your supplemental directives have been updated. Your new directives are:")
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
to_chat(user, "<span class='notice'>The injector is empty!</span>")
|
||||
return
|
||||
used = TRUE // Set this BEFORE the popup to prevent people using the injector more than once.
|
||||
var/choice = alert(user, "The injector is still unused. Do you wish to use it?", "Fireproofing injector", "Yes", "No")
|
||||
var/choice = tgui_alert(user, "The injector is still unused. Do you wish to use it?", "Fireproofing injector", list("Yes", "No"))
|
||||
if(choice == "No")
|
||||
to_chat(user, "<span class='notice'>You decide against using [src].</span>")
|
||||
used = FALSE
|
||||
|
||||
Reference in New Issue
Block a user