Merge pull request #10756 from VOREStation/Arokha/fixes2

The One Where I Port Modals
This commit is contained in:
Aronai Sieyes
2021-06-30 15:28:38 -04:00
committed by GitHub
468 changed files with 3555 additions and 2880 deletions
+2 -2
View File
@@ -141,7 +141,7 @@
to_chat(usr, "<span class='warning'>Error! Please notify administration!</span>")
return
var/list/turf/turfs = res
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", ""), MAX_NAME_LEN)
var/str = sanitizeSafe(input(usr, "New area name:","Blueprint Editing", ""), MAX_NAME_LEN)
if(!str || !length(str)) //cancel
return
if(length(str) > 50)
@@ -200,7 +200,7 @@
/obj/item/blueprints/proc/edit_area()
var/area/A = get_area()
var/prevname = "[A.name]"
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", prevname), MAX_NAME_LEN)
var/str = sanitizeSafe(input(usr, "New area name:","Blueprint Editing", prevname), MAX_NAME_LEN)
if(!str || !length(str) || str==prevname) //cancel
return
if(length(str) > 50)
+1 -2
View File
@@ -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
+11 -9
View File
@@ -68,28 +68,30 @@
/obj/item/weapon/pen/crayon/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity) return
if(istype(target,/turf/simulated/floor))
var/drawtype = input("Choose what you'd like to draw.", "Crayon scribbles") in list("graffiti","rune","letter","arrow")
var/drawtype = tgui_input_list(user, "Choose what you'd like to draw.", "Crayon scribbles", list("graffiti","rune","letter","arrow"))
if(!drawtype)
return
if(get_dist(target, user) > 1 || !(user.z == target.z))
return
switch(drawtype)
if("letter")
drawtype = input("Choose the letter.", "Crayon scribbles") in list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
if(get_dist(target, user) > 1 || !(user.z == target.z) || !drawtype)
drawtype = tgui_input_list(user, "Choose the letter.", "Crayon scribbles", list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"))
if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing a letter on the [target.name].")
if("graffiti")
drawtype = input("Choose the graffiti.", "Crayon scribbles") in list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
if(get_dist(target, user) > 1 || !(user.z == target.z) || !drawtype)
drawtype = tgui_input_list(user, "Choose the graffiti.", "Crayon scribbles", list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa"))
if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing graffiti on the [target.name].")
if("rune")
drawtype = input("Choose the rune.", "Crayon scribbles") in list("rune1", "rune2", "rune3", "rune4", "rune5", "rune6")
if(get_dist(target, user) > 1 || !(user.z == target.z) || !drawtype)
drawtype = tgui_input_list(user, "Choose the rune.", "Crayon scribbles", list("rune1", "rune2", "rune3", "rune4", "rune5", "rune6"))
if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing a rune on the [target.name].")
if("arrow")
drawtype = input("Choose the arrow.", "Crayon scribbles") in list("left", "right", "up", "down")
if(get_dist(target, user) > 1 || !(user.z == target.z) || !drawtype)
drawtype = tgui_input_list(user, "Choose the arrow.", "Crayon scribbles", list("left", "right", "up", "down"))
if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing an arrow on the [target.name].")
if(instant || do_after(user, 50))
@@ -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>")
@@ -130,7 +130,7 @@
to_chat(src, "<span class='danger'>There are no available communicators, sorry.</span>")
return
var/choice = input(src,"Send a text message to whom?") as null|anything in choices
var/choice = tgui_input_list(src,"Send a text message to whom?", "Recipient Choice", choices)
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
@@ -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
@@ -316,7 +315,7 @@
to_chat(src , "<span class='danger'>There are no available communicators, sorry.</span>")
return
var/choice = input(src,"Send a voice request to whom?") as null|anything in choices
var/choice = tgui_input_list(src,"Send a voice request to whom?", "Recipient Choice", choices)
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
@@ -16,33 +16,63 @@
/mob/living/simple_mob/animal/giant_spider/carrier //or the ones who fart babies when they die
ic_revivable = 0
//WHEN GHOSTS ATTACK!!!!!
/// A ghost has clicked us
/mob/living/simple_mob/attack_ghost(mob/observer/dead/user as mob)
if(!ghostjoin)
return ..()
var/reply = alert("Would you like to become [src]? It is bound to [revivedby].",,"Yes","No")
if(reply == "No")
return
if(!evaluate_ghost_join(user))
return ..()
if(ckey) //FIRST ONE TO CLICK YES GETS IT!!!!!! Channel your inner youtube commenter.
to_chat(src, "<span class='notice'>Sorry, someone else has already inhabited [src].</span>")
return
log_and_message_admins("[key_name_admin(user)] joined [src] as a ghost [ADMIN_FLW(src)]")
tgui_alert_async(usr, "Would you like to become [src]? It is bound to [revivedby].", "Become Mob", list("Yes","No"), CALLBACK(src, .proc/reply_ghost_join), 20 SECONDS)
/// A reply to an async alert request was received
/mob/living/simple_mob/proc/reply_ghost_join(response)
if(response != "Yes")
return // ok
var/mob/observer/dead/D = usr
if(evaluate_ghost_join(D))
ghost_join(D)
/// Inject a ghost into this mob. Assumes you've done all sanity before this point.
/mob/living/simple_mob/proc/ghost_join(mob/observer/dead/D)
log_and_message_admins("[key_name_admin(D)] joined [src] as a ghost [ADMIN_FLW(src)]")
active_ghost_pods -= src
if(user.mind)
user.mind.active = TRUE
user.mind.transfer_to(src)
// Move the ghost in
if(D.mind)
D.mind.active = TRUE
D.mind.transfer_to(src)
else
src.ckey = user.ckey
qdel(user)
ghostjoin = 0
src.ckey = D.ckey
qdel(D)
// Clean up the simplemob
ghostjoin = FALSE
ghostjoin_icon()
if(revivedby != "no one")
to_chat(src, "<span class='notice'>Where once your life had been rough and scary, you have been assisted by [revivedby]. They seem to be the reason you are on your feet again... so perhaps you should help them out.</span> <span class= warning> Being as you were revived, you are allied with the station. Do not attack anyone unless they are threatening the one who revived you. And try to listen to the one who revived you within reason. Of course, you may do scenes as you like, but you must still respect preferences.</span>")
visible_message("[src]'s eyes flicker with a curious intelligence.")
visible_message("[src]'s eyes flicker with a curious intelligence.", runemessage = "looks around")
/// Evaluate someone for being allowed to join as this mob from being a ghost
/mob/living/simple_mob/proc/evaluate_ghost_join(mob/observer/dead/D)
if(!istype(D) || !D.client)
stack_trace("A non-ghost mob was evaluated for joining into a simplemob...")
return FALSE
// At this point we can at least send them messages as to why they can't join, since they are a mob with a client
if(!ghostjoin)
to_chat(D, "<span class='notice'>Sorry, [src] is no longer ghost-joinable.</span>")
return FALSE
if(ckey)
to_chat(D, "<span class='notice'>Sorry, someone else has already inhabited [src].</span>")
return FALSE
// Insert whatever ban checks you want here if we ever add simplemob bans
return TRUE
/obj/item/device/denecrotizer //Away map reward. FOR TRAINED NECROMANCERS ONLY. >:C
name = "experimental denecrotizer"
@@ -105,8 +105,10 @@
new painting_decal(F, painting_dir, painting_colour)
/obj/item/device/floor_painter/attack_self(var/mob/user)
var/choice = input("Do you wish to change the decal type, paint direction, or paint colour?") as null|anything in list("Decal","Direction", "Colour")
if(choice == "Decal")
var/choice = tgui_alert(usr, "Do you wish to change the decal type, paint direction, or paint colour?", "Modify What?", list("Decal","Direction","Colour","Cancel"))
if(choice == "Cancel")
return
else if(choice == "Decal")
choose_decal()
else if(choice == "Direction")
choose_direction()
@@ -139,7 +141,7 @@
if(usr.incapacitated())
return
var/new_decal = input("Select a decal.") as null|anything in decals
var/new_decal = tgui_input_list(usr, "Select a decal:", "Decal Choice", decals)
if(new_decal && !isnull(decals[new_decal]))
decal = new_decal
to_chat(usr, "<span class='notice'>You set \the [src] decal to '[decal]'.</span>")
@@ -153,7 +155,7 @@
if(usr.incapacitated())
return
var/new_dir = input("Select a direction.") as null|anything in paint_dirs
var/new_dir = tgui_input_list(usr, "Select a direction:", "Direction Choice", paint_dirs)
if(new_dir && !isnull(paint_dirs[new_dir]))
paint_dir = new_dir
to_chat(usr, "<span class='notice'>You set \the [src] direction to '[paint_dir]'.</span>")
+2 -2
View File
@@ -315,7 +315,7 @@ var/list/GPS_list = list()
if(href_list["track_color"])
var/obj/item/device/gps/gps = locate(href_list["track_color"])
if(istype(gps) && !QDELETED(gps))
var/new_colour = input("Enter a new tracking color.", "GPS Waypoint Color") as color|null
var/new_colour = input(usr, "Enter a new tracking color.", "GPS Waypoint Color") as color|null
if(new_colour && istype(gps) && !QDELETED(gps) && holder == usr && !usr.incapacitated())
to_chat(usr, SPAN_NOTICE("You adjust the colour \the [src] is using to highlight [gps.gps_tag]."))
LAZYSET(tracking_devices, href_list["track_color"], new_colour)
@@ -323,7 +323,7 @@ var/list/GPS_list = list()
. = TRUE
if(href_list["tag"])
var/a = input("Please enter desired tag.", name, gps_tag) as text
var/a = input(usr, "Please enter desired tag.", name, gps_tag) as text
a = uppertext(copytext(sanitize(a), 1, 11))
if(in_range(src, usr))
gps_tag = a
@@ -30,7 +30,7 @@
to_chat(user,"<span class='notice'>There are no warrants available</span>")
return
var/temp
temp = input(user, "Which warrant would you like to load?") as null|anything in warrants
temp = tgui_input_list(user, "Which warrant would you like to load?", "Warrant Selection", warrants)
for(var/datum/data/record/warrant/W in data_core.warrants)
if(W.fields["namewarrant"] == temp)
active = W
@@ -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>", \
@@ -118,7 +118,7 @@
return
/obj/item/device/closet_painter/attack_self(var/mob/user)
var/choice = input("Do you wish to change the regular closet colour or the secure closet colour?") as null|anything in list("Regular Closet Colour","Secure Closet Colour")
var/choice = tgui_alert(usr, "Do you wish to change the regular closet color or the secure closet color?", "Color Selection", list("Regular Closet Colour","Cancel","Secure Closet Colour"))
if(choice == "Regular Closet Colour")
choose_colour()
else if(choice == "Secure Closet Colour")
@@ -137,7 +137,7 @@
if(usr.incapacitated())
return
var/new_colour = input("Select a colour.") as null|anything in colours
var/new_colour = tgui_input_list(usr, "Select a color:", "Color Selection", colours)
if(new_colour && !isnull(colours[new_colour]))
colour = new_colour
to_chat(usr, "<span class='notice'>You set \the [src] regular closet colour to '[colour]'.</span>")
@@ -151,7 +151,7 @@
if(usr.incapacitated())
return
var/new_colour_secure = input("Select a colour.") as null|anything in colours_secure
var/new_colour_secure = tgui_input_list(usr, "Select a color:", "Color Selection", colours_secure)
if(new_colour_secure && !isnull(colours_secure[new_colour_secure]))
colour_secure = new_colour_secure
to_chat(usr, "<span class='notice'>You set \the [src] secure closet colour to '[colour_secure]'.</span>")
+3 -3
View File
@@ -98,7 +98,7 @@
adjust_volume(usr)
/obj/item/device/megaphone/super/proc/adjust_volume(var/mob/living/user)
var/new_volume = input(user, "Set Volume") as null|anything in volume_options
var/new_volume = tgui_input_list(user, "Set Volume", "Set Volume", volume_options)
if(new_volume && Adjacent(user))
broadcast_size = new_volume
@@ -111,7 +111,7 @@
adjust_font(usr)
/obj/item/device/megaphone/super/proc/adjust_font(var/mob/living/user)
var/new_font = input(user, "Set Volume") as null|anything in font_options
var/new_font = tgui_input_list(user, "Set Volume", "Set Volume", font_options)
if(new_font && Adjacent(user))
broadcast_font = new_font
@@ -124,7 +124,7 @@
adjust_color(usr)
/obj/item/device/megaphone/super/proc/adjust_color(var/mob/living/user)
var/new_color = input(user, "Set Volume") as null|anything in color_options
var/new_color = tgui_input_list(user, "Set Volume", "Set Volume", color_options)
if(new_color && Adjacent(user))
broadcast_color = new_color
+1 -1
View File
@@ -32,7 +32,7 @@
tool_qualities = list(TOOL_MULTITOOL)
/obj/item/device/multitool/attack_self(mob/living/user)
var/choice = alert("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>")
+3 -3
View File
@@ -38,7 +38,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
if(pai != null) //Have a person in them already?
return ..()
var/choice = input(user, "You sure you want to inhabit this PAI?") in list("Yes", "No")
var/choice = tgui_alert(user, "You sure you want to inhabit this PAI?", "Confirmation", list("Yes", "No"))
if(choice == "No")
return ..()
@@ -273,7 +273,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
src.looking_for_personality = 1
paiController.findPAI(src, usr)
if(href_list["wipe"])
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
var/confirm = tgui_alert(usr, "Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe", list("Yes", "No"))
if(confirm == "Yes")
for(var/mob/M in src)
to_chat(M, "<font color = #ff0000><h2>You feel yourself slipping away from reality.</h2></font>")
@@ -290,7 +290,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
var/newlaws = sanitize(input(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
if(newlaws)
pai.pai_laws = newlaws
to_chat(pai, "Your supplemental directives have been updated. Your new directives are:")
@@ -24,7 +24,10 @@
P.change_color(pipe_colors[mode])
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
var/new_mode = tgui_input_list(user, "Which colour do you want to use?", "Pipe painter", modes)
if(!new_mode)
return
mode = new_mode
/obj/item/device/pipe_painter/examine(mob/user)
. = ..()
@@ -60,7 +60,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
choices += H
// Subtargets
if(choices.len > 1)
var/mob/living/new_M = input(user, "Ambiguous target. Please validate target:", "Target Validation", M) as null|anything in choices
var/mob/living/new_M = tgui_input_list(user, "Ambiguous target. Please validate target:", "Target Validation", choices, M)
if(!new_M || !M.Adjacent(user))
return
M = new_M
@@ -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>")
+1 -1
View File
@@ -191,7 +191,7 @@
operating = 1
while(selected_camera && Adjacent(user))
selected_camera = input("Select camera to view.") as null|anything in cameras
selected_camera = tgui_input_list(usr, "Select camera to view.", "Camera Choice", cameras)
selected_camera = null
operating = 0
@@ -14,7 +14,7 @@
/obj/item/device/universal_translator/attack_self(mob/user)
if(!listening) //Turning ON
langset = input(user,"Translate to which of your languages?","Language Selection") as null|anything in user.languages
langset = tgui_input_list(user,"Translate to which of your languages?","Language Selection", user.languages)
if(langset)
if(langset && ((langset.flags & NONVERBAL) || (langset.flags & HIVEMIND) || (!langset.machine_understands)))
//Nonverbal means no spoken words to translate, so I didn't see the need to remove it.
@@ -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)
@@ -161,45 +162,6 @@
destination = beacons[choice]
rebuild_radial_images()
/* Ye olde text-based way
var/choice = alert(user,"What do you want to do?","[src]","Create Beacon","Cancel","Target Beacon")
switch(choice)
if("Create Beacon")
if(beacons_left <= 0)
alert("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("Entered name length invalid (must be longer than 2, no more than than 20).","Error")
return
if(new_name in beacons)
alert("No duplicate names, please. '[new_name]' exists already.","Error")
return
var/obj/item/device/perfect_tele_beacon/nb = new(get_turf(src))
nb.tele_name = new_name
nb.tele_hand = src
nb.creator = user.ckey
beacons[new_name] = nb
beacons_left--
if(isliving(user))
var/mob/living/L = user
L.put_in_any_hand_if_possible(nb)
if("Target Beacon")
if(!beacons.len)
to_chat(user,"<span class='warning'>\The [src] doesn't have any beacons!</span>")
else
var/target = input("Which beacon do you target?","[src]") in beacons|null
if(target && (target in beacons))
destination = beacons[target]
to_chat(user,"<span class='notice'>Destination set to '[target]'.</span>")
else
return
*/
/obj/item/device/perfect_tele/attackby(obj/W, mob/user)
if(istype(W,cell_type) && !power_source)
power_source = W
@@ -421,14 +383,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,9 +405,9 @@ 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
var/obj/belly/bellychoice = tgui_input_list(usr, "Which belly?","Select A Belly", L.vore_organs)
if(bellychoice)
user.visible_message("<span class='warning'>[user] is trying to stuff \the [src] into [user.gender == MALE ? "his" : user.gender == FEMALE ? "her" : "their"] [bellychoice]!</span>","<span class='notice'>You begin putting \the [src] into your [bellychoice]!</span>")
if(do_after(user,5 SECONDS,src))
+1 -1
View File
@@ -9,7 +9,7 @@
var/list/options = list()
options[".45 Pistol"] = list(/obj/item/weapon/gun/projectile/colt/detective, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45/rubber)
options[".45 Revolver"] = list(/obj/item/weapon/gun/projectile/revolver/detective45, /obj/item/ammo_magazine/s45/rubber, /obj/item/ammo_magazine/s45/rubber)
var/choice = input(user,"Would you prefer a pistol or a revolver?") as null|anything in options
var/choice = tgui_input_list(user,"Would you prefer a pistol or a revolver?", "Gun!", options)
if(src && choice)
var/list/things_to_spawn = options[choice]
for(var/new_type in things_to_spawn) // Spawn all the things, the gun and the ammo.
+1 -1
View File
@@ -8,7 +8,7 @@
options["NT Mk58 (.45)"] = list(/obj/item/weapon/gun/projectile/sec, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45/rubber)
options["SW 625 Revolver (.45)"] = list(/obj/item/weapon/gun/projectile/revolver/detective45, /obj/item/ammo_magazine/s45/rubber, /obj/item/ammo_magazine/s45/rubber)
options["P92X (9mm)"] = list(/obj/item/weapon/gun/projectile/p92x/sec, /obj/item/ammo_magazine/m9mm/rubber, /obj/item/ammo_magazine/m9mm/rubber)
var/choice = input(user,"Would you prefer a pistol or a revolver?") as null|anything in options
var/choice = tgui_input_list(user,"Would you prefer a pistol or a revolver?", "Gun!", options)
if(src && choice)
var/list/things_to_spawn = options[choice]
for(var/new_type in things_to_spawn) // Spawn all the things, the gun and the ammo.
@@ -68,7 +68,7 @@ var/list/marker_beacon_colors = list(
return
if(!in_range(src, user))
return
var/input_color = input(user, "Choose a color.", "Beacon Color") as null|anything in marker_beacon_colors
var/input_color = tgui_input_list(user, "Choose a color.", "Beacon Color", marker_beacon_colors)
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
if(input_color)
@@ -143,7 +143,7 @@ var/list/marker_beacon_colors = list(
return
if(!in_range(src, user))
return
var/input_color = input(user, "Choose a color.", "Beacon Color") as null|anything in marker_beacon_colors
var/input_color = tgui_input_list(user, "Choose a color.", "Beacon Color", marker_beacon_colors)
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
if(input_color)
+1 -1
View File
@@ -350,7 +350,7 @@
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
var/N = input("How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1) as num|null
var/N = input(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1) as num|null
if(N)
var/obj/item/stack/F = src.split(N)
if (F)
+2 -2
View File
@@ -48,7 +48,7 @@
options["Moon Gem"] = "moon"
options["Tajaran Figure"] = "catrobe"
var/choice = input(M,"Choose your icon!","Customize Figure") in options
var/choice = tgui_input_list(M, "Choose your icon!", "Customize Figure", options)
if(src && choice && !M.stat && in_range(M,src))
icon_state = options[choice]
if(options[choice] == "frobe")
@@ -123,7 +123,7 @@
var/mob/M = usr
if(!M.mind) return 0
var/input = sanitizeSafe(input("What do you want to name the icon?", ,""), MAX_NAME_LEN)
var/input = sanitizeSafe(input(usr, "What do you want to name the icon?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = "icon of " + input
+2 -2
View File
@@ -320,7 +320,7 @@
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(alert("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)
@@ -897,7 +897,7 @@
if(!M.mind)
return 0
var/input = sanitizeSafe(input("What do you want to name the plushie?", ,""), MAX_NAME_LEN)
var/input = sanitizeSafe(input(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
+1 -1
View File
@@ -294,7 +294,7 @@
/obj/item/toy/rock/attackby(obj/item/I as obj, mob/living/user as mob, proximity)
if(!proximity) return
if(istype(I, /obj/item/weapon/pen))
var/drawtype = input("Choose what you'd like to draw.", "Faces") in list("fred","roxie","rock")
var/drawtype = tgui_alert(user, "Choose what you'd like to draw.", "Faces", list("fred","roxie","rock","Cancel"))
switch(drawtype)
if("fred")
src.icon_state = "fred"
@@ -132,7 +132,7 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
var/targName = sanitize(input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
@@ -158,7 +158,7 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(input("Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
var/targName = sanitize(input(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
targetName = targName
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
@@ -239,7 +239,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
..()
var/new_lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
var/new_lawpos = input(usr, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
@@ -356,7 +356,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = sanitize(input("Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
@@ -380,7 +380,7 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = sanitize(input("Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
+1 -1
View File
@@ -57,7 +57,7 @@ RSF
if(!Adjacent(user) || !istype(user))
to_chat(user,"<span class='notice'>You are too far away.</span>")
return
var/glass_choice = input(user, "Please choose which type of glass you would like to produce.") as null|anything in container_types
var/glass_choice = tgui_input_list(user, "Please choose which type of glass you would like to produce.", "Glass Choice", container_types)
if(glass_choice)
glasstype = container_types[glass_choice]
@@ -32,7 +32,7 @@
opposite_catastasis = "BROAD"
catastasis = "STANDARD"
switch( alert("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("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,8 +287,8 @@ Implant Specifics:<BR>"}
t.hotspot_expose(3500,125)
/obj/item/weapon/implant/explosive/post_implant(mob/source as mob)
elevel = alert("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion")
phrase = input("Choose activation phrase:") as text
elevel = tgui_alert(usr, "What sort of explosion would you prefer?", "Implant Intent", list("Localized Limb", "Destroy Body", "Full Explosion"))
phrase = input(usr, "Choose activation phrase:") as text
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
@@ -618,7 +618,10 @@ the implant may become unstable and either pre-maturely inject the subject or si
qdel(src)
/obj/item/weapon/implant/compressed/post_implant(mob/source)
src.activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
var/choices = list("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
activation_emote = tgui_input_list(usr, "Choose activation emote. If you cancel this, one will be picked at random.", "Implant Activation", choices)
if(!activation_emote)
activation_emote = pick(choices)
if (source.mind)
source.mind.store_memory("Compressed matter implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
to_chat(source, "The implanted compressed matter implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.")
@@ -108,7 +108,7 @@
if(Choices.len == 1)
target_choice = Choices[1]
else
target_choice = input("Choose augment location:") in Choices
target_choice = tgui_input_list(usr, "Choose augment location:", "Choose Location", Choices)
else
return FALSE
@@ -12,8 +12,10 @@
return
/obj/item/weapon/implant/uplink/post_implant(mob/source)
listening_objects |= src
activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
var/choices = list("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
activation_emote = tgui_input_list(usr, "Choose activation emote. If you cancel this, one will be picked at random.", "Implant Activation", choices)
if(!activation_emote)
activation_emote = pick(choices)
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
to_chat(source, "The implanted uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.")
@@ -191,7 +191,7 @@
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(alert("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)
+3 -4
View File
@@ -46,10 +46,9 @@
return
/obj/item/weapon/teleportation_scroll/proc/teleportscroll(var/mob/user)
var/A
A = input(user, "Area to jump to", "BOOYEA", A) in teleportlocs
var/A = tgui_input_list(user, "Area to jump to:", "Teleportation Scroll", teleportlocs)
if(!A)
return
var/area/thearea = teleportlocs[A]
if (user.stat || user.restrained())
+1 -1
View File
@@ -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("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)
+1 -1
View File
@@ -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"
@@ -160,7 +160,9 @@ Frequency:
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") in L
var/t1 = tgui_input_list(user, "Please select a teleporter to lock in on.", "Hand Teleporter", L)
if(!t1)
return
if ((user.get_active_hand() != src || user.stat || user.restrained()))
return
var/count = 0 //num of portals from this teleport in world