mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 14:37:27 +01:00
Convert almost all alert() to tgui_alert()
This commit is contained in:
@@ -195,7 +195,7 @@
|
||||
if(ruined)
|
||||
return
|
||||
|
||||
if(alert(usr, "Do I want to rip the poster from the wall?","You think...","Yes","No") == "Yes")
|
||||
if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes")
|
||||
|
||||
if(ruined || !user.Adjacent(src))
|
||||
return
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
if(ruined)
|
||||
return
|
||||
|
||||
if(alert(usr, "Do I want to rip the poster from the wall?","You think...","Yes","No") == "Yes")
|
||||
if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes")
|
||||
|
||||
if(ruined || !user.Adjacent(src))
|
||||
return
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
break
|
||||
|
||||
if(choice)
|
||||
finalized = alert(M, "Are you sure you want to play as [choice]?","Confirmation","No","Yes")
|
||||
finalized = tgui_alert(M, "Are you sure you want to play as [choice]?","Confirmation",list("No","Yes"))
|
||||
|
||||
if(randomize)
|
||||
choice = pick(possible_mobs)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
/obj/structure/ghost_pod/manual/attack_hand(var/mob/living/user)
|
||||
if(!used)
|
||||
if(confirm_before_open)
|
||||
if(alert(user, "Are you sure you want to touch \the [src]?", "Confirm", "No", "Yes") == "No")
|
||||
if(tgui_alert(user, "Are you sure you want to touch \the [src]?", "Confirm", list("No", "Yes")) == "No")
|
||||
return
|
||||
trigger()
|
||||
// VOREStation Addition Start
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
remains_active = TRUE
|
||||
|
||||
/obj/structure/ghost_pod/manual/lost_drone/dogborg/create_occupant(var/mob/M)
|
||||
var/response = alert(M, "What type of lost drone are you? Do note, that dogborgs may have experienced different type of corruption ((High potential for having vore-related laws))", "Drone Type", "Regular", "Dogborg")
|
||||
var/response = tgui_alert(M, "What type of lost drone are you? Do note, that dogborgs may have experienced different type of corruption ((High potential for having vore-related laws))", "Drone Type", list("Regular", "Dogborg"))
|
||||
if(!(response == "Dogborg")) // No response somehow or Regular
|
||||
return ..()
|
||||
else
|
||||
|
||||
@@ -69,13 +69,13 @@
|
||||
var/mob/living/L = user
|
||||
//They're in it, and want to get out.
|
||||
if(L.loc == src)
|
||||
var/choice = alert(usr, "Do you want to exit \the [src]?","Un-Hide?","Exit","Stay")
|
||||
var/choice = tgui_alert(usr, "Do you want to exit \the [src]?","Un-Hide?",list("Exit","Stay"))
|
||||
if(choice == "Exit")
|
||||
if(L == hider)
|
||||
hider = null
|
||||
L.forceMove(get_turf(src))
|
||||
else if(!hider)
|
||||
var/choice = alert(usr, "Do you want to hide in \the [src]?","Un-Hide?","Hide","Stay")
|
||||
var/choice = tgui_alert(usr, "Do you want to hide in \the [src]?","Un-Hide?",list("Hide","Stay"))
|
||||
if(choice == "Hide" && !hider) //Check again because PROMPT
|
||||
L.forceMove(src)
|
||||
hider = L
|
||||
|
||||
Reference in New Issue
Block a user