mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-19 14:51:27 +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:
@@ -300,18 +300,18 @@
|
||||
/proc/ionnum()
|
||||
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.
|
||||
/proc/freeborg()
|
||||
// Selects an unlinked borg, used in the robot upload console
|
||||
/proc/freeborg(mob/user)
|
||||
var/select
|
||||
var/list/borgs = 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
|
||||
var/name = "[A.real_name] ([A.modtype] [A.braintype])"
|
||||
borgs[name] = A
|
||||
|
||||
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]
|
||||
|
||||
//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)
|
||||
var/list/ais = active_ais()
|
||||
if(length(ais))
|
||||
if(user) . = input(usr,"AI signals detected:", "AI selection") in ais
|
||||
else . = pick(ais)
|
||||
return .
|
||||
if(!length(ais))
|
||||
return
|
||||
if(user)
|
||||
return tgui_input_list(user, "AI signals detected:", "AI selection", ais)
|
||||
else
|
||||
return pick(ais)
|
||||
|
||||
/proc/get_sorted_mobs()
|
||||
var/list/old_list = getmobs()
|
||||
|
||||
@@ -428,7 +428,7 @@ Recharging stations are available in robotics, the dormitory bathrooms, and the
|
||||
var/mob/living/simple_animal/diona/D = nymphs[1]
|
||||
D.split(TRUE)
|
||||
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)
|
||||
D.split(TRUE)
|
||||
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
/obj/effect/proc_holder/spell/area_teleport/before_cast(list/targets, mob/user)
|
||||
..()
|
||||
selected_area = null // Reset it
|
||||
var/A
|
||||
var/area_name
|
||||
|
||||
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
|
||||
A = pick(SSmapping.teleportlocs)
|
||||
area_name = pick(SSmapping.teleportlocs)
|
||||
|
||||
if(!A)
|
||||
if(!area_name)
|
||||
smoke_type = SMOKE_NONE
|
||||
return
|
||||
|
||||
var/area/thearea = SSmapping.teleportlocs[A]
|
||||
var/area/thearea = SSmapping.teleportlocs[area_name]
|
||||
|
||||
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.")
|
||||
|
||||
@@ -750,13 +750,13 @@
|
||||
//Alt heads.
|
||||
if(head_organ.dna.species.bodyflags & HAS_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)
|
||||
M.change_alt_head(new_alt_head)
|
||||
|
||||
// hair
|
||||
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)
|
||||
@@ -774,7 +774,7 @@
|
||||
|
||||
// facial hair
|
||||
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)
|
||||
M.change_facial_hair(new_style)
|
||||
@@ -792,7 +792,7 @@
|
||||
//Head accessory.
|
||||
if(head_organ.dna.species.bodyflags & HAS_HEAD_ACCESSORY)
|
||||
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)
|
||||
M.change_head_accessory(new_head_accessory)
|
||||
|
||||
@@ -804,8 +804,8 @@
|
||||
//Body accessory.
|
||||
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()
|
||||
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.
|
||||
var/new_body_accessory = input("Please select body accessory style", "Character Generation", M.body_accessory) as null|anything in valid_body_accessories
|
||||
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 = tgui_input_list(user, "Please select body accessory style", "Character Generation", valid_body_accessories)
|
||||
if(new_body_accessory)
|
||||
M.change_body_accessory(new_body_accessory)
|
||||
|
||||
@@ -813,7 +813,7 @@
|
||||
//Head markings.
|
||||
if(M.dna.species.bodyflags & HAS_HEAD_MARKINGS)
|
||||
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)
|
||||
M.change_markings(new_marking, "head")
|
||||
|
||||
@@ -824,7 +824,7 @@
|
||||
//Body markings.
|
||||
if(M.dna.species.bodyflags & HAS_BODY_MARKINGS)
|
||||
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)
|
||||
M.change_markings(new_marking, "body")
|
||||
|
||||
@@ -834,7 +834,7 @@
|
||||
//Tail markings.
|
||||
if(M.dna.species.bodyflags & HAS_TAIL_MARKINGS)
|
||||
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)
|
||||
M.change_markings(new_marking, "tail")
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
if(!target || !iscarbon(owner))
|
||||
return
|
||||
var/obj/machinery/abductor/console/console = target
|
||||
console.SelectDisguise(remote=1)
|
||||
console.SelectDisguise(TRUE, usr)
|
||||
|
||||
/datum/action/innate/set_droppoint
|
||||
name = "Set Experiment Release Point"
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
if(vest)
|
||||
vest.toggle_nodrop()
|
||||
else if(href_list["select_disguise"])
|
||||
SelectDisguise()
|
||||
SelectDisguise(FALSE, usr)
|
||||
else if(href_list["dispense"])
|
||||
switch(href_list["dispense"])
|
||||
if("baton")
|
||||
@@ -149,10 +149,10 @@
|
||||
if(vest)
|
||||
vest.flip_mode()
|
||||
|
||||
/obj/machinery/abductor/console/proc/SelectDisguise(remote = 0)
|
||||
var/entry_name = input( "Choose Disguise", "Disguise") as null|anything in disguises
|
||||
/obj/machinery/abductor/console/proc/SelectDisguise(remote, mob/user)
|
||||
var/entry_name = tgui_input_list(user, "Choose Disguise", "Abductor Disguises", disguises)
|
||||
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)
|
||||
|
||||
/obj/machinery/abductor/console/proc/SetDroppoint(turf/location,user)
|
||||
@@ -164,9 +164,7 @@
|
||||
pad.teleport_target = location
|
||||
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.
|
||||
|
||||
for(var/obj/machinery/abductor/pad/p in GLOB.abductor_equipment)
|
||||
if(p.team == team)
|
||||
pad = p
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
picked_random_type = pick(possible_guardians)
|
||||
guardian_type = picked_random_type
|
||||
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)
|
||||
to_chat(user, "<span class='warning'>You decide against using the [name].</span>")
|
||||
used = FALSE
|
||||
|
||||
@@ -149,12 +149,11 @@
|
||||
to_chat(guardian_user, "<span class='notice'>Surveillance trap deployed!</span>")
|
||||
return TRUE
|
||||
else
|
||||
to_chat(guardian_user, "<span class='notice'>You have too many traps deployed. Delete one to place another.</span>")
|
||||
var/picked_snare = input(guardian_user, "Pick which trap to disarm", "Disarm Trap") as null|anything in guardian_user.snares
|
||||
var/picked_snare = tgui_input_list(guardian_user, "You have too many snares deployed! Delete one to place another.", "Disarm Snare", guardian_user.snares)
|
||||
if(picked_snare)
|
||||
guardian_user.snares -= 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()
|
||||
|
||||
/obj/effect/proc_holder/spell/choose_battlecry
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
target_turf.air_update_turf()
|
||||
|
||||
/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)
|
||||
moles_of_gas = null
|
||||
to_chat(src, "<span class='notice'>You stopped expelling gas.</span>")
|
||||
|
||||
@@ -338,7 +338,7 @@ GLOBAL_LIST_EMPTY(gas_sensors)
|
||||
if(!ismultitool(I)) // Should never happen
|
||||
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))
|
||||
return
|
||||
|
||||
|
||||
@@ -451,8 +451,8 @@
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
var/desc = input("Please select a location to lock in.", "Syndicate Teleporter") in L
|
||||
return(L[desc])
|
||||
var/desc = tgui_input_list(usr, "Please select a location to lock in.", "Syndicate Teleporter", L)
|
||||
return L[desc]
|
||||
|
||||
/obj/machinery/computer/syndicate_depot/teleporter/proc/update_portal()
|
||||
if(portal_enabled && !myportal)
|
||||
|
||||
@@ -99,24 +99,23 @@
|
||||
borg.cmd_show_laws()
|
||||
borg.throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
|
||||
/obj/machinery/computer/aiupload/attack_hand(mob/user as mob)
|
||||
if(src.stat & NOPOWER)
|
||||
to_chat(usr, "The upload computer has no power!")
|
||||
/obj/machinery/computer/aiupload/attack_hand(mob/user)
|
||||
if(stat & NOPOWER)
|
||||
to_chat(user, "<span class='warning'>The upload computer has no power!</span>")
|
||||
return
|
||||
if(src.stat & BROKEN)
|
||||
to_chat(usr, "The upload computer is broken!")
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>The upload computer is broken!</span>")
|
||||
return
|
||||
|
||||
src.current = select_active_ai(user)
|
||||
current = select_active_ai(user)
|
||||
|
||||
if(!src.current)
|
||||
to_chat(usr, "No active AIs detected.")
|
||||
else
|
||||
to_chat(usr, "[src.current.name] selected for law changes.")
|
||||
if(!current)
|
||||
to_chat(user, "<span class='warning'>No active AIs detected.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>[current.name] selected for law changes.</span>")
|
||||
|
||||
/obj/machinery/computer/aiupload/attack_ghost(user as mob)
|
||||
return 1
|
||||
/obj/machinery/computer/aiupload/attack_ghost(user)
|
||||
return TRUE
|
||||
|
||||
#undef AIUPLOAD_EMAG_COOLDOWN
|
||||
|
||||
@@ -129,11 +128,10 @@
|
||||
circuit = /obj/item/circuitboard/borgupload
|
||||
var/mob/living/silicon/robot/current = null
|
||||
|
||||
|
||||
/obj/machinery/computer/borgupload/attackby(obj/item/aiModule/module as obj, mob/user as mob, params)
|
||||
/obj/machinery/computer/borgupload/attackby(obj/item/aiModule/module, mob/user, params)
|
||||
if(istype(module, /obj/item/aiModule))
|
||||
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
|
||||
var/turf/T = get_turf(current)
|
||||
if(!atoms_share_level(T, src))
|
||||
@@ -144,21 +142,20 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/computer/borgupload/attack_hand(mob/user as mob)
|
||||
if(src.stat & NOPOWER)
|
||||
to_chat(usr, "The upload computer has no power!")
|
||||
/obj/machinery/computer/borgupload/attack_hand(mob/user)
|
||||
if(stat & NOPOWER)
|
||||
to_chat(user, "<span class='warning'>The upload computer has no power!</span>")
|
||||
return
|
||||
if(src.stat & BROKEN)
|
||||
to_chat(usr, "The upload computer is broken!")
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>The upload computer is broken!</span>")
|
||||
return
|
||||
|
||||
src.current = freeborg()
|
||||
current = freeborg(user)
|
||||
|
||||
if(!src.current)
|
||||
to_chat(usr, "No free cyborgs detected.")
|
||||
else
|
||||
to_chat(usr, "[src.current.name] selected for law changes.")
|
||||
if(!current)
|
||||
to_chat(user, "<span class='warning'>No free cyborgs detected.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>[current.name] selected for law changes.</span>")
|
||||
|
||||
/obj/machinery/computer/borgupload/attack_ghost(user as mob)
|
||||
return 1
|
||||
/obj/machinery/computer/borgupload/attack_ghost(user)
|
||||
return TRUE
|
||||
|
||||
@@ -299,10 +299,10 @@
|
||||
if(auth) linkedServer.active = !linkedServer.active
|
||||
//Find a server
|
||||
if(href_list["find"])
|
||||
if(GLOB.message_servers && GLOB.message_servers.len > 1)
|
||||
src.linkedServer = input(usr,"Please select a server.", "Select a server.", null) as null|anything in GLOB.message_servers
|
||||
if(GLOB.message_servers && length(GLOB.message_servers) > 1)
|
||||
linkedServer = input(usr, "Please select a server.", "Select a server.", GLOB.message_servers)
|
||||
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]
|
||||
message = "<span class='notice'>NOTICE: Only Single Server Detected - Server selected.</span>"
|
||||
else
|
||||
@@ -415,7 +415,7 @@
|
||||
continue
|
||||
sendPDAs += P
|
||||
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
|
||||
customrecepient = null
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
var/mob/living/silicon/robot/R = locateUID(params["uid"])
|
||||
if(!can_hack(usr, R))
|
||||
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")
|
||||
return
|
||||
log_game("[key_name(usr)] emagged [key_name(R)] using robotic console!")
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
var/list/available = list()
|
||||
for(var/datum/track/S in songs)
|
||||
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))
|
||||
return
|
||||
selection = available[selected]
|
||||
|
||||
@@ -107,7 +107,6 @@
|
||||
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>"
|
||||
return "[output] [temp]"
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Topic(href,href_list)
|
||||
..()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
. = ..()
|
||||
if(can_buckle && has_buckled_mobs())
|
||||
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))
|
||||
return TRUE
|
||||
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(length(buckled_mobs) > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
|
||||
if(user_unbuckle_mob(unbuckled,user))
|
||||
var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?", "Unbuckle Who?", buckled_mobs)
|
||||
if(user_unbuckle_mob(unbuckled, user))
|
||||
return TRUE
|
||||
else
|
||||
if(user_unbuckle_mob(buckled_mobs[1], user))
|
||||
|
||||
@@ -306,8 +306,8 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user as mob)
|
||||
var/choice = input(user,"Spraycan options") in list("Toggle Cap","Change Drawing","Change Color")
|
||||
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user)
|
||||
var/choice = tgui_input_list(user, "Do you want to...", "Spraycan Options", list("Toggle Cap","Change Drawing", "Change Color"))
|
||||
switch(choice)
|
||||
if("Toggle Cap")
|
||||
to_chat(user, "<span class='notice'>You [capped ? "remove" : "replace"] the cap of [src].</span>")
|
||||
|
||||
@@ -234,10 +234,11 @@
|
||||
|
||||
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
|
||||
|
||||
if(user && (src in user.contents))
|
||||
var/input_flag = tgui_input_list(user, "Choose a flag to disguise this as.", "Choose a flag.", show_flag)
|
||||
if(!input_flag)
|
||||
return
|
||||
|
||||
if(user && (src in user.GetAllContents()))
|
||||
var/obj/item/flag/chosen_flag = flag[input_flag]
|
||||
|
||||
if(chosen_flag && !used)
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
if("Show")
|
||||
return ..()
|
||||
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")
|
||||
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))
|
||||
@@ -413,7 +413,7 @@
|
||||
RebuildHTML()
|
||||
|
||||
if("Appearance")
|
||||
var/list/appearances = list(
|
||||
var/static/list/appearances = list(
|
||||
"data",
|
||||
"id",
|
||||
"gold",
|
||||
@@ -464,7 +464,7 @@
|
||||
"ERT_janitorial",
|
||||
"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))
|
||||
return
|
||||
if(!choice)
|
||||
@@ -508,7 +508,7 @@
|
||||
RebuildHTML()
|
||||
|
||||
if("Occupation")
|
||||
var/list/departments = list(
|
||||
var/static/list/departments = list(
|
||||
"Assistant" = null,
|
||||
"Engineering" = GLOB.engineering_positions,
|
||||
"Medical" = GLOB.medical_positions,
|
||||
@@ -520,13 +520,13 @@
|
||||
"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"
|
||||
|
||||
if(department == "Custom")
|
||||
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]))
|
||||
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))
|
||||
return
|
||||
|
||||
@@ -62,14 +62,12 @@
|
||||
/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.
|
||||
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")
|
||||
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
|
||||
var/obj/structure/sign/S = new(get_turf(user))
|
||||
switch(direction)
|
||||
if("North")
|
||||
S.pixel_y = 32
|
||||
@@ -80,13 +78,12 @@
|
||||
if("West")
|
||||
S.pixel_x = -32
|
||||
else
|
||||
return TRUE // We dont want to stab it or place it, so we return
|
||||
return
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = sign_state
|
||||
to_chat(user, "<span class='notice'>You fasten [S] with your [I].</span>")
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/sign/double/map
|
||||
name = "station map"
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/statue/welder_act(mob/user, obj/item/I)
|
||||
if(anchored)
|
||||
return
|
||||
@@ -39,7 +38,6 @@
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
deconstruct(TRUE)
|
||||
|
||||
|
||||
/obj/structure/statue/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -161,7 +161,9 @@
|
||||
anchored = TRUE
|
||||
if("Rotate")
|
||||
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]
|
||||
update_icon() //is this necessary? probably not
|
||||
|
||||
@@ -572,7 +574,9 @@
|
||||
anchored = TRUE
|
||||
if("Rotate")
|
||||
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]
|
||||
update_icon() //is this necessary? probably not
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@
|
||||
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)
|
||||
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")
|
||||
if(!switch_roles_choice || !(check_usability(user)))
|
||||
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)) || switch_roles_choice == "Don't activate this Cyborg Teleporter")
|
||||
return FALSE
|
||||
|
||||
if(switch_roles_choice == "Syndicate Cyborg")
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
for(var/mob/living/carbon/human/H as anything in targets)
|
||||
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)
|
||||
return
|
||||
var/mob/living/carbon/human/target = targets_by_name[target_name]
|
||||
|
||||
@@ -140,7 +140,9 @@
|
||||
to_chat(user, "<span class='notice'>Open the maintenance panel first.</span>")
|
||||
return
|
||||
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]
|
||||
var/node_connect = dir
|
||||
initialize_directions = dir
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No")
|
||||
if(ghost_role == "No")
|
||||
return
|
||||
if(!species_prompt())
|
||||
if(!species_prompt(user))
|
||||
return
|
||||
if(!loc || !uses && !permanent || QDELETED(src) || QDELETED(user))
|
||||
to_chat(user, "<span class='warning'>The [name] is no longer usable!</span>")
|
||||
@@ -219,9 +219,9 @@
|
||||
mob_name = id_job
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/species_prompt()
|
||||
/obj/effect/mob_spawn/human/species_prompt(mob/user)
|
||||
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)
|
||||
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]
|
||||
|
||||
@@ -313,14 +313,15 @@
|
||||
return
|
||||
|
||||
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))
|
||||
to_chat(user, "<span class='warning'>You have moved too far away!</span>")
|
||||
return
|
||||
if(!ishuman(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
to_chat(user, "<span class='warning'>You can't use your hands!</span>")
|
||||
return
|
||||
|
||||
if(!switchMode)
|
||||
return
|
||||
sensor_mode = modes.Find(switchMode) - 1
|
||||
|
||||
if(loc == user)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
for(var/i = 1; i <= GLOB.blob_nodes.len; i++)
|
||||
var/obj/structure/blob/node/B = GLOB.blob_nodes[i]
|
||||
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]
|
||||
if(chosen_node)
|
||||
src.loc = chosen_node.loc
|
||||
@@ -414,7 +414,6 @@
|
||||
for(var/mob/living/simple_animal/hostile/blob_minion in blob_mobs)
|
||||
if(blob_minion.stat == CONSCIOUS)
|
||||
blob_minion.say(speak_text)
|
||||
return
|
||||
|
||||
/mob/camera/blob/verb/create_storage()
|
||||
set category = "Blob"
|
||||
|
||||
@@ -515,8 +515,8 @@
|
||||
/obj/item/pizzabox/pizza_bomb/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wirecutters) && primed)
|
||||
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
|
||||
if(!in_range(src, user) || issilicon(usr) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || user.restrained())
|
||||
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() || !chosen_wire)
|
||||
return
|
||||
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>")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
else
|
||||
var/obj/item/F = I
|
||||
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)
|
||||
return
|
||||
else
|
||||
|
||||
@@ -123,7 +123,9 @@
|
||||
areaindex[tmpname] = 1
|
||||
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]
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor/attack_self(mob/user) // message is later down
|
||||
|
||||
@@ -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))
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
teleport_target = null
|
||||
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/areaindex = list()
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
areaindex[tmpname] = 1
|
||||
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]
|
||||
to_chat(user, "<span class='notice'>The [src] is now set to [desc].</span>")
|
||||
//Process the shot without draining the cell
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
/obj/item/gun/throw/crossbow/AltClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
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)
|
||||
return
|
||||
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
/obj/item/reagent_containers/AltClick(mob/user)
|
||||
if(!Adjacent(user) || !length(possible_transfer_amounts) || !ishuman(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
|
||||
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
|
||||
var/new_transfer_rate = tgui_input_list(user, "Amount per transfer from this:", "[src]", possible_transfer_amounts)
|
||||
if(!new_transfer_rate)
|
||||
return
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
break
|
||||
|
||||
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)
|
||||
return
|
||||
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
|
||||
/obj/item/assault_pod/attack_self(mob/living/user)
|
||||
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]
|
||||
if(!src || QDELETED(src))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user