[TG UPDATE] 4 - TGUI - WOULD YOU LIKE TO UPGRADE TO THIS EDITION? (#17311)

* e

* https://github.com/tgstation/tgstation/pull/55157

* manual

* Replace alert usage with tgui_alert (#58419)

Pretty much every alert() call is replaced with tgui_alert, except one I replaced with tgalert as a fallback. If tgui_alert exists, why not use it?

* e

* e

Co-authored-by: Celotajs <81999976+celotajstg@users.noreply.github.com>
This commit is contained in:
Jamie D
2023-01-04 15:52:06 +00:00
committed by GitHub
parent e67445042c
commit 37a75475ad
127 changed files with 877 additions and 386 deletions

View File

@@ -293,7 +293,7 @@
if (isnull(boomInput[i]))
return
if (!isnum(boomInput[i])) //If the user doesn't input a number, set that specific explosion value to zero
alert(usr, "That wasn't a number! Value set to default (zero) instead.")
tgui_alert(usr, "That wasn't a number! Value set to default (zero) instead.")
boomInput = 0
explosionChoice = 1
temp_pod.explosionSize = boomInput
@@ -315,7 +315,7 @@
if (isnull(damageInput))
return
if (!isnum(damageInput)) //Sanitize the input for damage to deal.s
alert(usr, "That wasn't a number! Value set to default (zero) instead.")
tgui_alert(usr, "That wasn't a number! Value set to default (zero) instead.")
damageInput = 0
damageChoice = 1
temp_pod.damage = damageInput
@@ -434,7 +434,7 @@
if (isnull(soundLen))
return
if (!isnum(soundLen))
alert(usr, "That wasn't a number! Value set to default ([initial(temp_pod.fallingSoundLength)*0.1]) instead.")
tgui_alert(usr, "That wasn't a number! Value set to default ([initial(temp_pod.fallingSoundLength)*0.1]) instead.")
temp_pod.fallingSound = soundInput
temp_pod.fallingSoundLength = 10 * soundLen
. = TRUE
@@ -503,7 +503,7 @@
updateSelector()
. = TRUE
if("clearBay") //Delete all mobs and objs in the selected bay
if(alert(usr, "This will delete all objs and mobs in [bay]. Are you sure?", "Confirmation", "Delete that shit", "No") == "Delete that shit")
if(tgui_alert(usr, "This will delete all objs and mobs in [bay]. Are you sure?", "Confirmation", list("Delete that shit", "No")) == "Delete that shit")
clearBay()
refreshBay()
. = TRUE