mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-20 07:12:55 +00:00
Converts over the missing TGUI input lists (#23859)
* Converts over the missing TGUI input lists * last fixes * num revert
This commit is contained in:
@@ -415,7 +415,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(!isobserver(usr))
|
||||
to_chat(usr, "Not when you're not dead!")
|
||||
return
|
||||
var/target = input("Area to teleport to", "Teleport to a location") as null|anything in SSmapping.ghostteleportlocs
|
||||
var/target = tgui_input_list(usr, "Area to teleport to", "Teleport to a location", SSmapping.ghostteleportlocs)
|
||||
teleport(SSmapping.ghostteleportlocs[target])
|
||||
|
||||
/mob/dead/observer/proc/jump_to_ruin()
|
||||
|
||||
@@ -1487,7 +1487,9 @@
|
||||
return
|
||||
|
||||
var/turf/origin = T
|
||||
var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
|
||||
var/direction = tgui_input_list(src, "Which direction?", "Tile selection", list("Here", "North", "South", "East", "West"))
|
||||
if(!direction)
|
||||
return
|
||||
if(direction != "Here")
|
||||
T = get_step(T,text2dir(direction))
|
||||
if(!istype(T))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/verb/set_default_language(language as null|anything in languages)
|
||||
/mob/living/verb/set_default_language()
|
||||
set name = "Set Default Language"
|
||||
set category = "IC"
|
||||
|
||||
var/language = tgui_input_list(src, "Your current default language is: [default_language]", "Set your default language", languages)
|
||||
if(language)
|
||||
to_chat(src, "<span class='notice'>You will now speak [language] if you do not specify a language when speaking.</span>")
|
||||
else
|
||||
@@ -9,14 +9,12 @@
|
||||
default_language = language
|
||||
|
||||
// Silicons can't neccessarily speak everything in their languages list
|
||||
/mob/living/silicon/set_default_language(language as null|anything in speech_synthesizer_langs)
|
||||
..()
|
||||
|
||||
/mob/living/verb/check_default_language()
|
||||
set name = "Check Default Language"
|
||||
/mob/living/silicon/set_default_language()
|
||||
set name = "Set Default Language"
|
||||
set category = "IC"
|
||||
|
||||
if(default_language)
|
||||
to_chat(src, "<span class='notice'>You are currently speaking [default_language] by default.</span>")
|
||||
var/language = tgui_input_list(src, "Your current default language is: [default_language]", "Set your default language", speech_synthesizer_langs)
|
||||
if(language)
|
||||
to_chat(src, "<span class='notice'>You will now speak [language] if you do not specify a language when speaking.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Your current default language is your species or mob type default.</span>")
|
||||
to_chat(src, "<span class='notice'>You will now speak whatever your standard default language is if you do not specify one when speaking.</span>")
|
||||
default_language = language
|
||||
|
||||
@@ -447,7 +447,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
|
||||
//if(icon_state == initial(icon_state))
|
||||
var/icontype = ""
|
||||
icontype = input("Select an icon!", "AI", null, null) in display_choices
|
||||
icontype = tgui_input_list(usr, "Select an icon!", "AI", display_choices)
|
||||
icon = 'icons/mob/ai.dmi' //reset this in case we were on a custom sprite and want to change to a standard one
|
||||
switch(icontype)
|
||||
if("Custom")
|
||||
@@ -968,7 +968,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
return
|
||||
|
||||
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Friend Computer")
|
||||
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
|
||||
var/emote = tgui_input_list(usr, "Please, select a status!", "AI Status", ai_emotions)
|
||||
|
||||
if(check_unable())
|
||||
return
|
||||
|
||||
@@ -29,18 +29,18 @@
|
||||
// Copied over from paper's rename verb
|
||||
// see code\modules\paperwork\paper.dm line 62
|
||||
|
||||
/obj/item/pen/multi/robopen/proc/RenamePaper(mob/user as mob,obj/paper as obj)
|
||||
/obj/item/pen/multi/robopen/proc/RenamePaper(mob/user, obj/paper)
|
||||
if(!user || !paper)
|
||||
return
|
||||
var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling", null) as text
|
||||
var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling") as text
|
||||
if(!user || !paper)
|
||||
return
|
||||
|
||||
n_name = copytext(n_name, 1, 32)
|
||||
if(( get_dist(user,paper) <= 1 && user.stat == 0))
|
||||
paper.name = "paper[(n_name ? "- '[n_name]'" : null)]"
|
||||
if(get_dist(user, paper) > 1 || user.stat)
|
||||
return
|
||||
paper.name = "paper[(n_name ? "- '[n_name]'" : null)]"
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
//TODO: Add prewritten forms to dispense when you work out a good way to store the strings.
|
||||
/obj/item/form_printer
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC"
|
||||
|
||||
pose = sanitize(copytext(input(usr, "This is [src]. It...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
|
||||
pose = sanitize(copytext(input(usr, "This is [src]. It...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
/mob/living/silicon/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
if(mode == BOT_IDLE || mode == BOT_DELIVER)
|
||||
start_home()
|
||||
if("destination")
|
||||
var/new_dest = input(usr, "Enter Destination:", name, destination) as null|anything in GLOB.deliverybeacontags
|
||||
var/new_dest = tgui_input_list(usr, "Enter Destination:", name, GLOB.deliverybeacontags)
|
||||
if(new_dest)
|
||||
set_destination(new_dest)
|
||||
if("setid")
|
||||
@@ -246,7 +246,7 @@
|
||||
if(new_id)
|
||||
set_suffix(new_id)
|
||||
if("sethome")
|
||||
var/new_home = input(usr, "Enter Home:", name, home_destination) as null|anything in GLOB.deliverybeacontags
|
||||
var/new_home = tgui_input_list(usr, "Enter Home:", name, GLOB.deliverybeacontags)
|
||||
if(new_home)
|
||||
home_destination = new_home
|
||||
if("unload")
|
||||
@@ -779,7 +779,7 @@
|
||||
unload(0)
|
||||
|
||||
if("target")
|
||||
var/dest = input("Select Bot Destination", "Mulebot [suffix] Interlink", destination) as null|anything in GLOB.deliverybeacontags
|
||||
var/dest = tgui_input_list(user, "Select Bot Destination", "Mulebot [suffix] Interlink", GLOB.deliverybeacontags)
|
||||
if(dest)
|
||||
set_destination(dest)
|
||||
|
||||
|
||||
@@ -127,11 +127,11 @@
|
||||
continue
|
||||
choices += H
|
||||
|
||||
if(!choices.len)
|
||||
if(!length(choices))
|
||||
to_chat(src, "<span class='warning'>No suitable diona nearby.</span>")
|
||||
return FALSE
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to merge with?") in null|choices
|
||||
var/mob/living/M = tgui_input_list(src, "Who do you wish to merge with?", "Nymph Merging", choices)
|
||||
|
||||
if(!M || !src || !(Adjacent(M)) || stat != CONSCIOUS) //input can take a while, so re-validate
|
||||
return FALSE
|
||||
@@ -232,11 +232,11 @@
|
||||
if(Adjacent(H) && H.dna && !(NO_BLOOD in H.dna.species.species_traits))
|
||||
choices += H
|
||||
|
||||
if(!choices.len)
|
||||
if(!length(choices))
|
||||
to_chat(src, "<span class='warning'>No suitable blood donors nearby.</span>")
|
||||
return FALSE
|
||||
|
||||
var/mob/living/carbon/human/M = input(src,"Who do you wish to take a sample from?") in null|choices
|
||||
var/mob/living/carbon/human/M = tgui_input_list(src, "Who do you wish to take a sample from?", "Blood Sampling", choices)
|
||||
|
||||
if(!M || !src || !(Adjacent(M)) || stat != CONSCIOUS) //input can take a while, so re-validate
|
||||
return FALSE
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
if(Adjacent(O))
|
||||
choices += O
|
||||
if(length(choices))
|
||||
cocoon_target = input(src,"What do you wish to cocoon?") in null|choices
|
||||
cocoon_target = tgui_input_list(src, "What do you wish to cocoon?", "Cocoon Wrapping", choices)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>No suitable dead prey or wrappable objects found nearby.")
|
||||
return
|
||||
|
||||
@@ -241,8 +241,8 @@
|
||||
if(Adjacent(O) && !O.anchored)
|
||||
if(!istype(O, /obj/structure/spider))
|
||||
choices += O
|
||||
if(choices.len)
|
||||
cocoon_target = input(src,"What do you wish to cocoon?") in null|choices
|
||||
if(length(choices))
|
||||
cocoon_target = tgui_input_list(src, "What do you wish to cocoon?", "Cocoon Selection", choices)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>There is nothing nearby you can wrap.</span>")
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
queeneggs_action.button.name = "Empress Eggs"
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/LayQueenEggs()
|
||||
var/eggtype = input("What kind of eggs?") as null|anything in list(TS_DESC_QUEEN, TS_DESC_MOTHER, TS_DESC_PRINCE, TS_DESC_PRINCESS, TS_DESC_RED, TS_DESC_GRAY, TS_DESC_GREEN, TS_DESC_BLACK, TS_DESC_PURPLE, TS_DESC_WHITE, TS_DESC_BROWN)
|
||||
var/eggtype = tgui_input_list(src, "What kind of eggs?", "Egg laying", list(TS_DESC_QUEEN, TS_DESC_MOTHER, TS_DESC_PRINCE, TS_DESC_PRINCESS, TS_DESC_RED, TS_DESC_GRAY, TS_DESC_GREEN, TS_DESC_BLACK, TS_DESC_PURPLE, TS_DESC_WHITE, TS_DESC_BROWN))
|
||||
var/numlings = input("How many in the batch?") as null|anything in list(1, 2, 3, 4, 5, 10, 15, 20, 30, 40, 50)
|
||||
if(eggtype == null || numlings == null)
|
||||
to_chat(src, "<span class='danger'>Cancelled.</span>")
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
eggtypes += TS_DESC_BLACK
|
||||
var/eggtype = pick(eggtypes)
|
||||
if(client)
|
||||
eggtype = input("What kind of eggs?") as null|anything in eggtypes
|
||||
eggtype = tgui_input_list(src, "What kind of eggs?", "Egg Laying", eggtypes)
|
||||
if(!(eggtype in eggtypes))
|
||||
to_chat(src, "<span class='danger'>Unrecognized egg type.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(!isturf(loc))
|
||||
// This has to be checked after we ask the user what egg type. Otherwise they could trigger prompt THEN move into a vent.
|
||||
to_chat(src, "<span class='danger'>Eggs can only be laid while standing on a floor.</span>")
|
||||
|
||||
@@ -255,14 +255,14 @@
|
||||
var/list/eggtypes = ListAvailableEggTypes()
|
||||
var/list/eggtypes_uncapped = list(TS_DESC_RED, TS_DESC_GRAY, TS_DESC_GREEN)
|
||||
|
||||
var/eggtype = input("What kind of eggs?") as null|anything in eggtypes
|
||||
var/eggtype = tgui_input_list(src, "What kind of eggs?", "Laying Eggs", eggtypes)
|
||||
if(canlay < 1)
|
||||
// this was checked before input() but we have to check again to prevent them spam-clicking the popup.
|
||||
to_chat(src, "<span class='danger'>Too soon to lay another egg.</span>")
|
||||
return
|
||||
if(!(eggtype in eggtypes))
|
||||
to_chat(src, "<span class='danger'>Unrecognized egg type.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
// Multiple of eggtypes_uncapped can be laid at once. Other types must be laid one at a time (to prevent exploits)
|
||||
var/numlings = 1
|
||||
|
||||
@@ -459,7 +459,7 @@ GLOBAL_LIST_EMPTY(ts_infected_list)
|
||||
if(T.stat == DEAD)
|
||||
continue
|
||||
targets |= T // we use |= instead of += to avoid adding src to the list twice
|
||||
var/mob/living/L = input("Choose a terror to watch.", "Selection") in targets
|
||||
var/mob/living/L = tgui_input_list(src, "Choose a terror to watch.", "Brood Viewing", targets)
|
||||
if(istype(L))
|
||||
reset_perspective(L)
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
if(C!=src && Adjacent(C))
|
||||
choices += C
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
|
||||
var/mob/living/M = tgui_input_list(src, "Who do you wish to feed on?", "Feeding Selection", choices)
|
||||
if(!M)
|
||||
return 0
|
||||
return FALSE
|
||||
if(CanFeedon(M))
|
||||
Feedon(M)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/slime/feed
|
||||
name = "Feed"
|
||||
|
||||
@@ -885,7 +885,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
var/eye_name = null
|
||||
|
||||
var/ok = "[is_admin ? "Admin Observe" : "Observe"]"
|
||||
eye_name = input("Please, select a player!", ok, null, null) as null|anything in creatures
|
||||
eye_name = tgui_input_list(usr, "Please, select a player!", ok, creatures)
|
||||
|
||||
if(!eye_name)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user