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:
@@ -579,7 +579,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if("maxresearch")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(alert("Are you sure you want to maximize research levels?","Confirmation","Yes","No")=="No")
|
||||
if(tgui_alert(usr, "Are you sure you want to maximize research levels?", "Confirmation", list("Yes", "No"))=="No")
|
||||
return
|
||||
log_admin("[key_name(usr)] has maximized the research levels.")
|
||||
message_admins("[key_name_admin(usr)] has maximized the research levels.")
|
||||
@@ -648,7 +648,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
|
||||
if("reset") //Reset the R&D console's database.
|
||||
griefProtection()
|
||||
var/choice = alert("Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", "R&D Console Database Reset", "Continue", "Cancel")
|
||||
var/choice = tgui_alert(usr, "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", "R&D Console Database Reset", list("Continue", "Cancel"))
|
||||
if(choice == "Continue")
|
||||
add_wait_message("Resetting Database...", RESET_RESEARCH_DELAY)
|
||||
addtimer(CALLBACK(src, PROC_REF(reset_research)), RESET_RESEARCH_DELAY)
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
temp_server.id_with_download += num
|
||||
|
||||
else if(href_list["reset_tech"])
|
||||
var/choice = alert("Technology Data Reset", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", "Continue", "Cancel")
|
||||
var/choice = tgui_alert(usr, "Technology Data Reset", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", list("Continue", "Cancel"))
|
||||
if(choice == "Continue")
|
||||
for(var/I in temp_server.files.known_tech)
|
||||
var/datum/tech/T = temp_server.files.known_tech[I]
|
||||
@@ -259,7 +259,7 @@
|
||||
temp_server.files.RefreshResearch()
|
||||
|
||||
else if(href_list["reset_design"])
|
||||
var/choice = alert("Design Data Deletion", "Are you sure you want to blacklist this design? Ensure you sync servers after this decision.", "Continue", "Cancel")
|
||||
var/choice = tgui_alert(usr, "Design Data Deletion", "Are you sure you want to blacklist this design? Ensure you sync servers after this decision.", list("Continue", "Cancel"))
|
||||
if(choice == "Continue")
|
||||
for(var/I in temp_server.files.known_designs)
|
||||
var/datum/design/D = temp_server.files.known_designs[I]
|
||||
@@ -272,7 +272,7 @@
|
||||
temp_server.files.RefreshResearch()
|
||||
|
||||
else if(href_list["restore_design"])
|
||||
var/choice = alert("Design Data Restoration", "Are you sure you want to restore this design? Ensure you sync servers after this decision.", "Continue", "Cancel")
|
||||
var/choice = tgui_alert(usr, "Design Data Restoration", "Are you sure you want to restore this design? Ensure you sync servers after this decision.", list("Continue", "Cancel"))
|
||||
if(choice == "Continue")
|
||||
temp_server.files.blacklisted_designs -= href_list["restore_design"]
|
||||
temp_server.files.unblacklisted_designs += href_list["restore_design"]
|
||||
|
||||
@@ -173,8 +173,7 @@
|
||||
to_chat(M, "<span class='warning'>You absorb the potion and feel your intense desire to feed melt away.</span>")
|
||||
to_chat(user, "<span class='notice'>You feed the slime the potion, removing its hunger and calming it.</span>")
|
||||
being_used = TRUE
|
||||
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
||||
|
||||
var/newname = tgui_input_text(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime", MAX_NAME_LEN, 1)
|
||||
if(!newname)
|
||||
newname = "pet slime"
|
||||
M.name = newname
|
||||
@@ -228,7 +227,9 @@
|
||||
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
|
||||
var/reason_text = tgui_input_text(user, "Enter reason for giving sentience", "Reason for sentience potion")
|
||||
if(!reason_text)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You offer [src] sentience potion to [SM]...</span>")
|
||||
being_used = TRUE
|
||||
|
||||
@@ -304,7 +305,7 @@
|
||||
return
|
||||
|
||||
prompted = TRUE
|
||||
if(alert("This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,"Yes","No")=="No")
|
||||
if(tgui_alert(user, "This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?", "Consciousness Transfer", list("Yes", "No")) == "No")
|
||||
prompted = FALSE
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user