Files
Paradise/code/datums/spell_targeting/remoteview_targeting.dm
Aylong 825c2c8866 Converts Input List to TGUI Input Lists (#23396)
* Part 1

* Testing 1

* Revert "Testing 1"

This reverts commit fc06554b28.

* Part 1.1

* Part 2 - UI Style List

* Preferences lists

* Preferences lists - DONE

* More inputs

* MOOOOOORE

* UI style else

* Last ones

* Double name fix

* Pre-selected Search

* Return Pick Darkness

* Return Pick Darkness

* Missing users

* Some review changes

* Revert MULE lists

* I just hate MERGE CONFLICT label

* List window tweaks

* I think there it is

* why i am stopid

* Update tgui.bundle.js
2023-12-10 19:38:23 +00:00

25 lines
745 B
Plaintext

/**
* A spell targeting system which will return one user picked target from all alive mobs who have the remoteview block but do not have the psyresist block active.
*/
/datum/spell_targeting/remoteview
/datum/spell_targeting/remoteview/choose_targets(mob/user, obj/effect/proc_holder/spell/spell, params, atom/clicked_atom)
var/list/remoteviewers = list()
for(var/mob/M in GLOB.alive_mob_list)
if(M == user)
continue
if(M.dna?.GetSEState(GLOB.psyresistblock))
continue
if(M.dna?.GetSEState(GLOB.remoteviewblock))
remoteviewers += M
if(!length(remoteviewers))
return
var/mob/target = tgui_input_list(user, "Choose the target to spy on", "Targeting", remoteviewers)
if(QDELETED(target))
return
return list(target)