[MIRROR] default tgui alert input handling (#8891)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-09-02 00:28:35 +02:00
committed by GitHub
co-authored by Kashargul Kashargul
parent ec8834f9e5
commit 9f42148ab1
106 changed files with 675 additions and 178 deletions
+3 -3
View File
@@ -103,7 +103,7 @@
/obj/item/canvas/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/paint_palette))
var/choice = tgui_alert(user, "Adjusting the base color of this canvas will replace ALL pixels with the selected color. Are you sure?", "Confirm Color Fill", list("Yes", "No"))
if(choice == "No")
if(choice != "Yes")
return
var/basecolor = input(user, "Select a base color for the canvas:", "Base Color", canvas_color) as null|color
if(basecolor && Adjacent(user) && user.get_active_hand() == I)
@@ -551,7 +551,7 @@
Author's Name: [author_name]. \n \
Author's CKey: [author_ckey]"))
if(tgui_alert(usr, "Check your chat log (if filtering for notices, check where you don't) for painting details.",
"Is this the painting you want?", list("Yes", "No")) == "No")
"Is this the painting you want?", list("Yes", "No")) != "Yes")
return 0
if(!fexists("data/persistent/paintings/[persistence_id]/[painting["md5"]].png"))
to_chat(usr, span_warning("Chosen painting could not be loaded! Incident was logged, but no action taken at this time"))
@@ -590,7 +590,7 @@
if(tgui_alert(usr, "No painting list ID was given. You may obtain such by debugging SSPersistence and checking the all_paintings entry. \
If you do not wish to do that, you may request a list to be generated of painting titles. This might be resource intensive. \
Proceed? It will likely have over 500 entries", "Generate list?", list("Proceed!", "Cancel")) == "Cancel")
Proceed? It will likely have over 500 entries", "Generate list?", list("Proceed!", "Cancel")) != "Proceed!")
return
log_debug("[usr] generated list of paintings from SSPersistence")
@@ -101,7 +101,7 @@
if (not_has_ooc_text(M))
return
while(finalized == "No" && M.client)
while(finalized != "Yes" && M.client)
choice = tgui_input_list(M, "What type of predator do you want to play as?", "Maintpred Choice", possible_mobs)
if(!choice) //We probably pushed the cancel button on the mob selection. Let's just put the ghost pod back in the list.
to_chat(M, "<span class='notice'>No mob selected, cancelling.</span>")
@@ -53,7 +53,7 @@
/obj/structure/ghost_pod/manual/attack_hand(var/mob/living/user)
if(!used)
if(confirm_before_open)
if(tgui_alert(user, "Are you sure you want to touch \the [src]?", "Confirm", list("No", "Yes")) == "No")
if(tgui_alert(user, "Are you sure you want to touch \the [src]?", "Confirm", list("No", "Yes")) != "Yes")
return
trigger()
// VOREStation Addition Start
@@ -51,7 +51,7 @@
return
var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
if(confirm == "No")
if(confirm != "Yes")
visible_message(\
"<span class='notice'>[user.name] decides not to try turning \the [src].</span>",\
"<span class='notice'>You decide not to try turning \the [src].</span>")
@@ -157,7 +157,7 @@
..()
var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
if(confirm == "No")
if(confirm != "Yes")
visible_message(\
"<span class='notice'>[user.name] decides not to try turning \the [src].</span>",\
"<span class='notice'>You decide not to try turning \the [src].</span>")
@@ -186,7 +186,7 @@
new_bearing = round(compass_directions[choice])
confirm = tgui_alert(usr, "Are you certain you want to rotate \the [src]?", "[name]", list("Yes", "No"))
if(confirm == "No")
if(confirm != "Yes")
visible_message(\
"<span class='notice'>[user.name] decides not to try turning \the [src].</span>",\
"<span class='notice'>You decide not to try turning \the [src].</span>")