Converts over the missing TGUI input lists (#23859)

* Converts over the missing TGUI input lists

* last fixes

* num revert
This commit is contained in:
GDN
2024-02-14 15:17:29 -06:00
committed by GitHub
parent 8f9035d1ed
commit 82b863cefd
54 changed files with 167 additions and 168 deletions

View File

@@ -300,18 +300,18 @@
/proc/ionnum() /proc/ionnum()
return "[pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")]" return "[pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")]"
//When an AI is activated, it can choose from a list of non-slaved borgs to have as a slave. // Selects an unlinked borg, used in the robot upload console
/proc/freeborg() /proc/freeborg(mob/user)
var/select var/select
var/list/borgs = list() var/list/borgs = list()
for(var/mob/living/silicon/robot/A in GLOB.player_list) for(var/mob/living/silicon/robot/A in GLOB.player_list)
if(A.stat == 2 || A.connected_ai || A.scrambledcodes || isdrone(A)) if(A.stat == DEAD || A.connected_ai || A.scrambledcodes || isdrone(A))
continue continue
var/name = "[A.real_name] ([A.modtype] [A.braintype])" var/name = "[A.real_name] ([A.modtype] [A.braintype])"
borgs[name] = A borgs[name] = A
if(length(borgs)) if(length(borgs))
select = input("Unshackled borg signals detected:", "Borg selection", null, null) as null|anything in borgs select = tgui_input_list(user, "Unshackled borg signals detected:", "Borg selection", borgs)
return borgs[select] return borgs[select]
//When a borg is activated, it can choose which AI it wants to be slaved to //When a borg is activated, it can choose which AI it wants to be slaved to
@@ -338,10 +338,12 @@
/proc/select_active_ai(mob/user) /proc/select_active_ai(mob/user)
var/list/ais = active_ais() var/list/ais = active_ais()
if(length(ais)) if(!length(ais))
if(user) . = input(usr,"AI signals detected:", "AI selection") in ais return
else . = pick(ais) if(user)
return . return tgui_input_list(user, "AI signals detected:", "AI selection", ais)
else
return pick(ais)
/proc/get_sorted_mobs() /proc/get_sorted_mobs()
var/list/old_list = getmobs() var/list/old_list = getmobs()

View File

@@ -428,7 +428,7 @@ Recharging stations are available in robotics, the dormitory bathrooms, and the
var/mob/living/simple_animal/diona/D = nymphs[1] var/mob/living/simple_animal/diona/D = nymphs[1]
D.split(TRUE) D.split(TRUE)
else else
var/mob/living/simple_animal/diona/D = input("Select a nymph to drop:", "Nymph Dropping", nymphs[1]) as anything in nymphs var/mob/living/simple_animal/diona/D = tgui_input_list(usr, "Select a nymph to drop:", "Nymph Dropping", nymphs)
if(D in usr.contents) if(D in usr.contents)
D.split(TRUE) D.split(TRUE)

View File

@@ -11,18 +11,18 @@
/obj/effect/proc_holder/spell/area_teleport/before_cast(list/targets, mob/user) /obj/effect/proc_holder/spell/area_teleport/before_cast(list/targets, mob/user)
..() ..()
selected_area = null // Reset it selected_area = null // Reset it
var/A var/area_name
if(!randomise_selection) if(!randomise_selection)
A = input("Area to teleport to", "Teleport", A) as null|anything in SSmapping.teleportlocs area_name = tgui_input_list(user, "Area to teleport to", "Teleport", SSmapping.teleportlocs)
else else
A = pick(SSmapping.teleportlocs) area_name = pick(SSmapping.teleportlocs)
if(!A) if(!area_name)
smoke_type = SMOKE_NONE smoke_type = SMOKE_NONE
return return
var/area/thearea = SSmapping.teleportlocs[A] var/area/thearea = SSmapping.teleportlocs[area_name]
if(thearea.tele_proof && !istype(thearea, /area/wizard_station)) if(thearea.tele_proof && !istype(thearea, /area/wizard_station))
to_chat(user, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.") to_chat(user, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.")

View File

@@ -750,13 +750,13 @@
//Alt heads. //Alt heads.
if(head_organ.dna.species.bodyflags & HAS_ALT_HEADS) if(head_organ.dna.species.bodyflags & HAS_ALT_HEADS)
var/list/valid_alt_heads = M.generate_valid_alt_heads() var/list/valid_alt_heads = M.generate_valid_alt_heads()
var/new_alt_head = input("Please select alternate head", "Character Generation", head_organ.alt_head) as null|anything in valid_alt_heads var/new_alt_head = tgui_input_list(user, "Please select alternate head", "Character Generation", valid_alt_heads)
if(new_alt_head) if(new_alt_head)
M.change_alt_head(new_alt_head) M.change_alt_head(new_alt_head)
// hair // hair
var/list/valid_hairstyles = M.generate_valid_hairstyles() var/list/valid_hairstyles = M.generate_valid_hairstyles()
var/new_style = input("Please select hair style", "Character Generation", head_organ.h_style) as null|anything in valid_hairstyles var/new_style = tgui_input_list(user, "Please select hair style", "Character Generation", valid_hairstyles)
// if new style selected (not cancel) // if new style selected (not cancel)
if(new_style) if(new_style)
@@ -774,7 +774,7 @@
// facial hair // facial hair
var/list/valid_facial_hairstyles = M.generate_valid_facial_hairstyles() var/list/valid_facial_hairstyles = M.generate_valid_facial_hairstyles()
new_style = input("Please select facial style", "Character Generation", head_organ.f_style) as null|anything in valid_facial_hairstyles new_style = tgui_input_list(user, "Please select facial style", "Character Generation", valid_facial_hairstyles)
if(new_style) if(new_style)
M.change_facial_hair(new_style) M.change_facial_hair(new_style)
@@ -792,7 +792,7 @@
//Head accessory. //Head accessory.
if(head_organ.dna.species.bodyflags & HAS_HEAD_ACCESSORY) if(head_organ.dna.species.bodyflags & HAS_HEAD_ACCESSORY)
var/list/valid_head_accessories = M.generate_valid_head_accessories() var/list/valid_head_accessories = M.generate_valid_head_accessories()
var/new_head_accessory = input("Please select head accessory style", "Character Generation", head_organ.ha_style) as null|anything in valid_head_accessories var/new_head_accessory = tgui_input_list(user, "Please select head accessory style", "Character Generation", valid_head_accessories)
if(new_head_accessory) if(new_head_accessory)
M.change_head_accessory(new_head_accessory) M.change_head_accessory(new_head_accessory)
@@ -804,8 +804,8 @@
//Body accessory. //Body accessory.
if((M.dna.species.tail && M.dna.species.bodyflags & (HAS_TAIL)) || (M.dna.species.wing && M.dna.species.bodyflags & (HAS_WING))) if((M.dna.species.tail && M.dna.species.bodyflags & (HAS_TAIL)) || (M.dna.species.wing && M.dna.species.bodyflags & (HAS_WING)))
var/list/valid_body_accessories = M.generate_valid_body_accessories() var/list/valid_body_accessories = M.generate_valid_body_accessories()
if(valid_body_accessories.len > 1) //By default valid_body_accessories will always have at the very least a 'none' entry populating the list, even if the user's species is not present in any of the list items. if(length(valid_body_accessories) > 1) //By default valid_body_accessories will always have at the very least a 'none' entry populating the list, even if the user's species is not present in any of the list items.
var/new_body_accessory = input("Please select body accessory style", "Character Generation", M.body_accessory) as null|anything in valid_body_accessories var/new_body_accessory = tgui_input_list(user, "Please select body accessory style", "Character Generation", valid_body_accessories)
if(new_body_accessory) if(new_body_accessory)
M.change_body_accessory(new_body_accessory) M.change_body_accessory(new_body_accessory)
@@ -813,7 +813,7 @@
//Head markings. //Head markings.
if(M.dna.species.bodyflags & HAS_HEAD_MARKINGS) if(M.dna.species.bodyflags & HAS_HEAD_MARKINGS)
var/list/valid_head_markings = M.generate_valid_markings("head") var/list/valid_head_markings = M.generate_valid_markings("head")
var/new_marking = input("Please select head marking style", "Character Generation", M.m_styles["head"]) as null|anything in valid_head_markings var/new_marking = tgui_input_list(user, "Please select head marking style", "Character Generation", valid_head_markings)
if(new_marking) if(new_marking)
M.change_markings(new_marking, "head") M.change_markings(new_marking, "head")
@@ -824,7 +824,7 @@
//Body markings. //Body markings.
if(M.dna.species.bodyflags & HAS_BODY_MARKINGS) if(M.dna.species.bodyflags & HAS_BODY_MARKINGS)
var/list/valid_body_markings = M.generate_valid_markings("body") var/list/valid_body_markings = M.generate_valid_markings("body")
var/new_marking = input("Please select body marking style", "Character Generation", M.m_styles["body"]) as null|anything in valid_body_markings var/new_marking = tgui_input_list(user, "Please select body marking style", "Character Generation", valid_body_markings)
if(new_marking) if(new_marking)
M.change_markings(new_marking, "body") M.change_markings(new_marking, "body")
@@ -834,7 +834,7 @@
//Tail markings. //Tail markings.
if(M.dna.species.bodyflags & HAS_TAIL_MARKINGS) if(M.dna.species.bodyflags & HAS_TAIL_MARKINGS)
var/list/valid_tail_markings = M.generate_valid_markings("tail") var/list/valid_tail_markings = M.generate_valid_markings("tail")
var/new_marking = input("Please select tail marking style", "Character Generation", M.m_styles["tail"]) as null|anything in valid_tail_markings var/new_marking = tgui_input_list("Please select tail marking style", "Character Generation", valid_tail_markings)
if(new_marking) if(new_marking)
M.change_markings(new_marking, "tail") M.change_markings(new_marking, "tail")

View File

@@ -126,7 +126,7 @@
if(!target || !iscarbon(owner)) if(!target || !iscarbon(owner))
return return
var/obj/machinery/abductor/console/console = target var/obj/machinery/abductor/console/console = target
console.SelectDisguise(remote=1) console.SelectDisguise(TRUE, usr)
/datum/action/innate/set_droppoint /datum/action/innate/set_droppoint
name = "Set Experiment Release Point" name = "Set Experiment Release Point"

View File

@@ -119,7 +119,7 @@
if(vest) if(vest)
vest.toggle_nodrop() vest.toggle_nodrop()
else if(href_list["select_disguise"]) else if(href_list["select_disguise"])
SelectDisguise() SelectDisguise(FALSE, usr)
else if(href_list["dispense"]) else if(href_list["dispense"])
switch(href_list["dispense"]) switch(href_list["dispense"])
if("baton") if("baton")
@@ -149,10 +149,10 @@
if(vest) if(vest)
vest.flip_mode() vest.flip_mode()
/obj/machinery/abductor/console/proc/SelectDisguise(remote = 0) /obj/machinery/abductor/console/proc/SelectDisguise(remote, mob/user)
var/entry_name = input( "Choose Disguise", "Disguise") as null|anything in disguises var/entry_name = tgui_input_list(user, "Choose Disguise", "Abductor Disguises", disguises)
var/datum/icon_snapshot/chosen = disguises[entry_name] var/datum/icon_snapshot/chosen = disguises[entry_name]
if(chosen && (remote || in_range(usr,src))) if(chosen && (remote || in_range(user, src)))
vest.SetDisguise(chosen) vest.SetDisguise(chosen)
/obj/machinery/abductor/console/proc/SetDroppoint(turf/location,user) /obj/machinery/abductor/console/proc/SetDroppoint(turf/location,user)
@@ -164,9 +164,7 @@
pad.teleport_target = location pad.teleport_target = location
to_chat(user, "<span class='notice'>Location marked as test subject release point.</span>") to_chat(user, "<span class='notice'>Location marked as test subject release point.</span>")
/obj/machinery/abductor/console/proc/Link_Abduction_Equipment() // these must all be explicitly `in machines` or they will not properly link. /obj/machinery/abductor/console/proc/Link_Abduction_Equipment() // these must all be explicitly `in machines` or they will not properly link.
for(var/obj/machinery/abductor/pad/p in GLOB.abductor_equipment) for(var/obj/machinery/abductor/pad/p in GLOB.abductor_equipment)
if(p.team == team) if(p.team == team)
pad = p pad = p

View File

@@ -295,7 +295,7 @@
picked_random_type = pick(possible_guardians) picked_random_type = pick(possible_guardians)
guardian_type = picked_random_type guardian_type = picked_random_type
else else
guardian_type = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians guardian_type = tgui_input_list(user, "Pick the type of [mob_name]", "[mob_name] Creation", possible_guardians)
if(!guardian_type) if(!guardian_type)
to_chat(user, "<span class='warning'>You decide against using the [name].</span>") to_chat(user, "<span class='warning'>You decide against using the [name].</span>")
used = FALSE used = FALSE

View File

@@ -149,12 +149,11 @@
to_chat(guardian_user, "<span class='notice'>Surveillance trap deployed!</span>") to_chat(guardian_user, "<span class='notice'>Surveillance trap deployed!</span>")
return TRUE return TRUE
else else
to_chat(guardian_user, "<span class='notice'>You have too many traps deployed. Delete one to place another.</span>") var/picked_snare = tgui_input_list(guardian_user, "You have too many snares deployed! Delete one to place another.", "Disarm Snare", guardian_user.snares)
var/picked_snare = input(guardian_user, "Pick which trap to disarm", "Disarm Trap") as null|anything in guardian_user.snares
if(picked_snare) if(picked_snare)
guardian_user.snares -= picked_snare guardian_user.snares -= picked_snare
qdel(picked_snare) qdel(picked_snare)
to_chat(src, "<span class='notice'>Snare disarmed.</span>") to_chat(user, "<span class='notice'>Snare disarmed.</span>")
revert_cast() revert_cast()
/obj/effect/proc_holder/spell/choose_battlecry /obj/effect/proc_holder/spell/choose_battlecry

View File

@@ -44,7 +44,7 @@
target_turf.air_update_turf() target_turf.air_update_turf()
/mob/living/simple_animal/hostile/guardian/gaseous/ToggleMode() /mob/living/simple_animal/hostile/guardian/gaseous/ToggleMode()
var/picked_gas = input("Select a gas to expel.", "Gas Producer") as null|anything in possible_gases var/picked_gas = tgui_input_list(src, "Select a gas to expel.", "Gas Producer", possible_gases)
if(!picked_gas) if(!picked_gas)
moles_of_gas = null moles_of_gas = null
to_chat(src, "<span class='notice'>You stopped expelling gas.</span>") to_chat(src, "<span class='notice'>You stopped expelling gas.</span>")

View File

@@ -338,7 +338,7 @@ GLOBAL_LIST_EMPTY(gas_sensors)
if(!ismultitool(I)) // Should never happen if(!ismultitool(I)) // Should never happen
return return
var/choice = input(user, "Configure what", "Configuration") in list("Inlet", "Outlet", "Sensors", "Cancel") var/choice = tgui_input_list(user, "Configure what", "Configuration", list("Inlet", "Outlet", "Sensors", "Cancel"))
if((!choice) || (choice == "Cancel") || !Adjacent(user)) if((!choice) || (choice == "Cancel") || !Adjacent(user))
return return

View File

@@ -451,8 +451,8 @@
else else
areaindex[tmpname] = 1 areaindex[tmpname] = 1
L[tmpname] = R L[tmpname] = R
var/desc = input("Please select a location to lock in.", "Syndicate Teleporter") in L var/desc = tgui_input_list(usr, "Please select a location to lock in.", "Syndicate Teleporter", L)
return(L[desc]) return L[desc]
/obj/machinery/computer/syndicate_depot/teleporter/proc/update_portal() /obj/machinery/computer/syndicate_depot/teleporter/proc/update_portal()
if(portal_enabled && !myportal) if(portal_enabled && !myportal)

View File

@@ -99,24 +99,23 @@
borg.cmd_show_laws() borg.cmd_show_laws()
borg.throw_alert("newlaw", /obj/screen/alert/newlaw) borg.throw_alert("newlaw", /obj/screen/alert/newlaw)
/obj/machinery/computer/aiupload/attack_hand(mob/user as mob) /obj/machinery/computer/aiupload/attack_hand(mob/user)
if(src.stat & NOPOWER) if(stat & NOPOWER)
to_chat(usr, "The upload computer has no power!") to_chat(user, "<span class='warning'>The upload computer has no power!</span>")
return return
if(src.stat & BROKEN) if(stat & BROKEN)
to_chat(usr, "The upload computer is broken!") to_chat(user, "<span class='warning'>The upload computer is broken!</span>")
return return
src.current = select_active_ai(user) current = select_active_ai(user)
if(!src.current) if(!current)
to_chat(usr, "No active AIs detected.") to_chat(user, "<span class='warning'>No active AIs detected.</span>")
else return
to_chat(usr, "[src.current.name] selected for law changes.") to_chat(user, "<span class='notice'>[current.name] selected for law changes.</span>")
return
/obj/machinery/computer/aiupload/attack_ghost(user as mob) /obj/machinery/computer/aiupload/attack_ghost(user)
return 1 return TRUE
#undef AIUPLOAD_EMAG_COOLDOWN #undef AIUPLOAD_EMAG_COOLDOWN
@@ -129,11 +128,10 @@
circuit = /obj/item/circuitboard/borgupload circuit = /obj/item/circuitboard/borgupload
var/mob/living/silicon/robot/current = null var/mob/living/silicon/robot/current = null
/obj/machinery/computer/borgupload/attackby(obj/item/aiModule/module, mob/user, params)
/obj/machinery/computer/borgupload/attackby(obj/item/aiModule/module as obj, mob/user as mob, params)
if(istype(module, /obj/item/aiModule)) if(istype(module, /obj/item/aiModule))
if(!current)//no borg selected if(!current)//no borg selected
to_chat(user, "<span class='danger'>No borg selected. Please chose a target before proceeding with upload.") to_chat(user, "<span class='danger'>No borg selected. Please chose a target before proceeding with upload.</span>")
return return
var/turf/T = get_turf(current) var/turf/T = get_turf(current)
if(!atoms_share_level(T, src)) if(!atoms_share_level(T, src))
@@ -144,21 +142,20 @@
return ..() return ..()
/obj/machinery/computer/borgupload/attack_hand(mob/user as mob) /obj/machinery/computer/borgupload/attack_hand(mob/user)
if(src.stat & NOPOWER) if(stat & NOPOWER)
to_chat(usr, "The upload computer has no power!") to_chat(user, "<span class='warning'>The upload computer has no power!</span>")
return return
if(src.stat & BROKEN) if(stat & BROKEN)
to_chat(usr, "The upload computer is broken!") to_chat(user, "<span class='warning'>The upload computer is broken!</span>")
return return
src.current = freeborg() current = freeborg(user)
if(!src.current) if(!current)
to_chat(usr, "No free cyborgs detected.") to_chat(user, "<span class='warning'>No free cyborgs detected.</span>")
else return
to_chat(usr, "[src.current.name] selected for law changes.") to_chat(user, "<span class='notice'>[current.name] selected for law changes.</span>")
return
/obj/machinery/computer/borgupload/attack_ghost(user as mob) /obj/machinery/computer/borgupload/attack_ghost(user)
return 1 return TRUE

View File

@@ -299,10 +299,10 @@
if(auth) linkedServer.active = !linkedServer.active if(auth) linkedServer.active = !linkedServer.active
//Find a server //Find a server
if(href_list["find"]) if(href_list["find"])
if(GLOB.message_servers && GLOB.message_servers.len > 1) if(GLOB.message_servers && length(GLOB.message_servers) > 1)
src.linkedServer = input(usr,"Please select a server.", "Select a server.", null) as null|anything in GLOB.message_servers linkedServer = input(usr, "Please select a server.", "Select a server.", GLOB.message_servers)
message = "<span class='alert'>NOTICE: Server selected.</span>" message = "<span class='alert'>NOTICE: Server selected.</span>"
else if(GLOB.message_servers && GLOB.message_servers.len > 0) else if(GLOB.message_servers && length(GLOB.message_servers) > 0)
linkedServer = GLOB.message_servers[1] linkedServer = GLOB.message_servers[1]
message = "<span class='notice'>NOTICE: Only Single Server Detected - Server selected.</span>" message = "<span class='notice'>NOTICE: Only Single Server Detected - Server selected.</span>"
else else
@@ -415,7 +415,7 @@
continue continue
sendPDAs += P sendPDAs += P
if(GLOB.PDAs && GLOB.PDAs.len > 0) if(GLOB.PDAs && GLOB.PDAs.len > 0)
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortAtom(sendPDAs) customrecepient = tgui_input_list(usr, "Select a PDA from the list.", buttons = sortAtom(sendPDAs))
else else
customrecepient = null customrecepient = null

View File

@@ -249,7 +249,7 @@
var/mob/living/silicon/robot/R = locateUID(params["uid"]) var/mob/living/silicon/robot/R = locateUID(params["uid"])
if(!can_hack(usr, R)) if(!can_hack(usr, R))
return return
var/choice = input("Really hack [R.name]? This cannot be undone.") in list("Yes", "No") var/choice = alert(usr, "Really hack [R.name]? This cannot be undone.", "Do you want to hack this borg?", "Yes", "No")
if(choice != "Yes") if(choice != "Yes")
return return
log_game("[key_name(usr)] emagged [key_name(R)] using robotic console!") log_game("[key_name(usr)] emagged [key_name(R)] using robotic console!")

View File

@@ -146,7 +146,7 @@
var/list/available = list() var/list/available = list()
for(var/datum/track/S in songs) for(var/datum/track/S in songs)
available[S.song_name] = S available[S.song_name] = S
var/selected = input(usr, "Choose your song", "Track:") as null|anything in available var/selected = tgui_input_list(usr, "Select a new track", "Track:", available)
if(QDELETED(src) || !selected || !istype(available[selected], /datum/track)) if(QDELETED(src) || !selected || !istype(available[selected], /datum/track))
return return
selection = available[selected] selection = available[selected]

View File

@@ -107,7 +107,6 @@
if(patient) if(patient)
temp = "<br />\[Occupant: [patient] ([patient.stat > 1 ? "*DECEASED*" : "Health: [patient.health]%"])\]<br /><a href='?src=[UID()];view_stats=1'>View stats</a>|<a href='?src=[UID()];eject=1'>Eject</a>" temp = "<br />\[Occupant: [patient] ([patient.stat > 1 ? "*DECEASED*" : "Health: [patient.health]%"])\]<br /><a href='?src=[UID()];view_stats=1'>View stats</a>|<a href='?src=[UID()];eject=1'>Eject</a>"
return "[output] [temp]" return "[output] [temp]"
return
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Topic(href,href_list) /obj/item/mecha_parts/mecha_equipment/medical/sleeper/Topic(href,href_list)
..() ..()

View File

@@ -13,7 +13,7 @@
. = ..() . = ..()
if(can_buckle && has_buckled_mobs()) if(can_buckle && has_buckled_mobs())
if(length(buckled_mobs) > 1) if(length(buckled_mobs) > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?", "Unbuckle Who?", buckled_mobs)
if(user_unbuckle_mob(unbuckled,user)) if(user_unbuckle_mob(unbuckled,user))
return TRUE return TRUE
else else
@@ -33,8 +33,8 @@
. = ..() . = ..()
if(can_buckle && has_buckled_mobs() && Adjacent(user)) // attack_robot is called on all ranges, so the Adjacent check is needed if(can_buckle && has_buckled_mobs() && Adjacent(user)) // attack_robot is called on all ranges, so the Adjacent check is needed
if(length(buckled_mobs) > 1) if(length(buckled_mobs) > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?", "Unbuckle Who?", buckled_mobs)
if(user_unbuckle_mob(unbuckled,user)) if(user_unbuckle_mob(unbuckled, user))
return TRUE return TRUE
else else
if(user_unbuckle_mob(buckled_mobs[1], user)) if(user_unbuckle_mob(buckled_mobs[1], user))

View File

@@ -306,8 +306,8 @@
..() ..()
update_icon() update_icon()
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user as mob) /obj/item/toy/crayon/spraycan/attack_self(mob/living/user)
var/choice = input(user,"Spraycan options") in list("Toggle Cap","Change Drawing","Change Color") var/choice = tgui_input_list(user, "Do you want to...", "Spraycan Options", list("Toggle Cap","Change Drawing", "Change Color"))
switch(choice) switch(choice)
if("Toggle Cap") if("Toggle Cap")
to_chat(user, "<span class='notice'>You [capped ? "remove" : "replace"] the cap of [src].</span>") to_chat(user, "<span class='notice'>You [capped ? "remove" : "replace"] the cap of [src].</span>")

View File

@@ -234,10 +234,11 @@
var/list/show_flag = list("EXIT" = null) + sortList(flag) var/list/show_flag = list("EXIT" = null) + sortList(flag)
var/input_flag = input(user, "Choose a flag to disguise as.", "Choose a flag.") in show_flag var/input_flag = tgui_input_list(user, "Choose a flag to disguise this as.", "Choose a flag.", show_flag)
if(!input_flag)
if(user && (src in user.contents)) return
if(user && (src in user.GetAllContents()))
var/obj/item/flag/chosen_flag = flag[input_flag] var/obj/item/flag/chosen_flag = flag[input_flag]
if(chosen_flag && !used) if(chosen_flag && !used)

View File

@@ -389,7 +389,7 @@
if("Show") if("Show")
return ..() return ..()
if("Edit") if("Edit")
switch(input(user,"What would you like to edit on \the [src]?") in list("Name", "Photo", "Appearance", "Sex", "Age", "Occupation", "Money Account", "Blood Type", "DNA Hash", "Fingerprint Hash", "Reset Access", "Delete Card Information")) switch(input(user, "What would you like to edit on \the [src]?", "Agent ID", list("Name", "Photo", "Appearance", "Sex", "Age", "Occupation", "Money Account", "Blood Type", "DNA Hash", "Fingerprint Hash", "Reset Access", "Delete Card Information")))
if("Name") if("Name")
var/new_name = reject_bad_name(input(user,"What name would you like to put on this card?","Agent Card Name", ishuman(user) ? user.real_name : user.name), TRUE) var/new_name = reject_bad_name(input(user,"What name would you like to put on this card?","Agent Card Name", ishuman(user) ? user.real_name : user.name), TRUE)
if(!Adjacent(user)) if(!Adjacent(user))
@@ -413,7 +413,7 @@
RebuildHTML() RebuildHTML()
if("Appearance") if("Appearance")
var/list/appearances = list( var/static/list/appearances = list(
"data", "data",
"id", "id",
"gold", "gold",
@@ -464,7 +464,7 @@
"ERT_janitorial", "ERT_janitorial",
"ERT_paranormal", "ERT_paranormal",
) )
var/choice = input(user, "Select the appearance for this card.", "Agent Card Appearance") in appearances var/choice = tgui_input_list(user, "Select the appearance for this card.", "Agent Card Appearance", appearances)
if(!Adjacent(user)) if(!Adjacent(user))
return return
if(!choice) if(!choice)
@@ -508,7 +508,7 @@
RebuildHTML() RebuildHTML()
if("Occupation") if("Occupation")
var/list/departments = list( var/static/list/departments = list(
"Assistant" = null, "Assistant" = null,
"Engineering" = GLOB.engineering_positions, "Engineering" = GLOB.engineering_positions,
"Medical" = GLOB.medical_positions, "Medical" = GLOB.medical_positions,
@@ -520,13 +520,13 @@
"Custom" = null, "Custom" = null,
) )
var/department = input(user, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments var/department = tgui_input_list(user, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", departments)
var/new_job = "Assistant" var/new_job = "Assistant"
if(department == "Custom") if(department == "Custom")
new_job = sanitize(stripped_input(user,"Choose a custom job title:","Agent Card Occupation", "Assistant", MAX_MESSAGE_LEN)) new_job = sanitize(stripped_input(user,"Choose a custom job title:","Agent Card Occupation", "Assistant", MAX_MESSAGE_LEN))
else if(department != "Assistant" && !isnull(departments[department])) else if(department != "Assistant" && !isnull(departments[department]))
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments[department] new_job = tgui_input_list(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", departments[department])
if(!Adjacent(user)) if(!Adjacent(user))
return return

View File

@@ -62,14 +62,12 @@
/obj/item/sign/screwdriver_act(mob/living/user, obj/item/I) /obj/item/sign/screwdriver_act(mob/living/user, obj/item/I)
if(!isturf(user.loc)) // Why does this use user? This should just be loc. if(!isturf(user.loc)) // Why does this use user? This should just be loc.
return return
. = TRUE // These return values gotta be true or we stab the sign
var/direction = tgui_input_list(user, "Which direction will this sign be moved?", "Select direction,", list("North", "East", "South", "West", "Cancel"))
if(direction == "Cancel" || QDELETED(src))
return
var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel") var/obj/structure/sign/S = new(get_turf(user))
if(direction == "Cancel")
return TRUE // These gotta be true or we stab the sign
if(QDELETED(src))
return TRUE // Unsure about this, but stabbing something that doesnt exist seems like a bad idea
var/obj/structure/sign/S = new(user.loc) //This is really awkward to use user.loc
switch(direction) switch(direction)
if("North") if("North")
S.pixel_y = 32 S.pixel_y = 32
@@ -80,13 +78,12 @@
if("West") if("West")
S.pixel_x = -32 S.pixel_x = -32
else else
return TRUE // We dont want to stab it or place it, so we return return
S.name = name S.name = name
S.desc = desc S.desc = desc
S.icon_state = sign_state S.icon_state = sign_state
to_chat(user, "<span class='notice'>You fasten [S] with your [I].</span>") to_chat(user, "<span class='notice'>You fasten [S] with your [I].</span>")
qdel(src) qdel(src)
return TRUE
/obj/structure/sign/double/map /obj/structure/sign/double/map
name = "station map" name = "station map"

View File

@@ -27,7 +27,6 @@
return return
return ..() return ..()
/obj/structure/statue/welder_act(mob/user, obj/item/I) /obj/structure/statue/welder_act(mob/user, obj/item/I)
if(anchored) if(anchored)
return return
@@ -39,7 +38,6 @@
WELDER_SLICING_SUCCESS_MESSAGE WELDER_SLICING_SUCCESS_MESSAGE
deconstruct(TRUE) deconstruct(TRUE)
/obj/structure/statue/attack_hand(mob/living/user) /obj/structure/statue/attack_hand(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE) user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user) add_fingerprint(user)

View File

@@ -161,7 +161,9 @@
anchored = TRUE anchored = TRUE
if("Rotate") if("Rotate")
var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST) var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST)
var/selected = input(user,"Select a direction for the connector.", "Connector Direction") in dir_choices var/selected = tgui_input_list(user, "Select a direction for the connector.", "Connector Direction", dir_choices)
if(!selected)
return
dir = dir_choices[selected] dir = dir_choices[selected]
update_icon() //is this necessary? probably not update_icon() //is this necessary? probably not
@@ -572,7 +574,9 @@
anchored = TRUE anchored = TRUE
if("Rotate") if("Rotate")
var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST) var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST)
var/selected = input(user, "Select a direction for the connector.", "Connector Direction") in dir_choices var/selected = tgui_input_list(user, "Select a direction for the connector.", "Connector Direction", dir_choices)
if(!selected)
return
dir = dir_choices[selected] dir = dir_choices[selected]
update_icon() //is this necessary? probably not update_icon() //is this necessary? probably not

View File

@@ -125,8 +125,8 @@
poll_icon = image(icon = 'icons/mob/robots.dmi', icon_state = "syndi-engi-preview") poll_icon = image(icon = 'icons/mob/robots.dmi', icon_state = "syndi-engi-preview")
/obj/item/antag_spawner/nuke_ops/borg_tele/before_candidate_search(mob/user) /obj/item/antag_spawner/nuke_ops/borg_tele/before_candidate_search(mob/user)
var/switch_roles_choice = input("Would you like to continue playing as an operative or take over as the cyborg? If you play as the cyborg, another player will control your old self.", "Play As") as null|anything in list("Nuclear Operative", "Syndicate Cyborg") var/switch_roles_choice = tgui_input_list(user, "Would you like to continue playing as an operative or take over as the cyborg? If you play as the cyborg, another player will control your old self.", "Play As", list("Nuclear Operative", "Syndicate Cyborg", "Don't activate this Cyborg Teleporter"))
if(!switch_roles_choice || !(check_usability(user))) if(!switch_roles_choice || !(check_usability(user)) || switch_roles_choice == "Don't activate this Cyborg Teleporter")
return FALSE return FALSE
if(switch_roles_choice == "Syndicate Cyborg") if(switch_roles_choice == "Syndicate Cyborg")

View File

@@ -288,7 +288,7 @@
for(var/mob/living/carbon/human/H as anything in targets) for(var/mob/living/carbon/human/H as anything in targets)
targets_by_name[H.real_name] = H targets_by_name[H.real_name] = H
var/target_name = input(user, "Person to Locate", "Blood Stench") in targets_by_name var/target_name = tgui_input_list(user, "Person to Locate", "Blood Stench", targets_by_name)
if(!target_name) if(!target_name)
return return
var/mob/living/carbon/human/target = targets_by_name[target_name] var/mob/living/carbon/human/target = targets_by_name[target_name]

View File

@@ -140,7 +140,9 @@
to_chat(user, "<span class='notice'>Open the maintenance panel first.</span>") to_chat(user, "<span class='notice'>Open the maintenance panel first.</span>")
return return
var/list/choices = list("West" = WEST, "East" = EAST, "South" = SOUTH, "North" = NORTH) var/list/choices = list("West" = WEST, "East" = EAST, "South" = SOUTH, "North" = NORTH)
var/selected = input(user,"Select a direction for the connector.", "Connector Direction") in choices var/selected = tgui_input_list(user, "Select a direction for the connector.", "Connector Direction", choices)
if(!selected)
return
dir = choices[selected] dir = choices[selected]
var/node_connect = dir var/node_connect = dir
initialize_directions = dir initialize_directions = dir

View File

@@ -46,7 +46,7 @@
var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No") var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No")
if(ghost_role == "No") if(ghost_role == "No")
return return
if(!species_prompt()) if(!species_prompt(user))
return return
if(!loc || !uses && !permanent || QDELETED(src) || QDELETED(user)) if(!loc || !uses && !permanent || QDELETED(src) || QDELETED(user))
to_chat(user, "<span class='warning'>The [name] is no longer usable!</span>") to_chat(user, "<span class='warning'>The [name] is no longer usable!</span>")
@@ -219,9 +219,9 @@
mob_name = id_job mob_name = id_job
return ..() return ..()
/obj/effect/mob_spawn/human/species_prompt() /obj/effect/mob_spawn/human/species_prompt(mob/user)
if(allow_species_pick) if(allow_species_pick)
var/selected_species = input("Select a species", "Species Selection") as null|anything in pickable_species var/selected_species = tgui_input_list(user, "Select a species", "Species Selection", pickable_species)
if(!selected_species) if(!selected_species)
return TRUE // You didn't pick, so just continue on with the spawning process as a human return TRUE // You didn't pick, so just continue on with the spawning process as a human
var/datum/species/S = GLOB.all_species[selected_species] var/datum/species/S = GLOB.all_species[selected_species]

View File

@@ -313,14 +313,15 @@
return return
var/list/modes = list("Off", "Binary sensors", "Vitals tracker", "Tracking beacon") var/list/modes = list("Off", "Binary sensors", "Vitals tracker", "Tracking beacon")
var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes var/switchMode = tgui_input_list(user, "Select a sensor mode:", "Suit Sensor Mode", modes)
if(!user.Adjacent(src)) if(!user.Adjacent(src))
to_chat(user, "<span class='warning'>You have moved too far away!</span>") to_chat(user, "<span class='warning'>You have moved too far away!</span>")
return return
if(!ishuman(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) if(!ishuman(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
to_chat(user, "<span class='warning'>You can't use your hands!</span>") to_chat(user, "<span class='warning'>You can't use your hands!</span>")
return return
if(!switchMode)
return
sensor_mode = modes.Find(switchMode) - 1 sensor_mode = modes.Find(switchMode) - 1
if(loc == user) if(loc == user)

View File

@@ -27,7 +27,7 @@
for(var/i = 1; i <= GLOB.blob_nodes.len; i++) for(var/i = 1; i <= GLOB.blob_nodes.len; i++)
var/obj/structure/blob/node/B = GLOB.blob_nodes[i] var/obj/structure/blob/node/B = GLOB.blob_nodes[i]
nodes["Blob Node #[i] ([get_location_name(B)])"] = B nodes["Blob Node #[i] ([get_location_name(B)])"] = B
var/node_name = input(src, "Choose a node to jump to.", "Node Jump") in nodes var/node_name = tgui_input_list(src, "Choose a node to jump to.", "Node Jump", nodes)
var/obj/structure/blob/node/chosen_node = nodes[node_name] var/obj/structure/blob/node/chosen_node = nodes[node_name]
if(chosen_node) if(chosen_node)
src.loc = chosen_node.loc src.loc = chosen_node.loc
@@ -414,7 +414,6 @@
for(var/mob/living/simple_animal/hostile/blob_minion in blob_mobs) for(var/mob/living/simple_animal/hostile/blob_minion in blob_mobs)
if(blob_minion.stat == CONSCIOUS) if(blob_minion.stat == CONSCIOUS)
blob_minion.say(speak_text) blob_minion.say(speak_text)
return
/mob/camera/blob/verb/create_storage() /mob/camera/blob/verb/create_storage()
set category = "Blob" set category = "Blob"

View File

@@ -515,8 +515,8 @@
/obj/item/pizzabox/pizza_bomb/attackby(obj/item/I, mob/user, params) /obj/item/pizzabox/pizza_bomb/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wirecutters) && primed) if(istype(I, /obj/item/wirecutters) && primed)
to_chat(user, "<span class='danger'>Oh God, what wire do you cut?!</span>") to_chat(user, "<span class='danger'>Oh God, what wire do you cut?!</span>")
var/chosen_wire = input(user, "OH GOD OH GOD", "WHAT WIRE?!") in wires var/chosen_wire = tgui_input_list(user, "OH GOD OH GOD", "WHAT WIRE?!", wires)
if(!in_range(src, user) || issilicon(usr) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || user.restrained()) if(!in_range(src, user) || issilicon(usr) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || user.restrained() || !chosen_wire)
return return
playsound(src, I.usesound, 50, 1, 1) playsound(src, I.usesound, 50, 1, 1)
user.visible_message("<span class='warning'>[user] cuts the [chosen_wire] wire!</span>", "<span class='danger'>You cut the [chosen_wire] wire!</span>") user.visible_message("<span class='warning'>[user] cuts the [chosen_wire] wire!</span>", "<span class='danger'>You cut the [chosen_wire] wire!</span>")

View File

@@ -23,7 +23,7 @@
else else
var/obj/item/F = I var/obj/item/F = I
var/obj/item/food/snacks/customizable/C var/obj/item/food/snacks/customizable/C
C = input("Select food to make.", "Cooking", C) in food_choices C = tgui_input_list(user, "Select food to make.", "Cooking", food_choices)
if(!C) if(!C)
return return
else else

View File

@@ -123,7 +123,9 @@
areaindex[tmpname] = 1 areaindex[tmpname] = 1
L[tmpname] = R L[tmpname] = R
var/desc = input("Please select a location to target.", "Flare Target Interface") in L var/desc = tgui_input_list(user, "Please select a location to target.", "Flare Target Interface", L)
if(!desc)
return
destination = L[desc] destination = L[desc]
/obj/item/wormhole_jaunter/contractor/attack_self(mob/user) // message is later down /obj/item/wormhole_jaunter/contractor/attack_self(mob/user) // message is later down

View File

@@ -415,7 +415,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!isobserver(usr)) if(!isobserver(usr))
to_chat(usr, "Not when you're not dead!") to_chat(usr, "Not when you're not dead!")
return 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]) teleport(SSmapping.ghostteleportlocs[target])
/mob/dead/observer/proc/jump_to_ruin() /mob/dead/observer/proc/jump_to_ruin()

View File

@@ -1487,7 +1487,9 @@
return return
var/turf/origin = T 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") if(direction != "Here")
T = get_step(T,text2dir(direction)) T = get_step(T,text2dir(direction))
if(!istype(T)) if(!istype(T))

View File

@@ -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 name = "Set Default Language"
set category = "IC" set category = "IC"
var/language = tgui_input_list(src, "Your current default language is: [default_language]", "Set your default language", languages)
if(language) if(language)
to_chat(src, "<span class='notice'>You will now speak [language] if you do not specify a language when speaking.</span>") to_chat(src, "<span class='notice'>You will now speak [language] if you do not specify a language when speaking.</span>")
else else
@@ -9,14 +9,12 @@
default_language = language default_language = language
// Silicons can't neccessarily speak everything in their languages list // 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/silicon/set_default_language()
..() set name = "Set Default Language"
/mob/living/verb/check_default_language()
set name = "Check Default Language"
set category = "IC" set category = "IC"
var/language = tgui_input_list(src, "Your current default language is: [default_language]", "Set your default language", speech_synthesizer_langs)
if(default_language) if(language)
to_chat(src, "<span class='notice'>You are currently speaking [default_language] by default.</span>") to_chat(src, "<span class='notice'>You will now speak [language] if you do not specify a language when speaking.</span>")
else 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

View File

@@ -447,7 +447,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
//if(icon_state == initial(icon_state)) //if(icon_state == initial(icon_state))
var/icontype = "" 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 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) switch(icontype)
if("Custom") if("Custom")
@@ -968,7 +968,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
return return
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Friend Computer") 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()) if(check_unable())
return return

View File

@@ -29,18 +29,18 @@
// Copied over from paper's rename verb // Copied over from paper's rename verb
// see code\modules\paperwork\paper.dm line 62 // 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) if(!user || !paper)
return 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) if(!user || !paper)
return return
n_name = copytext(n_name, 1, 32) n_name = copytext(n_name, 1, 32)
if(( get_dist(user,paper) <= 1 && user.stat == 0)) if(get_dist(user, paper) > 1 || user.stat)
paper.name = "paper[(n_name ? "- '[n_name]'" : null)]" return
paper.name = "paper[(n_name ? "- '[n_name]'" : null)]"
add_fingerprint(user) add_fingerprint(user)
return
//TODO: Add prewritten forms to dispense when you work out a good way to store the strings. //TODO: Add prewritten forms to dispense when you work out a good way to store the strings.
/obj/item/form_printer /obj/item/form_printer

View File

@@ -337,7 +337,7 @@
set desc = "Sets a description which will be shown when someone examines you." set desc = "Sets a description which will be shown when someone examines you."
set category = "IC" 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() /mob/living/silicon/verb/set_flavor()
set name = "Set Flavour Text" set name = "Set Flavour Text"

View File

@@ -238,7 +238,7 @@
if(mode == BOT_IDLE || mode == BOT_DELIVER) if(mode == BOT_IDLE || mode == BOT_DELIVER)
start_home() start_home()
if("destination") 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) if(new_dest)
set_destination(new_dest) set_destination(new_dest)
if("setid") if("setid")
@@ -246,7 +246,7 @@
if(new_id) if(new_id)
set_suffix(new_id) set_suffix(new_id)
if("sethome") 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) if(new_home)
home_destination = new_home home_destination = new_home
if("unload") if("unload")
@@ -779,7 +779,7 @@
unload(0) unload(0)
if("target") 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) if(dest)
set_destination(dest) set_destination(dest)

View File

@@ -127,11 +127,11 @@
continue continue
choices += H choices += H
if(!choices.len) if(!length(choices))
to_chat(src, "<span class='warning'>No suitable diona nearby.</span>") to_chat(src, "<span class='warning'>No suitable diona nearby.</span>")
return FALSE 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 if(!M || !src || !(Adjacent(M)) || stat != CONSCIOUS) //input can take a while, so re-validate
return FALSE return FALSE
@@ -232,11 +232,11 @@
if(Adjacent(H) && H.dna && !(NO_BLOOD in H.dna.species.species_traits)) if(Adjacent(H) && H.dna && !(NO_BLOOD in H.dna.species.species_traits))
choices += H choices += H
if(!choices.len) if(!length(choices))
to_chat(src, "<span class='warning'>No suitable blood donors nearby.</span>") to_chat(src, "<span class='warning'>No suitable blood donors nearby.</span>")
return FALSE 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 if(!M || !src || !(Adjacent(M)) || stat != CONSCIOUS) //input can take a while, so re-validate
return FALSE return FALSE

View File

@@ -223,7 +223,7 @@
if(Adjacent(O)) if(Adjacent(O))
choices += O choices += O
if(length(choices)) 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 else
to_chat(src, "<span class='warning'>No suitable dead prey or wrappable objects found nearby.") to_chat(src, "<span class='warning'>No suitable dead prey or wrappable objects found nearby.")
return return

View File

@@ -241,8 +241,8 @@
if(Adjacent(O) && !O.anchored) if(Adjacent(O) && !O.anchored)
if(!istype(O, /obj/structure/spider)) if(!istype(O, /obj/structure/spider))
choices += O choices += O
if(choices.len) 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 Selection", choices)
else else
to_chat(src, "<span class='danger'>There is nothing nearby you can wrap.</span>") to_chat(src, "<span class='danger'>There is nothing nearby you can wrap.</span>")

View File

@@ -49,7 +49,7 @@
queeneggs_action.button.name = "Empress Eggs" queeneggs_action.button.name = "Empress Eggs"
/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/LayQueenEggs() /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) 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) if(eggtype == null || numlings == null)
to_chat(src, "<span class='danger'>Cancelled.</span>") to_chat(src, "<span class='danger'>Cancelled.</span>")

View File

@@ -48,10 +48,10 @@
eggtypes += TS_DESC_BLACK eggtypes += TS_DESC_BLACK
var/eggtype = pick(eggtypes) var/eggtype = pick(eggtypes)
if(client) 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)) if(!(eggtype in eggtypes))
to_chat(src, "<span class='danger'>Unrecognized egg type.</span>") to_chat(src, "<span class='danger'>Unrecognized egg type.</span>")
return 0 return FALSE
if(!isturf(loc)) 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. // 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>") to_chat(src, "<span class='danger'>Eggs can only be laid while standing on a floor.</span>")

View File

@@ -255,14 +255,14 @@
var/list/eggtypes = ListAvailableEggTypes() var/list/eggtypes = ListAvailableEggTypes()
var/list/eggtypes_uncapped = list(TS_DESC_RED, TS_DESC_GRAY, TS_DESC_GREEN) 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) if(canlay < 1)
// this was checked before input() but we have to check again to prevent them spam-clicking the popup. // 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>") to_chat(src, "<span class='danger'>Too soon to lay another egg.</span>")
return return
if(!(eggtype in eggtypes)) if(!(eggtype in eggtypes))
to_chat(src, "<span class='danger'>Unrecognized egg type.</span>") 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) // Multiple of eggtypes_uncapped can be laid at once. Other types must be laid one at a time (to prevent exploits)
var/numlings = 1 var/numlings = 1

View File

@@ -459,7 +459,7 @@ GLOBAL_LIST_EMPTY(ts_infected_list)
if(T.stat == DEAD) if(T.stat == DEAD)
continue continue
targets |= T // we use |= instead of += to avoid adding src to the list twice 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)) if(istype(L))
reset_perspective(L) reset_perspective(L)

View File

@@ -29,12 +29,12 @@
if(C!=src && Adjacent(C)) if(C!=src && Adjacent(C))
choices += 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) if(!M)
return 0 return FALSE
if(CanFeedon(M)) if(CanFeedon(M))
Feedon(M) Feedon(M)
return 1 return TRUE
/datum/action/innate/slime/feed /datum/action/innate/slime/feed
name = "Feed" name = "Feed"

View File

@@ -885,7 +885,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
var/eye_name = null var/eye_name = null
var/ok = "[is_admin ? "Admin Observe" : "Observe"]" 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) if(!eye_name)
return return

View File

@@ -41,7 +41,7 @@
/obj/item/photo/attackby(obj/item/P as obj, mob/user as mob, params) /obj/item/photo/attackby(obj/item/P as obj, mob/user as mob, params)
if(is_pen(P) || istype(P, /obj/item/toy/crayon)) if(is_pen(P) || istype(P, /obj/item/toy/crayon))
var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text) var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text)
txt = copytext(txt, 1, 128) txt = copytext(txt, 1, 128)
if(loc == user && user.stat == 0) if(loc == user && user.stat == 0)
scribble = txt scribble = txt

View File

@@ -14,7 +14,7 @@
teleport_target = null teleport_target = null
return ..() return ..()
/obj/item/gun/energy/telegun/attack_self(mob/living/user as mob) /obj/item/gun/energy/telegun/attack_self(mob/living/user)
var/list/L = list() var/list/L = list()
var/list/areaindex = list() var/list/areaindex = list()
@@ -34,7 +34,9 @@
areaindex[tmpname] = 1 areaindex[tmpname] = 1
L[tmpname] = R L[tmpname] = R
var/desc = input("Please select a location to lock in.", "Telegun Target Interface") in L var/desc = tgui_input_list(user, "Please select a location to lock in.", "Telegun Target Selection", L)
if(!desc)
return
teleport_target = L[desc] teleport_target = L[desc]
to_chat(user, "<span class='notice'>The [src] is now set to [desc].</span>") to_chat(user, "<span class='notice'>The [src] is now set to [desc].</span>")
//Process the shot without draining the cell //Process the shot without draining the cell

View File

@@ -133,7 +133,7 @@
/obj/item/gun/throw/crossbow/AltClick(mob/user) /obj/item/gun/throw/crossbow/AltClick(mob/user)
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user)) if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
return return
var/choice = input("Select tension to draw to:", "[src]", XBOW_TENSION_FULL) as null|anything in possible_tensions var/choice = tgui_input_list(user, "Select tension to draw to:", "[src]", possible_tensions)
if(!choice) if(!choice)
return return

View File

@@ -18,11 +18,7 @@
/obj/item/reagent_containers/AltClick(mob/user) /obj/item/reagent_containers/AltClick(mob/user)
if(!Adjacent(user) || !length(possible_transfer_amounts) || !ishuman(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) if(!Adjacent(user) || !length(possible_transfer_amounts) || !ishuman(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return return
var/new_transfer_rate = tgui_input_list(user, "Amount per transfer from this:", "[src]", possible_transfer_amounts)
var/default = null
if(amount_per_transfer_from_this in possible_transfer_amounts)
default = amount_per_transfer_from_this
var/new_transfer_rate = input("Amount per transfer from this:", "[src]", default) as null|anything in possible_transfer_amounts
if(!new_transfer_rate) if(!new_transfer_rate)
return return

View File

@@ -301,7 +301,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
break break
if(!pointless) if(!pointless)
var/choice = input("This item does not raise tech levels. Proceed destroying loaded item anyway?") in list("Proceed", "Cancel") var/choice = alert(user, "This item does not raise tech levels. Proceed destroying loaded item anyway?", "Are you sure you want to destroy this item?", "Proceed", "Cancel")
if(choice == "Cancel" || !linked_destroy) if(choice == "Cancel" || !linked_destroy)
return return

View File

@@ -33,7 +33,9 @@
/obj/item/assault_pod/attack_self(mob/living/user) /obj/item/assault_pod/attack_self(mob/living/user)
var/target_area var/target_area
target_area = input("Area to land", "Select a Landing Zone", target_area) in SSmapping.teleportlocs target_area = tgui_input_list(user, "Area to land", "Select a Landing Zone", SSmapping.teleportlocs)
if(!target_area)
return
var/area/picked_area = SSmapping.teleportlocs[target_area] var/area/picked_area = SSmapping.teleportlocs[target_area]
if(!src || QDELETED(src)) if(!src || QDELETED(src))
return return