mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 15:38:02 +01:00
Convert almost all alert() to tgui_alert()
This commit is contained in:
@@ -148,8 +148,7 @@
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/attack_hand(mob/living/user)
|
||||
if(used)
|
||||
var/confirm = alert(user, "Are you sure you want to open \the [src]? \
|
||||
\The [src] will expire upon opening it.", "Confirm Opening", "No", "Yes")
|
||||
var/confirm = tgui_alert(user, "Are you sure you want to open \the [src]? \The [src] will expire upon opening it.", "Confirm Opening", list("No", "Yes"))
|
||||
if(confirm == "Yes")
|
||||
..() // Will call `toggle()` and open the bag.
|
||||
else
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
to_chat(usr,"<span class='warning'>A warning pops up on the device, informing you that [M] is dead, and, as such, the mind transfer can not be done.</span>")
|
||||
return
|
||||
|
||||
var/choice = alert(usr,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation","Continue","Cancel")
|
||||
var/choice = tgui_alert(usr,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation",list("Continue","Cancel"))
|
||||
if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(M))
|
||||
|
||||
usr.visible_message("<span class='warning'>[usr] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!</span>","<span class='notice'>You begin swap minds with [M]!</span>")
|
||||
|
||||
@@ -286,8 +286,7 @@
|
||||
if (usr != src)
|
||||
return //something is terribly wrong
|
||||
|
||||
var/confirm = alert(src, "Would you like to talk as [src.client.prefs.real_name], over a communicator? \
|
||||
This will reset your respawn timer, if someone answers.", "Join as Voice?", "Yes","No")
|
||||
var/confirm = tgui_alert(src, "Would you like to talk as [src.client.prefs.real_name], over a communicator? This will reset your respawn timer, if someone answers.", "Join as Voice?", list("Yes","No"))
|
||||
if(confirm == "No")
|
||||
return
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(!ghostjoin)
|
||||
return ..()
|
||||
|
||||
var/reply = alert(usr, "Would you like to become [src]? It is bound to [revivedby].","Bind To","Yes","No")
|
||||
var/reply = tgui_alert(usr, "Would you like to become [src]? It is bound to [revivedby].","Bind To",list("Yes","No"))
|
||||
if(reply == "No")
|
||||
return
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
if(active)
|
||||
var/obj/item/weapon/card/id/I = W.GetIdCard()
|
||||
if(access_hos in I.access) // VOREStation edit
|
||||
var/choice = alert(user, "Would you like to authorize this warrant?","Warrant authorization","Yes","No")
|
||||
var/choice = tgui_alert(user, "Would you like to authorize this warrant?","Warrant authorization",list("Yes","No"))
|
||||
if(choice == "Yes")
|
||||
active.fields["auth"] = "[I.registered_name] - [I.assignment ? I.assignment : "(Unknown)"]"
|
||||
user.visible_message("<span class='notice'>You swipe \the [I] through the [src].</span>", \
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
tool_qualities = list(TOOL_MULTITOOL)
|
||||
|
||||
/obj/item/device/multitool/attack_self(mob/living/user)
|
||||
var/choice = alert(usr, "What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", "Clear Buffers", "Cancel")
|
||||
var/choice = tgui_alert(usr, "What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", list("Clear Buffers", "Cancel"))
|
||||
switch(choice)
|
||||
if("Cancel")
|
||||
to_chat(user,"<span class='notice'>You lower \the [src].</span>")
|
||||
|
||||
@@ -75,7 +75,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
|
||||
to_chat(user,"<span class='warning'>No stored mind in \the [src].</span>")
|
||||
return
|
||||
|
||||
var/choice = alert(user,"What would you like to do?","Stored: [stored_mind.name]","Delete","Backup","Cancel")
|
||||
var/choice = tgui_alert(user,"What would you like to do?","Stored: [stored_mind.name]",list("Delete","Backup","Cancel"))
|
||||
if(!stored_mind || user.get_active_hand() != src)
|
||||
return
|
||||
switch(choice)
|
||||
@@ -223,7 +223,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
|
||||
to_chat(usr,"<span class='warning'>There is already someone's mind stored inside</span>")
|
||||
return
|
||||
|
||||
var/choice = alert(usr,"This will remove the target's mind from their body (and from the game as long as they're in the sleevemate). You can put them into a (mindless) body, a NIF, or back them up for normal resleeving, but you should probably have a plan in advance so you don't leave them unable to interact for too long. Continue?","Confirmation","Continue","Cancel")
|
||||
var/choice = tgui_alert(usr,"This will remove the target's mind from their body (and from the game as long as they're in the sleevemate). You can put them into a (mindless) body, a NIF, or back them up for normal resleeving, but you should probably have a plan in advance so you don't leave them unable to interact for too long. Continue?","Confirmation",list("Continue","Cancel"))
|
||||
if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(target))
|
||||
|
||||
usr.visible_message("<span class='warning'>[usr] begins downloading [target]'s mind!</span>","<span class='notice'>You begin downloading [target]'s mind!</span>")
|
||||
|
||||
@@ -120,10 +120,11 @@
|
||||
|
||||
if(!(user.ckey in warned_users))
|
||||
warned_users |= user.ckey
|
||||
alert(user,"This device can be easily used to break ERP preferences due to the nature of teleporting \
|
||||
and tele-vore. Make sure you carefully examine someone's OOC prefs before teleporting them if you are \
|
||||
going to use this device for ERP purposes. This device records all warnings given and teleport events for \
|
||||
admin review in case of pref-breaking, so just don't do it.","OOC WARNING")
|
||||
tgui_alert_async(user,{"
|
||||
This device can be easily used to break ERP preferences due to the nature of teleporting and tele-vore.
|
||||
Make sure you carefully examine someone's OOC prefs before teleporting them if you are going to use this device for ERP purposes.
|
||||
This device records all warnings given and teleport events for admin review in case of pref-breaking, so just don't do it.
|
||||
"},"OOC Warning")
|
||||
var/choice = show_radial_menu(user, radial_menu_anchor, radial_images, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
|
||||
|
||||
if(!choice)
|
||||
@@ -162,20 +163,20 @@
|
||||
rebuild_radial_images()
|
||||
|
||||
/* Ye olde text-based way
|
||||
var/choice = alert(user,"What do you want to do?","[src]","Create Beacon","Cancel","Target Beacon")
|
||||
var/choice = tgui_alert(user,"What do you want to do?","[src]",list("Create Beacon","Cancel","Target Beacon"))
|
||||
switch(choice)
|
||||
if("Create Beacon")
|
||||
if(beacons_left <= 0)
|
||||
alert(usr, "The translocator can't support any more beacons!","Error")
|
||||
tgui_alert_async(usr, "The translocator can't support any more beacons!","Error")
|
||||
return
|
||||
|
||||
var/new_name = html_encode(input(user,"New beacon's name (2-20 char):","[src]") as text|null)
|
||||
|
||||
if(length(new_name) > 20 || length(new_name) < 2)
|
||||
alert(usr, "Entered name length invalid (must be longer than 2, no more than than 20).","Error")
|
||||
tgui_alert_async(usr, "Entered name length invalid (must be longer than 2, no more than than 20).","Error")
|
||||
return
|
||||
if(new_name in beacons)
|
||||
alert(usr, "No duplicate names, please. '[new_name]' exists already.","Error")
|
||||
tgui_alert_async(usr, "No duplicate names, please. '[new_name]' exists already.","Error")
|
||||
return
|
||||
|
||||
var/obj/item/device/perfect_tele_beacon/nb = new(get_turf(src))
|
||||
@@ -421,14 +422,14 @@
|
||||
/obj/item/device/perfect_tele_beacon/attack_hand(mob/user)
|
||||
if((user.ckey != creator) && !(user.ckey in warned_users))
|
||||
warned_users |= user.ckey
|
||||
var/choice = alert(user,"This device is a translocator beacon. Having it on your person may mean that anyone \
|
||||
who teleports to this beacon gets teleported into your selected vore-belly. If you are prey-only \
|
||||
or don't wish to potentially have a random person teleported into you, it's suggested that you \
|
||||
not carry this around.","OOC WARNING","Take It","Leave It")
|
||||
var/choice = tgui_alert(user, {"
|
||||
This device is a translocator beacon. Having it on your person may mean that anyone
|
||||
who teleports to this beacon gets teleported into your selected vore-belly. If you are prey-only
|
||||
or don't wish to potentially have a random person teleported into you, it's suggested that you
|
||||
not carry this around."}, "OOC Warning", list("Take It","Leave It"))
|
||||
if(choice == "Leave It")
|
||||
return
|
||||
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/item/device/perfect_tele_beacon/stationary
|
||||
name = "stationary translocator beacon"
|
||||
@@ -443,7 +444,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/device/perfect_tele_beac
|
||||
if(!isliving(user))
|
||||
return
|
||||
var/mob/living/L = user
|
||||
var/confirm = alert(user, "You COULD eat the beacon...", "Eat beacon?", "Eat it!", "No, thanks.")
|
||||
var/confirm = tgui_alert(user, "You COULD eat the beacon...", "Eat beacon?", list("Eat it!", "No, thanks."))
|
||||
if(confirm == "Eat it!")
|
||||
var/obj/belly/bellychoice = input("Which belly?","Select A Belly") as null|anything in L.vore_organs
|
||||
if(bellychoice)
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
|
||||
if(alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", "Yes", "No") == "Yes")
|
||||
if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes")
|
||||
var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null
|
||||
if(energy_color_input)
|
||||
lcolor = sanitize_hexcolor(energy_color_input)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
opposite_catastasis = "BROAD"
|
||||
catastasis = "STANDARD"
|
||||
|
||||
switch( alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","Switch to [opposite_catastasis]","Cancel") )
|
||||
switch( tgui_alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel")) )
|
||||
if("Switch to STANDARD","Switch to BROAD")
|
||||
src.contraband_enabled = !src.contraband_enabled
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if(!registered_user && register_user(user))
|
||||
to_chat(user, "<span class='notice'>The microscanner marks you as its owner, preventing others from accessing its internals.</span>")
|
||||
if(registered_user == user)
|
||||
switch(alert(usr, "Would you like edit the ID, or show it?","Show or Edit?", "Edit","Show"))
|
||||
switch(tgui_alert(usr, "Would you like edit the ID, or show it?","Show or Edit?", list("Edit","Show")))
|
||||
if("Edit")
|
||||
agentcard_module.tgui_interact(user)
|
||||
if("Show")
|
||||
|
||||
@@ -287,7 +287,7 @@ Implant Specifics:<BR>"}
|
||||
t.hotspot_expose(3500,125)
|
||||
|
||||
/obj/item/weapon/implant/explosive/post_implant(mob/source as mob)
|
||||
elevel = alert(usr, "What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion")
|
||||
elevel = tgui_alert(usr, "What sort of explosion would you prefer?", "Implant Intent", list("Localized Limb", "Destroy Body", "Full Explosion"))
|
||||
phrase = input("Choose activation phrase:") as text
|
||||
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
|
||||
phrase = replace_characters(phrase, replacechars)
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
|
||||
if(alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", "Yes", "No") == "Yes")
|
||||
if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes")
|
||||
var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null
|
||||
if(energy_color_input)
|
||||
lcolor = sanitize_hexcolor(energy_color_input)
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
if(user.incapacitated() || !istype(user))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to recolor your shield?", "Confirm Recolor", "Yes", "No") == "Yes")
|
||||
if(tgui_alert(usr, "Are you sure you want to recolor your shield?", "Confirm Recolor", list("Yes", "No")) == "Yes")
|
||||
var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null
|
||||
if(energy_color_input)
|
||||
lcolor = sanitize_hexcolor(energy_color_input)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
user.visible_message("<span class='rose'>Without even breaking stride, \the [user] flips open \the [src] in one smooth movement.</span>")
|
||||
|
||||
else if(lit && detonator_mode)
|
||||
switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter."))
|
||||
switch(tgui_alert(user, "What would you like to do?", "Lighter", list("Press the button.", "Close the lighter.")))
|
||||
if("Press the button.")
|
||||
to_chat(user, "<span class='warning'>You press the button.</span>")
|
||||
icon_state = "[base_state]click"
|
||||
|
||||
Reference in New Issue
Block a user